Notifications
Clear all
[Closed] Make modifiers unique on instances objects
Jun 11, 2010 8:20 am
I have an array of objects which have a uvwmap modifier, and I’m trying to make the modifier for all objects unique. This can be done with InstanceMgr.CanMakeModifiersUnique but I can’t seem to get it to work in the following situation. (following code is just an example, the actual code is a bit more complex)
s = sphere radius:10
sphereArray = #()
sphereUVW = Uvwmap()
addModifier s sphereUVW
for i = 1 to 10 do
(
sphereArray[i] = instance s
move sphereArray[i] [((i - 1) * 30),0,0]
)
for o in sphereArray do
(
for m in o.modifiers do
(
if classof m == uvwmap then
(
if (InstanceMgr.CanMakeModifiersUnique sphereArray m) then
(
InstanceMgr.MakeModifiersUnique sphereArray m #individual
)
)
)
)
In the example above, it won’t make it unique but that is how I would like to use it.
s = sphere radius:10
sphereArray = #()
sphereUVW = Uvwmap()
for i = 1 to 10 do
(
sphereArray[i] = instance s
move sphereArray[i] [((i - 1) * 30),0,0]
)
select sphereArray
modPanel.addModToSelection sphereUVW
for o in selection do
(
for m in o.modifiers do
(
if classof m == uvwmap then
(
if (InstanceMgr.CanMakeModifiersUnique selection m) then
(
InstanceMgr.MakeModifiersUnique selection m #individual
)
)
)
)
And in this example it does work.
Is it even possible to use it like I want?
1 Reply
Jun 11, 2010 8:20 am
It sure is
s = sphere radius:10
sphereArray = #()
sphereUVW = Uvwmap()
for i = 1 to 10 do
(
sphereArray[i] = instance s
move sphereArray[i] [((i - 1) * 30),0,0]
)
select sphereArray
modPanel.addModToSelection sphereUVW
for o in selection do
(
for m in o.modifiers do
(
if classof m == uvwmap then
(
if (InstanceMgr.CanMakeModifiersUnique [b]o[/b] m) then
(
InstanceMgr.MakeModifiersUnique [b]o[/b] m #individual
)
)
)
)
you were trying to make unique for that group, you have to do it per node.
-Johan