3D Cursor Dynamic Positioning Script

This is a script I use all the time. Basically you create an object with the name 3DCursor (I use an Empty with Display set as Plain Axes), and the 3D Cursor will follow it. This allows you to use Grab on the 3D Cursor, and easily snap it, move it by typing units, move it on a constrained axis, Frame it, etc.

It will also move the object to the 3D Cursor’s position, so the normal 3D Cursor tools still work.

To use:
Open the script in the Blender Text Editor
Go to Script in the Buttons Window
Enable Script Links
Press New, select the the script, and set the drop down by the name to Redraw

Here’s the script:

import Blender

Blender.OldCursorPos = 0,0,0

CursorObj = Blender.Object.Get(‘3DCursor’)
CursorObjPos = CursorObj.loc
CursorPos = Blender.Window.GetCursorPos()

if CursorPos != Blender.OldCursorPos:
CursorObj.loc = CursorPos
CursorObjPos = CursorObj.loc
Blender.OldCursorPos = CursorPos

elif CursorObj.LocX != CursorPos[0] or CursorObj.LocY != CursorPos[1] or CursorObj.LocZ != CursorPos[2]:
CursorPos = Blender.Window.GetCursorPos()
Blender.OldCursorPos = CursorPos

nice :), i wrote a similar script like this too but using spacehandler, your way is pretty neat, has some Python/Blender tricks i didn’t know of before. it’s definitely useful to be able to snap and move the cursor like an object in 3D space. cheers.