From 9999dada60a64eb27b37c4d711f4c3979888253e Mon Sep 17 00:00:00 2001
From: Campbell Barton <ideasman42@gmail.com>
Date: Fri, 1 Mar 2019 12:49:17 +1100
Subject: [PATCH] Update for API change: scene.cursor_location ->
 scene.cursor.location

Note that some scripts still used the 3D view cursor which has been
removed for a while.
---
 .../add_mesh_aggregate.py                     |  4 +--
 .../add_curve_spirofit_bouncespline.py        |  6 ++--
 .../add_curve_torus_knots.py                  |  2 +-
 .../add_surface_plane_cone.py                 |  8 +++---
 add_curve_ivygen.py                           |  2 +-
 add_curve_sapling/utils.py                    |  2 +-
 add_mesh_extra_objects/Wallfactory.py         |  2 +-
 add_mesh_extra_objects/add_empty_as_parent.py |  2 +-
 archimesh/achm_books_maker.py                 |  2 +-
 archimesh/achm_column_maker.py                |  8 +++---
 archimesh/achm_curtain_maker.py               |  4 +--
 archimesh/achm_door_maker.py                  |  6 ++--
 archimesh/achm_kitchen_maker.py               |  2 +-
 archimesh/achm_lamp_maker.py                  |  2 +-
 archimesh/achm_main_panel.py                  |  6 ++--
 archimesh/achm_roof_maker.py                  |  2 +-
 archimesh/achm_room_maker.py                  |  2 +-
 archimesh/achm_shelves_maker.py               |  2 +-
 archimesh/achm_stairs_maker.py                |  2 +-
 archimesh/achm_tools.py                       |  2 +-
 archimesh/achm_venetian_maker.py              | 10 +++----
 archimesh/achm_window_maker.py                | 14 +++++-----
 archimesh/achm_window_panel.py                |  4 +--
 archipack/archipack_autoboolean.py            |  4 +--
 archipack/archipack_door.py                   |  2 +-
 archipack/archipack_fence.py                  |  2 +-
 archipack/archipack_floor.py                  |  4 +--
 archipack/archipack_reference_point.py        |  2 +-
 archipack/archipack_roof.py                   |  4 +--
 archipack/archipack_slab.py                   |  6 ++--
 archipack/archipack_stair.py                  |  2 +-
 archipack/archipack_truss.py                  |  2 +-
 archipack/archipack_wall2.py                  |  6 ++--
 archipack/archipack_window.py                 |  2 +-
 camera_turnaround.py                          |  4 +--
 io_import_images_as_planes.py                 |  2 +-
 io_scene_ms3d/ms3d_import.py                  |  6 ++--
 magic_uv/op/align_uv_cursor.py                |  6 ++--
 measureit/measureit_main.py                   |  2 +-
 mesh_auto_mirror.py                           | 14 +++++-----
 mesh_carver.py                                | 28 +++++++++----------
 mesh_extra_tools/mesh_edge_roundifier.py      |  2 +-
 .../mesh_select_tools/mesh_index_select.py    |  2 +-
 mesh_tiny_cad/CCEN.py                         |  2 +-
 object_fracture/fracture_ops.py               |  2 +-
 object_fracture_cell/__init__.py              |  2 +-
 render_povray/primitives.py                   | 12 ++++----
 space_view3d_math_vis/draw.py                 |  6 ++--
 space_view3d_pie_menus/pie_cursor.py          |  2 +-
 space_view3d_pie_menus/pie_origin.py          |  4 +--
 space_view3d_spacebar_menu.py                 | 16 +++++------
 uv_texture_atlas.py                           |  2 +-
 52 files changed, 123 insertions(+), 123 deletions(-)

diff --git a/add_advanced_objects_menu/add_mesh_aggregate.py b/add_advanced_objects_menu/add_mesh_aggregate.py
index d86a96971..2665df139 100644
--- a/add_advanced_objects_menu/add_mesh_aggregate.py
+++ b/add_advanced_objects_menu/add_mesh_aggregate.py
@@ -247,7 +247,7 @@ class OBJECT_OT_agregate_mesh(Operator):
             msv.append(obj.modifiers[i].show_viewport)
             obj.modifiers[i].show_viewport = False
 
-        cur = scn.cursor_location
+        cur = scn.cursor.location
         for i in range(self.numP):
 
             mes = choice(par).data
@@ -310,7 +310,7 @@ class OBJECT_OT_agregate_mesh(Operator):
                 bpy.ops.object.join()
 
             if self.track:
-                cur = scn.cursor_location = cpom[1]
+                cur = scn.cursor.location = cpom[1]
 
         for i in range(len(msv)):
             obj.modifiers[i].show_viewport = msv[i]
diff --git a/add_curve_extra_objects/add_curve_spirofit_bouncespline.py b/add_curve_extra_objects/add_curve_spirofit_bouncespline.py
index 2b7ed914c..b220157c5 100644
--- a/add_curve_extra_objects/add_curve_spirofit_bouncespline.py
+++ b/add_curve_extra_objects/add_curve_spirofit_bouncespline.py
@@ -926,10 +926,10 @@ def move_origin_to_start():
         start = active.matrix_world @ spline.points[0].co
         start = start[:-1]
 
-    cursor = bpy.context.scene.cursor_location.copy()
-    bpy.context.scene.cursor_location = start
+    cursor = bpy.context.scene.cursor.location.copy()
+    bpy.context.scene.cursor.location = start
     bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
-    bpy.context.scene.cursor_location = cursor
+    bpy.context.scene.cursor.location = cursor
 
 
 def draw_spline_settings(self):
diff --git a/add_curve_extra_objects/add_curve_torus_knots.py b/add_curve_extra_objects/add_curve_torus_knots.py
index 30d19b583..8352ecfaf 100644
--- a/add_curve_extra_objects/add_curve_torus_knots.py
+++ b/add_curve_extra_objects/add_curve_torus_knots.py
@@ -148,7 +148,7 @@ def align_matrix(self, context):
     if self.absolute_location:
         loc = Matrix.Translation(Vector((0, 0, 0)))
     else:
-        loc = Matrix.Translation(context.scene.cursor_location)
+        loc = Matrix.Translation(context.scene.cursor.location)
 
 # user defined location & translation
     userLoc = Matrix.Translation(self.location)
diff --git a/add_curve_extra_objects/add_surface_plane_cone.py b/add_curve_extra_objects/add_surface_plane_cone.py
index 94889f5b9..2cd148d6a 100644
--- a/add_curve_extra_objects/add_surface_plane_cone.py
+++ b/add_curve_extra_objects/add_surface_plane_cone.py
@@ -123,7 +123,7 @@ class MakeSurfaceWedge(Operator, MakeSurfaceHelpers):
         # change name
         context.active_object.name = 'SurfaceWedge'
         # get the wedge to the 3d cursor.
-        context.active_object.location = context.scene.cursor_location
+        context.active_object.location = context.scene.cursor.location
         bpy.ops.transform.resize(value=(size, size, size))
 
         # adjust resolution in u and v direction
@@ -186,7 +186,7 @@ class MakeSurfaceCone(Operator, MakeSurfaceHelpers):
         bpy.ops.object.editmode_toggle()
         # bring object to cursor
         bpy.ops.object.mode_set(mode='OBJECT')
-        context.active_object.location = context.scene.cursor_location
+        context.active_object.location = context.scene.cursor.location
         # adjust size
         bpy.ops.transform.resize(value=(size, size, size))
 
@@ -266,7 +266,7 @@ class MakeSurfaceStar(Operator, MakeSurfaceHelpers):
         # origin to geometry
         bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY', center='MEDIAN')
         # get object to 3d cursor
