In trying to rig this girl character I've had a strange behaviour come up. I could work around it easily enough but it's getting to me that there's something I'm not understanding. My level of experience with expressions is relatively low but I have some Javascript experience so the main principles are clear.
What's annoying me is that my procedure works fine in a simple scene created wholly in AE. However when I import a .psd file (using composition-retain layer sizes), the same approach becomes useless. I feel like I'm missing something about layer sizes in relation to comps or something, or come upon a bug.
Ok this is my first post and its a little involved. I've always been able to find answers by searching online or in documentation. Here goes.
I'm trying to set up a character using Puppet Pins, which I will link to nulls as part of a more complicated setup down the road. My general approach is to set up the pins first and see how it all moves manually before creating nulls and linking the pins to the positions of the nulls. So far so simple. To get my nulls to the exact position of my pins, i pickwhip the null position to the pin position, see what the coords are, then remove the expression and put in the coords manually on the null. Once the nulls and pins are lined up, I just link the pins to the nulls with an expression in the pins "position" property.
This all works fine in my simple scene consisting of a solid layer with puppet pins applied, and some nulls. The nulls snap to the pins perfectly, and I don't have to convert the pin coordinates to comp space or anything. The pins coords seem to be in comp space already. Then I can link the pins to my nulls and all is fine.
However, in my complex scene which is generated from an imported .psd, the pin coords do not correspond to comp space. They're very low and seem to match up to the layer the puppet effect was applied to. So the null ends up way off near the top left of the comp.
No problem. We just run toComp on the position of the pin and we should get the comp space coords of the pin. But I don't. I get something way off.
Why do the pin positions not map to comp space automatically in my psd-based comp, as they did with the simple comp?
Is it even possible to run toComp successfully in the following way
toComp(thisComp.layer("R_Arm").effect("Puppet").arap.mesh("Mesh 1").deform("Puppet Pin 1").position);
or is the return of
thisComp.layer("R_Arm").effect("Puppet").arap.mesh("Mesh 1").deform("Puppet Pin 1").position;
not of the right data type to be an argument of toComp?
Are pin coordinates just layer based coordinates like any other or are there other factors involved?
I'd like to be able to set up pins where I want them and link them to nulls with exactly matching coordinates so the artwork doesn't jump when I link them.
More generally, is there any attribute of a psd file that can affect the coordinate system of a comp generated on import. The file in question contained all regular layers, plus one group of 3 (which came in as a pre-comp the entire size of the main comp, as expected), no layer effects or anything else fishy.
Anyone more experienced with expressions and coordinate spaces in AE have any idea what I'm missing?
Macbook Pro Early 2011 15" i7 2.2Ghz
16gb RAM
AMD Radeon 6750 1GB
OSX 10.9.2
AE 12.2.1.5