In View from Top screen, I want get location 3Dcursor by script, when i click change 3dcursor point. Can you help me.
thank you so much!
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.
Sign up to join this communityIn View from Top screen, I want get location 3Dcursor by script, when i click change 3dcursor point. Can you help me.
thank you so much!
You can get the cursor location using bpy.context.scene.cursor_location
to change the cursor location you just set its values as shown here bpy.context.scene.cursor_location = (0,0,0)
In blender 2.80+, the syntax is :
bpy.context.scene.cursor.location = (0,0,0)
cursor_location
then you set it using bpy.context.scene.cursor_location = (0,0,0)
$\endgroup$
– Tak
Mar 13 '17 at 9:42
bpy.context.scene.cursor_location
will give you the current location of the cursor shown in the 3D Cursor location panel
$\endgroup$
– Tak
Mar 13 '17 at 9:50
bpy.context.scene.cursor
Docs
$\endgroup$
– mikechambers
Jul 25 '19 at 17:45