I was looking into ways of setting the default values of tools like Extrude, Weld, Chamfer. From what I could find there doesn’t seem to be an easy way to do it. I came up with this but I’m not sure if there is a better way to do it. Its based on what Paul Neale does with his Auto Select Modifiers script (http://paulneale.com/scripts/StackTools/)
This is the first time I have messed with callbacks so I’m not sure what the repercussions are.
fn callSelChange=
(
if(classof (modPanel.getCurrentObject()) == Editable_Poly) then
(
o = selection
----------------------------
-- Preferences
----------------------------
--Vertex
-- o.weldThreshold = 100
--Polygon
o.extrusionType = 1
o.faceExtrudeHeight = 0
o.bevelHeight = 0
o.bevelOutline = 0
o.bevelType = 1
o.outlineAmount = 0
----------------------------
)
else()
if(classof (modPanel.getCurrentObject()) == Edit_Poly) then
(
o = modPanel.getCurrentObject()
----------------------------
--Vertex
-- o.weldThreshold = 100
--Polygon
o.extrudeFaceType = 1
o.extrudeFaceHeight = 0
o.bevelHeight = 0
o.bevelOutline = 0
o.bevelType = 1
o.outlineAmount = 0
----------------------------
)
else()
)
callbacks.removeScripts id:#Select_EP
callbacks.addScript #ModPanelSubObjectLevelChanged ("callSelChange()") id:#Select_EP