XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : Select Objects in sequence.

01-15-2004, 09:51 AM
Hey guys.
I need help with a script thing.

In plain text I want the script to do the following:

Go through each selected object and set visibility to 0 for 5 frames, then set visibility to 1. Then offset the animation 5 frames from the previous object.

Object N-01: Frame 0 = Vis0
Frame 5 = Vis1

object N-02: Frame 5 = Vis0
Frame 10 = Vis1

etc etc.... :)

Can anyone help me with this?


01-16-2004, 10:58 AM
Assuming you have the following objects in your scene:


-- variable <fr> holds the current frame
fr = 0
-- loop through all objects named "TestObject*"
for obj in $TestObject* do
&nbsp;&nbsp;&nbsp;&nbsp;-- set animate on so following statements will create keys
&nbsp;&nbsp;&nbsp;&nbsp;animate on
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- create two visiblity keys
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at time fr obj.visibility = 0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at time (fr+5) obj.visibility = 1
-- advance <fr> variable for next object
fr += 5

Hope this helps,

01-16-2004, 11:28 AM
thanks magicm :)

that did the trick :)

CGTalk Moderation
01-17-2006, 05:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.