THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 25/10/2012 at 09:28, xxxxxxxx wrote:

Following you're examples I have snapping working in my plugin but I've got an issue. I'm calling Snap() from within a MouseDrag while loop which works fine, but once Snap() returns True it will never return False again. Is this a bug or do I need to clear out the SnapCore or something?

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 26/10/2012 at 05:31, xxxxxxxx wrote:

Yeah that's pretty much the code I was using though you also have to tell the snap system to ignore the active object or it will go crazy, but I still have the issue. It isn't really noticeable on workplane snapping but the other modes it is.

So using the code you provided, if you create a scene with a cube and a sphere, if you turn on vertex snapping, select the sphere and then activate the tool, in this case the LiquidTool, you can drag around the scene and the sphere will follow. But once you snap it to one of the vertices on the cube you'll never be able to unsnap it off the cube until you release the mouse button and reclick. I would think if your mouse is nowhere near a vertex it should go back to just following your cursor.