Notifications
Clear all

[Closed] Can't get a key to form

I’m trying to have objects sit in place until it’s time to move them and then start moving. This is what I tried but it’s not working.

(
f = openfile “c:\ ransforms.csv”
set animate on
if (f != undefined) then
(
skiptonextline f
while not eof f do
(
sliderTime = 0
TransformName = readdelimitedstring f “,”
Xpos1 = readValue f
Ypos1 = readValue f
Zpos1 = readValue f
Start_Time = readValue f
End_Time = readValue f
DelXpos = readValue f
DelYpos = readValue f
DelZpos = readValue f
Point pos:[Xpos1,Ypos1,Zpos1] isSelected:on name:TransformName
addNewKey $.pos.controller.X_Position.controller Start_Time
addNewKey $.pos.controller.Y_Position.controller Start_Time
addNewKey $.pos.controller.Z_Position.controller Start_Time
sliderTime = End_Time
move $ [DelXpos,DelYpos,DelZpos]
)
)
else
(
messageBox “Open Failed” title:“Error!”
)

1 Reply
  1. You are missing a “)” to close the scope of your script (i.e. matching the opening “(” at the start of it). Running the code without it leaves the Maxscript parser waiting for another command.

  2. Include some or all of the CSV file you are referencing. Can’t help you until we can see what data you are actually trying to read into 3ds Max.