Notifications
Clear all

[Closed] If edit poly/edit spline do – Script

Hello, i have this script that is supposed to ( depending on what modifier you selecting) change to subobjectlevel, currently it gives me an error wich i don’t understand at all, the script seems logical to me !

macroScript aK_test00001
category:"DragAndDrop"
toolTip:""

(
(
if isValidNode $ do
(
setCommandPanelTaskMode #modify
if isValidObj $.modifiers[Edit_Poly] then modPanel.setCurrentObject $.modifiers[Edit_Poly] subobjectLevel = 1
else if isValidObj $.modifiers[Edit_Spline] do subobjectLevel = 0

    )
)

This the error
unknown-3

Really appreciate any thing at this point :^)

1 Reply
(
	if isValidNode $ do
	(
		setCommandPanelTaskMode #modify
		if isValidObj $.modifiers[Edit_Poly] then 
		(
			modPanel.setCurrentObject $.modifiers[Edit_Poly] 
			subobjectLevel = 1
		)
		else 
			if isValidObj $.modifiers[Edit_Spline] do subobjectLevel = 0

    )
)