Instances in sweep modifier

Hi there

I have a quistion regarding custom shapes in the sweep modifier (instance shapes).
The custom shape I will be using have a modifier in the stack (ex. Edit_Spline).

When I add my sweep manually both the baseobject and the modifier is an instance (see the link).

https://www.dropbox.com/s/ieh5thty21zv9t3/sweepProb.jpg?dl=0

But when I use my script only the baseobject is an instance:

sweep01 = sweep()
profil = $Rectangle001
addmodifier $ sweep01
sweep01.CustomShape = 1
sweep01.shapes[1] = profil
sweep01.AssignCSType = 2
sweep01.PivotAlignment = 5

What am I missing here?

Regards
David

Comments

Comment viewing options

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

addmodifier $ (copy sweep01)

you want a copy insted?

sweep01.CustomShape = 1
sweep01.shapes[1] = $Circle001
sweep01.AssignCSType = 2
sweep01.PivotAlignment = 5
 
for i in selection do addmodifier i (copy sweep01)
PIXandDOTS's picture

Hello Fajar I want to get the

Hello Fajar

I want to get the same result as when I do the process manually, so that the top level in the modifier stack is an instance.

Regards
David

Comment viewing options

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