diff options
author | NBurn <7nburn@gmail.com> | 2019-01-25 06:59:16 +0300 |
---|---|---|
committer | NBurn <7nburn@gmail.com> | 2019-01-25 06:59:16 +0300 |
commit | c686df25d98bc6a08ad02b9f4f9cff6b4aee4805 (patch) | |
tree | 2ddb8dd6ee0fc2bd546bb95691c07b906aeab1cf /add_advanced_objects_panels | |
parent | a6189ebcbe0fcee59f72147fcc160f7b47234354 (diff) |
addons: object select_set syntax update
Diffstat (limited to 'add_advanced_objects_panels')
-rw-r--r-- | add_advanced_objects_panels/delaunay_voronoi.py | 12 | ||||
-rw-r--r-- | add_advanced_objects_panels/drop_to_ground.py | 16 | ||||
-rw-r--r-- | add_advanced_objects_panels/object_laplace_lightning.py | 4 | ||||
-rw-r--r-- | add_advanced_objects_panels/unfold_transition.py | 4 |
4 files changed, 18 insertions, 18 deletions
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"} |