-        context.active_object.location = context.scene.cursor_location
+        context.active_object.location = context.scene.cursor.location
         # change name
         ao.name = 'SurfaceStar'
         # adjust size
@@ -334,7 +334,7 @@ class MakeSurfacePlane(Operator, MakeSurfaceHelpers):
 
         # bring object to 3d cursor
         bpy.ops.object.mode_set(mode='OBJECT')
-        context.active_object.location = context.scene.cursor_location
+        context.active_object.location = context.scene.cursor.location
         bpy.ops.transform.resize(value=(size, size, size))
 
         # adjust resolution in u and v direction
diff --git a/add_curve_ivygen.py b/add_curve_ivygen.py
index efb55f983..f4be17c7e 100644
--- a/add_curve_ivygen.py
+++ b/add_curve_ivygen.py
@@ -528,7 +528,7 @@ class IvyGen(Operator):
         # radius = computeBoundingSphere(ob)  # Not needed anymore
 
         # Get the seeding point
-        seedPoint = context.scene.cursor_location
+        seedPoint = context.scene.cursor.location
 
         # Fix the random seed
         rand_seed(randomSeed)
diff --git a/add_curve_sapling/utils.py b/add_curve_sapling/utils.py
index 66ee91f6a..5ea23001e 100644
--- a/add_curve_sapling/utils.py
+++ b/add_curve_sapling/utils.py
@@ -1603,7 +1603,7 @@ def addTree(props):
     treeOb = bpy.data.objects.new('tree', cu)
     bpy.context.scene.collection.objects.link(treeOb)
 
-    # treeOb.location=bpy.context.scene.cursor_location attractUp
+    # treeOb.location=bpy.context.scene.cursor.location attractUp
 
     cu.dimensions = '3D'
     cu.fill_mode = 'FULL'
diff --git a/add_mesh_extra_objects/Wallfactory.py b/add_mesh_extra_objects/Wallfactory.py
index fa006774f..8fb09e19d 100644
--- a/add_mesh_extra_objects/Wallfactory.py
+++ b/add_mesh_extra_objects/Wallfactory.py
@@ -877,7 +877,7 @@ class add_mesh_wallb(Operator):
         context.view_layer.objects.active = ob_new
         ob_new.select_set(True)
 
-        ob_new.location = tuple(context.scene.cursor_location)
+        ob_new.location = tuple(context.scene.cursor.location)
         ob_new.rotation_quaternion = [1.0, 0.0, 0.0, 0.0]
 
         return {'FINISHED'}
diff --git a/add_mesh_extra_objects/add_empty_as_parent.py b/add_mesh_extra_objects/add_empty_as_parent.py
index 563340446..da4295ffd 100644
--- a/add_mesh_extra_objects/add_empty_as_parent.py
+++ b/add_mesh_extra_objects/add_empty_as_parent.py
@@ -69,7 +69,7 @@ class P2E(Operator):
             pass
 
         if self.locat == 'CURSOR':
-            loc = sce.cursor_location
+            loc = sce.cursor.location
         elif self.locat == 'ACTIVE':
             loc = act.location
         else:
diff --git a/archimesh/achm_books_maker.py b/archimesh/achm_books_maker.py
index a3468be98..873730306 100644
--- a/archimesh/achm_books_maker.py
+++ b/archimesh/achm_books_maker.py
@@ -184,7 +184,7 @@ def create_book_mesh(self):
 # ------------------------------------------------------------------------------
 def generate_books(self):
     boxes = []
-    location = bpy.context.scene.cursor_location
+    location = bpy.context.scene.cursor.location
     myloc = copy(location)  # copy location to keep 3D cursor position
 
     # Create
