Add Point At Null
ebergerly
Posts: 3,255
So I'm writing a script where you select a character in the scene and then run a script that:
- Adds a null to the scene and names it "EyeGoalNull"
- Sets the Point At property of the character's Left Eye and Right Eye to the EyeGoalNull
I've got step 1 completed, but can't figure how to do step 2. Here's what I have so far:
var n = new DzNode(); Scene.addNode( n ); n.setName( "EyeGoalNull" ); n.setLabel( "EyeGoalNull" );
Anyone? I wish it's as simple as SelectedNode.LeftEye.PointAt = EyeGoalNull
Post edited by ebergerly on
Comments
Okay, getting closer I think...
This seems to successfully find the left eye node as a child of the selected parent:
Now I just need to know how to access the Point At property of the eye nodes....
Hey, I think I've got it !!!
So if you renamed the character from say Genesis3Female to say Girl1, how do you access that new name? Seems like node.name gives you the Genesis3Female as opposed to the name you applied. And it seems "node.alias" doesn't do it...
Ahh, okay, it's node.getLabel()...