PDA

View Full Version : Keep sub-object selections when adding modifiers via MaxScript?


Malkalypse
12-07-2009, 07:38 PM
I've noticed that when I have sub-object selection, and then add a new modifiier to the top of the stack using MaxScript, the sub-object selection is disregarded.

Case 1:
I apply a mesh select to an object, and select some particular vertices that I want to effect with my next modifier. Leaving the mesh select on the sub-object mode, I manually select the next modifier from the list, and only the selected vertices are affected.

Case 2:
I apply a mesh select to an object and select vertices as before. While still in sub-object mode I add a modifier via MaxScript. The new modifier is added, but the selection is ignored. If I drop back down to the mesh select modifier, it has been reset to sub-object level 0.
(From here I can manually switch to the sub object level I was using, and the correct vertices are selected. Then I can jump back up to the top modifier on the stack and only the selected vertices are affected.)

I'd like to know why this happens, and if there is a way around it?

denisT
12-07-2009, 07:58 PM
I've noticed that when I have sub-object selection, and then add a new modifiier to the top of the stack using MaxScript, the sub-object selection is disregarded.

Case 1:
I apply a mesh select to an object, and select some particular vertices that I want to effect with my next modifier. Leaving the mesh select on the sub-object mode, I manually select the next modifier from the list, and only the selected vertices are affected.

Case 2:
I apply a mesh select to an object and select vertices as before. While still in sub-object mode I add a modifier via MaxScript. The new modifier is added, but the selection is ignored. If I drop back down to the mesh select modifier, it has been reset to sub-object level 0.
(From here I can manually switch to the sub object level I was using, and the correct vertices are selected. Then I can jump back up to the top modifier on the stack and only the selected vertices are affected.)

I'd like to know why this happens, and if there is a way around it?

use modpanel.addmodtoselection instead of addmodifier <node> ...

denisT
12-07-2009, 08:05 PM
s = Sphere radius:10 segs:32 isselected:on
poly = Edit_Poly()
modPanel.addModToSelection poly ui:on
setselectionlevel poly #vertex
poly.select #vertex #{1..100}
modPanel.addModToSelection (Push Push_Value:10) ui:on

Malkalypse
12-07-2009, 08:26 PM
Yeah, looks like I'm going to have to do it that way. Reeeaaaal slow but it works :D

denisT
12-07-2009, 08:41 PM
Yeah, looks like I'm going to have to do it that way. Reeeaaaal slow but it works :D

it will be very slow and will take a lot of memory. it's probably better to rewrite the modifier's algorithms

CGTalk Moderation
12-07-2009, 08:41 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.