diff --git a/archimesh/achm_column_maker.py b/archimesh/achm_column_maker.py
index d1680a9cc..fdb303037 100644
--- a/archimesh/achm_column_maker.py
+++ b/archimesh/achm_column_maker.py
@@ -605,7 +605,7 @@ def create_circular_column(self, objname, radio_top, radio_mid, radio_bottom, he
     mesh = bpy.data.meshes.new(objname)
     myobject = bpy.data.objects.new(objname, mesh)
 
-    myobject.location = bpy.context.scene.cursor_location
+    myobject.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(myobject)
 
     mesh.from_pydata(myvertex, [], myfaces)
@@ -677,7 +677,7 @@ def create_torus(objname, radio_inside, radio_outside, height):
     mesh = bpy.data.meshes.new(objname)
     myobject = bpy.data.objects.new(objname, mesh)
 
-    myobject.location = bpy.context.scene.cursor_location
+    myobject.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(myobject)
 
     mesh.from_pydata(myvertex, [], myfaces)
@@ -726,7 +726,7 @@ def create_rectangular_base(self, objname, x, y, z, ramp=False):
     mesh = bpy.data.meshes.new(objname)
     myobject = bpy.data.objects.new(objname, mesh)
 
-    myobject.location = bpy.context.scene.cursor_location
+    myobject.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(myobject)
 
     mesh.from_pydata(myvertex, [], myfaces)
@@ -792,7 +792,7 @@ def create_arc(objname, radio, gap, thickness, center):
     mesh = bpy.data.meshes.new(objname)
     myobject = bpy.data.objects.new(objname, mesh)
 
-    myobject.location = bpy.context.scene.cursor_location
+    myobject.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(myobject)
 
     mesh.from_pydata(myvertex, [], myfaces)
diff --git a/archimesh/achm_curtain_maker.py b/archimesh/achm_curtain_maker.py
index 297405562..e0c9cc465 100644
--- a/archimesh/achm_curtain_maker.py
+++ b/archimesh/achm_curtain_maker.py
@@ -266,7 +266,7 @@ def generate_japan(self):
     support = []
     panel = []
 
-    location = bpy.context.scene.cursor_location
+    location = bpy.context.scene.cursor.location
     myloc = copy(location)  # copy location to keep 3D cursor position
 
     # ------------------
@@ -625,7 +625,7 @@ def create_bezier(objname, points, origin, depth=0.001, fill='FULL'):
 # All custom values are passed using self container (self.myvariable)
 # ------------------------------------------------------------------------------
 def generate_roller(self):
-    location = bpy.context.scene.cursor_location
+    location = bpy.context.scene.cursor.location
     myloc = copy(location)  # copy location to keep 3D cursor position
 
     # ------------------
diff --git a/archimesh/achm_door_maker.py b/archimesh/achm_door_maker.py
index 80a7a2410..b7c468a75 100644
--- a/archimesh/achm_door_maker.py
+++ b/archimesh/achm_door_maker.py
@@ -76,7 +76,7 @@ def create_object(self, context):
     # we create main object and mesh
     mainmesh = bpy.data.meshes.new("DoorFrane")
     mainobject = bpy.data.objects.new("DoorFrame", mainmesh)
-    mainobject.location = bpy.context.scene.cursor_location
+    mainobject.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(mainobject)
     mainobject.DoorObjectGenerator.add()
 
@@ -601,7 +601,7 @@ def create_door_data(self, myframe, width, openside):
     mymesh = bpy.data.meshes.new("Door")
     myobject = bpy.data.objects.new("Door", mymesh)
 
-    myobject.location = bpy.context.scene.cursor_location
+    myobject.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(myobject)
 
     mymesh.from_pydata(verts, [], faces)
@@ -653,7 +653,7 @@ def create_handle(self, mydoor, pos, frame_width, openside):
     mymesh = bpy.data.meshes.new("Handle_" + pos)
     myobject = bpy.data.objects.new("Handle_" + pos, mymesh)
 
-    myobject.location = bpy.context.scene.cursor_location
+    myobject.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(myobject)
 
     mymesh.from_pydata(verts, [], faces)
diff --git a/archimesh/achm_kitchen_maker.py b/archimesh/achm_kitchen_maker.py
index 14860f739..ad3e1123a 100644
--- a/archimesh/achm_kitchen_maker.py
+++ b/archimesh/achm_kitchen_maker.py
@@ -629,7 +629,7 @@ def generate_cabinets(self):
 
     boxes = []
     bases = []
-    location = bpy.context.scene.cursor_location
+    location = bpy.context.scene.cursor.location
     myloc = copy(location)  # copy location to keep 3D cursor position
     # Fit to floor
     if self.fitZ:
diff --git a/archimesh/achm_lamp_maker.py b/archimesh/achm_lamp_maker.py
index ea661d5f7..09e30747d 100644
--- a/archimesh/achm_lamp_maker.py
+++ b/archimesh/achm_lamp_maker.py
@@ -412,7 +412,7 @@ def create_light_mesh(self):
 # All custom values are passed using self container (self.myvariable)
 # ------------------------------------------------------------------------------
 def generate_light(self):
-    location = bpy.context.scene.cursor_location
+    location = bpy.context.scene.cursor.location
     myloc = copy(location)  # copy location to keep 3D cursor position
     # ---------------------
     # Lamp base
diff --git a/archimesh/achm_main_panel.py b/archimesh/achm_main_panel.py
index 47287a580..0db6bbd41 100644
--- a/archimesh/achm_main_panel.py
+++ b/archimesh/achm_main_panel.py
@@ -341,9 +341,9 @@ class ARCHIMESH_OT_Pencil(Operator):
             # ----------------------------
             if len(mypoints) > 1 and len(clearangles) > 0:
                 # Move cursor
-                bpy.context.scene.cursor_location.x = mypoints[0][0]
-                bpy.context.scene.cursor_location.y = mypoints[0][1]
-                bpy.context.scene.cursor_location.z = 0  # always on grid floor
+                bpy.context.scene.cursor.location.x = mypoints[0][0]
+                bpy.context.scene.cursor.location.y = mypoints[0][1]
+                bpy.context.scene.cursor.location.z = 0  # always on grid floor
 
                 # Add room mesh
                 bpy.ops.mesh.archimesh_room()
diff --git a/archimesh/achm_roof_maker.py b/archimesh/achm_roof_maker.py
index 7de38df77..846b1f506 100644
--- a/archimesh/achm_roof_maker.py
+++ b/archimesh/achm_roof_maker.py
@@ -242,7 +242,7 @@ def create_roof(self):
     mymesh = bpy.data.meshes.new("Roof")
     myobject = bpy.data.objects.new("Roof", mymesh)
 
-    myobject.location = bpy.context.scene.cursor_location
+    myobject.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(myobject)
 
     mymesh.from_pydata(verts, [], faces)
diff --git a/archimesh/achm_room_maker.py b/archimesh/achm_room_maker.py
index 2cdd1510a..702f9c0d6 100644
--- a/archimesh/achm_room_maker.py
+++ b/archimesh/achm_room_maker.py
@@ -354,7 +354,7 @@ def create_room(self, context):
     # we create main object and mesh for walls
     roommesh = bpy.data.meshes.new("Room")
     roomobject = bpy.data.objects.new("Room", roommesh)
-    roomobject.location = bpy.context.scene.cursor_location
+    roomobject.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(roomobject)
     roomobject.RoomGenerator.add()
     roomobject.RoomGenerator[0].walls.add()
diff --git a/archimesh/achm_shelves_maker.py b/archimesh/achm_shelves_maker.py
index 53595da25..0f04124ed 100644
--- a/archimesh/achm_shelves_maker.py
+++ b/archimesh/achm_shelves_maker.py
@@ -278,7 +278,7 @@ def create_shelves_mesh(self):
 def generate_shelves(self):
 
     boxes = []
-    location = bpy.context.scene.cursor_location
+    location = bpy.context.scene.cursor.location
     myloc = copy(location)  # copy location to keep 3D cursor position
     # Fit to floor
     if self.fitZ:
diff --git a/archimesh/achm_stairs_maker.py b/archimesh/achm_stairs_maker.py
index 9459d5d90..b8688e73d 100644
--- a/archimesh/achm_stairs_maker.py
+++ b/archimesh/achm_stairs_maker.py
@@ -273,7 +273,7 @@ def create_stairs(self, objname):
     mesh = bpy.data.meshes.new(objname)
     myobject = bpy.data.objects.new(objname, mesh)
 
-    myobject.location = bpy.context.scene.cursor_location
+    myobject.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(myobject)
 
     mesh.from_pydata(myvertex, [], myfaces)
diff --git a/archimesh/achm_tools.py b/archimesh/achm_tools.py
index 3a7755168..78eae826c 100644
--- a/archimesh/achm_tools.py
+++ b/archimesh/achm_tools.py
@@ -922,7 +922,7 @@ def create_control_box(objname, x, y, z, tube=True):
     mesh = bpy.data.meshes.new(objname)
     myobject = bpy.data.objects.new(objname, mesh)
 
-    myobject.location = bpy.context.scene.cursor_location
+    myobject.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(myobject)
 
     mesh.from_pydata(myvertex, [], myfaces)
diff --git a/archimesh/achm_venetian_maker.py b/archimesh/achm_venetian_maker.py
index dbf769706..5ef9a9bc4 100644
--- a/archimesh/achm_venetian_maker.py
+++ b/archimesh/achm_venetian_maker.py
@@ -76,7 +76,7 @@ def create_object(self, context):
     # we create main object and mesh
     mainmesh = bpy.data.meshes.new("VenetianFrane")
     mainobject = bpy.data.objects.new("VenetianFrame", mainmesh)
-    mainobject.location = bpy.context.scene.cursor_location
+    mainobject.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(mainobject)
     mainobject.VenetianObjectGenerator.add()
 
@@ -517,7 +517,7 @@ def create_slat_mesh(objname, width, depth, height, angle, ratio):
     mesh = bpy.data.meshes.new(objname)
     myobject = bpy.data.objects.new(objname, mesh)
 
-    myobject.location = bpy.context.scene.cursor_location
+    myobject.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(myobject)
 
     mesh.from_pydata(myvertex, [], myfaces)
@@ -643,7 +643,7 @@ def create_venetian_base(objname, x, y, z):
     mesh = bpy.data.meshes.new(objname)
     myobject = bpy.data.objects.new(objname, mesh)
 
-    myobject.location = bpy.context.scene.cursor_location
+    myobject.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(myobject)
 
     mesh.from_pydata(myvertex, [], myfaces)
@@ -808,7 +808,7 @@ def get_venetian_stick(objname, height):
     mesh = bpy.data.meshes.new(objname)
     myobject = bpy.data.objects.new(objname, mesh)
 
-    myobject.location = bpy.context.scene.cursor_location
+    myobject.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(myobject)
 
     mesh.from_pydata(myvertex, [], myfaces)
@@ -1374,7 +1374,7 @@ def get_venetian_strings(objname, height):
     mesh = bpy.data.meshes.new(objname)
     myobject = bpy.data.objects.new(objname, mesh)
 
-    myobject.location = bpy.context.scene.cursor_location
+    myobject.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(myobject)
 
     mesh.from_pydata(myvertex, [], myfaces)
diff --git a/archimesh/achm_window_maker.py b/archimesh/achm_window_maker.py
index bf16411d8..3e1b5ac9e 100644
--- a/archimesh/achm_window_maker.py
+++ b/archimesh/achm_window_maker.py
@@ -76,7 +76,7 @@ def create_object(self, context):
     # we create main object and mesh
     mainmesh = bpy.data.meshes.new("WindowFrane")
     mainobject = bpy.data.objects.new("WindowFrame", mainmesh)
-    mainobject.location = bpy.context.scene.cursor_location
+    mainobject.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(mainobject)
     mainobject.WindowObjectGenerator.add()
 
@@ -526,7 +526,7 @@ class ARCHIMESH_PT_WindowObjectgenerator(Panel):
 # Generate rail windows
 # ------------------------------------------------------------------------------
 def generate_rail_window(myframe, mp, mymesh):
-    myloc = bpy.context.scene.cursor_location
+    myloc = bpy.context.scene.cursor.location
 
     alummat = None
     if mp.crt_mat and bpy.context.scene.render.engine in {'CYCLES', 'BLENDER_EEVEE'}:
@@ -617,7 +617,7 @@ def generate_rail_window(myframe, mp, mymesh):
 # Generate leaf windows
 # ------------------------------------------------------------------------------
 def generate_leaf_window(myframe, mp, mymesh):
-    myloc = bpy.context.scene.cursor_location
+    myloc = bpy.context.scene.cursor.location
 
     alummat = None
     if mp.crt_mat and bpy.context.scene.render.engine in {'CYCLES', 'BLENDER_EEVEE'}:
@@ -1750,7 +1750,7 @@ def create_leaf_handle(objname, mat):
     mesh = bpy.data.meshes.new(objname)
     myobject = bpy.data.objects.new(objname, mesh)
 
-    myobject.location = bpy.context.scene.cursor_location
+    myobject.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(myobject)
 
     mesh.from_pydata(myvertex, [], myfaces)
@@ -2091,7 +2091,7 @@ def create_rail_handle(objname, mat):
     mesh = bpy.data.meshes.new(objname)
     myobject = bpy.data.objects.new(objname, mesh)
 
-    myobject.location = bpy.context.scene.cursor_location
+    myobject.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(myobject)
 
     mesh.from_pydata(myvertex, [], myfaces)
@@ -2129,7 +2129,7 @@ def create_sill(objname, x, y, z, mat):
     mesh = bpy.data.meshes.new(objname)
     myobject = bpy.data.objects.new(objname, mesh)
 
-    myobject.location = bpy.context.scene.cursor_location
+    myobject.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(myobject)
 
     mesh.from_pydata(myvertex, [], myfaces)
@@ -2167,7 +2167,7 @@ def create_blind_box(objname, x, y, z):
     mesh = bpy.data.meshes.new(objname)
     myobject = bpy.data.objects.new(objname, mesh)
 
-    myobject.location = bpy.context.scene.cursor_location
+    myobject.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(myobject)
 
     mesh.from_pydata(myvertex, [], myfaces)
diff --git a/archimesh/achm_window_panel.py b/archimesh/achm_window_panel.py
index faf183853..30429070b 100644
--- a/archimesh/achm_window_panel.py
+++ b/archimesh/achm_window_panel.py
@@ -239,7 +239,7 @@ def create_window():
     # Link object to scene
     bpy.context.collection.objects.link(window_object)
     window_object.WindowPanelGenerator.add()
-    window_object.location = bpy.context.scene.cursor_location
+    window_object.location = bpy.context.scene.cursor.location
 
     # Shape the mesh.
     do_mesh(window_object, window_mesh)
@@ -1540,7 +1540,7 @@ def create_ctrl_box(parentobj, objname):
     mymesh = bpy.data.meshes.new(objname)
     myobj = bpy.data.objects.new(objname, mymesh)
 
-    myobj.location = bpy.context.scene.cursor_location
+    myobj.location = bpy.context.scene.cursor.location
     bpy.context.collection.objects.link(myobj)
 
     mymesh.from_pydata(myvertex, [], myfaces)
diff --git a/archipack/archipack_autoboolean.py b/archipack/archipack_autoboolean.py
index 8e4df558b..7d8a90a62 100644
--- a/archipack/archipack_autoboolean.py
+++ b/archipack/archipack_autoboolean.py
@@ -422,7 +422,7 @@ class ArchipackBoolManager(ArchipackCollectionManager):
         # parenting childs to wall reference point
         if wall.parent is None:
             x, y, z = wall.bound_box[0]
-            context.scene.cursor_location = wall.matrix_world @ Vector((x, y, z))
+            context.scene.cursor.location = wall.matrix_world @ Vector((x, y, z))
             # fix issue #9
             context.view_layer.objects.active = wall
             bpy.ops.archipack.reference_point()
@@ -505,7 +505,7 @@ class ArchipackBoolManager(ArchipackCollectionManager):
         # parenting childs to wall reference point
         if wall.parent is None:
             x, y, z = wall.bound_box[0]
-            context.scene.cursor_location = wall.matrix_world @ Vector((x, y, z))
+            context.scene.cursor.location = wall.matrix_world @ Vector((x, y, z))
             # fix issue #9
             context.view_layer.objects.active = wall
             bpy.ops.archipack.reference_point()
diff --git a/archipack/archipack_door.py b/archipack/archipack_door.py
index 03e3d5e1e..98ca10689 100644
--- a/archipack/archipack_door.py
+++ b/archipack/archipack_door.py
@@ -1624,7 +1624,7 @@ class ARCHIPACK_OT_door(ArchipackCreateTool, Operator):
             if self.mode == 'CREATE':
                 bpy.ops.object.select_all(action="DESELECT")
                 o = self.create(context)
-                o.location = bpy.context.scene.cursor_location
+                o.location = bpy.context.scene.cursor.location
                 o.select_set(state=True)
                 context.view_layer.objects.active = o
                 self.manipulate()
diff --git a/archipack/archipack_fence.py b/archipack/archipack_fence.py
index 7af93df3f..3630e00e6 100644
--- a/archipack/archipack_fence.py
+++ b/archipack/archipack_fence.py
@@ -1631,7 +1631,7 @@ class ARCHIPACK_OT_fence(ArchipackCreateTool, Operator):
         if context.mode == "OBJECT":
             bpy.ops.object.select_all(action="DESELECT")
             o = self.create(context)
-            o.location = context.scene.cursor_location
+            o.location = context.scene.cursor.location
             o.select_set(state=True)
             context.view_layer.objects.active = o
             self.manipulate()
diff --git a/archipack/archipack_floor.py b/archipack/archipack_floor.py
index 5a5bc66fb..23a10b32a 100644
--- a/archipack/archipack_floor.py
+++ b/archipack/archipack_floor.py
@@ -1830,7 +1830,7 @@ class ARCHIPACK_OT_floor(ArchipackCreateTool, Operator):
         if context.mode == "OBJECT":
             bpy.ops.object.select_all(action="DESELECT")
             o = self.create(context)
-            o.location = context.scene.cursor_location
+            o.location = context.scene.cursor.location
             # activate manipulators at creation time
             o.select_set(state=True)
             context.view_layer.objects.active = o
@@ -1978,7 +1978,7 @@ class ARCHIPACK_OT_floor_cutter(ArchipackCreateTool, Operator):
             pd = archipack_floor.datablock(parent)
             pd.boundary = o.name
         else:
-            o.location = context.scene.cursor_location
+            o.location = context.scene.cursor.location
         # make manipulators selectable
         d.manipulable_selectable = True
         self.link_object_to_scene(context, o)
diff --git a/archipack/archipack_reference_point.py b/archipack/archipack_reference_point.py
index 0b0c03481..99acf9d86 100644
--- a/archipack/archipack_reference_point.py
+++ b/archipack/archipack_reference_point.py
@@ -230,7 +230,7 @@ class ARCHIPACK_OT_reference_point(ArchipackCollectionManager, Operator):
         row.label(text="Use Properties panel (N) to define parms", icon='INFO')
 
     def create(self, context):
-        x, y, z = context.scene.cursor_location
+        x, y, z = context.scene.cursor.location
         # bpy.ops.object.empty_add(type='ARROWS', radius=0.5, location=Vector((x, y, 0)))
         m = bpy.data.meshes.new(name="Reference")
         o = bpy.data.objects.new("Reference", m)
diff --git a/archipack/archipack_roof.py b/archipack/archipack_roof.py
index 477a3ce64..4e8b9471e 100644
--- a/archipack/archipack_roof.py
+++ b/archipack/archipack_roof.py
@@ -5049,7 +5049,7 @@ class ARCHIPACK_OT_roof(ArchipackCreateTool, Operator):
         if context.mode == "OBJECT":
             bpy.ops.object.select_all(action="DESELECT")
             o = self.create(context)
-            o.location = context.scene.cursor_location
+            o.location = context.scene.cursor.location
             o.select_set(state=True)
             context.view_layer.objects.active = o
             self.manipulate()
@@ -5101,7 +5101,7 @@ class ARCHIPACK_OT_roof_cutter(ArchipackCreateTool, Operator):
             pd = archipack_roof.datablock(parent)
             pd.boundary = o.name
         else:
-            o.location = context.scene.cursor_location
+            o.location = context.scene.cursor.location
         # make manipulators selectable
         d.manipulable_selectable = True
         self.link_object_to_scene(context, o)
diff --git a/archipack/archipack_slab.py b/archipack/archipack_slab.py
index 3c0d513cb..897686daf 100644
--- a/archipack/archipack_slab.py
+++ b/archipack/archipack_slab.py
@@ -1466,7 +1466,7 @@ class ARCHIPACK_OT_slab(ArchipackCreateTool, Operator):
         if context.mode == "OBJECT":
             bpy.ops.object.select_all(action="DESELECT")
             o = self.create(context)
-            o.location = bpy.context.scene.cursor_location
+            o.location = bpy.context.scene.cursor.location
             o.select_set(state=True)
             context.view_layer.objects.active = o
             self.manipulate()
@@ -1578,7 +1578,7 @@ class ARCHIPACK_OT_slab_from_wall(Operator):
             # parenting childs to wall reference point
             if wall.parent is None:
                 x, y, z = wall.bound_box[0]
-                context.scene.cursor_location = wall.matrix_world @ Vector((x, y, z))
+                context.scene.cursor.location = wall.matrix_world @ Vector((x, y, z))
                 # fix issue #9
                 context.view_layer.objects.active = wall
                 bpy.ops.archipack.reference_point()
@@ -1651,7 +1651,7 @@ class ARCHIPACK_OT_slab_cutter(ArchipackCreateTool, Operator):
             pd = archipack_slab.datablock(parent)
             pd.boundary = o.name
         else:
-            o.location = context.scene.cursor_location
+            o.location = context.scene.cursor.location
         # make manipulators selectable
         d.manipulable_selectable = True
         self.link_object_to_scene(context, o)
diff --git a/archipack/archipack_stair.py b/archipack/archipack_stair.py
index 5f3fcf1ff..9fbcdfe24 100644
--- a/archipack/archipack_stair.py
+++ b/archipack/archipack_stair.py
@@ -2768,7 +2768,7 @@ class ARCHIPACK_OT_stair(ArchipackCreateTool, Operator):
         if context.mode == "OBJECT":
             bpy.ops.object.select_all(action="DESELECT")
             o = self.create(context)
-            o.location = context.scene.cursor_location
+            o.location = context.scene.cursor.location
             o.select_set(state=True)
             context.view_layer.objects.active = o
             self.manipulate()
diff --git a/archipack/archipack_truss.py b/archipack/archipack_truss.py
index 2931717a7..04cc0d96a 100644
--- a/archipack/archipack_truss.py
+++ b/archipack/archipack_truss.py
@@ -333,7 +333,7 @@ class ARCHIPACK_OT_truss(ArchipackCreateTool, Operator):
         if context.mode == "OBJECT":
             bpy.ops.object.select_all(action="DESELECT")
             o = self.create(context)
-            o.location = bpy.context.scene.cursor_location
+            o.location = bpy.context.scene.cursor.location
             o.select_set(state=True)
             context.view_layer.objects.active = o
             self.manipulate()
diff --git a/archipack/archipack_wall2.py b/archipack/archipack_wall2.py
index 1eb3ff804..8e3bfb43c 100644
--- a/archipack/archipack_wall2.py
+++ b/archipack/archipack_wall2.py
@@ -449,7 +449,7 @@ def update_t_part(self, context):
                 if o.parent is None:
                     # create a reference point and make it active
                     x, y, z = w.bound_box[0]
-                    context.scene.cursor_location = w.matrix_world @ Vector((x, y, z))
+                    context.scene.cursor.location = w.matrix_world @ Vector((x, y, z))
                     # fix issue #9
                     context.view_layer.objects.active = o
                     bpy.ops.archipack.reference_point()
@@ -1781,7 +1781,7 @@ class ARCHIPACK_OT_wall2(ArchipackCreateTool, Operator):
         if context.mode == "OBJECT":
             bpy.ops.object.select_all(action="DESELECT")
             o = self.create(context)
-            o.location = bpy.context.scene.cursor_location
+            o.location = bpy.context.scene.cursor.location
             o.select_set(state=True)
             context.view_layer.objects.active = o
             self.manipulate()
@@ -1886,7 +1886,7 @@ class ARCHIPACK_OT_wall2_from_slab(Operator):
         # parenting childs to wall reference point
         if o.parent is None:
             x, y, z = o.bound_box[0]
-            context.scene.cursor_location = o.matrix_world @ Vector((x, y, z))
+            context.scene.cursor.location = o.matrix_world @ Vector((x, y, z))
             # fix issue #9
             context.view_layer.objects.active = o
             bpy.ops.archipack.reference_point()
diff --git a/archipack/archipack_window.py b/archipack/archipack_window.py
index 74d687dcd..7788eafea 100644
--- a/archipack/archipack_window.py
+++ b/archipack/archipack_window.py
@@ -1815,7 +1815,7 @@ class ARCHIPACK_OT_window(ArchipackCreateTool, Operator):
             if self.mode == 'CREATE':
                 bpy.ops.object.select_all(action="DESELECT")
                 o = self.create(context)
-                o.location = bpy.context.scene.cursor_location
+                o.location = bpy.context.scene.cursor.location
                 o.select_set(state=True)
                 context.view_layer.objects.active = o
                 self.manipulate()
diff --git a/camera_turnaround.py b/camera_turnaround.py
index 0a30d9228..e5581b353 100644
--- a/camera_turnaround.py
+++ b/camera_turnaround.py
@@ -59,7 +59,7 @@ class CAMERATURN_OT_RunAction(Operator):
         turn_camera = scene.turn_camera
         selectobject = context.active_object
         camera = context.scene.camera
-        savedcursor = bpy.context.scene.cursor_location.copy()  # cursor position
+        savedcursor = bpy.context.scene.cursor.location.copy()  # cursor position
         savedframe = scene.frame_current
         if turn_camera.use_cursor is False:
             bpy.ops.view3d.snap_cursor_to_selected()
@@ -166,7 +166,7 @@ class CAMERATURN_OT_RunAction(Operator):
 
         # back previous configuration
         context.preferences.edit.keyframe_new_interpolation_type = savedinterpolation
-        bpy.context.scene.cursor_location = savedcursor
+        bpy.context.scene.cursor.location = savedcursor
 
         # -------------------------
         # Back to old selection
diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py
index 26e7ee861..fdff36032 100644
--- a/io_import_images_as_planes.py
+++ b/io_import_images_as_planes.py
@@ -1072,7 +1072,7 @@ class IMPORT_IMAGE_OT_to_plane(Operator, AddObjectHelper):
 
         elif self.size_mode == 'CAMERA':
             x, y = compute_camera_size(
-                context, context.scene.cursor_location,
+                context, context.scene.cursor.location,
                 self.fill_mode, px / py
             )
 
diff --git a/io_scene_ms3d/ms3d_import.py b/io_scene_ms3d/ms3d_import.py
index 01019a128..ae6f16476 100644
--- a/io_scene_ms3d/ms3d_import.py
+++ b/io_scene_ms3d/ms3d_import.py
@@ -239,7 +239,7 @@ class Ms3dImporter():
                 FORMAT_GROUP.format(ms3d_model.name))
         blender_empty_object = blender_context.blend_data.objects.new(
                 FORMAT_EMPTY_OBJECT.format(ms3d_model.name), None)
