anyone know python script for Object>Snap>Selection to Cursor? (Assuming I have the object selected)


I figured it out. Just select the object and set it location to (0.0,0.0,0.0)

bpy.data.objects["name"].location = (0.0,0.0,0.0)
| improve this answer | |
  • $\begingroup$ (0.0,0.0,0.0) is the center of the scene. The 3d Cursor is a different thing. There is an operator for snapping objects to the location of the 3d Cursor: bpy.ops.view3d.snap_selected_to_cursor() See the documentation $\endgroup$ – Martynas Žiemys Oct 22 '19 at 10:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.