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:
authorNBurn <7nburn@gmail.com>2019-01-25 06:59:16 +0300
committerNBurn <7nburn@gmail.com>2019-01-25 06:59:16 +0300
commitc686df25d98bc6a08ad02b9f4f9cff6b4aee4805 (patch)
tree2ddb8dd6ee0fc2bd546bb95691c07b906aeab1cf /archimesh
parenta6189ebcbe0fcee59f72147fcc160f7b47234354 (diff)
addons: object select_set syntax update
Diffstat (limited to 'archimesh')
-rw-r--r--archimesh/achm_books_maker.py6
-rw-r--r--archimesh/achm_column_maker.py18
-rw-r--r--archimesh/achm_curtain_maker.py12
-rw-r--r--archimesh/achm_door_maker.py18
-rw-r--r--archimesh/achm_kitchen_maker.py2
-rw-r--r--archimesh/achm_lamp_maker.py6
-rw-r--r--archimesh/achm_main_panel.py4
-rw-r--r--archimesh/achm_roof_maker.py8
-rw-r--r--archimesh/achm_room_maker.py16
-rw-r--r--archimesh/achm_shelves_maker.py6
-rw-r--r--archimesh/achm_stairs_maker.py6
-rw-r--r--archimesh/achm_tools.py26
-rw-r--r--archimesh/achm_venetian_maker.py12
-rw-r--r--archimesh/achm_window_maker.py20
-rw-r--r--archimesh/achm_window_panel.py22
15 files changed, 91 insertions, 91 deletions
diff --git a/archimesh/achm_books_maker.py b/archimesh/achm_books_maker.py
index 3a36bfac..beceaa9e 100644
--- a/archimesh/achm_books_maker.py
+++ b/archimesh/achm_books_maker.py
@@ -171,7 +171,7 @@ def create_book_mesh(self):
# deactivate others
for o in bpy.data.objects:
if o.select is True:
- o.select = False
+ o.select_set(False)
bpy.ops.object.select_all(False)
generate_books(self)
@@ -231,9 +231,9 @@ def generate_books(self):
# deactivate others
for o in bpy.data.objects:
if o.select is True:
- o.select = False
+ o.select_set(False)
- boxes[0].select = True
+ boxes[0].select_set(True)
bpy.context.scene.objects.active = boxes[0]
return
diff --git a/archimesh/achm_column_maker.py b/archimesh/achm_column_maker.py
index b9f5936e..ed52ae9c 100644
--- a/archimesh/achm_column_maker.py
+++ b/archimesh/achm_column_maker.py
@@ -356,7 +356,7 @@ def create_column_mesh(self):
# deactivate others
for o in bpy.data.objects:
if o.select is True:
- o.select = False
+ o.select_set(False)
bpy.ops.object.select_all(False)
@@ -380,7 +380,7 @@ def create_column_mesh(self):
if self.model == "1":
bpy.ops.object.select_all(False)
mycolumn = create_circular_column(self, "Column", radio_top, radio_mid, radio_bottom, height)
- mycolumn.select = True
+ mycolumn.select_set(True)
bpy.context.scene.objects.active = mycolumn
# Subsurf
set_smooth(mycolumn)
@@ -391,7 +391,7 @@ def create_column_mesh(self):
if self.model == "2":
mycolumn = create_rectangular_base(self, "Column", self.col_sx, self.col_sy, height)
bpy.ops.object.select_all(False)
- mycolumn.select = True
+ mycolumn.select_set(True)
bpy.context.scene.objects.active = mycolumn
set_normals(mycolumn)
# ------------------------
@@ -400,7 +400,7 @@ def create_column_mesh(self):
if self.cir_base is True:
cir_bottom = create_torus("Column_cir_bottom", radio_bottom, self.cir_base_r, self.cir_base_z)
bpy.ops.object.select_all(False)
- cir_bottom.select = True
+ cir_bottom.select_set(True)
bpy.context.scene.objects.active = cir_bottom
set_modifier_subsurf(cir_bottom)
set_smooth(cir_bottom)
@@ -416,7 +416,7 @@ def create_column_mesh(self):
box_bottom = create_rectangular_base(self, "Column_box_bottom", self.box_base_x, self.box_base_y,
self.box_base_z)
bpy.ops.object.select_all(False)
- box_bottom.select = True
+ box_bottom.select_set(True)
bpy.context.scene.objects.active = box_bottom
box_bottom.parent = mycolumn
set_normals(box_bottom)
@@ -432,7 +432,7 @@ def create_column_mesh(self):
if self.cir_top is True:
cir_top = create_torus("Column_cir_top", radio_top, self.cir_top_r, self.cir_top_z)
bpy.ops.object.select_all(False)
- cir_top.select = True
+ cir_top.select_set(True)
bpy.context.scene.objects.active = cir_top
set_modifier_subsurf(cir_top)
set_smooth(cir_top)
@@ -448,7 +448,7 @@ def create_column_mesh(self):
box_top = create_rectangular_base(self, "Column_box_top", self.box_top_x, self.box_top_y,
self.box_top_z, self.ramp)
bpy.ops.object.select_all(False)
- box_top.select = True
+ box_top.select_set(True)
bpy.context.scene.objects.active = box_top
set_normals(box_top)
box_top.parent = mycolumn
@@ -464,7 +464,7 @@ def create_column_mesh(self):
self.array_space_factor)
myarc.parent = mycolumn
bpy.ops.object.select_all(False)
- myarc.select = True
+ myarc.select_set(True)
bpy.context.scene.objects.active = myarc
set_normals(myarc)
set_modifier_mirror(myarc, "X")
@@ -554,7 +554,7 @@ def create_column_mesh(self):
set_material(myarc, mat)
bpy.ops.object.select_all(False)
- mycolumn.select = True
+ mycolumn.select_set(True)
bpy.context.scene.objects.active = mycolumn
return
diff --git a/archimesh/achm_curtain_maker.py b/archimesh/achm_curtain_maker.py
index c2dbb6f2..f8d005f2 100644
--- a/archimesh/achm_curtain_maker.py
+++ b/archimesh/achm_curtain_maker.py
@@ -164,7 +164,7 @@ def create_japan_mesh(self):
# deactivate others
for o in bpy.data.objects:
if o.select is True:
- o.select = False
+ o.select_set(False)
bpy.ops.object.select_all(False)
# Create units
generate_japan(self)
@@ -250,7 +250,7 @@ def create_roller_mesh(self):
# deactivate others
for o in bpy.data.objects:
if o.select is True:
- o.select = False
+ o.select_set(False)
bpy.ops.object.select_all(False)
generate_roller(self)
@@ -410,9 +410,9 @@ def generate_japan(self):
# deactivate others
for o in bpy.data.objects:
if o.select is True:
- o.select = False
+ o.select_set(False)
- myrail.select = True
+ myrail.select_set(True)
bpy.context.scene.objects.active = myrail
return
@@ -714,9 +714,9 @@ def generate_roller(self):
# deactivate others
for o in bpy.data.objects:
if o.select is True:
- o.select = False
+ o.select_set(False)
- myroller.select = True
+ myroller.select_set(True)
bpy.context.scene.objects.active = myroller
return
diff --git a/archimesh/achm_door_maker.py b/archimesh/achm_door_maker.py
index f3b42ded..f6238200 100644
--- a/archimesh/achm_door_maker.py
+++ b/archimesh/achm_door_maker.py
@@ -71,7 +71,7 @@ class AchmDoor(Operator):
def create_object(self, context):
# deselect all objects
for o in bpy.data.objects:
- o.select = False
+ o.select_set(False)
# we create main object and mesh
mainmesh = bpy.data.meshes.new("DoorFrane")
@@ -85,7 +85,7 @@ def create_object(self, context):
shape_children(mainobject)
# we select, and activate, main object
- mainobject.select = True
+ mainobject.select_set(True)
bpy.context.scene.objects.active = mainobject
@@ -101,12 +101,12 @@ def update_object(self, context):
oldmesh = o.data
oldname = o.data.name
# Now we deselect that object to not delete it.
- o.select = False
+ o.select_set(False)
# and we create a new mesh
tmp_mesh = bpy.data.meshes.new("temp")
# deselect all objects
for obj in bpy.data.objects:
- obj.select = False
+ obj.select_set(False)
# ---------------------------------
# Clear Parent objects (autohole)
@@ -124,13 +124,13 @@ def update_object(self, context):
child.hide = False # must be visible to avoid bug
child.hide_render = False # must be visible to avoid bug
old = child.data
- child.select = True
+ child.select_set(True)
bpy.ops.object.delete()
bpy.data.meshes.remove(old)
except:
dummy = -1
- myparent.select = True
+ myparent.select_set(True)
bpy.ops.object.delete()
# -----------------------
@@ -150,7 +150,7 @@ def update_object(self, context):
bpy.data.meshes.remove(oldmesh)
tmp_mesh.name = oldname
# and select, and activate, the main object
- o.select = True
+ o.select_set(True)
bpy.context.scene.objects.active = o
@@ -274,7 +274,7 @@ def shape_children(mainobject, update=False):
# deactivate others
for o in bpy.data.objects:
if o.select is True and o.name != mainobject.name:
- o.select = False
+ o.select_set(False)
# ------------------------------------------------------------------
@@ -535,7 +535,7 @@ def make_one_door(self, myframe, width, openside):
handle2 = None
if self.handle != "0":
handle1 = create_handle(self, mydoor, "Front", width, openside)
- handle1.select = True
+ handle1.select_set(True)
bpy.context.scene.objects.active = handle1
set_smooth(handle1)
set_modifier_subsurf(handle1)
diff --git a/archimesh/achm_kitchen_maker.py b/archimesh/achm_kitchen_maker.py
index 9901c420..3ba7c5f6 100644
--- a/archimesh/achm_kitchen_maker.py
+++ b/archimesh/achm_kitchen_maker.py
@@ -608,7 +608,7 @@ def create_kitchen_mesh(self):
# deactivate others
for o in bpy.data.objects:
if o.select is True:
- o.select = False
+ o.select_set(False)
bpy.ops.object.select_all(False)
# Create cabinets
generate_cabinets(self)
diff --git a/archimesh/achm_lamp_maker.py b/archimesh/achm_lamp_maker.py
index 1297d55e..fd4617ab 100644
--- a/archimesh/achm_lamp_maker.py
+++ b/archimesh/achm_lamp_maker.py
@@ -390,7 +390,7 @@ def create_light_mesh(self):
# deactivate others
for o in bpy.data.objects:
if o.select is True:
- o.select = False
+ o.select_set(False)
bpy.ops.object.select_all(False)
generate_light(self)
@@ -493,9 +493,9 @@ def generate_light(self):
# deactivate others
for o in bpy.data.objects:
if o.select is True:
- o.select = False
+ o.select_set(False)
- mybase.select = True
+ mybase.select_set(True)
bpy.context.scene.objects.active = mybase
return
diff --git a/archimesh/achm_main_panel.py b/archimesh/achm_main_panel.py
index 36bc2f63..58de8c74 100644
--- a/archimesh/achm_main_panel.py
+++ b/archimesh/achm_main_panel.py
@@ -117,8 +117,8 @@ class AchmHoleAction(Operator):
# Parent the empty to the room (the parent of frame)
if obj.parent is not None:
bpy.ops.object.select_all(action='DESELECT')
- parentobj.select = True
- obj.parent.select = True # parent of object
+ parentobj.select_set(True)
+ obj.parent.select_set(True) # parent of object
bpy.ops.object.parent_set(type='OBJECT', keep_transform=False)
# ---------------------------------------
# Add the modifier to controller
diff --git a/archimesh/achm_roof_maker.py b/archimesh/achm_roof_maker.py
index 84564e75..6cce3c30 100644
--- a/archimesh/achm_roof_maker.py
+++ b/archimesh/achm_roof_maker.py
@@ -159,7 +159,7 @@ def create_roof_mesh(self):
# deactivate others
for o in bpy.data.objects:
if o.select is True:
- o.select = False
+ o.select_set(False)
bpy.ops.object.select_all(False)
mydata = create_roof(self)
@@ -167,10 +167,10 @@ def create_roof_mesh(self):
# active object and deactivate others
if bpy.context.scene.objects.active is not None:
- bpy.context.scene.objects.active.select = False
+ bpy.context.scene.objects.active.select_set(False)
bpy.context.scene.objects.active = myroof
- myroof.select = True
+ myroof.select_set(True)
# Thicknes
if self.roof_thick > 0.0:
@@ -211,7 +211,7 @@ def create_roof_mesh(self):
set_material(myroof, mat)
bpy.ops.object.select_all(False)
- myroof.select = True
+ myroof.select_set(True)
bpy.context.scene.objects.active = myroof
return
diff --git a/archimesh/achm_room_maker.py b/archimesh/achm_room_maker.py
index 1ef5219d..7061b26a 100644
--- a/archimesh/achm_room_maker.py
+++ b/archimesh/achm_room_maker.py
@@ -349,7 +349,7 @@ class AchmRoom(Operator):
def create_room(self, context):
# deselect all objects
for o in bpy.data.objects:
- o.select = False
+ o.select_set(False)
# we create main object and mesh for walls
roommesh = bpy.data.meshes.new("Room")
@@ -363,7 +363,7 @@ def create_room(self, context):
shape_walls_and_create_children(roomobject, roommesh)
# we select, and activate, main object for the room.
- roomobject.select = True
+ roomobject.select_set(True)
bpy.context.scene.objects.active = roomobject
@@ -395,12 +395,12 @@ def update_room(self, context):
oldmesh = o.data
oldname = o.data.name
# Now we deselect that room object to not delete it.
- o.select = False
+ o.select_set(False)
# and we create a new mesh for the walls:
tmp_mesh = bpy.data.meshes.new("temp")
# deselect all objects
for obj in bpy.data.objects:
- obj.select = False
+ obj.select_set(False)
# Remove children created by this addon:
for child in o.children:
# noinspection PyBroadException
@@ -418,7 +418,7 @@ def update_room(self, context):
pass
# clear data
old = child.data
- child.select = True
+ child.select_set(True)
bpy.ops.object.delete()
bpy.data.meshes.remove(old)
except:
@@ -430,7 +430,7 @@ def update_room(self, context):
bpy.data.meshes.remove(oldmesh)
tmp_mesh.name = oldname
# and select, and activate, the main object of the room.
- o.select = True
+ o.select_set(True)
bpy.context.scene.objects.active = o
@@ -497,7 +497,7 @@ def shape_walls_and_create_children(myroom, tmp_mesh, update=False):
mybase.location = (0, 0, 0)
bpy.context.scene.objects.link(mybase)
mybase.parent = myroom
- mybase.select = True
+ mybase.select_set(True)
mybase["archimesh.room_object"] = True
mybase["archimesh.room_baseboard"] = True
@@ -572,7 +572,7 @@ def shape_walls_and_create_children(myroom, tmp_mesh, update=False):
# deactivate others
for o in bpy.data.objects:
if o.select is True and o.name != myroom.name:
- o.select = False
+ o.select_set(False)
# ------------------------------------------------------------------------------
diff --git a/archimesh/achm_shelves_maker.py b/archimesh/achm_shelves_maker.py
index 89f83aa8..e6e01ddb 100644
--- a/archimesh/achm_shelves_maker.py
+++ b/archimesh/achm_shelves_maker.py
@@ -263,7 +263,7 @@ def create_shelves_mesh(self):
# deactivate others
for o in bpy.data.objects:
if o.select is True:
- o.select = False
+ o.select_set(False)
bpy.ops.object.select_all(False)
# Create units
generate_shelves(self)
@@ -312,9 +312,9 @@ def generate_shelves(self):
# deactivate others
for o in bpy.data.objects:
if o.select is True:
- o.select = False
+ o.select_set(False)
- boxes[0].select = True
+ boxes[0].select_set(True)
bpy.context.scene.objects.active = boxes[0]
# Create materials
diff --git a/archimesh/achm_stairs_maker.py b/archimesh/achm_stairs_maker.py
index 9b65bfbd..963f3ebd 100644
--- a/archimesh/achm_stairs_maker.py
+++ b/archimesh/achm_stairs_maker.py
@@ -207,7 +207,7 @@ def create_stairs_mesh(self):
# deactivate others
for o in bpy.data.objects:
if o.select is True:
- o.select = False
+ o.select_set(False)
bpy.ops.object.select_all(False)
@@ -216,7 +216,7 @@ def create_stairs_mesh(self):
# ------------------------
mydata = create_stairs(self, "Stairs")
mystairs = mydata[0]
- mystairs.select = True
+ mystairs.select_set(True)
bpy.context.scene.objects.active = mystairs
remove_doubles(mystairs)
set_normals(mystairs)
@@ -246,7 +246,7 @@ def create_stairs_mesh(self):
set_material(mystairs, mat)
bpy.ops.object.select_all(False)
- mystairs.select = True
+ mystairs.select_set(True)
bpy.context.scene.objects.active = mystairs
return
diff --git a/archimesh/achm_tools.py b/archimesh/achm_tools.py
index 704f350e..bb75d447 100644
--- a/archimesh/achm_tools.py
+++ b/archimesh/achm_tools.py
@@ -77,9 +77,9 @@ def set_smooth(myobject):
# deactivate others
for o in bpy.data.objects:
if o.select is True:
- o.select = False
+ o.select_set(False)
- myobject.select = True
+ myobject.select_set(True)
bpy.context.scene.objects.active = myobject
if bpy.context.scene.objects.active.name == myobject.name:
bpy.ops.object.shade_smooth()
@@ -102,7 +102,7 @@ def set_modifier_subsurf(myobject):
# --------------------------------------------------------------------
def set_modifier_mirror(myobject, axis="Y"):
bpy.ops.object.select_all(False)
- myobject.select = True
+ myobject.select_set(True)
bpy.context.scene.objects.active = myobject
if bpy.context.scene.objects.active.name == myobject.name:
bpy.ops.object.modifier_add(type='MIRROR')
@@ -131,7 +131,7 @@ def set_modifier_mirror(myobject, axis="Y"):
# --------------------------------------------------------------------
def set_modifier_array(myobject, axis, move, repeat, fix=False, fixmove=0, zmove=0):
bpy.ops.object.select_all(False)
- myobject.select = True
+ myobject.select_set(True)
bpy.context.scene.objects.active = myobject
if bpy.context.scene.objects.active.name == myobject.name:
bpy.ops.object.modifier_add(type='ARRAY')
@@ -212,7 +212,7 @@ def set_material(myobject, mymaterial):
# --------------------------------------------------------------------
def set_material_faces(myobject, idx):
bpy.context.scene.objects.active = myobject
- myobject.select = True
+ myobject.select_set(True)
bpy.context.object.active_material_index = idx
if bpy.context.scene.objects.active.name == myobject.name:
bpy.ops.object.mode_set(mode='EDIT')
@@ -226,7 +226,7 @@ def set_material_faces(myobject, idx):
# Select faces
# --------------------------------------------------------------------
def select_faces(myobject, selface, clear):
- myobject.select = True
+ myobject.select_set(True)
bpy.context.scene.objects.active = myobject
if bpy.context.scene.objects.active.name == myobject.name:
# deselect everything
@@ -243,7 +243,7 @@ def select_faces(myobject, selface, clear):
# Select vertices
# --------------------------------------------------------------------
def select_vertices(myobject, selvertices, clear=True):
- myobject.select = True
+ myobject.select_set(True)
bpy.context.scene.objects.active = myobject
if bpy.context.scene.objects.active.name == myobject.name:
# deselect everything
@@ -272,7 +272,7 @@ def select_vertices(myobject, selvertices, clear=True):
def mark_seam(myobject):
# noinspection PyBroadException
try:
- myobject.select = True
+ myobject.select_set(True)
bpy.context.scene.objects.active = myobject
if bpy.context.scene.objects.active.name == myobject.name:
bpy.ops.object.mode_set(mode='EDIT', toggle=False)
@@ -288,7 +288,7 @@ def mark_seam(myobject):
def unwrap_mesh(myobject, allfaces=True):
# noinspection PyBroadException
try:
- myobject.select = True
+ myobject.select_set(True)
bpy.context.scene.objects.active = myobject
if bpy.context.scene.objects.active.name == myobject.name:
# Unwrap
@@ -887,8 +887,8 @@ def parentobject(parentobj, childobj):
try:
bpy.ops.object.select_all(action='DESELECT')
bpy.context.scene.objects.active = parentobj
- parentobj.select = True
- childobj.select = True
+ parentobj.select_set(True)
+ childobj.select_set(True)
bpy.ops.object.parent_set(type='OBJECT', keep_transform=False)
return True
except:
@@ -952,11 +952,11 @@ def remove_children(myobject):
# clear child data
if child.type == 'MESH':
old = child.data
- child.select = True
+ child.select_set(True)
bpy.ops.object.delete()
bpy.data.meshes.remove(old)
if child.type == 'CURVE':
- child.select = True
+ child.select_set(True)
bpy.ops.object.delete()
except:
pass
diff --git a/archimesh/achm_venetian_maker.py b/archimesh/achm_venetian_maker.py
index 05dbdba3..ba077a80 100644
--- a/archimesh/achm_venetian_maker.py
+++ b/archimesh/achm_venetian_maker.py
@@ -71,7 +71,7 @@ class AchmVenetian(Operator):
def create_object(self, context):
# deselect all objects
for o in bpy.data.objects:
- o.select = False
+ o.select_set(False)
# we create main object and mesh
mainmesh = bpy.data.meshes.new("VenetianFrane")
@@ -84,7 +84,7 @@ def create_object(self, context):
shape_mesh_and_create_children(mainobject, mainmesh)
# we select, and activate, main object
- mainobject.select = True
+ mainobject.select_set(True)
bpy.context.scene.objects.active = mainobject
@@ -100,12 +100,12 @@ def update_object(self, context):
oldmesh = o.data
oldname = o.data.name
# Now we deselect that object to not delete it.
- o.select = False
+ o.select_set(False)
# and we create a new mesh
tmp_mesh = bpy.data.meshes.new("temp")
# deselect all objects
for obj in bpy.data.objects:
- obj.select = False
+ obj.select_set(False)
# -----------------------
# remove all children
@@ -123,7 +123,7 @@ def update_object(self, context):
bpy.data.meshes.remove(oldmesh)
tmp_mesh.name = oldname
# and select, and activate, the main object
- o.select = True
+ o.select_set(True)
bpy.context.scene.objects.active = o
@@ -319,7 +319,7 @@ def shape_mesh_and_create_children(mainobject, tmp_mesh, update=False):
# deactivate others
for o in bpy.data.objects:
if o.select is True and o.name != mainobject.name:
- o.select = False
+ o.select_set(False)
return
diff --git a/archimesh/achm_window_maker.py b/archimesh/achm_window_maker.py
index 64a9a3f8..48a9faa7 100644
--- a/archimesh/achm_window_maker.py
+++ b/archimesh/achm_window_maker.py
@@ -71,7 +71,7 @@ class AchmWindows(Operator):
def create_object(self, context):
# deselect all objects
for o in bpy.data.objects:
- o.select = False
+ o.select_set(False)
# we create main object and mesh
mainmesh = bpy.data.meshes.new("WindowFrane")
@@ -84,7 +84,7 @@ def create_object(self, context):
shape_mesh_and_create_children(mainobject, mainmesh)
# we select, and activate, main object
- mainobject.select = True
+ mainobject.select_set(True)
bpy.context.scene.objects.active = mainobject
@@ -100,12 +100,12 @@ def update_object(self, context):
oldmesh = o.data
oldname = o.data.name
# Now we deselect that object to not delete it.
- o.select = False
+ o.select_set(False)
# and we create a new mesh
tmp_mesh = bpy.data.meshes.new("temp")
# deselect all objects
for obj in bpy.data.objects:
- obj.select = False
+ obj.select_set(False)
# ---------------------------------
# Clear Parent objects (autohole)
@@ -123,13 +123,13 @@ def update_object(self, context):
child.hide = False # must be visible to avoid bug
child.hide_render = False # must be visible to avoid bug
old = child.data
- child.select = True
+ child.select_set(True)
bpy.ops.object.delete()
bpy.data.meshes.remove(old)
except:
dummy = -1
- myparent.select = True
+ myparent.select_set(True)
bpy.ops.object.delete()
# -----------------------
@@ -148,7 +148,7 @@ def update_object(self, context):
bpy.data.meshes.remove(oldmesh)
tmp_mesh.name = oldname
# and select, and activate, the main object
- o.select = True
+ o.select_set(True)
bpy.context.scene.objects.active = o
@@ -233,7 +233,7 @@ def shape_mesh_and_create_children(mainobject, tmp_mesh, update=False):
# deactivate others
for o in bpy.data.objects:
if o.select is True and o.name != mainobject.name:
- o.select = False
+ o.select_set(False)
return
@@ -720,9 +720,9 @@ def generate_leaf_window(myframe, mp, mymesh):
# deactivate others
for o in bpy.data.objects:
if o.select is True:
- o.select = False
+ o.select_set(False)
- myframe.select = True
+ myframe.select_set(True)
bpy.context.scene.objects.active = myframe
return myframe
diff --git a/archimesh/achm_window_panel.py b/archimesh/achm_window_panel.py
index 15cc0e08..d8f6460c 100644
--- a/archimesh/achm_window_panel.py
+++ b/archimesh/achm_window_panel.py
@@ -231,7 +231,7 @@ class AchmWinPanel(Operator):
def create_window():
# deselect all objects
for o in bpy.data.objects:
- o.select = False
+ o.select_set(False)
# Create main object
window_mesh = bpy.data.meshes.new("Window")
window_object = bpy.data.objects.new("Window", window_mesh)
@@ -247,15 +247,15 @@ def create_window():
# deactivate others
for o in bpy.data.objects:
if o.select is True and o.name != window_object.name:
- o.select = False
+ o.select_set(False)
# Select, and activate object
- window_object.select = True
+ window_object.select_set(True)
bpy.context.scene.objects.active = window_object
do_ctrl_box(window_object)
# Reselect
- window_object.select = True
+ window_object.select_set(True)
bpy.context.scene.objects.active = window_object
@@ -269,12 +269,12 @@ def update_window(self, context):
oldmesh = o.data
oldname = o.data.name
# Now deselect that object to not delete it.
- o.select = False
+ o.select_set(False)
# # and create a new mesh for the object:
# tmp_mesh = bpy.data.meshes.new("temp")
# deselect all objects
for obj in bpy.data.objects:
- obj.select = False
+ obj.select_set(False)
# ---------------------------------
# Clear Parent objects (autohole)
# ---------------------------------
@@ -294,13 +294,13 @@ def update_window(self, context):
child.hide = False # must be visible to avoid bug
child.hide_render = False # must be visible to avoid bug
old = child.data
- child.select = True
+ child.select_set(True)
bpy.ops.object.delete()
bpy.data.meshes.remove(old)
except:
pass
- myparent.select = True
+ myparent.select_set(True)
bpy.ops.object.delete()
# Finally create all that again
@@ -317,15 +317,15 @@ def update_window(self, context):
# deactivate others
for ob in bpy.data.objects:
if ob.select is True and ob.name != o.name:
- ob.select = False
+ ob.select_set(False)
# and select, and activate, the object.
- o.select = True
+ o.select_set(True)
bpy.context.scene.objects.active = o
do_ctrl_box(o)
# Reselect
- o.select = True
+ o.select_set(True)
bpy.context.scene.objects.active = o