Expressions/Scripts/Presets

Moderator: byronnash

 
drblacksnake
Topic Author
Posts: 3
Joined: Tue May 05, 2009 7:34 am

worldPosition from a nested Comp after collapseTransforms

Thu Nov 05, 2015 5:12 pm

Hi aEnhancers,
Could anyone tell how to access world position of a 3D Null, which is located inside another nested 3D comp with collapseTransforms?

Basically, I have this one mechComp with bunch of animated 3D layers that form some sort of machinery (animated: rotation+scale); then there is the mainComp with bunch of 3D layers that form environment, and there that mechComp is also nested as layer (3D, collapseTransforms=ON, animated: translate+scale), and I need to attach pointLights to it's exhausts in order to generate particles with Particular. Unfortunately, as the parts inside mechComp move, the light in mainComp stays parented to a single position.

I parented 3D nulls to each end of exhausts, in hopes that some to/fromWorld's will catch it, but results are really out of place.
For pointLight position I tied to adopt 3D Corner Pin expression from Dan Ebbert's site, which was something like:

s = comp("mechComp").layer("exhaustNull")
fromWorld(s.toWorld(s.anchorPoint));


Obviously, because of collapseTransform something is missing between fromWorld and toWorld, but what?
 
drblacksnake
Topic Author
Posts: 3
Joined: Tue May 05, 2009 7:34 am

Re: worldPosition from a nested Comp after collapseTransform

Wed Nov 11, 2015 5:17 am

Ok, this time I got around by just parenting emitter lights to the mechComp layer in the envComp - this way the light "moved" into mechComp world and was getting around with toWorld, and then the Particular did its tacking magic.

Who is online

Users browsing this forum: No registered users and 4 guests