--Soft Selection Falloff macroScript MouseFalloff category:"RobG3D Scripts" ( try(DestroyDialog falloff_mouseRollout) catch() try ( --the slider upper bound is the largest dimension of the object (lower bound is always 0) local sliderUpper bbMax = $.max bbMin = $.min bbx = bbMax.x - bbMin.x bby = bbMax.y - bbMin.y bbz = bbMax.z - bbMin.z if bbx >= bby then sliderUpper = bbx if bby >= bbz then sliderUpper = bby if bbz >= bby then sliderUpper = bbz rollout falloff_mouseRollout "Falloff" width:200 height:24 ( slider sld1 "" pos:[51,1] width:160 height:10 range:[0 , sliderUpper, $.Falloff ] orient:#horizontal ticks:0 label edt1 "" pos:[2,3] width:40 height:16 on sld1 changed val do ( selection[1].useSoftSel = on --turn on soft selection selection[1].Falloff = sld1.Value --set size to slider value edt1.Text = selection[1].Falloff as string --change the label that tells us the size ) on sld1 buttonup do ( --do these two here, not when the slider is changed, for speed efficiency selection[1].useSoftSel = true --turn on soft selection if it is off if (selection[1].Falloff == 0) then selection[1].useSoftSel = off --if the slider is 0, turn off soft selection DestroyDialog falloff_mouseRollout ) on falloff_mouseRollout open do --set up initial things when rollout open ( origMousePos = mouse.screenpos sld1.Value = selection[1].Falloff edt1.Text = selection[1].Falloff as string ) ) createDialog falloff_mouseRollout pos:(mouse.screenpos-[194,10]) style:#(#style_sysmenu) ) catch () )