-        blender_empty_object.location = blender_scene.cursor_location
+        blender_empty_object.location = blender_scene.cursor.location
         blender_collection.objects.link(blender_empty_object)
         blender_group.objects.link(blender_empty_object)
 
@@ -288,7 +288,7 @@ class Ms3dImporter():
         blender_collection = blender_context.collection
         blender_view_layer = blender_context.view_layer
         blender_collection.objects.link(blender_mesh_object)
-        #blender_mesh_object.location = blender_scene.cursor_location
+        #blender_mesh_object.location = blender_scene.cursor.location
         enable_edit_mode(False, blender_context)
         select_all(False)
         blender_mesh_object.select_set(True)
@@ -699,7 +699,7 @@ class Ms3dImporter():
         blender_armature_object = blender_context.blend_data.objects.new(
                 ms3d_armature_object_name, blender_armature)
         blender_collection.objects.link(blender_armature_object)
-        #blender_armature_object.location = blender_scene.cursor_location
+        #blender_armature_object.location = blender_scene.cursor.location
         blender_armature_object.show_in_front = True
 
         ##########################
diff --git a/magic_uv/op/align_uv_cursor.py b/magic_uv/op/align_uv_cursor.py
index 86d13179f..24c111d0f 100644
--- a/magic_uv/op/align_uv_cursor.py
+++ b/magic_uv/op/align_uv_cursor.py
@@ -60,7 +60,7 @@ class _Properties:
                 bd_size = common.get_uvimg_editor_board_size(area)
             else:
                 bd_size = [1.0, 1.0]
