[Bf-extensions-cvs] [c686df25] master: addons: object select_set syntax update

NBurn noreply at git.blender.org
Fri Jan 25 04:59:37 CET 2019


Commit: c686df25d98bc6a08ad02b9f4f9cff6b4aee4805
Author: NBurn
Date:   Thu Jan 24 22:59:16 2019 -0500
Branches: master
https://developer.blender.org/rBAc686df25d98bc6a08ad02b9f4f9cff6b4aee4805

addons: object select_set syntax update

===================================================================

M	add_advanced_objects_menu/add_mesh_aggregate.py
M	add_advanced_objects_menu/circle_array.py
M	add_advanced_objects_menu/copy2.py
M	add_advanced_objects_menu/cubester.py
M	add_advanced_objects_menu/make_struts.py
M	add_advanced_objects_menu/rope_alpha.py
M	add_advanced_objects_panels/delaunay_voronoi.py
M	add_advanced_objects_panels/drop_to_ground.py
M	add_advanced_objects_panels/object_laplace_lightning.py
M	add_advanced_objects_panels/unfold_transition.py
M	add_curve_extra_objects/add_curve_spirofit_bouncespline.py
M	add_mesh_extra_objects/Wallfactory.py
M	add_mesh_extra_objects/add_empty_as_parent.py
M	add_mesh_extra_objects/add_mesh_beam_builder.py
M	add_mesh_extra_objects/add_mesh_round_brilliant.py
M	add_mesh_extra_objects/add_mesh_triangles.py
M	add_mesh_extra_objects/geodesic_domes/vefm_271.py
M	animation_add_corrective_shape_key.py
M	archimesh/achm_books_maker.py
M	archimesh/achm_column_maker.py
M	archimesh/achm_curtain_maker.py
M	archimesh/achm_door_maker.py
M	archimesh/achm_kitchen_maker.py
M	archimesh/achm_lamp_maker.py
M	archimesh/achm_main_panel.py
M	archimesh/achm_roof_maker.py
M	archimesh/achm_room_maker.py
M	archimesh/achm_shelves_maker.py
M	archimesh/achm_stairs_maker.py
M	archimesh/achm_tools.py
M	archimesh/achm_venetian_maker.py
M	archimesh/achm_window_maker.py
M	archimesh/achm_window_panel.py
M	btrace/bTrace.py
M	camera_turnaround.py
M	io_anim_c3d/__init__.py
M	io_export_unreal_psk_psa.py
M	io_import_dxf/dxfimport/do.py
M	io_import_scene_unreal_psa_psk.py
M	io_mesh_pdb/import_pdb.py
M	io_mesh_raw/import_raw.py
M	io_scene_3ds/import_3ds.py
M	io_scene_ms3d/ms3d_import.py
M	io_scene_x3d/import_x3d.py
M	light_field_tools/light_field_tools.py
M	materials_library_vx/__init__.py
M	materials_utils/__init__.py
M	mesh_bsurfaces.py
M	mesh_carver.py
M	mesh_tissue/dual_mesh.py
M	mesh_tissue/lattice.py
M	mesh_tissue/tessellate_numpy.py
M	mesh_tissue/uv_to_mesh.py
M	object_cloud_gen.py
M	object_fracture/fracture_ops.py
M	object_fracture_cell/__init__.py
M	object_fracture_cell/fracture_cell_setup.py
M	object_fracture_crack/crack_it.py
M	object_print3d_utils/export.py
M	object_skinify.py
M	render_povray/primitives.py
M	space_view3d_display_tools/select_tools.py
M	space_view3d_display_tools/selection_restrictor.py
M	space_view3d_stored_views/operators.py
M	ui_layer_manager.py
M	uv_texture_atlas.py

===================================================================

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

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list