0
$\begingroup$

Im trying to translate a vertex in 3D space while it should snap to closest point if it finds one. I have tried with all the snapping parameters listed in the API can’t seem to make it work anyone has any idea? I have also forced to snapping mode with these lines:

  bpy.context.scene.tool_settings.snap_elements = {'VERTEX'}
  bpy.context.scene.tool_settings.snap_target = 'ACTIVE'
  bpy.context.scene.tool_settings.use_snap = True

enter image description here

$\endgroup$

1 Answer 1

0
$\begingroup$

Try what was answered in this thread:

https://blenderartists.org/t/can-a-modal-operator-use-snapping/1175190

$\endgroup$
1
  • $\begingroup$ I actually have a costum snap with ray_cast and kdtree implemented in my own operator but the performance is too slow when dealing with really big meshes and scenes that's the main reason why im trying to use the blender's snapping, but thx for the info $\endgroup$
    – XIWEI ZHOU
    Commented Oct 22, 2019 at 7:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .