Notifications
Clear all
[Closed] simple animate script not working
Dec 28, 2010 4:59 pm
I have a script that used to work
--(
--Objs = for o in objects collect o
for o in selection do
(
print o.name
myNum = --random 100 200
my2ndNum = myNum+100 --random myNum
myZ = o.pos.z
print myNumz
print o.name
o.visibility = bezier_float() -- Track View: Add Visibility Track
addNewKey o.visibility.controller myNum #select
addNewKey o.visibility.controller my2ndNum #select
o.visibility.controller.keys[1].value = 0
o.visibility.controller.keys[2].value = 1 --<BREAKS HERE
addNewKey o.pos.controller.Z_Position.controller myNum #select
addNewKey o.pos.controller.Z_Position.controller my2ndNum #select
o.pos.Z_Position.controller.keys[1].value = myZ +1000
o.pos.Z_Position.controller.keys[2].value = myZ --<BREAKS HERE
--actionMan.executeAction 0 "40022"
)
gets a “– Unknown property: “value” in undefined”
It’s breaking when I add the second controller key. I am using 3ds max 2011 vanilla. Thanks!
4 Replies
Dec 28, 2010 4:59 pm
I worry that MyNum hasn’t been initialized.
Is the collection zero based? That is, does [2] not exist, only [0] and [1]?
1 Reply
If you look at the script in my reply you’ll see I pointed that out as well as myNim(z) hasn’t been initialised or typo, look for –MY COMMENTS IN ALL CAPS