On IsChecked Return (SubObjectLevel == 1 and filters.CanSwitchTo_Vertex())
On IsEnabled Return (Filters.CanSwitchTo_Vertex())
On IsVisible Return (Filters.CanSwitchTo_Vertex())
On Execute do
(
If SubObjectLevel == undefined then Max Modify Mode
If Filters.CanSwitchTo_Vertex() == True then Try(If SubObjectLevel != 1 then SubObjectLevel = 1 Else SubObjectLevel = 0)Catch()
)
)
MacroScript SubObject_Edge
ButtonText:"Edge"
Category:"Modifier Stack"
internalCategory:"Modifier Stack"
Tooltip:"Edge Sub-object Mode"
Icon:#("SubObjectIcons",2)
(
On IsChecked Return (SubObjectLevel == 2 and Filters.CanSwitchTo_Edge())
On IsEnabled Return (Filters.CanSwitchTo_Edge())
On IsVisible Return (Filters.CanSwitchTo_Edge())
On Execute do
(
If SubObjectLevel == undefined then Max Modify Mode
If Filters.CanSwitchTo_Edge() == True then Try(If SubObjectLevel != 2 then SubObjectLevel = 2 Else SubObjectLevel = 0)Catch()
)
)
MacroScript SubObject_Face
ButtonText:"Face"
Category:"Modifier Stack"
internalCategory:"Modifier Stack"
Tooltip:"Face Sub-object Mode"
Icon:#("SubObjectIcons",3)
(
On IsChecked Return (SubObjectLevel == 3 and Filters.CanSwitchTo_Face())
On IsEnabled Return (Filters.CanSwitchTo_Face())
On IsVisible Return (Filters.CanSwitchTo_Face())
On Execute do
(
If SubObjectLevel == undefined then Max Modify Mode
If Filters.CanSwitchTo_Face() == True then Try(If SubObjectLevel != 3 then SubObjectLevel = 3 Else SubObjectLevel = 0)Catch()
)
)
MacroScript SubObject_Polygon
ButtonText:"Polygon"
Category:"Modifier Stack"
internalCategory:"Modifier Stack"
Tooltip:"Polygon Sub-object Mode"
Icon:#("SubObjectIcons",4)
(
On IsChecked return (SubObjectLevel == 4 and Filters.CanSwitchTo_Polygon())
On IsEnabled Return (Filters.CanSwitchTo_Polygon())
On IsVisible Return (Filters.CanSwitchTo_Polygon())
On Execute do
(
If SubObjectLevel == undefined then Max Modify Mode
If Filters.CanSwitchTo_Polygon() == True then Try(If SubObjectLevel != 4 then SubObjectLevel = 4 Else SubObjectLevel = 0)Catch()
)
)
MacroScript SubObject_Element
ButtonText:"Element"
Category:"Modifier Stack"
internalCategory:"Modifier Stack"
Tooltip:"Element Sub-object Mode"
Icon:#("SubObjectIcons",5)
(
On IsChecked return
(
If (SubObjectLevel == 5 and Filters.CanSwitchTo_Element() == True) then True
Else If (SubObjectLevel == 4 and (Filters.CanSwitchTo_Element() == True and (Filters.CanSwitchTo_Border() == False and Filters.CanSwitchTo_Face() == False))) Then True
Else False
)
On IsEnabled Return (Filters.CanSwitchTo_Element())
On IsVisible Return (Filters.CanSwitchTo_Element())
On Execute do
(
If SubObjectLevel == undefined then Max Modify Mode
if (filters.Is_EditMesh() == True or filters.Is_MeshSelect () == True or filters.Is_EditPoly () == True or filters.Is_PolySelect () == True ) then
(
if Filters.CanSwitchTo_Element() == True then Try(If SubObjectLevel != 5 then SubObjectLevel = 5 Else SubObjectLevel = 0)Catch()
)
Else
(
if Filters.CanSwitchTo_Element() == True then Try(If SubObjectLevel != 4 then SubObjectLevel = 4 Else SubObjectLevel = 0)Catch()
)
)
)
MacroScript SubObject_Segment
ButtonText:"Segment"
Category:"Modifier Stack"
internalCategory:"Modifier Stack"
Tooltip:"Segment Sub-object Mode"
Icon:#("SubObjectIcons",11)
(
On IsChecked return (SubObjectLevel == 2 and Filters.CanSwitchTo_Segment())
On IsEnabled Return (Filters.CanSwitchTo_Segment())
On IsVisible Return (Filters.CanSwitchTo_Segment())
On Execute do
(
If SubObjectLevel == undefined then Max Modify Mode
if Filters.CanSwitchTo_Segment() == True then Try(If SubObjectLevel != 2 then SubObjectLevel = 2 Else SubObjectLevel = 0)Catch()
)
)
MacroScript SubObject_Spline
ButtonText:"Spline"
Category:"Modifier Stack"
internalCategory:"Modifier Stack"
Tooltip:"Spline Sub-object Mode"
Icon:#("SubObjectIcons",12)
(
On IsChecked return (SubObjectLevel == 3 and Filters.CanSwitchTo_Spline())
On IsEnabled Return (Filters.CanSwitchTo_Spline())
On IsVisible Return (Filters.CanSwitchTo_Spline())
On Execute do
(
If SubObjectLevel == undefined then Max Modify Mode
if Filters.CanSwitchTo_Spline() == True then Try(If SubObjectLevel != 3 then SubObjectLevel = 3 Else SubObjectLevel = 0)Catch()
)
)
MacroScript SubObject_Patch
ButtonText:"Patch"
Category:"Modifier Stack"
internalCategory:"Modifier Stack"
Tooltip:"Patch Sub-object Mode"
Icon:#("SubObjectIcons",8)
(
On IsChecked return (SubObjectLevel == 3 and Filters.CanSwitchTo_Patch())
On IsEnabled Return (Filters.CanSwitchTo_Patch())
On IsVisible Return (Filters.CanSwitchTo_Patch())
On Execute do
(
If SubObjectLevel == undefined then Max Modify Mode
if Filters.CanSwitchTo_Patch() == True then Try(If SubObjectLevel != 3 then SubObjectLevel = 3 Else SubObjectLevel = 0)Catch()
)
)
MacroScript SubObject_Border
ButtonText:"Border"
Category:"Modifier Stack"
internalCategory:"Modifier Stack"
Tooltip:"Border Sub-object Mode"
Icon:#("SubObjectIcons",9)
(
On IsChecked return (SubObjectLevel == 3 and Filters.CanSwitchTo_Border())
On IsEnabled Return (Filters.CanSwitchTo_Border())
On IsVisible Return (Filters.CanSwitchTo_Border())
On Execute do
(
If SubObjectLevel == undefined then Max Modify Mode
if Filters.CanSwitchTo_Border() == True then Try(If SubObjectLevel != 3 then SubObjectLevel = 3 Else SubObjectLevel = 0)Catch()