FORUMS: list search recent posts

Expression-driven layers behaving unpredictably

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Neil Hammers
Expression-driven layers behaving unpredictably
on Aug 3, 2016 at 7:10:48 pm

Hi,
Decided to add a top layer of controllers to the rig I was doing, but it does weird things.
The common position linking with toComp-fromComp expression:
ctrl = thisComp.layer("CTRL");
fromComp(ctrl.toComp(ctrl.anchorPoint));

does NOT snap position; does NOT lock position property - instead I can move the child layer, however it moves in mirrored directions; scaling goes all wrong as if anchorPoint is located somewhere out of composition.
Both the child and the controler (visible in UI) have anchors at default positions, and they are NOT parented, each have unique name too.
Restarted AFX(CC13.5) several times, and even rebooted the computer - no changes. Deleted all the other layers except those two (as if there might be some cycle) - still the same.
How on Earth? What might be wrong? How to fix?
ty
Nh


Return to posts index

Neil Hammers
Re: Expression-driven layers behaving unpredictably
on Aug 4, 2016 at 9:42:01 am
Last Edited By Neil Hammers on Aug 4, 2016 at 9:58:51 am

Opened the project file on another computer - same story. Replicated from scratch in a new project - same story. And guess what? - the cause of this seems to root from
fromComp
part, its like it stopped to work, suddenly. As soon as I remove it, the child object sticks to the controller, like it should. Still, I need them both to be parented, so this fromComp part is necessary. Anyone experienced this? Got a fix? ty
Nh

EDIT: the code with fromComp works neatly with effect points, like Corner Pin, yet I fail to constrain one layer to another. Am I missing some part of the concept?


Return to posts index

Dan Ebberts
Re: Expression-driven layers behaving unpredictably
on Aug 4, 2016 at 5:34:36 pm

Try it this way:


ctrl = thisComp.layer("CTRL");
if (hasParent)
parent.fromComp(ctrl.toComp(ctrl.anchorPoint))
else
ctrl.toComp(ctrl.anchorPoint);



Dan



Return to posts index


Neil Hammers
Re: Expression-driven layers behaving unpredictably
on Aug 5, 2016 at 12:38:11 pm

Dan, You are The Man! It [rainbow][glitter]WORKS[/glitter][/rainbow]! Have a faint clue why it was not working with previous script, but this works.. Can You tell me where to learn more, as the Adobe manual is way too scarce on this space transform magic?


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]