Notifications
Clear all
[Closed] Quick Question (check how well you know 3DS MAX)
Page 3 / 3
Prev
Sep 10, 2019 5:22 am
i can get all nodes in stack… all modcontexts… in theory i can find a modifier by node and context
1 Reply
i can’t get a list of current modifiers in stack, but at least i can know now the node (or nodes) which context is currently in the list. It’s a BIG progress!
the good thing is that the nodes might be UNSELECTED (the ‘pinned’ stack case)
Sep 10, 2019 5:22 am
now i know what is to enumerate… if we have multiple nodes with some logic i can find ‘shared’ modifiers… it sounds promising
Sep 10, 2019 5:22 am
I still don’t see how to get this stak:
(
delete objects
max modify mode
md1 = noisemodifier()
md2 = edit_poly()
md3 = bend()
md4 = smooth()
md5 = uvwmap()
obj1 = box pos:[0,0,0]
obj2 = box pos:[50,0,0]
addmodifier obj1 md1
addmodifier obj1 md2
addmodifier obj1 md3
addmodifier obj2 md2
addmodifier obj2 md4
addmodifier obj2 md5
select obj1
modpanel.setcurrentobject md2
modpanel.setpinstack on
deselect obj1
)
Sep 10, 2019 5:22 am
This seems to work for my previous example, but it is very ugly.
(
currentMod = modpanel.getcurrentobject()
nodes = refs.dependentNodes currentMod
nodesModifiers = for j in nodes collect #(j, j.modifiers.count)
dummyMod = emptymodifier()
select nodes
modpanel.addmodtoselection dummyMod
mainNode = undefined
for j = 1 to nodesModifiers.count do
(
if nodesModifiers[j][2] != nodesModifiers[j][1].modifiers.count do
(
mainNode = nodesModifiers[j][1]
deletemodifier mainNode dummyMod
)
)
select mainNode
modpanel.setcurrentobject currentMod
modpanel.setpinstack on
max select none
print mainNode.modifiers
)
Page 3 / 3
Prev