-            loc = space.cursor_location
+            loc = space.cursor.location
 
             if bd_size[0] < 0.000001:
                 cx = 0.0
@@ -84,7 +84,7 @@ class _Properties:
                 bd_size = [1.0, 1.0]
             cx = bd_size[0] * value[0]
             cy = bd_size[1] * value[1]
-            space.cursor_location = Vector((cx, cy))
+            space.cursor.location = Vector((cx, cy))
 
         scene.muv_align_uv_cursor_enabled = BoolProperty(
             name="Align UV Cursor Enabled",
@@ -264,6 +264,6 @@ class MUV_OT_AlignUVCursor(bpy.types.Operator):
         cx = cx * bd_size[0]
         cy = cy * bd_size[1]
 
-        space.cursor_location = Vector((cx, cy))
+        space.cursor.location = Vector((cx, cy))
 
         return {'FINISHED'}
diff --git a/measureit/measureit_main.py b/measureit/measureit_main.py
index d6e14dc7d..43ae6d223 100644
--- a/measureit/measureit_main.py
+++ b/measureit/measureit_main.py
@@ -1824,7 +1824,7 @@ class MEASUREIT_OT_AddNote(Operator):
         if context.area.type == 'VIEW_3D':
             bpy.ops.object.empty_add(type='PLAIN_AXES')
             myempty = bpy.data.objects[bpy.context.active_object.name]
-            myempty.location = bpy.context.scene.cursor_location
+            myempty.location = bpy.context.scene.cursor.location
             myempty.empty_display_size = 0.01
             myempty.name = "Annotation"
             # Add properties
diff --git a/mesh_auto_mirror.py b/mesh_auto_mirror.py
index c17838d5a..68193c1a4 100644
--- a/mesh_auto_mirror.py
+++ b/mesh_auto_mirror.py
@@ -49,14 +49,14 @@ class AlignVertices(Operator):
         auto_m = context.scene.auto_mirror
         bpy.ops.object.mode_set(mode='OBJECT')
 
-        x1, y1, z1 = bpy.context.scene.cursor_location
+        x1, y1, z1 = bpy.context.scene.cursor.location
         bpy.ops.view3d.snap_cursor_to_selected()
 
-        x2, y2, z2 = bpy.context.scene.cursor_location
+        x2, y2, z2 = bpy.context.scene.cursor.location
 
-        bpy.context.scene.cursor_location[0], \
-        bpy.context.scene.cursor_location[1], \
-        bpy.context.scene.cursor_location[2] = 0, 0, 0
+        bpy.context.scene.cursor.location[0], \
+        bpy.context.scene.cursor.location[1], \
+        bpy.context.scene.cursor.location[2] = 0, 0, 0
 
         # Vertices coordinate to 0 (local coordinate, so on the origin)
         for vert in bpy.context.object.data.vertices:
@@ -69,10 +69,10 @@ class AlignVertices(Operator):
                     axis = 2
                 vert.co[axis] = 0
 
-        bpy.context.scene.cursor_location = x2, y2, z2
+        bpy.context.scene.cursor.location = x2, y2, z2
         bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
 
-        bpy.context.scene.cursor_location = x1, y1, z1
+        bpy.context.scene.cursor.location = x1, y1, z1
         bpy.ops.object.mode_set(mode='EDIT')
 
         return {'FINISHED'}
diff --git a/mesh_carver.py b/mesh_carver.py
index d920ee9ad..1ee3755ee 100644
--- a/mesh_carver.py
+++ b/mesh_carver.py
@@ -1332,7 +1332,7 @@ def CreateCutSquare(self, context):
     depthLocation = region_2d_to_vector_3d(region, rv3d, coord)
     self.ViewVector = depthLocation
     if self.snapCursor:
-        PlanePoint = context.scene.cursor_location
+        PlanePoint = context.scene.cursor.location
     else:
         PlanePoint = self.OpsObj.location if self.OpsObj is not None else Vector((0.0, 0.0, 0.0))
 
@@ -1402,7 +1402,7 @@ def CreateCutLine(self, context):
     depthLocation = region_2d_to_vector_3d(region, rv3d, coord)
     self.ViewVector = depthLocation
 
-    PlanePoint = context.scene.cursor_location if self.snapCursor else Vector((0.0, 0.0, 0.0))
+    PlanePoint = context.scene.cursor.location if self.snapCursor else Vector((0.0, 0.0, 0.0))
     PlaneNormal = depthLocation
     PlaneNormalised = PlaneNormal.normalized()
 
@@ -1501,7 +1501,7 @@ def CreateCutCircle(self, context):
     depthLocation = region_2d_to_vector_3d(region, rv3d, coord)
     self.ViewVector = depthLocation
 
-    PlanePoint = context.scene.cursor_location if self.snapCursor else Vector((0.0, 0.0, 0.0))
+    PlanePoint = context.scene.cursor.location if self.snapCursor else Vector((0.0, 0.0, 0.0))
     PlaneNormal = depthLocation
     PlaneNormalised = PlaneNormal.normalized()
 
@@ -1740,14 +1740,14 @@ def Picking(context, event):
                 hit_world = matrix * hit
                 length_squared = (hit_world - ray_origin).length_squared
                 if best_obj is None or length_squared < best_length_squared:
-                    scene.cursor_location = hit_world
+                    scene.cursor.location = hit_world
                     best_length_squared = length_squared
                     best_obj = obj
             else:
                 if best_obj is None:
                     depthLocation = region_2d_to_vector_3d(region, rv3d, coord)
                     loc = region_2d_to_location_3d(region, rv3d, coord, depthLocation)
-                    scene.cursor_location = loc
+                    scene.cursor.location = loc
 
 
 def CreatePrimitive(self, _AngleStep, _radius):
@@ -3168,13 +3168,13 @@ class Carver(bpy.types.Operator):
         bpy.ops.mesh.normals_make_consistent()
         bpy.ops.object.mode_set(mode='OBJECT')
 
-        saved_location_0 = context.scene.cursor_location.copy()
+        saved_location_0 = context.scene.cursor.location.copy()
         bpy.ops.view3d.snap_cursor_to_active()
-        saved_location = context.scene.cursor_location.copy()
+        saved_location = context.scene.cursor.location.copy()
         bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
-        context.scene.cursor_location = saved_location
+        context.scene.cursor.location = saved_location
         bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
-        context.scene.cursor_location = saved_location_0
+        context.scene.cursor.location = saved_location_0
 
         bpy.data.objects[self.CurrentObj.name].select_set(True)
         bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY')
@@ -3203,7 +3203,7 @@ class Carver(bpy.types.Operator):
             bpy.ops.view3d.localview()
 
         # Save cursor position
-        CursorLocation = context.scene.cursor_location.copy()
+        CursorLocation = context.scene.cursor.location.copy()
 
         ActiveObjList = []
         if (self.ObjectMode is False) and (self.ProfileMode is False):
@@ -3250,7 +3250,7 @@ class Carver(bpy.types.Operator):
         lastSelected = []
 
         for ActiveObj in ActiveObjList:
-            context.scene.cursor_location = CursorLocation
+            context.scene.cursor.location = CursorLocation
 
             if len(context.selected_objects) > 0:
                 bpy.ops.object.select_all(action='TOGGLE')
@@ -3322,12 +3322,12 @@ class Carver(bpy.types.Operator):
                             CreateBevel(context, context.selected_objects[0])
                         UndoAdd(self, "REBOOL", context.selected_objects[0])
 
-                        context.scene.cursor_location = ActiveObj.location
+                        context.scene.cursor.location = ActiveObj.location
                         bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
                     else:
                         bpy.ops.object.delete(use_global=False)
 
-                context.scene.cursor_location = CursorLocation
+                context.scene.cursor.location = CursorLocation
 
                 if self.ObjectMode:
                     context.view_layer.objects.active = self.ObjectBrush
@@ -3351,7 +3351,7 @@ class Carver(bpy.types.Operator):
                         # Get the last object selected
                         lastSelected.append(context.selected_objects[0])
 
-        context.scene.cursor_location = CursorLocation
+        context.scene.cursor.location = CursorLocation
 
         if self.DontApply is False:
             # Remove cut object
diff --git a/mesh_extra_tools/mesh_edge_roundifier.py b/mesh_extra_tools/mesh_edge_roundifier.py
index 319962453..6304f7b67 100644
--- a/mesh_extra_tools/mesh_edge_roundifier.py
+++ b/mesh_extra_tools/mesh_edge_roundifier.py
@@ -1065,7 +1065,7 @@ class EdgeRoundifier(Operator):
         if parameters["refObject"] == "ORG":
             refObjectLocation = [0, 0, 0]
         elif parameters["refObject"] == "CUR":
-            refObjectLocation = bpy.context.scene.cursor_location - objectLocation
+            refObjectLocation = bpy.context.scene.cursor.location - objectLocation
         else:
             refObjectLocation = self.calc.getEdgeReference(edge, edgeCenter, parameters["plane"])
 
diff --git a/mesh_extra_tools/mesh_select_tools/mesh_index_select.py b/mesh_extra_tools/mesh_select_tools/mesh_index_select.py
index 16c912db3..a9e14dfe2 100644
--- a/mesh_extra_tools/mesh_select_tools/mesh_index_select.py
+++ b/mesh_extra_tools/mesh_select_tools/mesh_index_select.py
@@ -93,7 +93,7 @@ class SelVertEdgeFace(Operator):
         if self.select_type == 'VERT':
             bpy.context.tool_settings.mesh_select_mode = [True, False, False]
             ver = obj.data.vertices
-            loc = context.scene.cursor_location
+            loc = context.scene.cursor.location
             sel = []
             for v in ver:
                 d = v.co - loc
diff --git a/mesh_tiny_cad/CCEN.py b/mesh_tiny_cad/CCEN.py
index 48e484a6e..24604e8f1 100644
--- a/mesh_tiny_cad/CCEN.py
+++ b/mesh_tiny_cad/CCEN.py
@@ -90,7 +90,7 @@ def generate_3PT(pts, obj, nv, mode=1):
     if r:
         p1, _ = r
         cp = mw @ p1
-        bpy.context.scene.cursor_location = cp
+        bpy.context.scene.cursor.location = cp
 
         if mode == 0:
             pass
diff --git a/object_fracture/fracture_ops.py b/object_fracture/fracture_ops.py
index 30515f594..15a6f8f21 100644
--- a/object_fracture/fracture_ops.py
+++ b/object_fracture/fracture_ops.py
@@ -468,7 +468,7 @@ def import_object(obname):
             instance_groups=True)
 
     for ob in bpy.context.selected_objects:
