Creative Communities of the World Forums

The peer to peer support community for media production professionals.

  • Posted by David Baxter on December 12, 2010 at 1:31 pm

    Hi there, I’m fairly new to expressions and I’m having a problem due to not properly understanding the syntax.

    I need to use a null object slider to control the multiplication factor of a scale parameter, when I hooked it up it’s only scaling the x axis. I understand this is because it’s an array function but I can’t work out how to declare it properly.

    Can anybody correct this for me?

    This is the exp that works with just the X axis

    value+(20*thisComp.layer("Rig 2").effect("L - R")("Slider"))

    This is my attempt at declaring the same value for the X & Y scale axis.

    x = value+(20*thisComp.layer("Rig 2").effect("L - R")("Slider"));
    y = value+(20*thisComp.layer("Rig 2").effect("L - R")("Slider"));
    [x,y]

    Dan Ebberts replied 15 years, 5 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    December 13, 2010 at 5:11 am

    Try it this way:

    s = 20*thisComp.layer(“Rig 2”).effect(“L – R”)(“Slider”);
    value + [s,s]

    Dan

  • David Baxter

    December 13, 2010 at 6:05 pm

    Thanks Dan, that worked.

    How come [x,y] didn’t work though? Or was it the value plus when I declared the variable the issue?

  • Dan Ebberts

    December 13, 2010 at 8:26 pm

    You were adding a scalar (the slider) to an array (value) so you were only affecting the x part of value.

    Dan

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy