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.
intersting. i gave it a try but only achieved some workaround.
i tested with boxes and teapots so no "special" object or geometry types.
my idea was to use the transform change handler, check for valid snapping, if snapping valid then searching the "blacklist" (for forbidden objects) and disabling the snapping display for the forbidden objects.
if this works fine for your needs creating a dialog with (blacklist) selection and save settings etc. should not be the problem.
hope this helps a bit!
-- delete own change-handler(s)
deleteAllChangeHandlers id:#trChan
-- made some testobjects and pass the names
snapBlacklistNames = #("b4","b3","b1","b5")-- --> in this array should be the objects that should not react to snapping
snapBlacklist = #()-- loop for filling the testobjects by names into the object arrayfor s in snapBlacklistNames do(
tmpObj = getNodeByName s
appendIfUnique snapBlacklist tmpObj
-- print ("tmpObj: "+tmpObj as string))-- end for
when transform $ changes id:#trChan do(-- print ("snapNode: "+snapMode.node as string)if snapMode.node != undefined do(if(findItem snapBlacklist snapMode.node != 0) then (print"DO NOT SNAP"
snapMode.display = false)else(print"start snapping -again"
snapMode.display = true)-- end else)-- end if)-- end when
havent had the chance to try it yet
but wouldnt the snapmode.display just "hide" the snap but the snap will continue to work as usual for the all the objects?
well thanks anyway.. will try it first thing tomorow
Comments
intersting. i gave it a try
intersting. i gave it a try but only achieved some workaround.
i tested with boxes and teapots so no "special" object or geometry types.
my idea was to use the transform change handler, check for valid snapping, if snapping valid then searching the "blacklist" (for forbidden objects) and disabling the snapping display for the forbidden objects.
if this works fine for your needs creating a dialog with (blacklist) selection and save settings etc. should not be the problem.
hope this helps a bit!
Thank you for your
Thank you for your help
havent had the chance to try it yet
but wouldnt the snapmode.display just "hide" the snap but the snap will continue to work as usual for the all the objects?
well thanks anyway.. will try it first thing tomorow