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_menu | |
parent | a6189ebcbe0fcee59f72147fcc160f7b47234354 (diff) |
addons: object select_set syntax update
Diffstat (limited to 'add_advanced_objects_menu')
-rw-r--r-- | add_advanced_objects_menu/add_mesh_aggregate.py | 10 | ||||
-rw-r--r-- | add_advanced_objects_menu/circle_array.py | 14 | ||||
-rw-r--r-- | add_advanced_objects_menu/copy2.py | 12 | ||||
-rw-r--r-- | add_advanced_objects_menu/cubester.py | 8 | ||||
-rw-r--r-- | add_advanced_objects_menu/make_struts.py | 4 | ||||
-rw-r--r-- | add_advanced_objects_menu/rope_alpha.py | 4 |
6 files changed, 26 insertions, 26 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): |