Edit Spline -> Fillet Button
I want to make a toolbar with the Fillet Button.
This is the macroscript:
MacroScript ESpline_Fillet
enabledIn:#("max", "viz") --pfb: 2003.12.12 added product switch
ButtonText:"Fillet"
Category:"Editable Spline Object"
internalCategory:"Editable Spline Object"
Tooltip:"Fillet (Spline)"
-- Needs Icon
(
--On IsEnabled Return Filters.Is_EditSpline()
On IsVisible Return Filters.Is_EditSpline()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 1 then subobjectlevel = 1
Try(ApplyOperation Edit_Spline Splineops.StartFillet)Catch(MessageBox "Operation Failed" Title:"Spline Editing")
)
)
I could put this to work in a normal button with this code:
on btn_Fillet pressed do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 1 then subobjectlevel = 1
Try(ApplyOperation Edit_Spline Splineops.StartFillet)Catch(MessageBox "Operation Failed" Title:"Spline Editing")
)
But I want it to work the same way it work in the Edit Spline modifier (button pressed the filled is on, button not pressed the fillet is off).
Someone could help me?
Sorry for my terrible English.
Comments
The code:rollout FilletTool
The code:
rollout FilletTool "Fillet Spline" width:162 height:300
(
checkButton ckb_Fillet "CheckButton" pos:[31,23] width:81 height:32
on ckb_Fillet changed state do
if state == on then (
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 1 then subobjectlevel = 1
Try(ApplyOperation Edit_Spline Splineops.StartFillet)Catch(MessageBox "Operation Failed" Title:"Spline Editing")
)
else
(
toolmode.commandmode = #move
)
)
createDialog FilletTool
Now I want that the button go to uncheck mode when I click in other button.