ScriptSpot

Forum topic · General Scripting

Instances in sweep modifier

By PIXandDOTS · 2016-02-14

Description

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 (2)

addmodifier $ (copy sweep01)

fajar · 2016-02-16

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 · 2016-02-18

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