# Cursor location accessing methods

Can you provide me with different methods, or at least one, for accessing the vector of cursor location? I need anything but the one described in this line of code:

bpy.context.scene.cursor_location


I do not want to access any method in my code using "context"! My code reloads the modules recursively and Blender for no reason I know always loses context when I do so. By the way, lots of people are complaining about losing context in scripts and add-ons after reloading Blender (not in a direct way). If you have any suggestions I would be more than glad.

• Suggest if you don't know something ask a question. If it involves code, show code. Try and avoid "hearsay" in questions. Jan 4 '19 at 14:43

## 1 Answer

A .blend file can contain many scenes. Each scene has a .cursor_location attribute:

>>> {scene.name:scene.cursor_location for scene in bpy.data.scenes}
{'Scene': Vector((0.9819498062133789, -5.541140079498291, -6.299274444580078))}


If you know the name of the scene, (e.g. 'Scene'), you could use

bpy.data.scenes['Scene'].cursor_location

• Thx that worked just fine. Jan 4 '19 at 16:59