-        ob.location = bpy.context.scene.cursor_location
+        ob.location = bpy.context.scene.cursor.location
 
 
 class ImportFractureRecorder(bpy.types.Operator):
diff --git a/object_fracture_cell/__init__.py b/object_fracture_cell/__init__.py
index 75da5e282..e1fcb41f8 100644
--- a/object_fracture_cell/__init__.py
+++ b/object_fracture_cell/__init__.py
@@ -110,7 +110,7 @@ def main_object(context, obj, level, **kw):
                     if recursion_chance_select == 'SIZE_MAX':
                         objects_recurse_input.reverse()
                 elif recursion_chance_select in {'CURSOR_MIN', 'CURSOR_MAX'}:
-                    c = scene.cursor_location.copy()
+                    c = scene.cursor.location.copy()
                     objects_recurse_input.sort(key=lambda ob_pair:
                         (ob_pair[1].location - c).length_squared)
                     if recursion_chance_select == 'CURSOR_MAX':
diff --git a/render_povray/primitives.py b/render_povray/primitives.py
index da7105bf3..ffdd6cd96 100644
--- a/render_povray/primitives.py
+++ b/render_povray/primitives.py
@@ -69,7 +69,7 @@ class POVRAY_OT_lathe_add(bpy.types.Operator):
         layers=[False]*20
         layers[0]=True
         bpy.ops.curve.primitive_bezier_curve_add(
-            location=context.scene.cursor_location,
+            location=context.scene.cursor.location,
             rotation=(0, 0, 0),
             layers=layers,
         )
