1 try
2 (
3 fn ApplyOperation ctype oper =
4 (
5 If (Modpanel.getcurrentObject() == $.baseobject) then oper $
6 If Classof (Modpanel.getcurrentObject ()) == ctype then (oper $.modifiers[modPanel.getModifierIndex $ (Modpanel.getcurrentObject ())])
7 )
8 for i in objects do
9 (
10 select i
11 macros.run "Modifier Stack" "Convert_to_Mesh";
12 max modify mode;
13 subobjectLevel = 4;
14 actionMan.executeAction 0 "40021";
15 ApplyOperation Edit_Mesh meshops.Unifynormal;
16 subobjectLevel = 0;
17 macros.run "Modifier Stack" "Convert_to_Poly";
18 clearSelection();
19 )
20 )
21 catch()