ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
Works fine in max2017
Try this version. Run this macro and in the category "bgaTools" drag n drop this on your toolbar. When you hold SHIFT and press this button all modifiers of selected object will turn on else on single click will turn off
macroScript ModsOnOff category:"bgaTools" toolTip:"ModsOnOff"(ifselection.count == 0 then messagebox "Select some object first!" title:"Warning" beep:off else(
local modpanel = GetCommandPanelTaskMode()
with undo off with redraw off
(for o in selection where o.modifiers.count > 0 do o.modifiers.enabled = keyboard.shiftPressed
if modpanel == #create then (setCommandPanelTaskMode #modify ; setCommandPanelTaskMode #create)else(setCommandPanelTaskMode #create ; setCommandPanelTaskMode #modify))))
-- TURN ON MODIFIERSifselection.count == 0 then messagebox "Select some object first!" title:"Warning" beep:off else(
name = GetCommandPanelTaskMode()for o in selection where o.modifiers.count > 0 do o.modifiers.enabled = on
if name == #create then (setCommandPanelTaskMode #modify ; setCommandPanelTaskMode #create)else(setCommandPanelTaskMode #create ; setCommandPanelTaskMode #modify))
and this code
-- TURN OFF MODIFIERSifselection.count == 0 then messagebox "Select some object first!" title:"Warning" beep:off else(
name = GetCommandPanelTaskMode()for o in selection where o.modifiers.count > 0 do o.modifiers.enabled = off
if name == #create then (setCommandPanelTaskMode #modify ; setCommandPanelTaskMode #create)else(setCommandPanelTaskMode #create ; setCommandPanelTaskMode #modify))
fn toggleMods objs mode:on =
(if objs.count == 0 then messagebox "Select some object first!" title:"Warning" beep:off else(
name = GetCommandPanelTaskMode()for o in objs where o.modifiers.count > 0 do(for m = 1 to o.modifiers.count do o.modifiers[m].enabled = mode
)if name == #create then (setCommandPanelTaskMode #modify ; setCommandPanelTaskMode #create)else(setCommandPanelTaskMode #create ; setCommandPanelTaskMode #modify)))-- turn off all modifiers
toggleMods selection mode:off
-- turn on all modifiers
toggleMods selection
Comments
Can't get this to work in 2016 sp2
Hi,
Tried this and no command panel comes up in 3ds max 2016.
Thanks for any help.
...
Works fine in max2017
Try this version. Run this macro and in the category "bgaTools" drag n drop this on your toolbar. When you hold SHIFT and press this button all modifiers of selected object will turn on else on single click will turn off
bga
Thanks you. Working in 2016 sp2 as well.
Very handy. Now on my toolbar. Thanks again.
...
Yup. Create two macros from this code
and this code
bga
thank you very much.
thank you very much. could it be even simplier - hotkey toggle?
thanks!
but it work only in one way - to ON all modifiers
...
No. Works in both ways. You need to use each FN separately.
Anyway here is the tool
bga
...
bga
thank you very much!
thanks! work like a charm. is it possible to make it as toggle on/off?
...
bga