@@ -634,7 +634,7 @@ class POVRAY_OT_box_add(bpy.types.Operator):
 def pov_cylinder_define(context, op, ob, radius, loc, loc_cap):
     if op:
         R = op.R
-        loc = bpy.context.scene.cursor_location
+        loc = bpy.context.scene.cursor.location
         loc_cap[0] = loc[0]
         loc_cap[1] = loc[1]
         loc_cap[2] = (loc[2]+2)
@@ -697,7 +697,7 @@ class POVRAY_OT_cylinder_add(bpy.types.Operator):
                 LOC_CAP = ob.pov.imported_cyl_loc_cap
         else:
             if not props.imported_cyl_loc:
-                LOC_CAP = LOC = bpy.context.scene.cursor_location
+                LOC_CAP = LOC = bpy.context.scene.cursor.location
                 LOC_CAP[2] += 2.0
             else:
                 LOC = props.imported_cyl_loc
@@ -738,7 +738,7 @@ class POVRAY_OT_cylinder_update(bpy.types.Operator):
 def pov_sphere_define(context, op, ob, loc):
         if op:
             R = op.R
-            loc = bpy.context.scene.cursor_location
+            loc = bpy.context.scene.cursor.location
         else:
             assert(ob)
             R = ob.pov.sphere_radius
