-
Expression that parents existing nulls to existing layers… maybe by #, in a loop, till all are parented?
Ultimate goal: a human brain made of icons. Camera flies through it.
My hope: can an expression be used to automagically parent each icon to an existing null?
Details:
I have a cloud of nulls, each one placed in 3D space. If you could see them, it would look like a human brain modeled in 3D.
The nulls have names with numbers, ie “_Empty_001”
I want to parent a 3D layer to each null (so that I can put an image in the layer that always faces the camera. Facing the camera’s easy).
The 3D layers have numbered names, too, ie “misc icons isolated-10.png”
Can an expression do the repetitive work of parenting these together, so that each null gets one (1) layer parented to it?
I was hoping an expression could do something like this:
Look at Null name.
Find 3D Layer that has same number in its name.
Parent 3D layer to Null.
Go to next Null and repeat till ….? (I could enter a number).I don’t actually care if the numbers match. What I’m after is to assign each 3D layer, to its own null. That will create a 3D object made up of little images. I need to be able to vary the images, so I’d like to simply use a 3D layer, because I could replace an image with a comp full of images, if I need to.
So I suppose this psuedocode recipe would work, too:
Look at 3D layer: does it have a parent Null?
If no, find a Null that has no child.
Parent this layer to Null.
Repeat till all layers have parent nulls.Can it be done? How would you write it?