How should I use the script to get the number of IMM
I think:
[IGetMax,Brush:Modifiers:Multi Mesh Select]
should do it. Because the slider starts from 0 you will have to add one to the result.
Marcus
Thank you very much. I solved this problem. I have another question. How should I turn all imm brushes into sub-tools at the same time?
I don’t think there’s a way to do it at the same time. But you can do it like this:
//get number of IMMs
[VarSet,noIMMs,[IGetMax,Brush:Modifiers:Multi Mesh Select]]
[VarInc,noIMMs]//add one as slider starts at zero
//loop through them
[Loop,noIMMs,
//select IMM
[ISet,Brush:Modifiers:Multi Mesh Select,[Val,n]]
//create mesh
[IPress,Brush:To Mesh]
[If,([Val,n]==0),
//record first new mesh ID
[VarSet,toolID,[IGet,Tool:Item Info]]
,
//get name of the new mesh
[VarSet,newMeshName,[IGetTitle,Tool:Current Tool,0]]
//record its ID
[VarSet,delToolID,[IGet,Tool:Item Info]]
//reselect first mesh created
[ISet,Tool:Item Info,#toolID]
//append new mesh
[IPress,Tool:SubTool:Append]
[IPress,[StrMerge,"PopUp:",[Var,newMeshName]]]
//reselect last mesh created
[ISet,Tool:Item Info,#delToolID]
//delete it
[IKeyPress,'2',[IPress,Tool:SubTool:Delete]]
//reselect first mesh created
[ISet,Tool:Item Info,#toolID]
]
,n]
Marcus
Thank you so much