Notifications
Clear all
[Closed] addmodfunc
Jan 04, 2007 4:55 pm
2007 Viz
I am having odd problem with this simple script.
It works fine in blank scene but errors out in template that I've set up.
Also when it errors it pulls up a addmodfunc.ms script up.
The template contains just mat’s and some command models that we use.
BTW If you cant tell by the code Im abit of a newb. :shrug:
rollout DoorTool "Greg's Supply Grille Maker"
(
spinner mesh_length "Length: " type:#float range:[6,46,6]
spinner mesh_height "Height: " type:#float range:[6,46,24]
button create "Create Supply Grille"
on create pressed do
(
doorlength = mesh_length.value
doorheight = mesh_height.value
wirelength = doorlength
wirewidth = doorheight
wireheight = doorheight
wire = Rectangle length: wirelength width: wirewidth
wire.pos = [0,0,0]
select $Rectangle01
max modify mode
macros.run "Modifiers" "Bevel"
$.modifiers[#Bevel].Level_1_Height = 0.3125
$.modifiers[#Bevel].Use_Level_2 = 1
$.modifiers[#Bevel].Level_2_Height = 0.125
$.modifiers[#Bevel].Level_2_Outline = -1
macros.run "Modifier Stack" "Convert_to_Poly"
actionMan.executeAction 0 "40203"
subobjectLevel = 4
$.EditablePoly.SetSelection #Face #{10}
$.insetType = 1
$.EditablePoly.buttonOp #Inset
actionMan.executeAction 0 "40203" -- Views: Arc Rotate View Mode
$.EditablePoly.SetSelection #Face #{9..10}
$.insetAmount = 0.1
$.EditablePoly.buttonOp #Inset
$.insetAmount = 0.06
$.insetType = 1
$.EditablePoly.buttonOp #Inset
$.bridgeSegments = 1
$.EditablePoly.Bridge ()
subobjectLevel = 0
clearSelection()
select $Rectangle01
$.name = "frame grille"
panlength = doorlength-2.2
panwidth = doorheight-2.2
panheight = .3125
panseg = doorheight*1.5
pan = Box length: panlength width: panwidth widthsegs: panseg height: panheight
pan.pos = [0,0,0]
select $Box01
macros.run "Modifier Stack" "Convert_to_Poly"
subobjectLevel = 4
actionMan.executeAction 0 "40059"
max select
$.EditablePoly.SetSelection #Face #{1..mesh_height.value/.56*2}
$.insetType = 1
$.insetAmount = 0.06
$.insetType = 1
$.EditablePoly.buttonOp #Inset
$.EditablePoly.Bridge ()
subobjectLevel = 0
clearSelection()
select $Box01
$.name = "Supply grille"
)
)
createDialog DoorTool width:250
Any help would be great
Thanks