Beginners question

--animation a slice plane of a slice modifier in time on selected objects
for i = 1 to selection.count do
(local sliceMod = sliceModifier Slice_Type:2
local capMod = Cap_holes ()
addModifier selection[i] sliceMod
addModifier selection[i] capMod
with animate on
( if selection[i].name=="b0" + 1 as string
do (
at time (1+ (i*2)) sliceMod.Slice_Plane.pos = [0,0,0]
at time ((i*5) + 2) sliceMod.Slice_Plane.pos = [0,0,25])
)
)

--- im not able to step the selection as per name

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Ofer Zelichover's picture

Hi, I'm not exactly sure what

Hi,

I'm not exactly sure what you're trying to do, but one thing looks like it might be a type in your code. Is is supposed to be '1 as string' in this line:
if selection[i].name=="b0" + 1 as string
This would mean that you test the object's name, and only the objects with the name b01 will be animated.

Cheers,
o

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.