Quick Question (check how well you know 3DS MAX)


#1

My question is:

HOW CAN WE KNOW WHAT MODIFIERS (OBJECTS) ARE CURRENTLY IN THE MODIFIER PANEL STACK?

Think a little before answering the question. It may not be so easy if I ask :wink:


#2

depends on the object selected…


#3

:slight_smile: first misconception …
but what if we have a multiple selection?


#4

For a single node it must show all applied modifiers, for multiple only the shared instances?


#5

true… but how can it help us?

just try to imagine that we have hundreds of objects selected


#6

not sure if it is efficient

(
	mod_handles = for obj in selection collect
	(
		(for m in obj.modifiers collect getHandleByAnim m) as BitArray
	)

	handles = mod_handles[1]
	for m in mod_handles do handles *= m
	handles

	mods_in_modstack = for h in handles collect getAnimByHandle h
)

at first I was thinking that we can count them and take only those that are met at least as much as the count of selected nodes, but there might be a situation that one node will have several instanced modifiers and some other none of the modifiers… so it seems wrong direction to me


#7

the situation might be worse - they all have to share specific modifiers to be shown in the stack.

but … now I have to point to the second misconception :wink:

what if NOTHING is selected! but the Modifier Stack is ‘pinned’ ?

:smile:


#8

:smiley: damn
But I never had it pinned since the R4 version. I don’t quite get the idea behind pinning


#9

simple example - pin a Skin Modifier and select and transform its bones :stuck_out_tongue_winking_eye:


#10

I thought you were aiming at compounds - like, how many obj., modifiers are in “action”, and we can’t see them all at once in mod. stack…


#11

i just ask about what we see :slight_smile:
i don’t care about what we can’t see.


#12

a little offtop…
if we create and copy a node as reference then for that node mod stack shows a stripe across the stack and LB_GETCOUNT returns 1 while $.modifiers.count is zero
should we treat it as something valuable? we definitely can see it :slight_smile:
modPanel.getCurrentObject() returns ReferenceTarget:DerivedObject


#13

sure we have to… it’s very important thing. using this info we can know how many times this object is referred


#14

This is very tricky. If the stack is pinned and the selected modifier is a shared modifier and there are no objects selected I can’t figure out a way to know to which node belongs the modifier.

Have you found a native method to get it or you have coded your own function?


#15

the funniest part of it - i CAN’T find a way to know what modifiers are currently in the modifiers stack. The best i can do now is using UI select every item from SubTree List and check what it makes the current edit object. It forces to update every modifier and might take a lot of time for some modifiers (TurboSmooth, Optimize, Cloth, APEX, etc.)


#16

I thought you actually knew how to get them.


#17

if I confessed right away that I don’t know, many would not even try :upside_down_face:

but the problem challenges me, and I’m still looking for a solution …


#18

can we enumerate the node tree, and collect modifiers with the A_MOD_BEING_EDITED flag set. Then enumerate the stack from that.


#19

eh… i tried it too. but this flag is set anyway for all single nodes if the multiple selection is in the Modifier stack.
another problem is what to enumerate if nothing is selected and we have ‘pinned’ stack?


#20

i stuck with getting ‘what is pinned’ in the modifiers list.
I already went through all the possible flags (for both modifiers and appmods), hoping to find one that says ‘modifier is on the stack’. But all in vain…