Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-03-01 04:49:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-01 04:51:10 +0300
commit9999dada60a64eb27b37c4d711f4c3979888253e (patch)
treeb325eb58ec754c883683696683933fc9d368eb0d /archimesh
parentdd0dffef42ae64d1bf16e879e3f1470ce3bf5cad (diff)
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.
Diffstat (limited to 'archimesh')
-rw-r--r--archimesh/achm_books_maker.py2
-rw-r--r--archimesh/achm_column_maker.py8
-rw-r--r--archimesh/achm_curtain_maker.py4
-rw-r--r--archimesh/achm_door_maker.py6
-rw-r--r--archimesh/achm_kitchen_maker.py2
-rw-r--r--archimesh/achm_lamp_maker.py2
-rw-r--r--archimesh/achm_main_panel.py6
-rw-r--r--archimesh/achm_roof_maker.py2
-rw-r--r--archimesh/achm_room_maker.py2
-rw-r--r--archimesh/achm_shelves_maker.py2
-rw-r--r--archimesh/achm_stairs_maker.py2
-rw-r--r--archimesh/achm_tools.py2
-rw-r--r--archimesh/achm_venetian_maker.py10
-rw-r--r--archimesh/achm_window_maker.py14
-rw-r--r--archimesh/achm_window_panel.py4
15 files changed, 34 insertions, 34 deletions
diff --git a/archimesh/achm_books_maker.py b/archimesh/achm_books_maker.py
index a3468be9..87373030 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 d1680a9c..fdb30303 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 29740556..e0c9cc46 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 80a7a241..b7c468a7 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 14860f73..ad3e1123 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 ea661d5f..09e30747 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 47287a58..0db6bbd4 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 7de38df7..846b1f50 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 2cdd1510..702f9c0d 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 53595da2..0f04124e 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 9459d5d9..b8688e73 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 3a775516..78eae826 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 dbf76970..5ef9a9bc 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 bf16411d..3e1b5ac9 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 faf18385..30429070 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)