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:
-rw-r--r--add_advanced_objects_menu/add_mesh_aggregate.py10
-rw-r--r--add_advanced_objects_menu/circle_array.py14
-rw-r--r--add_advanced_objects_menu/copy2.py12
-rw-r--r--add_advanced_objects_menu/cubester.py8
-rw-r--r--add_advanced_objects_menu/make_struts.py4
-rw-r--r--add_advanced_objects_menu/rope_alpha.py4
-rw-r--r--add_advanced_objects_panels/delaunay_voronoi.py12
-rw-r--r--add_advanced_objects_panels/drop_to_ground.py16
-rw-r--r--add_advanced_objects_panels/object_laplace_lightning.py4
-rw-r--r--add_advanced_objects_panels/unfold_transition.py4
-rw-r--r--add_curve_extra_objects/add_curve_spirofit_bouncespline.py2
-rw-r--r--add_mesh_extra_objects/Wallfactory.py2
-rw-r--r--add_mesh_extra_objects/add_empty_as_parent.py4
-rw-r--r--add_mesh_extra_objects/add_mesh_beam_builder.py2
-rw-r--r--add_mesh_extra_objects/add_mesh_round_brilliant.py2
-rw-r--r--add_mesh_extra_objects/add_mesh_triangles.py2
-rw-r--r--add_mesh_extra_objects/geodesic_domes/vefm_271.py2
-rw-r--r--animation_add_corrective_shape_key.py2
-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
-rw-r--r--btrace/bTrace.py22
-rw-r--r--camera_turnaround.py4
-rw-r--r--io_anim_c3d/__init__.py2
-rw-r--r--io_export_unreal_psk_psa.py28
-rw-r--r--io_import_dxf/dxfimport/do.py2
-rw-r--r--io_import_scene_unreal_psa_psk.py12
-rw-r--r--io_mesh_pdb/import_pdb.py16
-rw-r--r--io_mesh_raw/import_raw.py4
-rw-r--r--io_scene_3ds/import_3ds.py2
-rw-r--r--io_scene_ms3d/ms3d_import.py2
-rw-r--r--io_scene_x3d/import_x3d.py12
-rw-r--r--light_field_tools/light_field_tools.py4
-rw-r--r--materials_library_vx/__init__.py2
-rw-r--r--materials_utils/__init__.py16
-rw-r--r--mesh_bsurfaces.py68
-rw-r--r--mesh_carver.py64
-rw-r--r--mesh_tissue/dual_mesh.py4
-rw-r--r--mesh_tissue/lattice.py28
-rw-r--r--mesh_tissue/tessellate_numpy.py4
-rw-r--r--mesh_tissue/uv_to_mesh.py14
-rw-r--r--object_cloud_gen.py18
-rw-r--r--object_fracture/fracture_ops.py8
-rw-r--r--object_fracture_cell/__init__.py4
-rw-r--r--object_fracture_cell/fracture_cell_setup.py4
-rw-r--r--object_fracture_crack/crack_it.py2
-rw-r--r--object_print3d_utils/export.py2
-rw-r--r--object_skinify.py12
-rw-r--r--render_povray/primitives.py6
-rw-r--r--space_view3d_display_tools/select_tools.py6
-rw-r--r--space_view3d_display_tools/selection_restrictor.py24
-rw-r--r--space_view3d_stored_views/operators.py4
-rw-r--r--ui_layer_manager.py6
-rw-r--r--uv_texture_atlas.py36
66 files changed, 365 insertions, 365 deletions
diff --git a/add_advanced_objects_menu/add_mesh_aggregate.py b/add_advanced_objects_menu/add_mesh_aggregate.py
index 122e4d96..d86a9697 100644
--- a/add_advanced_objects_menu/add_mesh_aggregate.py
+++ b/add_advanced_objects_menu/add_mesh_aggregate.py
@@ -240,7 +240,7 @@ class OBJECT_OT_agregate_mesh(Operator):
bpy.ops.object.mode_set()
bpy.ops.object.select_all(action='DESELECT')
- obj.select = True
+ obj.select_set(True)
msv = []
for i in range(len(obj.modifiers)):
@@ -283,7 +283,7 @@ class OBJECT_OT_agregate_mesh(Operator):
newobj.scale = [self.baseSca + self.baseSca * rg(self.varSca)] * 3
if self.anim:
- newobj.select = True
+ newobj.select_set(True)
bpy.ops.object.make_single_user(type='SELECTED_OBJECTS', obdata=True)
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
@@ -306,7 +306,7 @@ class OBJECT_OT_agregate_mesh(Operator):
else:
scn.objects.active = obj
- newobj.select = True
+ newobj.select_set(True)
bpy.ops.object.join()
if self.track:
@@ -316,9 +316,9 @@ class OBJECT_OT_agregate_mesh(Operator):
obj.modifiers[i].show_viewport = msv[i]
for o in par:
- o.select = True
+ o.select_set(True)
- obj.select = True
+ obj.select_set(True)
if self.auto_refresh is False:
self.refresh = False
diff --git a/add_advanced_objects_menu/circle_array.py b/add_advanced_objects_menu/circle_array.py
index 818e513c..acec375f 100644
--- a/add_advanced_objects_menu/circle_array.py
+++ b/add_advanced_objects_menu/circle_array.py
@@ -97,7 +97,7 @@ class Circle_Array(Operator):
active.modifiers[0].use_object_offset = True
active.modifiers[0].use_relative_offset = False
- active.select = False
+ active.select_set(False)
bpy.context.scene.objects.active = context.active_object
bpy.ops.view3d.snap_cursor_to_selected()
@@ -112,11 +112,11 @@ class Circle_Array(Operator):
bpy.context.scene.objects.active = active
num = active.modifiers["Array"].count
rotate_num = 360 / num
- active.select = True
+ active.select_set(True)
bpy.ops.object.transform_apply(location=False, rotation=True, scale=True)
empty_name.rotation_euler = (0, 0, radians(rotate_num))
- empty_name.select = False
- active.select = True
+ empty_name.select_set(False)
+ active.select_set(True)
bpy.ops.object.origin_set(type="ORIGIN_CURSOR")
return {'FINISHED'}
@@ -137,11 +137,11 @@ class Circle_Array(Operator):
bpy.context.scene.objects.active = active
num = active.modifiers["Array"].count
rotate_num = 360 / num
- active.select = True
+ active.select_set(True)
bpy.ops.object.transform_apply(location=False, rotation=True, scale=True)
empty_name.rotation_euler = (0, 0, radians(rotate_num))
- empty_name.select = False
- active.select = True
+ empty_name.select_set(False)
+ active.select_set(True)
return {'FINISHED'}
diff --git a/add_advanced_objects_menu/copy2.py b/add_advanced_objects_menu/copy2.py
index 14dd312f..0492a089 100644
--- a/add_advanced_objects_menu/copy2.py
+++ b/add_advanced_objects_menu/copy2.py
@@ -254,8 +254,8 @@ def vertex_copy(scene, obj, source_obj, axes):
# select all copied objects
for copy in copy_list:
- copy.select = True
- obj.select = False
+ copy.select_set(True)
+ obj.select_set(False)
def edge_copy(scene, obj, source_obj, axes, es, scale):
@@ -297,8 +297,8 @@ def edge_copy(scene, obj, source_obj, axes, es, scale):
# select all copied objects
for copy in copy_list:
- copy.select = True
- obj.select = False
+ copy.select_set(True)
+ obj.select_set(False)
def face_copy(scene, obj, source_obj, axes):
@@ -323,8 +323,8 @@ def face_copy(scene, obj, source_obj, axes):
# select all copied objects
for copy in copy_list:
- copy.select = True
- obj.select = False
+ copy.select_set(True)
+ obj.select_set(False)
def register():
diff --git a/add_advanced_objects_menu/cubester.py b/add_advanced_objects_menu/cubester.py
index 0b75285a..3d95613e 100644
--- a/add_advanced_objects_menu/cubester.py
+++ b/add_advanced_objects_menu/cubester.py
@@ -199,7 +199,7 @@ def create_mesh_from_audio(self, scene, verts, faces):
ob = bpy.data.objects.new("cubed", mesh)
bpy.context.scene.objects.link(ob)
bpy.context.scene.objects.active = ob
- ob.select = True
+ ob.select_set(True)
# initial vertex colors
if adv_obj.cubester_materials == "image" and adv_obj.cubester_color_image != "":
@@ -335,8 +335,8 @@ def create_mesh_from_audio(self, scene, verts, faces):
# correct for z height
curve.scale = (curve.scale[0], curve.scale[0], curve.scale[0])
- ob.select = True
- curve.select = False
+ ob.select_set(True)
+ curve.select_set(False)
scene.objects.active = ob
# data was collected and then multi-variable regression was done in Excel
@@ -414,7 +414,7 @@ def create_mesh_from_image(self, scene, verts, faces):
ob = bpy.data.objects.new("cubed", mesh)
context.scene.objects.link(ob)
context.scene.objects.active = ob
- ob.select = True
+ ob.select_set(True)
# uv unwrap
if adv_obj.cubester_mesh_style == "blocks":
diff --git a/add_advanced_objects_menu/make_struts.py b/add_advanced_objects_menu/make_struts.py
index 91e794a2..87aee753 100644
--- a/add_advanced_objects_menu/make_struts.py
+++ b/add_advanced_objects_menu/make_struts.py
@@ -479,7 +479,7 @@ def create_struts(self, context, ind, od, segments, solid, loops, manifold):
for truss_obj in bpy.context.scene.objects:
if not truss_obj.select:
continue
- truss_obj.select = False
+ truss_obj.select_set(False)
truss_mesh = truss_obj.to_mesh(context.scene, True, 'PREVIEW')
if not truss_mesh.edges:
continue
@@ -492,7 +492,7 @@ def create_struts(self, context, ind, od, segments, solid, loops, manifold):
mesh.from_pydata(verts, [], faces)
obj = bpy.data.objects.new("Struts", mesh)
bpy.context.scene.objects.link(obj)
- obj.select = True
+ obj.select_set(True)
obj.location = truss_obj.location
bpy.context.scene.objects.active = obj
mesh.update()
diff --git a/add_advanced_objects_menu/rope_alpha.py b/add_advanced_objects_menu/rope_alpha.py
index a7379282..d56f053e 100644
--- a/add_advanced_objects_menu/rope_alpha.py
+++ b/add_advanced_objects_menu/rope_alpha.py
@@ -127,13 +127,13 @@ def which_vertex_are_selected(ob):
def seleccionar_por_nombre(nombre):
scn = bpy.context.scene
- bpy.data.objects[nombre].select = True
+ bpy.data.objects[nombre].select_set(True)
scn.objects.active = bpy.data.objects[nombre]
def deseleccionar_por_nombre(nombre):
- bpy.data.objects[nombre].select = False
+ bpy.data.objects[nombre].select_set(False)
def crear_vertices(ob):
diff --git a/add_advanced_objects_panels/delaunay_voronoi.py b/add_advanced_objects_panels/delaunay_voronoi.py
index 67169ff6..fced150d 100644
--- a/add_advanced_objects_panels/delaunay_voronoi.py
+++ b/add_advanced_objects_panels/delaunay_voronoi.py
@@ -150,8 +150,8 @@ class OBJECT_OT_TriangulateButton(Operator):
my = bpy.data.objects.new("TIN", mesh)
context.scene.objects.link(my)
my.matrix_world = obj.matrix_world.copy()
- obj.select = False
- my.select = True
+ obj.select_set(False)
+ my.select_set(True)
context.scene.objects.active = my
self.report({'INFO'}, "Mesh created (" + str(len(faces)) + " triangles)")
print("Total :%s faces %s verts" % (len(faces), len(points_3D)))
@@ -212,8 +212,8 @@ class OBJECT_OT_TriangulateButton(Operator):
# Update scene
bpy.context.scene.objects.link(tinObj) # Link object to scene
bpy.context.scene.objects.active = tinObj
- tinObj.select = True
- obj.select = False
+ tinObj.select_set(True)
+ obj.select_set(False)
self.report({"INFO"},
"Mesh created (" + str(len(triangles)) + " triangles)")
@@ -315,8 +315,8 @@ class OBJECT_OT_VoronoiButton(Operator):
# update scene
bpy.context.scene.objects.link(voronoiObj) # Link object to scene
bpy.context.scene.objects.active = voronoiObj
- voronoiObj.select = True
- obj.select = False
+ voronoiObj.select_set(True)
+ obj.select_set(False)
# Report
if self.meshType == "Edges":
diff --git a/add_advanced_objects_panels/drop_to_ground.py b/add_advanced_objects_panels/drop_to_ground.py
index 735af80a..c9d9a7b4 100644
--- a/add_advanced_objects_panels/drop_to_ground.py
+++ b/add_advanced_objects_panels/drop_to_ground.py
@@ -109,9 +109,9 @@ def drop_objectsall(self, context):
name = ground.name
for obs in bpy.context.scene.objects:
- obs.select = True
+ obs.select_set(True)
if obs.name == name:
- obs.select = False
+ obs.select_set(False)
obs2 = context.selected_objects
@@ -158,11 +158,11 @@ def drop_objectsall(self, context):
# cleanup
bpy.ops.object.select_all(action='DESELECT')
- tmp_ground.select = True
+ tmp_ground.select_set(True)
bpy.ops.object.delete('EXEC_DEFAULT')
for ob in obs2:
- ob.select = True
- ground.select = True
+ ob.select_set(True)
+ ground.select_set(True)
def drop_objects(self, context):
@@ -215,11 +215,11 @@ def drop_objects(self, context):
# cleanup
bpy.ops.object.select_all(action='DESELECT')
- tmp_ground.select = True
+ tmp_ground.select_set(True)
bpy.ops.object.delete('EXEC_DEFAULT')
for ob in obs:
- ob.select = True
- ground.select = True
+ ob.select_set(True)
+ ground.select_set(True)
# define base dummy class for inheritance
diff --git a/add_advanced_objects_panels/object_laplace_lightning.py b/add_advanced_objects_panels/object_laplace_lightning.py
index 32d7b3f4..a28ff136 100644
--- a/add_advanced_objects_panels/object_laplace_lightning.py
+++ b/add_advanced_objects_panels/object_laplace_lightning.py
@@ -342,9 +342,9 @@ def writeArrayToCubes(arr, gridBU, orig, cBOOL=False, jBOOL=True):
# Selects all cubes w/ ?bpy.ops.object.join() b/c
# Can't join all cubes to a single mesh right... argh...
for q in bpy.context.scene.objects:
- q.select = False
+ q.select_set(False)
if q.name[0:5] == 'xCUBE':
- q.select = True
+ q.select_set(True)
bpy.context.scene.objects.active = q
diff --git a/add_advanced_objects_panels/unfold_transition.py b/add_advanced_objects_panels/unfold_transition.py
index 562f6a6c..726a4942 100644
--- a/add_advanced_objects_panels/unfold_transition.py
+++ b/add_advanced_objects_panels/unfold_transition.py
@@ -151,7 +151,7 @@ class Set_Up_Fold(Operator):
b.tail, b.head = fb[1], fb[2]
b.align_roll(f.normal)
- b.select = False
+ b.select_set(False)
b.layers = vis
b.parent = root
vg = obj.vertex_groups.new(name=b.name)
@@ -162,7 +162,7 @@ class Set_Up_Fold(Operator):
if adv_obj.unfold_modo == "weight":
obj.vertex_groups.active_index = 0
scn.objects.active = rig
- obj.select = False
+ obj.select_set(False)
return {"FINISHED"}
diff --git a/add_curve_extra_objects/add_curve_spirofit_bouncespline.py b/add_curve_extra_objects/add_curve_spirofit_bouncespline.py
index 88c43969..a57e0cab 100644
--- a/add_curve_extra_objects/add_curve_spirofit_bouncespline.py
+++ b/add_curve_extra_objects/add_curve_spirofit_bouncespline.py
@@ -825,7 +825,7 @@ class CatenaryCurve(Operator):
try:
ob1 = bpy.context.active_object
- ob1.select = False
+ ob1.select_set(False)
ob2 = bpy.context.selected_objects[0]
start = ob1.location
end = ob2.location
diff --git a/add_mesh_extra_objects/Wallfactory.py b/add_mesh_extra_objects/Wallfactory.py
index b6d7460f..f7edf659 100644
--- a/add_mesh_extra_objects/Wallfactory.py
+++ b/add_mesh_extra_objects/Wallfactory.py
@@ -877,7 +877,7 @@ class add_mesh_wallb(Operator):
# leave this out to prevent 'Tab key" going into edit mode :)
# Use rmb click to select and still modify.
scene.objects.active = ob_new
- ob_new.select = True
+ ob_new.select_set(True)
ob_new.location = tuple(context.scene.cursor_location)
ob_new.rotation_quaternion = [1.0, 0.0, 0.0, 0.0]
diff --git a/add_mesh_extra_objects/add_empty_as_parent.py b/add_mesh_extra_objects/add_empty_as_parent.py
index 0d4716a3..56334044 100644
--- a/add_mesh_extra_objects/add_empty_as_parent.py
+++ b/add_mesh_extra_objects/add_empty_as_parent.py
@@ -85,12 +85,12 @@ class P2E(Operator):
bpy.ops.collection.objects_add_active()
for o in objs:
- o.select = True
+ o.select_set(True)
if not o.parent:
bpy.ops.object.parent_set(type='OBJECT')
if self.grupo:
bpy.ops.collection.objects_add_active()
- o.select = False
+ o.select_set(False)
for o in objs:
if self.renom:
o.name = self.nombre + '_' + o.name
diff --git a/add_mesh_extra_objects/add_mesh_beam_builder.py b/add_mesh_extra_objects/add_mesh_beam_builder.py
index 8c876953..70324052 100644
--- a/add_mesh_extra_objects/add_mesh_beam_builder.py
+++ b/add_mesh_extra_objects/add_mesh_beam_builder.py
@@ -665,7 +665,7 @@ def addBeamObj(sRef, context):
beamObj = bpy.data.objects.new("Beam", beamMesh)
context.scene.objects.link(beamObj)
context.scene.objects.active = beamObj
- beamObj.select = True
+ beamObj.select_set(True)
beamMesh.from_pydata(verts, [], faces)
beamMesh.update(calc_edges=True)
diff --git a/add_mesh_extra_objects/add_mesh_round_brilliant.py b/add_mesh_extra_objects/add_mesh_round_brilliant.py
index b5c0f869..2d653f9e 100644
--- a/add_mesh_extra_objects/add_mesh_round_brilliant.py
+++ b/add_mesh_extra_objects/add_mesh_round_brilliant.py
@@ -237,7 +237,7 @@ def addBrilliant(context, s, table_w, crown_h, girdle_t, pavi_d, bezel_f,
# activate and select object
scene.objects.active = dobj
- dobj.select = True
+ dobj.select_set(True)
obj = bpy.context.active_object
# flip all face normals outside
diff --git a/add_mesh_extra_objects/add_mesh_triangles.py b/add_mesh_extra_objects/add_mesh_triangles.py
index 8a662547..de577f9d 100644
--- a/add_mesh_extra_objects/add_mesh_triangles.py
+++ b/add_mesh_extra_objects/add_mesh_triangles.py
@@ -282,7 +282,7 @@ class MakeTriangle(Operator):
# before doing the deselect make sure edit mode isn't active
exitEditMode()
bpy.ops.object.select_all(action="DESELECT")
- NewObj.select = True
+ NewObj.select_set(True)
context.scene.objects.active = NewObj
if self.at_3Dcursor is True:
diff --git a/add_mesh_extra_objects/geodesic_domes/vefm_271.py b/add_mesh_extra_objects/geodesic_domes/vefm_271.py
index 8c87c22a..4b5f68e7 100644
--- a/add_mesh_extra_objects/geodesic_domes/vefm_271.py
+++ b/add_mesh_extra_objects/geodesic_domes/vefm_271.py
@@ -834,7 +834,7 @@ class importmesh(mesh):
obj = bpy.data.objects[meshname]
bpy.context.scene.objects.active = obj
- obj.select = True
+ obj.select_set(True)
impmesh = None
if not breakquadflag:
bpy.ops.object.mode_set(mode='EDIT')
diff --git a/animation_add_corrective_shape_key.py b/animation_add_corrective_shape_key.py
index efb357f8..e7fc75ce 100644
--- a/animation_add_corrective_shape_key.py
+++ b/animation_add_corrective_shape_key.py
@@ -229,7 +229,7 @@ class object_duplicate_flatten_modifiers(bpy.types.Operator):
bpy.ops.object.select_all(action='DESELECT')
scene.objects.active = new_object
- new_object.select = True
+ new_object.select_set(True)
return {'FINISHED'}
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
diff --git a/btrace/bTrace.py b/btrace/bTrace.py
index 8df06475..8543ac59 100644
--- a/btrace/bTrace.py
+++ b/btrace/bTrace.py
@@ -132,7 +132,7 @@ class OBJECT_OT_objectconnect(Operator):
for a in obnames:
lists.append(a)
- a.select = False
+ a.select_set(False)
# trace the origins
tracer = bpy.data.curves.new('tracer', 'CURVE')
@@ -162,16 +162,16 @@ class OBJECT_OT_objectconnect(Operator):
# place hooks
for i in range(len(lists)):
- lists[i].select = True
+ lists[i].select_set(True)
curve.data.splines[0].bezier_points[i].select_control_point = True
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.object.hook_add_selob()
bpy.ops.object.mode_set(mode='OBJECT')
curve.data.splines[0].bezier_points[i].select_control_point = False
- lists[i].select = False
+ lists[i].select_set(False)
bpy.ops.object.select_all(action='DESELECT')
- curve.select = True # selected curve after it's created
+ curve.select_set(True) # selected curve after it's created
# Materials
check_materials = True
trace_mats = addtracemat(bpy.context.object.data)
@@ -269,7 +269,7 @@ class OBJECT_OT_particletrace(Operator):
# add to group
bpy.ops.object.select_all(action='DESELECT')
for curveobject in curvelist:
- curveobject.select = True
+ curveobject.select_set(True)
bpy.context.scene.objects.active = curveobject
bpy.ops.object.collection_link(group="Btrace")
# Materials
@@ -372,7 +372,7 @@ class OBJECT_OT_traceallparticles(Operator):
bp.keyframe_insert('handle_right')
# Select new curve
bpy.ops.object.select_all(action='DESELECT')
- curve.select = True
+ curve.select_set(True)
bpy.context.scene.objects.active = curve
# Materials
@@ -741,7 +741,7 @@ class OBJECT_OT_meshfollow(Operator):
bpy.ops.object.select_all(action='DESELECT')
for curveobject in curvelist:
if curveobject.type == 'CURVE':
- curveobject.select = True
+ curveobject.select_set(True)
context.scene.objects.active = curveobject
bpy.ops.object.collection_link(group="Btrace")
# Materials
@@ -749,16 +749,16 @@ class OBJECT_OT_meshfollow(Operator):
if not trace_mats and check_materials is True:
check_materials = False
- curveobject.select = False
+ curveobject.select_set(False)
if Btrace.animate: # Add grow curve
for curveobject in curvelist:
- curveobject.select = True
+ curveobject.select_set(True)
bpy.ops.curve.btgrow()
for curveobject in curvelist:
- curveobject.select = False
+ curveobject.select_set(False)
- obj.select = False # Deselect original object
+ obj.select_set(False) # Deselect original object
if check_materials is False:
self.report({'WARNING'}, "Some Materials could not be added")
diff --git a/camera_turnaround.py b/camera_turnaround.py
index f9e20b62..5bb5c620 100644
--- a/camera_turnaround.py
+++ b/camera_turnaround.py
@@ -88,7 +88,7 @@ class RunAction(Operator):
# (make empty active object)
# -------------------------
bpy.ops.object.select_all(False)
- myempty.select = True
+ myempty.select_set(True)
context.scene.objects.active = myempty
# save current configuration
savedinterpolation = context.preferences.edit.keyframe_new_interpolation_type
@@ -172,7 +172,7 @@ class RunAction(Operator):
# Back to old selection
# -------------------------
bpy.ops.object.select_all(False)
- selectobject.select = True
+ selectobject.select_set(True)
bpy.context.scene.objects.active = selectobject
bpy.context.scene.frame_set(savedframe)
diff --git a/io_anim_c3d/__init__.py b/io_anim_c3d/__init__.py
index 0d4a1b95..88ff974b 100644
--- a/io_anim_c3d/__init__.py
+++ b/io_anim_c3d/__init__.py
@@ -274,7 +274,7 @@ class C3DImporter(bpy.types.Operator):
o.show_name = self.properties.show_names
o.show_in_front = self.properties.x_ray
for name in unames.values():
- bpy.context.scene.objects[name].select = True
+ bpy.context.scene.objects[name].select_set(True)
return unames
def create_armature_obj(self, ms, scale):
diff --git a/io_export_unreal_psk_psa.py b/io_export_unreal_psk_psa.py
index 8428ea87..b499aa30 100644
--- a/io_export_unreal_psk_psa.py
+++ b/io_export_unreal_psk_psa.py
@@ -986,9 +986,9 @@ def triangulate_mesh(object):
bpy.ops.object.mode_set(mode='OBJECT')
for i in scene.objects:
- i.select = False # deselect all objects
+ i.select_set(False) # deselect all objects
- me_ob.select = True
+ me_ob.select_set(True)
scene.objects.active = me_ob
print("Copy and Convert mesh just incase any way...")
@@ -1031,14 +1031,14 @@ def meshmerge(selectedobjects):
cloneobjects.append(me_ob) # add object to the array
for i in bpy.data.objects:
- i.select = False # deselect all objects
+ i.select_set(False) # deselect all objects
count = 0 # reset count
# begin merging the mesh together as one
for count in range(len(cloneobjects)):
if count == 0:
bpy.context.scene.objects.active = cloneobjects[count]
print("Set Active Object:", cloneobjects[count].name)
- cloneobjects[count].select = True
+ cloneobjects[count].select_set(True)
bpy.ops.object.join() # join object together
if len(cloneobjects) > 1:
bpy.types.Scene.udk_copy_merge = True
@@ -1085,7 +1085,7 @@ def parse_mesh(mesh, psk):
scene = bpy.context.scene
for i in scene.objects:
- i.select = False # deselect all objects
+ i.select_set(False) # deselect all objects
scene.objects.active = mesh
setmesh = mesh
@@ -2027,9 +2027,9 @@ class OBJECT_OT_UTSelectedFaceSmooth(Operator):
bpy.ops.object.mode_set(mode='OBJECT') # it need to go into object mode to able to select the faces
for i in bpy.context.scene.objects:
- i.select = False # deselect all objects
+ i.select_set(False) # deselect all objects
- obj.select = True # set current object select
+ obj.select_set(True) # set current object select
bpy.context.scene.objects.active = obj # set active object
mesh = bmesh.new()
mesh.from_mesh(obj.data)
@@ -2087,8 +2087,8 @@ def rebuildmesh(obj):
bpy.ops.object.mode_set(mode='OBJECT')
for i in bpy.context.scene.objects:
- i.select = False # deselect all objects
- obj.select = True
+ i.select_set(False) # deselect all objects
+ obj.select_set(True)
bpy.context.scene.objects.active = obj
me_ob = bpy.data.meshes.new(("Re_" + obj.name))
@@ -2220,9 +2220,9 @@ def rebuildarmature(obj):
# bpy.ops.object.mode_set(mode='OBJECT')
for i in bpy.context.scene.objects:
- i.select = False # deselect all objects
+ i.select_set(False) # deselect all objects
- ob_new.select = True
+ ob_new.select_set(True)
bpy.context.scene.objects.active = obj
bpy.ops.object.mode_set(mode='EDIT')
@@ -2234,7 +2234,7 @@ def rebuildarmature(obj):
bpy.ops.object.mode_set(mode='OBJECT')
for i in bpy.context.scene.objects:
- i.select = False # deselect all objects
+ i.select_set(False) # deselect all objects
bpy.context.scene.objects.active = ob_new
bpy.ops.object.mode_set(mode='EDIT')
@@ -2564,9 +2564,9 @@ def udkcheckmeshline():
bpy.ops.object.mode_set(mode='OBJECT')
for i in bpy.context.scene.objects:
- i.select = False # deselect all objects
+ i.select_set(False) # deselect all objects
- objmesh.select = True
+ objmesh.select_set(True)
bpy.context.scene.objects.active = objmesh # set active mesh
wedges = ObjMap()
points = ObjMap()
diff --git a/io_import_dxf/dxfimport/do.py b/io_import_dxf/dxfimport/do.py
index e10d7d70..7fd3e262 100644
--- a/io_import_dxf/dxfimport/do.py
+++ b/io_import_dxf/dxfimport/do.py
@@ -1410,7 +1410,7 @@ class Do:
for o in (o for o in scene.objects if "BEVEL" not in o.name and "TAPER" not in o.name
and o not in self.objects_before and o.parent is None):
o.location = o.location - center
- o.select = True
+ o.select_set(True)
if not self.did_group_instance:
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
diff --git a/io_import_scene_unreal_psa_psk.py b/io_import_scene_unreal_psa_psk.py
index daea302e..26fab899 100644
--- a/io_import_scene_unreal_psa_psk.py
+++ b/io_import_scene_unreal_psa_psk.py
@@ -425,8 +425,8 @@ def pskimport(infile,importmesh,importbone,bDebugLogPSK,importmultiuvtextures):
bpy.context.scene.objects.link(ob_new)
#bpy.ops.object.mode_set(mode='OBJECT')
for i in bpy.context.scene.objects:
- i.select = False #deselect all objects
- ob_new.select = True
+ i.select_set(False) #deselect all objects
+ ob_new.select_set(True)
#set current armature to edit the bone
bpy.context.scene.objects.active = ob_new
#set mode to able to edit the bone
@@ -699,10 +699,10 @@ def pskimport(infile,importmesh,importbone,bDebugLogPSK,importmultiuvtextures):
me_ob.update()
bpy.context.scene.objects.link(obmesh)
bpy.context.scene.update()
- obmesh.select = False
- ob_new.select = False
- obmesh.select = True
- ob_new.select = True
+ obmesh.select_set(False)
+ ob_new.select_set(False)
+ obmesh.select_set(True)
+ ob_new.select_set(True)
bpy.ops.object.parent_set(type="ARMATURE")
print ("PSK2Blender completed")
diff --git a/io_mesh_pdb/import_pdb.py b/io_mesh_pdb/import_pdb.py
index bf243899..dcae0b60 100644
--- a/io_mesh_pdb/import_pdb.py
+++ b/io_mesh_pdb/import_pdb.py
@@ -579,7 +579,7 @@ def camera_light_source(use_camera,
# Rotate the camera around its axis by 90° such that we have a nice
# camera position and view onto the object.
bpy.ops.object.select_all(action='DESELECT')
- camera.select = True
+ camera.select_set(True)
bpy.ops.transform.rotate(value=(90.0*2*pi/360.0),
axis=object_camera_vec,
constraint_axis=(False, False, False),
@@ -851,8 +851,8 @@ def draw_sticks_dupliverts(all_atoms,
# Smooth the cylinders.
if use_sticks_smooth == True:
bpy.ops.object.select_all(action='DESELECT')
- stick_cylinder.select = True
- stick_cups.select = True
+ stick_cylinder.select_set(True)
+ stick_cups.select_set(True)
bpy.ops.object.shade_smooth()
# Parenting the mesh to the cylinder.
@@ -1072,7 +1072,7 @@ def draw_sticks_normal(all_atoms,
# Smooth the cylinder.
if use_sticks_smooth == True:
bpy.ops.object.select_all(action='DESELECT')
- stick.select = True
+ stick.select_set(True)
bpy.ops.object.shade_smooth()
list_group_sub.append(stick)
@@ -1081,7 +1081,7 @@ def draw_sticks_normal(all_atoms,
if counter == use_sticks_one_object_nr:
bpy.ops.object.select_all(action='DESELECT')
for stick in list_group_sub:
- stick.select = True
+ stick.select_set(True)
bpy.ops.object.join()
list_group.append(bpy.context.scene.objects.active)
bpy.ops.object.select_all(action='DESELECT')
@@ -1094,13 +1094,13 @@ def draw_sticks_normal(all_atoms,
if use_sticks_one_object == True:
bpy.ops.object.select_all(action='DESELECT')
for stick in list_group_sub:
- stick.select = True
+ stick.select_set(True)
bpy.ops.object.join()
list_group.append(bpy.context.scene.objects.active)
bpy.ops.object.select_all(action='DESELECT')
for group in list_group:
- group.select = True
+ group.select_set(True)
bpy.ops.object.join()
bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY',
center='MEDIAN')
@@ -1385,7 +1385,7 @@ def import_pdb(Ball_type,
bpy.ops.object.select_all(action='DESELECT')
obj = None
for obj in atom_object_list:
- obj.select = True
+ obj.select_set(True)
# activate the last selected object
if obj:
diff --git a/io_mesh_raw/import_raw.py b/io_mesh_raw/import_raw.py
index 7da72823..093ee7a9 100644
--- a/io_mesh_raw/import_raw.py
+++ b/io_mesh_raw/import_raw.py
@@ -96,14 +96,14 @@ def addMeshObj(mesh, objName):
scn = bpy.context.scene
for o in scn.objects:
- o.select = False
+ o.select_set(False)
mesh.update()
mesh.validate()
nobj = bpy.data.objects.new(objName, mesh)
scn.objects.link(nobj)
- nobj.select = True
+ nobj.select_set(True)
if scn.objects.active is None or scn.objects.active.mode == 'OBJECT':
scn.objects.active = nobj
diff --git a/io_scene_3ds/import_3ds.py b/io_scene_3ds/import_3ds.py
index 28d7b25f..7434855b 100644
--- a/io_scene_3ds/import_3ds.py
+++ b/io_scene_3ds/import_3ds.py
@@ -917,7 +917,7 @@ def load_3ds(filepath,
ob.matrix_world = ob.matrix_world * global_matrix
for ob in importedObjects:
- ob.select = True
+ ob.select_set(True)
# Done DUMMYVERT
"""
diff --git a/io_scene_ms3d/ms3d_import.py b/io_scene_ms3d/ms3d_import.py
index d5ef0015..dbf6d87e 100644
--- a/io_scene_ms3d/ms3d_import.py
+++ b/io_scene_ms3d/ms3d_import.py
@@ -289,7 +289,7 @@ class Ms3dImporter():
#blender_mesh_object.location = blender_scene.cursor_location
enable_edit_mode(False, blender_context)
select_all(False)
- blender_mesh_object.select = True
+ blender_mesh_object.select_set(True)
blender_scene.objects.active = blender_mesh_object
##########################
diff --git a/io_scene_x3d/import_x3d.py b/io_scene_x3d/import_x3d.py
index d2592ecd..e6e29dbc 100644
--- a/io_scene_x3d/import_x3d.py
+++ b/io_scene_x3d/import_x3d.py
@@ -3028,7 +3028,7 @@ def importShape_ProcessObject(
# bpymesh.transform(getFinalMatrix(node))
bpyob = node.blendObject = bpy.data.objects.new(vrmlname, bpydata)
bpyob.matrix_world = getFinalMatrix(node, None, ancestry, global_matrix)
- bpyscene.objects.link(bpyob).select = True
+ bpyscene.objects.link(bpyob).select_set(True)
if DEBUG:
bpyob["source_line_no"] = geom.lineno
@@ -3082,7 +3082,7 @@ def importShape(bpyscene, node, ancestry, global_matrix):
bpyob = node.blendData = node.blendObject = bpyob.copy()
# Could transform data, but better the object so we can instance the data
bpyob.matrix_world = getFinalMatrix(node, None, ancestry, global_matrix)
- bpyscene.objects.link(bpyob).select = True
+ bpyscene.objects.link(bpyob).select_set(True)
return
vrmlname = node.getDefName()
@@ -3230,7 +3230,7 @@ def importLamp(bpyscene, node, spec, ancestry, global_matrix):
raise ValueError
bpyob = node.blendData = node.blendObject = bpy.data.objects.new(bpylamp.name, bpylamp)
- bpyscene.objects.link(bpyob).select = True
+ bpyscene.objects.link(bpyob).select_set(True)
bpyob.matrix_world = getFinalMatrix(node, mtx, ancestry, global_matrix)
@@ -3256,7 +3256,7 @@ def importViewpoint(bpyscene, node, ancestry, global_matrix):
mtx = Matrix.Translation(Vector(position)) * translateRotation(orientation)
bpyob = node.blendData = node.blendObject = bpy.data.objects.new(name, bpycam)
- bpyscene.objects.link(bpyob).select = True
+ bpyscene.objects.link(bpyob).select_set(True)
bpyob.matrix_world = getFinalMatrix(node, mtx, ancestry, global_matrix)
@@ -3266,7 +3266,7 @@ def importTransform(bpyscene, node, ancestry, global_matrix):
name = 'Transform'
bpyob = node.blendData = node.blendObject = bpy.data.objects.new(name, None)
- bpyscene.objects.link(bpyob).select = True
+ bpyscene.objects.link(bpyob).select_set(True)
bpyob.matrix_world = getFinalMatrix(node, None, ancestry, global_matrix)
@@ -3528,7 +3528,7 @@ def load_web3d(
node = defDict[key]
if node.blendData is None: # Add an object if we need one for animation
node.blendData = node.blendObject = bpy.data.objects.new('AnimOb', None) # , name)
- bpyscene.objects.link(node.blendObject).select = True
+ bpyscene.objects.link(node.blendObject).select_set(True)
if node.blendData.animation_data is None:
node.blendData.animation_data_create()
diff --git a/light_field_tools/light_field_tools.py b/light_field_tools/light_field_tools.py
index 5ab2092f..f49a54f7 100644
--- a/light_field_tools/light_field_tools.py
+++ b/light_field_tools/light_field_tools.py
@@ -322,12 +322,12 @@ class OBJECT_OT_create_lightfield_basemesh(Operator):
scene = bpy.context.scene
for o in scene.objects:
- o.select = False
+ o.select_set(False)
mesh.update()
nobj = bpy.data.objects.new(self.objName, mesh)
scene.objects.link(nobj)
- nobj.select = True
+ nobj.select_set(True)
if scene.objects.active is None or scene.objects.active.mode == 'OBJECT':
scene.objects.active = nobj
diff --git a/materials_library_vx/__init__.py b/materials_library_vx/__init__.py
index b12b9124..1977e7ec 100644
--- a/materials_library_vx/__init__.py
+++ b/materials_library_vx/__init__.py
@@ -534,7 +534,7 @@ if mat:
self.last_selected = ""
except:
context.scene.objects.active = None
- dummy.select = False
+ dummy.select_set(False)
#objects = context.selected_objects
material = None
diff --git a/materials_utils/__init__.py b/materials_utils/__init__.py
index dc1b6035..8e6bf0d2 100644
--- a/materials_utils/__init__.py
+++ b/materials_utils/__init__.py
@@ -158,11 +158,11 @@ def replace_material(m1, m2, all_objects=False, update_selection=False, operator
# Indicate which objects were affected
if update_selection:
- ob.select = True
+ ob.select_set(True)
match = True
if update_selection and not match:
- ob.select = False
+ ob.select_set(False)
else:
if operator:
warning_messages(operator, "REP_MAT_NONE")
@@ -197,16 +197,16 @@ def select_material_by_name(find_mat_name):
ms = ob.material_slots
for m in ms:
if m.material == find_mat:
- ob.select = True
+ ob.select_set(True)
# the active object may not have the mat!
# set it to one that does!
scn.objects.active = ob
break
else:
- ob.select = False
+ ob.select_set(False)
# deselect non-meshes
else:
- ob.select = False
+ ob.select_set(False)
else:
# it's edit mode, so select the polygons
ob = actob
@@ -355,7 +355,7 @@ def cleanmatslots(operator=None):
# is active object selected ?
selected = bool(actob.select)
- actob.select = True
+ actob.select_set(True)
objs = bpy.context.selected_editable_objects
# collect all object names for warning_messages
@@ -493,7 +493,7 @@ def assign_mat_mesh_edit(matname="Default", operator=None):
# is selected ?
selected = bool(actob.select)
# select active object
- actob.select = True
+ actob.select_set(True)
# activate the chosen material
actob.active_material_index = i
@@ -516,7 +516,7 @@ def assign_mat(matname="Default", operator=None):
# is active object selected ?
selected = bool(actob.select)
- actob.select = True
+ actob.select_set(True)
# check if material exists, if it doesn't then create it
target = bpy.data.materials.get(matname)
diff --git a/mesh_bsurfaces.py b/mesh_bsurfaces.py
index 35c3459d..abcdfc75 100644
--- a/mesh_bsurfaces.py
+++ b/mesh_bsurfaces.py
@@ -400,7 +400,7 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
if not self.using_external_curves:
try:
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- self.original_curve.select = True
+ self.original_curve.select_set(True)
bpy.context.scene.objects.active = self.original_curve
bpy.ops.object.delete()
@@ -408,12 +408,12 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
pass
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- self.main_object.select = True
+ self.main_object.select_set(True)
bpy.context.scene.objects.active = self.main_object
else:
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- self.original_curve.select = True
- self.main_object.select = True
+ self.original_curve.select_set(True)
+ self.main_object.select_set(True)
bpy.context.scene.objects.active = self.main_object
bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN')
@@ -1310,7 +1310,7 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
# Delete all duplicates
for o in objects_to_delete:
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- o.select = True
+ o.select_set(True)
bpy.context.scene.objects.active = o
bpy.ops.object.delete()
@@ -1358,7 +1358,7 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
bpy.context.scene.objects.link(ob)
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- ob.select = True
+ ob.select_set(True)
bpy.context.scene.objects.active = ob
# Get together each vert and its nearest, to the middle position
@@ -1682,14 +1682,14 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
# Delete duplicated object
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- final_ob_duplicate.select = True
+ final_ob_duplicate.select_set(True)
bpy.context.scene.objects.active = final_ob_duplicate
bpy.ops.object.delete()
# Join crosshatched surface and main object
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
ob_surface.select = True
- self.main_object.select = True
+ self.main_object.select_set(True)
bpy.context.scene.objects.active = self.main_object
bpy.ops.object.join('INVOKE_REGION_WIN')
@@ -2445,7 +2445,7 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
spline_bp_count = len(spline.bezier_points)
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- ob_simplified_curve[i].select = True
+ ob_simplified_curve[i].select_set(True)
bpy.context.scene.objects.active = ob_simplified_curve[i]
bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN')
@@ -2490,7 +2490,7 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
# Delete the temporal curve
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- ob_simplified_curve[i].select = True
+ ob_simplified_curve[i].select_set(True)
bpy.context.scene.objects.active = ob_simplified_curve[i]
bpy.ops.object.delete()
@@ -2629,7 +2629,7 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
vert_num_in_spline += 1
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- ob_ctrl_pts.select = True
+ ob_ctrl_pts.select_set(True)
bpy.context.scene.objects.active = ob_ctrl_pts
bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN')
@@ -2975,14 +2975,14 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
# Delete object with control points and object from grease pencil conversion
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- ob_ctrl_pts.select = True
+ ob_ctrl_pts.select_set(True)
bpy.context.scene.objects.active = ob_ctrl_pts
bpy.ops.object.delete()
for sp_ob in splines_U_objects:
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- sp_ob.select = True
+ sp_ob.select_set(True)
bpy.context.scene.objects.active = sp_ob
bpy.ops.object.delete()
@@ -3022,7 +3022,7 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
# Join the new mesh to the main object
ob_surface.select = True
- self.main_object.select = True
+ self.main_object.select_set(True)
bpy.context.scene.objects.active = self.main_object
bpy.ops.object.join('INVOKE_REGION_WIN')
@@ -3083,7 +3083,7 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
strokes_for_crosshatch = False
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- self.main_object.select = True
+ self.main_object.select_set(True)
bpy.context.scene.objects.active = self.main_object
bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN')
@@ -3103,7 +3103,7 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
bpy.ops.object.delete()
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- self.main_object.select = True
+ self.main_object.select_set(True)
bpy.context.scene.objects.active = self.main_object
bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN')
@@ -3176,13 +3176,13 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
for o in bpy.data.objects:
if o.name.find("SURFSKIO_") != -1:
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- o.select = True
+ o.select_set(True)
bpy.context.scene.objects.active = o
bpy.ops.object.delete()
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- self.original_curve.select = True
+ self.original_curve.select_set(True)
bpy.context.scene.objects.active = self.original_curve
bpy.ops.object.duplicate('INVOKE_REGION_WIN')
@@ -3206,7 +3206,7 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN')
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- self.temporary_curve.select = True
+ self.temporary_curve.select_set(True)
bpy.context.scene.objects.active = self.temporary_curve
# Set a minimum number of points for crosshatch
@@ -3244,7 +3244,7 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
if not self.is_crosshatch:
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- self.temporary_curve.select = True
+ self.temporary_curve.select_set(True)
bpy.context.scene.objects.active = self.temporary_curve
bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN')
@@ -3320,13 +3320,13 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
# Delete temporary strokes curve object
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- self.temporary_curve.select = True
+ self.temporary_curve.select_set(True)
bpy.context.scene.objects.active = self.temporary_curve
bpy.ops.object.delete()
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- self.main_object.select = True
+ self.main_object.select_set(True)
bpy.context.scene.objects.active = self.main_object
bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN')
@@ -3339,13 +3339,13 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
if (not self.stopping_errors and not self.keep_strokes) or self.is_crosshatch:
bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN')
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- self.original_curve.select = True
+ self.original_curve.select_set(True)
bpy.context.scene.objects.active = self.original_curve
bpy.ops.object.delete()
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- self.main_object.select = True
+ self.main_object.select_set(True)
bpy.context.scene.objects.active = self.main_object
bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN')
@@ -3421,7 +3421,7 @@ class GPENCIL_OT_SURFSK_edit_strokes(Operator):
bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN')
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- curve_ob.select = True
+ curve_ob.select_set(True)
bpy.context.scene.objects.active = curve_ob
bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN')
@@ -3437,14 +3437,14 @@ class GPENCIL_OT_SURFSK_edit_strokes(Operator):
# Delete grease pencil strokes
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- self.main_object.select = True
+ self.main_object.select_set(True)
bpy.context.scene.objects.active = self.main_object
bpy.ops.gpencil.active_frame_delete('INVOKE_REGION_WIN')
# Clean up curves
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- ob_gp_strokes.select = True
+ ob_gp_strokes.select_set(True)
bpy.context.scene.objects.active = ob_gp_strokes
curve_crv = ob_gp_strokes.data
@@ -3495,7 +3495,7 @@ class CURVE_OT_SURFSK_reorder_splines(Operator):
objects_to_delete.append(GP_strokes_curve)
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- GP_strokes_curve.select = True
+ GP_strokes_curve.select_set(True)
bpy.context.scene.objects.active = GP_strokes_curve
bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN')
@@ -3511,7 +3511,7 @@ class CURVE_OT_SURFSK_reorder_splines(Operator):
bpy.ops.object.convert(target='MESH', keep_original=False)
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- self.main_curve.select = True
+ self.main_curve.select_set(True)
bpy.context.scene.objects.active = self.main_curve
bpy.ops.object.duplicate('INVOKE_REGION_WIN')
@@ -3554,7 +3554,7 @@ class CURVE_OT_SURFSK_reorder_splines(Operator):
# Duplicate the duplicate and add Shrinkwrap to it, with the grease pencil strokes curve as target
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- curves_duplicate_2.select = True
+ curves_duplicate_2.select_set(True)
bpy.context.scene.objects.active = curves_duplicate_2
bpy.ops.object.modifier_add('INVOKE_REGION_WIN', type='SHRINKWRAP')
@@ -3626,7 +3626,7 @@ class CURVE_OT_SURFSK_reorder_splines(Operator):
curve_original_name = self.main_curve.name
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- self.main_curve.select = True
+ self.main_curve.select_set(True)
bpy.context.scene.objects.active = self.main_curve
self.main_curve.name = "SURFSKIO_CRV_ORD"
@@ -3656,7 +3656,7 @@ class CURVE_OT_SURFSK_reorder_splines(Operator):
for order_idx in splines_new_order:
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
bpy.data.objects[splines_unordered[order_idx]].select = True
- bpy.data.objects["SURFSKIO_CRV_ORD"].select = True
+ bpy.data.objects["SURFSKIO_CRV_ORD"].select_set(True)
bpy.context.scene.objects.active = bpy.data.objects["SURFSKIO_CRV_ORD"]
bpy.ops.object.join('INVOKE_REGION_WIN')
@@ -3667,13 +3667,13 @@ class CURVE_OT_SURFSK_reorder_splines(Operator):
# Delete all unused objects
for o in objects_to_delete:
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- o.select = True
+ o.select_set(True)
bpy.context.scene.objects.active = o
bpy.ops.object.delete()
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
- bpy.data.objects[curve_original_name].select = True
+ bpy.data.objects[curve_original_name].select_set(True)
bpy.context.scene.objects.active = bpy.data.objects[curve_original_name]
bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN')
diff --git a/mesh_carver.py b/mesh_carver.py
index 542f8784..f9a44fc3 100644
--- a/mesh_carver.py
+++ b/mesh_carver.py
@@ -1560,7 +1560,7 @@ def update_bevel(context):
if len(selection) > 0:
for obj in selection:
bpy.ops.object.select_all(action='DESELECT')
- obj.select = True
+ obj.select_set(True)
context.scene.objects.active = obj
# Test object name
@@ -1630,7 +1630,7 @@ def update_bevel(context):
bpy.ops.object.select_all(action='DESELECT')
for obj in selection:
- obj.select = True
+ obj.select_set(True)
context.scene.objects.active = active
@@ -1847,7 +1847,7 @@ def Pick(context, event, self, ray_max=10000.0):
def SelectObject(self, copyobj):
- copyobj.select = True
+ copyobj.select_set(True)
for child in copyobj.children:
SelectObject(self, child)
@@ -1897,17 +1897,17 @@ def Undo(self):
for o in self.UList[self.UList_Index]:
if o[1] == "REBOOL":
- o[0].select = True
+ o[0].select_set(True)
o[0].hide = False
if o[1] == "DUPLICATE":
- o[0].select = True
+ o[0].select_set(True)
o[0].hide = False
bpy.ops.object.delete(use_global=False)
for so in SelectObjList:
- bpy.data.objects[so.name].select = True
+ bpy.data.objects[so.name].select_set(True)
bpy.context.scene.objects.active = Active_Obj
self.UList_Index -= 1
@@ -1977,7 +1977,7 @@ def duplicateObject(self):
if len(bpy.context.selected_objects) > 0:
bpy.ops.object.select_all(action='TOGGLE')
for o in self.SavSel:
- o.select = True
+ o.select_set(True)
bpy.context.scene.objects.active = self.OpsObj
@@ -2084,7 +2084,7 @@ def Rebool(context, self):
context.scene.objects.active = obj
obj.display_type = "SOLID"
- obj.select = True
+ obj.select_set(True)
bpy.ops.object.duplicate_move(
OBJECT_OT_duplicate={
"linked": False,
@@ -2145,7 +2145,7 @@ def Rebool(context, self):
mb.show_viewport = True
context.scene.objects.active = obj
- obj.select = True
+ obj.select_set(True)
if self.DontApply is False:
try:
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="CT_DIFFERENCE")
@@ -2155,7 +2155,7 @@ def Rebool(context, self):
bpy.ops.object.select_all(action='TOGGLE')
- LastObjectCreated.select = True
+ LastObjectCreated.select_set(True)
def createMeshFromData(self):
@@ -2175,7 +2175,7 @@ def createMeshFromData(self):
scn = bpy.context.scene
scn.objects.link(ob)
scn.objects.active = ob
- ob.select = True
+ ob.select_set(True)
ob.location = Vector((10000.0, 0.0, 0.0))
ob.display_type = "WIRE"
@@ -2188,7 +2188,7 @@ def Selection_Save_Restore(self):
if "CT_Profil" in bpy.data.objects:
Selection_Save(self)
bpy.ops.object.select_all(action='DESELECT')
- bpy.data.objects["CT_Profil"].select = True
+ bpy.data.objects["CT_Profil"].select_set(True)
bpy.context.scene.objects.active = bpy.data.objects["CT_Profil"]
if bpy.data.objects["CT_Profil"] in self.SavSel:
self.SavSel.remove(bpy.data.objects["CT_Profil"])
@@ -2204,7 +2204,7 @@ def Selection_Save(self):
def Selection_Restore(self):
for o in self.SavSel:
- o.select = True
+ o.select_set(True)
if self.Sav_ac:
bpy.context.scene.objects.active = bpy.data.objects.get(self.Sav_ac, None)
@@ -2387,7 +2387,7 @@ class Carver(bpy.types.Operator):
self.BrushSolidify = True
bpy.ops.object.select_all(action='TOGGLE')
- self.ProfileBrush.select = True
+ self.ProfileBrush.select_set(True)
context.scene.objects.active = self.ProfileBrush
# Set xRay
self.ProfileBrush.show_in_front = True
@@ -2415,7 +2415,7 @@ class Carver(bpy.types.Operator):
self.BrushSolidify = False
bpy.ops.object.select_all(action='TOGGLE')
- self.ObjectBrush.select = True
+ self.ObjectBrush.select_set(True)
context.scene.objects.active = self.ObjectBrush
bpy.ops.object.modifier_remove(modifier="CT_SOLIDIFY")
@@ -2427,7 +2427,7 @@ class Carver(bpy.types.Operator):
self.BrushSolidify = True
self.SolidifyPossible = True
bpy.ops.object.select_all(action='TOGGLE')
- self.ObjectBrush.select = True
+ self.ObjectBrush.select_set(True)
context.scene.objects.active = self.ObjectBrush
# Set xRay
self.ObjectBrush.show_in_front = True
@@ -2526,12 +2526,12 @@ class Carver(bpy.types.Operator):
bpy.ops.object.select_all(action='TOGGLE')
if self.ObjectMode:
- self.ObjectBrush.select = True
+ self.ObjectBrush.select_set(True)
context.scene.objects.active = self.ObjectBrush
# Active le xray
self.ObjectBrush.show_in_front = True
else:
- self.ProfileBrush.select = True
+ self.ProfileBrush.select_set(True)
context.scene.objects.active = self.ProfileBrush
# Active le xray
self.ProfileBrush.show_in_front = True
@@ -2781,7 +2781,7 @@ class Carver(bpy.types.Operator):
self.BrushSolidify = False
bpy.ops.object.select_all(action='TOGGLE')
- self.ObjectBrush.select = True
+ self.ObjectBrush.select_set(True)
context.scene.objects.active = self.ObjectBrush
bpy.ops.object.modifier_remove(modifier="CT_SOLIDIFY")
@@ -2852,7 +2852,7 @@ class Carver(bpy.types.Operator):
self.BrushSolidify = False
bpy.ops.object.select_all(action='TOGGLE')
- self.ObjectBrush.select = True
+ self.ObjectBrush.select_set(True)
context.scene.objects.active = self.ObjectBrush
bpy.ops.object.modifier_remove(modifier="CT_SOLIDIFY")
@@ -2871,7 +2871,7 @@ class Carver(bpy.types.Operator):
brush = bpy.data.objects["CarverBrushCopy"]
self.ObjectBrush.data = bpy.data.meshes[brush.data.name]
bpy.ops.object.select_all(action='DESELECT')
- bpy.data.objects["CarverBrushCopy"].select = True
+ bpy.data.objects["CarverBrushCopy"].select_set(True)
bpy.ops.object.delete()
return {'FINISHED'}
@@ -3154,7 +3154,7 @@ class Carver(bpy.types.Operator):
context.scene.objects.active = self.CurrentObj
- bpy.data.objects[self.CurrentObj.name].select = True
+ bpy.data.objects[self.CurrentObj.name].select_set(True)
bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY')
bpy.ops.object.mode_set(mode='EDIT')
@@ -3177,11 +3177,11 @@ class Carver(bpy.types.Operator):
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
context.scene.cursor_location = saved_location_0
- bpy.data.objects[self.CurrentObj.name].select = True
+ bpy.data.objects[self.CurrentObj.name].select_set(True)
bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY')
for o in self.SavSel:
- bpy.data.objects[o.name].select = True
+ bpy.data.objects[o.name].select_set(True)
if bLocalView:
bpy.ops.view3d.localview()
@@ -3220,7 +3220,7 @@ class Carver(bpy.types.Operator):
context.scene.objects.active = self.CurrentObj
- bpy.data.objects[self.CurrentObj.name].select = True
+ bpy.data.objects[self.CurrentObj.name].select_set(True)
bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY')
bpy.ops.object.mode_set(mode='EDIT')
@@ -3264,7 +3264,7 @@ class Carver(bpy.types.Operator):
BevelAO = True
# Select cut object
- bpy.data.objects[self.CurrentObj.name].select = True
+ bpy.data.objects[self.CurrentObj.name].select_set(True)
context.scene.objects.active = self.CurrentObj
bpy.ops.object.mode_set(mode='EDIT')
@@ -3272,7 +3272,7 @@ class Carver(bpy.types.Operator):
bpy.ops.object.mode_set(mode='OBJECT')
# Select object to cut
- bpy.data.objects[ActiveObj.name].select = True
+ bpy.data.objects[ActiveObj.name].select_set(True)
context.scene.objects.active = ActiveObj
bpy.ops.object.mode_set(mode='EDIT')
@@ -3359,7 +3359,7 @@ class Carver(bpy.types.Operator):
if (self.ObjectMode is False) and (self.ProfileMode is False):
if len(context.selected_objects) > 0:
bpy.ops.object.select_all(action='TOGGLE')
- bpy.data.objects[self.CurrentObj.name].select = True
+ bpy.data.objects[self.CurrentObj.name].select_set(True)
bpy.ops.object.delete(use_global=False)
else:
if self.ObjectMode:
@@ -3370,10 +3370,10 @@ class Carver(bpy.types.Operator):
# Select cut objects
for obj in lastSelected:
- bpy.data.objects[obj.name].select = True
+ bpy.data.objects[obj.name].select_set(True)
for ActiveObj in ActiveObjList:
- bpy.data.objects[ActiveObj.name].select = True
+ bpy.data.objects[ActiveObj.name].select_set(True)
context.scene.objects.active = ActiveObj
# Update bevel
list_act_obj = context.selected_objects.copy()
@@ -3384,9 +3384,9 @@ class Carver(bpy.types.Operator):
bpy.ops.object.select_all(action='TOGGLE')
if self.ObjectMode:
# Re-select brush
- self.ObjectBrush.select = True
+ self.ObjectBrush.select_set(True)
for ActiveObj in ActiveObjList:
- bpy.data.objects[ActiveObj.name].select = True
+ bpy.data.objects[ActiveObj.name].select_set(True)
context.scene.objects.active = ActiveObj
# If object has children, set "Wire" draw type
diff --git a/mesh_tissue/dual_mesh.py b/mesh_tissue/dual_mesh.py
index 92ee7562..d983d873 100644
--- a/mesh_tissue/dual_mesh.py
+++ b/mesh_tissue/dual_mesh.py
@@ -138,7 +138,7 @@ class dual_mesh(Operator):
bpy.ops.object.convert(target='MESH')
ob.data = ob.data.copy()
bpy.ops.object.select_all(action='DESELECT')
- ob.select = True
+ ob.select_set(True)
bpy.context.scene.objects.active = ob0
bpy.ops.object.mode_set(mode='EDIT')
@@ -274,7 +274,7 @@ class dual_mesh(Operator):
o.data = ob.data
for o in sel:
- o.select = True
+ o.select_set(True)
bpy.context.scene.objects.active = act
bpy.ops.object.mode_set(mode=mode)
diff --git a/mesh_tissue/lattice.py b/mesh_tissue/lattice.py
index e2235305..9edcd39f 100644
--- a/mesh_tissue/lattice.py
+++ b/mesh_tissue/lattice.py
@@ -316,7 +316,7 @@ class lattice_along_surface(Operator):
if o.name != grid_obj.name and o.type in \
('MESH', 'CURVE', 'SURFACE', 'FONT'):
obj = o
- o.select = False
+ o.select_set(False)
break
try:
obj_dim = obj.dimensions
@@ -339,7 +339,7 @@ class lattice_along_surface(Operator):
if len(grid_mesh.polygons) > 64 * 64:
bpy.ops.object.delete(use_global=False)
bpy.context.scene.objects.active = obj
- obj.select = True
+ obj.select_set(True)
self.report({'ERROR'}, "Maximum resolution allowed for Lattice is 64")
return {'CANCELLED'}
@@ -385,8 +385,8 @@ class lattice_along_surface(Operator):
# set as parent
if self.set_parent:
- obj.select = True
- lattice.select = True
+ obj.select_set(True)
+ lattice.select_set(True)
bpy.context.scene.objects.active = lattice
bpy.ops.object.parent_set(type='LATTICE')
@@ -432,12 +432,12 @@ class lattice_along_surface(Operator):
target_point.z / bpy.data.objects[lattice.name].scale.z
except:
bpy.ops.object.mode_set(mode='OBJECT')
- grid_obj.select = True
- lattice.select = True
- obj.select = False
+ grid_obj.select_set(True)
+ lattice.select_set(True)
+ obj.select_set(False)
bpy.ops.object.delete(use_global=False)
bpy.context.scene.objects.active = obj
- obj.select = True
+ obj.select_set(True)
bpy.ops.object.modifier_remove(modifier=obj.modifiers[-1].name)
if nu > 64 or nv > 64:
self.report({'ERROR'}, "Maximum resolution allowed for Lattice is 64")
@@ -451,12 +451,12 @@ class lattice_along_surface(Operator):
# grid_obj.matrix_world = old_grid_matrix
bpy.ops.object.mode_set(mode='OBJECT')
- grid_obj.select = True
- lattice.select = False
- obj.select = False
+ grid_obj.select_set(True)
+ lattice.select_set(False)
+ obj.select_set(False)
bpy.ops.object.delete(use_global=False)
bpy.context.scene.objects.active = lattice
- lattice.select = True
+ lattice.select_set(True)
if self.high_quality_lattice:
bpy.context.object.data.points_w = 8
@@ -467,8 +467,8 @@ class lattice_along_surface(Operator):
bpy.ops.object.hide_view_set(unselected=False)
bpy.context.scene.objects.active = obj
- obj.select = True
- lattice.select = False
+ obj.select_set(True)
+ lattice.select_set(False)
if self.flipNormals:
try:
diff --git a/mesh_tissue/tessellate_numpy.py b/mesh_tissue/tessellate_numpy.py
index f6fb97c0..f2a96d5e 100644
--- a/mesh_tissue/tessellate_numpy.py
+++ b/mesh_tissue/tessellate_numpy.py
@@ -888,7 +888,7 @@ class tessellate(Operator):
scene = bpy.context.scene
scene.objects.link(new_ob)
- new_ob.select = True
+ new_ob.select_set(True)
bpy.context.scene.objects.active = new_ob
if self.merge:
bpy.ops.object.mode_set(mode='EDIT')
@@ -1431,7 +1431,7 @@ class settings_tessellate(Operator):
# Create object in order to transfer vertex group
scene = bpy.context.scene
scene.objects.link(temp_ob)
- temp_ob.select = True
+ temp_ob.select_set(True)
bpy.context.scene.objects.active = temp_ob
try:
diff --git a/mesh_tissue/uv_to_mesh.py b/mesh_tissue/uv_to_mesh.py
index 273b3a6a..8ae59c6f 100644
--- a/mesh_tissue/uv_to_mesh.py
+++ b/mesh_tissue/uv_to_mesh.py
@@ -77,8 +77,8 @@ class uv_to_mesh(Operator):
def execute(self, context):
bpy.ops.object.mode_set(mode='OBJECT')
for o in bpy.data.objects:
- o.select = False
- bpy.context.object.select = True
+ o.select_set(False)
+ bpy.context.object.select_set(True)
if self.apply_modifiers:
bpy.ops.object.duplicate_move()
@@ -121,7 +121,7 @@ class uv_to_mesh(Operator):
scn = bpy.context.scene
scn.objects.link(ob)
scn.objects.active = ob
- ob.select = True
+ ob.select_set(True)
# Create mesh from given verts, faces.
me.from_pydata(verts, [], faces)
@@ -148,7 +148,7 @@ class uv_to_mesh(Operator):
except:
pass
- ob0.select = False
+ ob0.select_set(False)
if self.auto_scale:
scaleFactor = math.pow(area / new_area, 1 / 2)
ob.scale = Vector((scaleFactor, scaleFactor, scaleFactor))
@@ -173,10 +173,10 @@ class uv_to_mesh(Operator):
if self.apply_modifiers:
bpy.ops.object.mode_set(mode='OBJECT')
- ob.select = False
- ob0.select = True
+ ob.select_set(False)
+ ob0.select_set(True)
bpy.ops.object.delete(use_global=False)
- ob.select = True
+ ob.select_set(True)
bpy.context.scene.objects.active = ob
return {'FINISHED'}
diff --git a/object_cloud_gen.py b/object_cloud_gen.py
index 6601b8f1..6255e581 100644
--- a/object_cloud_gen.py
+++ b/object_cloud_gen.py
@@ -192,7 +192,7 @@ def getMeshandPutinEditMode(scene, object):
bpy.ops.object.select_all(action='DESELECT')
# Select the object
- object.select = True
+ object.select_set(True)
scene.objects.active = object
# Go into Edit Mode
@@ -297,7 +297,7 @@ def applyScaleRotLoc(scene, obj):
bpy.ops.object.select_all(action='DESELECT')
# Select the object
- obj.select = True
+ obj.select_set(True)
scene.objects.active = obj
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
@@ -324,7 +324,7 @@ def addNewObject(scene, name, copyobj):
# Link new object to the given scene and select it
scene.objects.link(ob_new)
- ob_new.select = True
+ ob_new.select_set(True)
return ob_new
@@ -348,7 +348,7 @@ def removeParticleSystemFromObj(scene, obj):
bpy.ops.object.select_all(action='DESELECT')
# Select the object
- obj.select = True
+ obj.select_set(True)
scene.objects.active = obj
bpy.ops.object.particle_system_remove()
@@ -359,7 +359,7 @@ def removeParticleSystemFromObj(scene, obj):
def convertParticlesToMesh(scene, particlesobj, destobj, replacemesh):
# Select the Destination object
- destobj.select = True
+ destobj.select_set(True)
scene.objects.active = destobj
# Go to Edit Mode
@@ -398,7 +398,7 @@ def combineObjects(scene, combined, listobjs):
bpy.ops.object.select_all(action='DESELECT')
# Select the new object.
- combined.select = True
+ combined.select_set(True)
scene.objects.active = combined
# Add data
@@ -564,7 +564,7 @@ class GenerateCloud(Operator):
# press generate again if they want
for eachMember in definitionObjects:
eachMember.display_type = 'SOLID'
- eachMember.select = True
+ eachMember.select_set(True)
eachMember.hide_render = False
elif WhatToDo == 'CLOUD_CONVERT_TO_MESH':
@@ -692,7 +692,7 @@ class GenerateCloud(Operator):
bpy.ops.object.select_all(action='DESELECT')
# Select the object.
- bounds.select = True
+ bounds.select_set(True)
scene.objects.active = bounds
# Turn bounds object into a box. Use itself as a reference
@@ -922,7 +922,7 @@ class GenerateCloud(Operator):
cloud.hide = True
# Select the object.
- bounds.select = True
+ bounds.select_set(True)
scene.objects.active = bounds
# Let's resize the bound box to be more accurate.
diff --git a/object_fracture/fracture_ops.py b/object_fracture/fracture_ops.py
index 9cfcfb82..e6929d22 100644
--- a/object_fracture/fracture_ops.py
+++ b/object_fracture/fracture_ops.py
@@ -75,7 +75,7 @@ def create_cutter(context, crack_type, scale, roughness):
v.co[1] += roughness * scale * 0.1 * (random.random() - 0.5)
v.co[2] += roughness * scale * 0.1 * (random.random() - 0.5)
- bpy.context.active_object.select = True
+ bpy.context.active_object.select_set(True)
# bpy.context.scene.objects.active.select = True
'''
@@ -143,7 +143,7 @@ def getIslands(shard):
for gi in range(0, gindex):
bpy.ops.object.select_all(action='DESELECT')
bpy.context.scene.objects.active = shard
- shard.select = True
+ shard.select_set(True)
bpy.ops.object.duplicate(linked=False, mode='DUMMY')
a = bpy.context.scene.objects.active
sm = a.data
@@ -184,9 +184,9 @@ def boolop(ob, cutter, op):
gsize = sizex + sizey + sizez
bpy.ops.object.select_all()
- ob.select = True
+ ob.select_set(True)
sce.objects.active = ob
- cutter.select = False
+ cutter.select_set(False)
bpy.ops.object.modifier_add(type='BOOLEAN')
a = sce.objects.active
diff --git a/object_fracture_cell/__init__.py b/object_fracture_cell/__init__.py
index c1220374..f4122d33 100644
--- a/object_fracture_cell/__init__.py
+++ b/object_fracture_cell/__init__.py
@@ -72,7 +72,7 @@ def main_object(scene, obj, level, **kw):
from . import fracture_cell_setup
# not essential but selection is visual distraction.
- obj.select = False
+ obj.select_set(False)
if kw_copy["use_debug_redraw"]:
obj_display_type_prev = obj.display_type
@@ -198,7 +198,7 @@ def main(context, **kw):
bpy.ops.object.select_all(action='DESELECT')
for obj_cell in objects:
- obj_cell.select = True
+ obj_cell.select_set(True)
if mass_mode == 'UNIFORM':
for obj_cell in objects:
diff --git a/object_fracture_cell/fracture_cell_setup.py b/object_fracture_cell/fracture_cell_setup.py
index 93ac1b9a..2b46715f 100644
--- a/object_fracture_cell/fracture_cell_setup.py
+++ b/object_fracture_cell/fracture_cell_setup.py
@@ -392,9 +392,9 @@ def cell_fracture_boolean(scene, obj, objects,
# this is ugly and Im not proud of this - campbell
base = None
for base in scene.object_bases:
- base.select = False
+ base.select_set(False)
for obj_cell in objects_boolean:
- obj_cell.select = True
+ obj_cell.select_set(True)
bpy.ops.mesh.separate(type='LOOSE')
diff --git a/object_fracture_crack/crack_it.py b/object_fracture_crack/crack_it.py
index 489d2c87..96d1abfd 100644
--- a/object_fracture_crack/crack_it.py
+++ b/object_fracture_crack/crack_it.py
@@ -82,7 +82,7 @@ def _makeJoin(active_name, active_layer):
if fractures:
# Execute join
bpy.context.scene.objects.active = fractures[0]
- fractures[0].select = True
+ fractures[0].select_set(True)
bpy.ops.object.join()
else:
error_handlers(
diff --git a/object_print3d_utils/export.py b/object_print3d_utils/export.py
index 00277958..b0e6bc7b 100644
--- a/object_print3d_utils/export.py
+++ b/object_print3d_utils/export.py
@@ -192,7 +192,7 @@ def write_mesh(context, info, report_cb):
# restore context
base = None
for base in context_backup["selected_bases"]:
- base.select = True
+ base.select_set(True)
del base
scene.objects.active = context_backup["active_object"]
diff --git a/object_skinify.py b/object_skinify.py
index 795492ad..19d93aab 100644
--- a/object_skinify.py
+++ b/object_skinify.py
@@ -576,7 +576,7 @@ def main(context):
oldRotation = None
oldScale = None
armature_object = scn.objects.active
- armature_object.select = True
+ armature_object.select_set(True)
old_pose_pos = armature_object.data.pose_position
bpy.ops.object.mode_set(mode='OBJECT')
@@ -620,20 +620,20 @@ def main(context):
if sknfy.apply_mod and sknfy.parent_armature:
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.select_all(action='DESELECT')
- ob.select = True
- armature_object.select = True
+ ob.select_set(True)
+ armature_object.select_set(True)
scn.objects.active = armature_object
bpy.ops.object.parent_set(type='ARMATURE_AUTO')
armature_object.data.pose_position = old_pose_pos
- armature_object.select = False
+ armature_object.select_set(False)
else:
bpy.ops.object.mode_set(mode='OBJECT')
ob.location = oldLocation
ob.rotation_euler = oldRotation
ob.scale = oldScale
- ob.select = False
- armature_object.select = True
+ ob.select_set(False)
+ armature_object.select_set(True)
scn.objects.active = armature_object
armature_object.location = oldLocation
diff --git a/render_povray/primitives.py b/render_povray/primitives.py
index 8eb17a36..45fcae37 100644
--- a/render_povray/primitives.py
+++ b/render_povray/primitives.py
@@ -585,7 +585,7 @@ class POVRAY_OT_loft_add(bpy.types.Operator):
scn = bpy.context.scene
scn.objects.link(ob)
scn.objects.active = ob
- ob.select = True
+ ob.select_set(True)
ob.pov.curveshape = "loft"
return {'FINISHED'}
@@ -1074,7 +1074,7 @@ class POVRAY_OT_rainbow_add(bpy.types.Operator):
#refocus on the actual rainbow
bpy.context.scene.objects.active = ob
- ob.select=True
+ ob.select_set(True)
return {'FINISHED'}
@@ -1296,7 +1296,7 @@ class POVRAY_OT_prism_add(bpy.types.Operator):
scn = bpy.context.scene
scn.objects.link(ob)
scn.objects.active = ob
- ob.select = True
+ ob.select_set(True)
ob.pov.curveshape = "prism"
ob.name = ob.data.name = "Prism"
return {'FINISHED'}
diff --git a/space_view3d_display_tools/select_tools.py b/space_view3d_display_tools/select_tools.py
index fbd8f57c..2094405a 100644
--- a/space_view3d_display_tools/select_tools.py
+++ b/space_view3d_display_tools/select_tools.py
@@ -63,7 +63,7 @@ class ShowHideObject(Operator):
i.hide_render = False
else:
i.hide = True
- i.select = False
+ i.select_set(False)
if i.type not in ['CAMERA', 'LIGHT']:
i.hide_render = True
@@ -101,7 +101,7 @@ class HideAllObjects(Operator):
if context.object is None:
for i in bpy.data.objects:
i.hide = True
- i.select = False
+ i.select_set(False)
if i.type not in ['CAMERA', 'LIGHT']:
i.hide_render = True
@@ -111,7 +111,7 @@ class HideAllObjects(Operator):
for i in bpy.data.objects:
if i.name != obj_name:
i.hide = True
- i.select = False
+ i.select_set(False)
if i.type not in ['CAMERA', 'LIGHT']:
i.hide_render = True
diff --git a/space_view3d_display_tools/selection_restrictor.py b/space_view3d_display_tools/selection_restrictor.py
index e5816409..12cf05b2 100644
--- a/space_view3d_display_tools/selection_restrictor.py
+++ b/space_view3d_display_tools/selection_restrictor.py
@@ -260,7 +260,7 @@ class RestrictorMesh(Operator):
if ob.type == 'MESH':
if ob.get('ignore_restrictors') is None:
ob.hide_select = True
- ob.select = False
+ ob.select_set(False)
return{'FINISHED'}
@@ -295,7 +295,7 @@ class RestrictorCurve(Operator):
if ob.type == 'CURVE':
if ob.get('ignore_restrictors') is None:
ob.hide_select = True
- ob.select = False
+ ob.select_set(False)
return{'FINISHED'}
@@ -330,7 +330,7 @@ class RestrictorArm(Operator):
if ob.type == 'ARMATURE':
if ob.get('ignore_restrictors') is None:
ob.hide_select = True
- ob.select = False
+ ob.select_set(False)
return{'FINISHED'}
@@ -365,7 +365,7 @@ class RestrictorEmpty(Operator):
if ob.type == 'EMPTY':
if ob.get('ignore_restrictors') is None:
ob.hide_select = True
- ob.select = False
+ ob.select_set(False)
return{'FINISHED'}
@@ -400,7 +400,7 @@ class RestrictorCam(Operator):
if ob.type == 'CAMERA':
if ob.get('ignore_restrictors') is None:
ob.hide_select = True
- ob.select = False
+ ob.select_set(False)
return{'FINISHED'}
@@ -435,7 +435,7 @@ class RestrictorLamp(Operator):
if ob.type == 'LIGHT':
if ob.get('ignore_restrictors') is None:
ob.hide_select = True
- ob.select = False
+ ob.select_set(False)
return{'FINISHED'}
@@ -469,7 +469,7 @@ class RestrictorLat(Operator):
if ob.type == 'LATTICE':
if ob.get('ignore_restrictors') is None:
ob.hide_select = True
- ob.select = False
+ ob.select_set(False)
return{'FINISHED'}
@@ -503,7 +503,7 @@ class RestrictorFont(Operator):
if ob.type == 'FONT':
if ob.get('ignore_restrictors') is None:
ob.hide_select = True
- ob.select = False
+ ob.select_set(False)
return{'FINISHED'}
@@ -537,7 +537,7 @@ class RestrictorMeta(Operator):
if ob.type == 'META':
if ob.get('ignore_restrictors') is None:
ob.hide_select = True
- ob.select = False
+ ob.select_set(False)
return{'FINISHED'}
@@ -571,7 +571,7 @@ class RestrictorSurf(Operator):
if ob.type == 'SURFACE':
if ob.get('ignore_restrictors') is None:
ob.hide_select = True
- ob.select = False
+ ob.select_set(False)
return{'FINISHED'}
@@ -606,7 +606,7 @@ class RestrictorSound(Operator):
if ob.type == 'SPEAKER':
if ob.get('ignore_restrictors') is None:
ob.hide_select = True
- ob.select = False
+ ob.select_set(False)
return{'FINISHED'}
@@ -657,7 +657,7 @@ class RefreshRestrictors(Operator):
if ob.get('ignore_restrictors') is None:
ob.hide_select = False if get_props is None else True
if get_props is None:
- ob.select = False
+ ob.select_set(False)
mesh = gl_icon if types == "MESH" else mesh
curve = gl_icon if types == "CURVE" else curve
diff --git a/space_view3d_stored_views/operators.py b/space_view3d_stored_views/operators.py
index 82cfecda..5d8a4726 100644
--- a/space_view3d_stored_views/operators.py
+++ b/space_view3d_stored_views/operators.py
@@ -103,7 +103,7 @@ class SetSceneCamera(Operator):
c.hide = (c != chosen_camera)
scene.camera = chosen_camera
bpy.ops.object.select_all(action='DESELECT')
- chosen_camera.select = True
+ chosen_camera.select_set(True)
return {'FINISHED'}
def invoke(self, context, event):
@@ -122,7 +122,7 @@ class PreviewSceneCamera(Operator):
chosen_camera = context.active_object
bpy.ops.view3d.object_as_camera()
bpy.ops.object.select_all(action="DESELECT")
- chosen_camera.select = True
+ chosen_camera.select_set(True)
return {'FINISHED'}
diff --git a/ui_layer_manager.py b/ui_layer_manager.py
index d3bb41c3..312e8b1f 100644
--- a/ui_layer_manager.py
+++ b/ui_layer_manager.py
@@ -316,12 +316,12 @@ class SCENE_OT_namedlayer_lock_all(Operator):
layers = obj.layers
if True in {layer and group_layer for layer, group_layer in zip(layers, group_layers)}:
obj.hide_select = not use_lock
- obj.select = False
+ obj.select_set(False)
scene.layergroups[group_idx].use_lock = not use_lock
else:
if obj.layers[layer_idx]:
obj.hide_select = not use_lock
- obj.select = False
+ obj.select_set(False)
scene.namedlayers.layers[layer_idx].use_lock = not use_lock
return {'FINISHED'}
@@ -362,7 +362,7 @@ class SCENE_OT_namedlayer_select_objects_by_layer(Operator):
not_all_selected += 1
if not not_all_selected:
for obj in objects:
- obj.select = False
+ obj.select_set(False)
else:
bpy.ops.object.select_by_layer(match='SHARED', extend=self.extend, layers=layer_idx + 1)
diff --git a/uv_texture_atlas.py b/uv_texture_atlas.py
index 9902aa34..a8b5befd 100644
--- a/uv_texture_atlas.py
+++ b/uv_texture_atlas.py
@@ -389,7 +389,7 @@ class TexAtl_SelectGroup(Operator):
bpy.ops.object.select_all(action='DESELECT')
obj_group = bpy.data.collections[group_name]
for object in obj_group.objects:
- object.select = True
+ object.select_set(True)
return {'FINISHED'}
@@ -608,7 +608,7 @@ class TexAtl_MergeObjects(Operator):
bpy.ops.object.select_all(action='DESELECT')
ob_merged_old = bpy.data.objects.get(self.group_name + "_mergedObject")
if ob_merged_old is not None:
- ob_merged_old.select = True
+ ob_merged_old.select_set(True)
scene.objects.active = ob_merged_old
bpy.ops.object.delete(use_global=True)
@@ -617,7 +617,7 @@ class TexAtl_MergeObjects(Operator):
ob_merge.location = scene.cursor_location # position object at 3d-cursor
scene.objects.link(ob_merge) # Link object to scene
me.update()
- ob_merge.select = False
+ ob_merge.select_set(False)
bpy.ops.object.select_all(action='DESELECT')
@@ -633,7 +633,7 @@ class TexAtl_MergeObjects(Operator):
object.hide_select = False
bpy.ops.object.select_all(action='DESELECT')
- object.select = True
+ object.select_set(True)
# activate lightmap uv if existent
for uv in object.data.uv_textures:
@@ -643,16 +643,16 @@ class TexAtl_MergeObjects(Operator):
# Duplicate Temp Object
bpy.ops.object.select_all(action='DESELECT')
- object.select = True
+ object.select_set(True)
scene.objects.active = object
bpy.ops.object.duplicate(linked=False, mode='TRANSLATION')
activeNowObject = scene.objects.active
- activeNowObject.select = True
+ activeNowObject.select_set(True)
# hide render of original mesh
object.hide_render = True
object.hide = True
- object.select = False
+ object.select_set(False)
object.hide_select = isObjHideSelect
# remove unused UV
@@ -690,8 +690,8 @@ class TexAtl_MergeObjects(Operator):
# merge objects together
bpy.ops.object.select_all(action='DESELECT')
- activeNowObject.select = True
- ob_merge.select = True
+ activeNowObject.select_set(True)
+ ob_merge.select_set(True)
scene.objects.active = ob_merge
bpy.ops.object.join()
@@ -699,7 +699,7 @@ class TexAtl_MergeObjects(Operator):
# make Unwrap
bpy.ops.object.select_all(action='DESELECT')
- ob_merge.select = True
+ ob_merge.select_set(True)
scene.objects.active = ob_merge
# Unfide all faces
@@ -745,17 +745,17 @@ class TexAtl_SeparateObjects(Operator):
# bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
bpy.ops.object.select_all(action='DESELECT')
ob_merged.hide = False
- ob_merged.select = True
+ ob_merged.select_set(True)
groupSeparate = bpy.data.collections.new(ob_merged.name)
groupSeparate.objects.link(ob_merged)
- ob_merged.select = False
+ ob_merged.select_set(False)
doUnhidePolygons = False
for ms_obj in ob_merged.ms_merged_objects:
# select vertex groups and separate group from merged
# object
bpy.ops.object.select_all(action='DESELECT')
- ob_merged.select = True
+ ob_merged.select_set(True)
scene.objects.active = ob_merged
bpy.ops.object.mode_set(mode='EDIT')
@@ -781,27 +781,27 @@ class TexAtl_SeparateObjects(Operator):
# Copy UV Coordinates to the original mesh
if ms_obj.name in scene.objects:
- ob_merged.select = False
+ ob_merged.select_set(False)
ob_original = scene.objects[ms_obj.name]
isOriginalToSelect = ob_original.hide_select
ob_original.hide_select = False
ob_original.hide = False
- ob_original.select = True
+ ob_original.select_set(True)
scene.objects.active = ob_separeted
bpy.ops.object.join_uvs()
ob_original.hide_render = False
- ob_original.select = False
+ ob_original.select_set(False)
ob_original.hide_select = isOriginalToSelect
ob_original.data.update()
# delete separated object
bpy.ops.object.select_all(action='DESELECT')
- ob_separeted.select = True
+ ob_separeted.select_set(True)
bpy.ops.object.delete(use_global=False)
# delete duplicated object
bpy.ops.object.select_all(action='DESELECT')
- ob_merged.select = True
+ ob_merged.select_set(True)
bpy.ops.object.delete(use_global=False)
return{'FINISHED'}