Skip navigation
Currently Being Moderated

Cancelling parent scaling in child

Jul 12, 2011 9:38 AM

Any tips on getting a child to cancel out the scaling of its parent?  The parent in this case scales X and Y differently, And I can't figure out how to anti-scale the child so it doesn't stretch.

 

On the child, I'm trying to do an inverse proportion. (But this obviously applies it to both X and Y the same). Not sure sure how to call specific X or Y scale.

 

 

s = thisComp.layer("Parent").transform.scale;

[(1/s)]

 

 

Is giving me a scalar error (?)

 
Replies
  • Currently Being Moderated
    Jul 12, 2011 10:34 AM   in reply to navparker@mac.com

    Try this:

     

    s = parent.transform.scale/100;
    [value[0]/s[0],value[1]/s[1]]

     

     

    Dan

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 26, 2011 9:33 AM   in reply to Dan Ebberts

    As always... brilliant! Thank you very much!

     

    I keep thinking variables can only store one number, not a set of numbers that can be selectively plucked out of a series.  Would the programmy term be plucking an element out of a matrix (or is it array?)

     

    If it was a 3D layer, it would be [value[0]/s[0],value[1]/s[1],value[2]/s[2]], right?

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 26, 2011 9:48 AM   in reply to Navarro Parker

    Yes, arrays, and yes on the 3D version.

     

    Dan

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points