@@ -799,7 +799,7 @@ class POVRAY_OT_sphere_add(bpy.types.Operator):
                 LOC = ob.pov.imported_loc
         else:
             if not props.imported_loc:
-                LOC = bpy.context.scene.cursor_location
+                LOC = bpy.context.scene.cursor.location
 
             else:
                 LOC = props.imported_loc
@@ -1327,7 +1327,7 @@ def pov_parametric_define(context, op, ob):
             obrot = ob.rotation_euler # In radians
             #Parametric addon has no loc rot, some extra work is needed
             #in case cursor has moved
-            curloc = bpy.context.scene.cursor_location
+            curloc = bpy.context.scene.cursor.location
 
 
             bpy.ops.object.mode_set(mode="EDIT")
diff --git a/space_view3d_math_vis/draw.py b/space_view3d_math_vis/draw.py
index d4acda2f8..0490a5ceb 100644
--- a/space_view3d_math_vis/draw.py
+++ b/space_view3d_math_vis/draw.py
@@ -112,13 +112,13 @@ def draw_callback_px():
 
     offset_y = 20
     if data_quat:
-        loc = context.scene.cursor_location.copy()
+        loc = context.scene.cursor.location.copy()
         for key, mat in data_quat.items():
             draw_text(key, loc, dy=-offset_y)
             offset_y += 20
 
     if data_euler:
-        loc = context.scene.cursor_location.copy()
+        loc = context.scene.cursor.location.copy()
         for key, mat in data_euler.items():
             draw_text(key, loc, dy=-offset_y)
             offset_y += 20
@@ -143,7 +143,7 @@ def draw_callback_view():
         draw_matrices(list(data_matrix.values()), scale, with_bounding_box)
 
     if data_euler or data_quat:
-        cursor = bpy.context.scene.cursor_location.copy()
+        cursor = bpy.context.scene.cursor.location.copy()
         derived_matrices = []
         for quat in data_quat.values():
             matrix = quat.to_matrix().to_4x4()
diff --git a/space_view3d_pie_menus/pie_cursor.py b/space_view3d_pie_menus/pie_cursor.py
index 337c0c12b..05550eb3c 100644
--- a/space_view3d_pie_menus/pie_cursor.py
+++ b/space_view3d_pie_menus/pie_cursor.py
@@ -49,7 +49,7 @@ class Snap_CursSelToCenter1(Operator):
         return (context.area.type == "VIEW_3D" and context.mode == "OBJECT")
 
     def execute(self, context):
-        context.space_data.cursor_location = (0, 0, 0)
+        context.scene.cursor.location = (0, 0, 0)
         for obj in context.selected_objects:
             obj.location = (0, 0, 0)
 
diff --git a/space_view3d_pie_menus/pie_origin.py b/space_view3d_pie_menus/pie_origin.py
index 58f22d419..12e477f4c 100644
--- a/space_view3d_pie_menus/pie_origin.py
+++ b/space_view3d_pie_menus/pie_origin.py
@@ -49,11 +49,11 @@ class PivotToSelection(Operator):
         return context.active_object is not None
 
     def execute(self, context):
-        saved_location = context.scene.cursor_location.copy()
+        saved_location = context.scene.cursor.location.copy()
         bpy.ops.view3d.snap_cursor_to_selected()
         bpy.ops.object.mode_set(mode='OBJECT')
         bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
-        context.scene.cursor_location = saved_location
+        context.scene.cursor.location = saved_location
 
         return {'FINISHED'}
 
diff --git a/space_view3d_spacebar_menu.py b/space_view3d_spacebar_menu.py
index 18acb9420..be900c426 100644
--- a/space_view3d_spacebar_menu.py
+++ b/space_view3d_spacebar_menu.py
@@ -2738,7 +2738,7 @@ def edgeIntersect(context, operator):
         return
 
     point = line[0].lerp(line[1], 0.5)
-    context.scene.cursor_location = obj.matrix_world * point
+    context.scene.cursor.location = obj.matrix_world * point
 
 
 # Cursor Edge Intersection Operator #
@@ -2789,16 +2789,16 @@ class SetObjectMode(Operator):
 # Origin To Selected Edit Mode #
 def vfeOrigin(context):
     try:
-        cursorPositionX = context.scene.cursor_location[0]
-        cursorPositionY = context.scene.cursor_location[1]
-        cursorPositionZ = context.scene.cursor_location[2]
+        cursorPositionX = context.scene.cursor.location[0]
+        cursorPositionY = context.scene.cursor.location[1]
+        cursorPositionZ = context.scene.cursor.location[2]
         bpy.ops.view3d.snap_cursor_to_selected()
         bpy.ops.object.mode_set()
         bpy.ops.object.origin_set(type='ORIGIN_CURSOR', center='MEDIAN')
         bpy.ops.object.mode_set(mode='EDIT')
-        context.scene.cursor_location[0] = cursorPositionX
-        context.scene.cursor_location[1] = cursorPositionY
-        context.scene.cursor_location[2] = cursorPositionZ
+        context.scene.cursor.location[0] = cursorPositionX
+        context.scene.cursor.location[1] = cursorPositionY
+        context.scene.cursor.location[2] = cursorPositionZ
         return True
     except:
         return False
@@ -2834,7 +2834,7 @@ class SnapCursSelToCenter(Operator):
         return (context.area.type == "VIEW_3D" and context.mode == "OBJECT")
 
     def execute(self, context):
-        context.space_data.cursor_location = (0, 0, 0)
+        context.scene.cursor.location = (0, 0, 0)
         for obj in context.selected_objects:
             obj.location = (0, 0, 0)
         return {'FINISHED'}
diff --git a/uv_texture_atlas.py b/uv_texture_atlas.py
index 5e5278749..50adb3c88 100644
--- a/uv_texture_atlas.py
+++ b/uv_texture_atlas.py
@@ -618,7 +618,7 @@ class TexAtl_MergeObjects(Operator):
 
         me = bpy.data.meshes.new(self.group_name + '_mergedObject')
         ob_merge = bpy.data.objects.new(self.group_name + '_mergedObject', me)
-        ob_merge.location = scene.cursor_location   # position object at 3d-cursor
+        ob_merge.location = scene.cursor.location   # position object at 3d-cursor
         collection.objects.link(ob_merge)           # Link object to collection
         me.update()
         ob_merge.select_set(False)
-- 
GitLab