/* Toggle Turbo/Meshsmooth Created: Apr 15, 2008 Last Updated: Apr 15, 2008 Author : John Rand (littl3fish@gmail.com) Version: 3ds max 8, 9 32&64bit, 2008 32&64bit v1.0 Install file TMsmoothToggle.ms in your "~\scripts" folder. Mass toggle for all geometry containing either one or more turbosmooth or meshsmooth modifiers. If the smooth modifiers are already active you will have to toggle the button to build the array, the script isn't smart enough to pre-determine the modifier states. Note: this script affects rendertime visibility of smoothing as well. *********************************************************************************************** MODIFY THIS AT YOUR OWN RISK */ --start try(destroyDialog RLToggleTSmooth)catch() global ToggleTSmooth global ToggleMSmooth global TS_array = #() global MS_array = #() rollout RLToggleTSmooth "Toggle Turbo/Mesh Smooth" width:160 height:36 ( CheckButton TurboSmoothON "TurboSmooth ON" highlightColor:orange height:20 align:#left offset:[-5,0] across:2 CheckButton MeshSmoothON "MeshSmooth ON" highlightColor:red height:20 align:#left offset:[5,0] fn TSSelectON = ( start = timeStamp() for o in geometry do if superclassof o == geometryClass do ( for m in o.modifiers where classof mod == turbosmooth do ( if o.turbosmooth.enabled == false then ( o.turboSmooth.enabled = true ) append TS_array o.name ) ) end = timeStamp() format "Processing took % seconds\n" ((end - start) / 1000.0) ) fn TSSelectOFF = ( start = timeStamp() for o in geometry do if superclassof o == geometryClass do ( for m in o.modifiers where classof mod == turbosmooth do ( if o.turbosmooth.enabled == true then ( o.turboSmooth.enabled = false ) append TS_array o.name ) ) end = timeStamp() format "Processing took % seconds\n" ((end - start) / 1000.0) ) fn MSSelectON = ( start = timeStamp() for o in geometry do if superclassof o == geometryClass do ( for m in o.modifiers where classof mod == meshsmooth do ( if o.meshsmooth.enabled == false then ( o.meshsmooth.enabled = true ) append MS_array o.name ) ) end = timeStamp() format "Processing took % seconds\n" ((end - start) / 1000.0) ) fn MSSelectOFF = ( start = timeStamp() for o in geometry do if superclassof o == geometryClass do ( for m in o.modifiers where classof mod == meshsmooth do ( if o.meshsmooth.enabled == true then ( o.meshsmooth.enabled = false ) append MS_array o.name ) ) end = timeStamp() format "Processing took % seconds\n" ((end - start) / 1000.0) ) on TurboSmoothON changed state do ( if state == on then ( TSSelectON() ) else (TSSelectOFF()) ) on MeshSmoothON changed state do ( if state == on then ( MSSelectON() ) else (MSSelectOFF()) ) on RLToggleTSmooth close do ( TS_array = #() MS_array = #() ) ) createdialog RLToggleTSmooth width:220 height:30