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

NBurn noreply at git.blender.org
Fri Jan 25 05:41:05 CET 2019


Commit: cfed082dbadc66d6df311829617f6ebb56c29517
Author: NBurn
Date:   Thu Jan 24 23:40:37 2019 -0500
Branches: master
https://developer.blender.org/rBACcfed082dbadc66d6df311829617f6ebb56c29517

addons-contrib: object select_set syntax update

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

M	add_dimension.py
M	add_mesh_castle/Castle.py
M	add_mesh_clusters/__init__.py
M	add_mesh_space_tree/__init__.py
M	amaranth/render/meshlight_select.py
M	amaranth/scene/debug.py
M	io_atomblend_utilities/io_atomblend_utilities.py
M	io_directx_bel/import_x.py
M	io_import_LRO_Lola_MGS_Mola_img.py
M	io_mesh_gwyddion/import_gwyddion.py
M	io_mesh_xyz/import_xyz.py
M	io_points_pcd/pcd_utils.py
M	io_scene_fpx/fpx_import.py
M	io_scene_map/export_map.py
M	io_scene_open_street_map.py
M	mesh_ktools.py
M	np_station/np_float_box.py
M	np_station/np_float_poly.py
M	np_station/np_float_rectangle.py
M	np_station/np_point_align.py
M	np_station/np_point_array.py
M	np_station/np_point_copy.py
M	np_station/np_point_distance.py
M	np_station/np_point_instance.py
M	np_station/np_point_move.py
M	np_station/np_point_scale.py
M	np_station/np_roto_move.py
M	object_mesh_versions.py
M	object_particle_hair_net.py
M	render_shots.py
M	space_view3d_add_surround_cameras.py
M	space_view3d_paint_bprojection.py
M	sun_position/ui_sun.py

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

diff --git a/add_dimension.py b/add_dimension.py
index 199f9703..090f16f2 100644
--- a/add_dimension.py
+++ b/add_dimension.py
@@ -1768,8 +1768,8 @@ def createCurve(vertArray, self, align_matrix):
         bpy.context.scene.update()
 
     bpy.ops.object.select_all(action='DESELECT')
-    DimensionCurve.select = True
-    DimensionText.select = True
+    DimensionCurve.select_set(True)
+    DimensionText.select_set(True)
     bpy.context.scene.objects.active = DimensionCurve
     bpy.context.scene.update()
 
diff --git a/add_mesh_castle/Castle.py b/add_mesh_castle/Castle.py
index 8681e8a5..465e9c22 100644
--- a/add_mesh_castle/Castle.py
+++ b/add_mesh_castle/Castle.py
@@ -1223,11 +1223,11 @@ class add_castle(bpy.types.Operator):
             castleObj = makeWallObj(self, castleScene, wallLoc, OBJ_N, blockArea, [], wallExtOpts, baseMtl)
 
             if baseRotate:
-                castleObj.select = True  # must select to rotate
+                castleObj.select_set(True)  # must select to rotate
                 # rotate 90 backward
                 bpy.ops.transform.rotate(value=-cPieHlf, constraint_axis=[True, False, False])
                 bpy.ops.object.transform_apply(location=False, rotation=True, scale=False)
-                castleObj.select = False  # deselect after rotate else joined with others...
+                castleObj.select_set(False)  # deselect after rotate else joined with others...
 
             settings['d'] = saveBD  # restore block values
             settings['dv'] = saveBDV
@@ -1675,13 +1675,13 @@ class add_castle(bpy.types.Operator):
             # generate tower...
             cTower1Obj = makeWallObj(self, castleScene, wallLoc, "CTower1", blockArea, [], wallExtOpts, wallMtl)
 
-            cTower1Obj.select = True  # must select to rotate
+            cTower1Obj.select_set(True)  # must select to rotate
             # rotate 90 forward (face plant)...
             #            bpy.ops.transform.rotate(value=cPieHlf,constraint_axis=[True,False,False])
             # rotate 90 ccw along side
             bpy.ops.transform.rotate(value=-cPieHlf, constraint_axis=[False, True, False])
             bpy.ops.object.transform_apply(location=False, rotation=True, scale=False)
-            cTower1Obj.select = False  # deselect after rotate else joined with others...
+            cTower1Obj.select_set(False)  # deselect after rotate else joined with others...
 
             cTower1Obj.parent = castleObj  # Connect to parent
 
@@ -1723,7 +1723,7 @@ class add_castle(bpy.types.Operator):
 
             cDomeObj.parent = castleObj  # Connect to parent
 
-        castleObj.select = True
+        castleObj.select_set(True)
         context.scene.objects.active = castleObj
 
         return {'FINISHED'}
@@ -1818,11 +1818,11 @@ def makeWalls(sRef, objScene, objParent, objSides, objMods, objLoc, objMat, objL
         cFrontObj.parent = objParent  # Connect to parent
 
         if wallRound:  # rotate 90 forward if round/disc
-            cFrontObj.select = True  # must select to rotate
+            cFrontObj.select_set(True)  # must select to rotate
             bpy.ops.transform.rotate(value=cPieHlf, constraint_axis=[True, False, False])
             bpy.ops.object.transform_apply(location=False, rotation=True, scale=False)
             cFrontObj.location.z += WobjH / 2  # adjust vertical after rotate for radius
-            cFrontObj.select = False  # deselect after rotate else joined with others...
+            cFrontObj.select_set(False)  # deselect after rotate else joined with others...
 
     ####################
     if objSides[2]:  # Make "back" wall
@@ -1863,7 +1863,7 @@ def makeWalls(sRef, objScene, objParent, objSides, objMods, objLoc, objMat, objL
         cBackObj = makeWallObj(sRef, objScene, objLoc, objName, blockArea, wallHoles, wallExtOpts, objMat)
         cBackObj.parent = objParent  # Connect to parent
 
-        cBackObj.select = True  # must select to rotate
+        cBackObj.select_set(True)  # must select to rotate
 
         # rotate to "reverse" face of wall, else just a mirror of front.
         bpy.ops.transform.rotate(value=cPie, constraint_axis=[False, False, True])
@@ -1873,7 +1873,7 @@ def makeWalls(sRef, objScene, objParent, objSides, objMods, objLoc, objMat, objL
             bpy.ops.transform.rotate(value=cPieHlf, constraint_axis=[True, False, False])
             cBackObj.location.z += WobjH / 2  # adjust vertical after rotate for radius
 
-        cBackObj.select = False  # de-select after rotate else joined with others...
+        cBackObj.select_set(False)  # de-select after rotate else joined with others...
 
     ####################
     # set block "area": height, width, depth, and spacing for side walls...
@@ -1928,7 +1928,7 @@ def makeWalls(sRef, objScene, objParent, objSides, objMods, objLoc, objMat, objL
         cSideLObj = makeWallObj(sRef, objScene, objLoc, objName, blockArea, wallHoles, wallExtOpts, objMat)
         cSideLObj.parent = objParent  # Connect to parent
 
-        cSideLObj.select = True  # must select to rotate
+        cSideLObj.select_set(True)  # must select to rotate
         bpy.ops.object.transform_apply(location=False, rotation=True, scale=False)
 
         if wallRound:  # rotate 90 forward
@@ -1946,7 +1946,7 @@ def makeWalls(sRef, objScene, objParent, objSides, objMods, objLoc, objMat, objL
         # rotate 90 cw along side
         #            bpy.ops.transform.rotate(value=cPieHlf,constraint_axis=[False,True,False])
 
-        cSideLObj.select = False  # deselect after rotate else joined with others...
+        cSideLObj.select_set(False)  # deselect after rotate else joined with others...
 
 
     ####################
@@ -1990,7 +1990,7 @@ def makeWalls(sRef, objScene, objParent, objSides, objMods, objLoc, objMat, objL
         cSideRObj.parent = objParent  # Connect to parent
         #        objScene.objects.active=cSideRObj
 
-        cSideRObj.select = True  # must select to rotate
+        cSideRObj.select_set(True)  # must select to rotate
         bpy.ops.object.transform_apply(location=False, rotation=True, scale=False)
 
         if wallRound:  # rotate 90 forward
@@ -2008,7 +2008,7 @@ def makeWalls(sRef, objScene, objParent, objSides, objMods, objLoc, objMat, objL
         # rotate 90 cw along side
         #        bpy.ops.transform.rotate(value=cPieHlf,constraint_axis=[False,True,False])
 
-        cSideRObj.select = False  # deselect after rotate...
+        cSideRObj.select_set(False)  # deselect after rotate...
 
         return  # all done, is automatic, just a matter of detail/protocol.
 
diff --git a/add_mesh_clusters/__init__.py b/add_mesh_clusters/__init__.py
index 4e7f8afe..971171e0 100644
--- a/add_mesh_clusters/__init__.py
+++ b/add_mesh_clusters/__init__.py
@@ -361,7 +361,7 @@ def DEF_atom_draw_atoms(prop_element,
     # ------------------------------------------------------------------------
     # SELECT ALL LOADED OBJECTS
     bpy.ops.object.select_all(action='DESELECT')
-    new_atom_mesh.select = True
+    new_atom_mesh.select_set(True)
     bpy.context.scene.objects.active = new_atom_mesh
 
     return True
diff --git a/add_mesh_space_tree/__init__.py b/add_mesh_space_tree/__init__.py
index 12171b6e..cf77a437 100644
--- a/add_mesh_space_tree/__init__.py
+++ b/add_mesh_space_tree/__init__.py
@@ -567,8 +567,8 @@ def createGeometry(tree, power=0.5, scale=0.01, addleaves=False, pleaf=0.5,
     obj_new = bpy.data.objects.new(mesh.name, mesh)
     base = bpy.context.scene.objects.link(obj_new)
     for ob in bpy.context.scene.objects:
-        ob.select = False
-    base.select = True
+        ob.select_set(False)
+    base.select_set(True)
     bpy.context.scene.objects.active = obj_new
     bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
 
diff --git a/amaranth/render/meshlight_select.py b/amaranth/render/meshlight_select.py
index c3155071..00c30717 100644
--- a/amaranth/render/meshlight_select.py
+++ b/amaranth/render/meshlight_select.py
@@ -39,7 +39,7 @@ class AMTH_OBJECT_OT_select_meshlights(bpy.types.Operator):
 
         for ob in context.scene.objects:
             if utils.cycles_is_emission(context, ob):
-                ob.select = True
+                ob.select_set(True)
                 context.scene.objects.active = ob
 
         if not context.selected_objects and not context.scene.objects.active:
diff --git a/amaranth/scene/debug.py b/amaranth/scene/debug.py
index 03175b39..4226e9ac 100755
--- a/amaranth/scene/debug.py
+++ b/amaranth/scene/debug.py
@@ -321,7 +321,7 @@ class AMTH_SCENE_OT_amaranth_object_select(Operator):
         obj = bpy.data.objects[self.object_name]
 
         bpy.ops.object.select_all(action="DESELECT")
-        obj.select = True
+        obj.select_set(True)
         context.scene.objects.active = obj
 
         return {"FINISHED"}
diff --git a/io_atomblend_utilities/io_atomblend_utilities.py b/io_atomblend_utilities/io_atomblend_utilities.py
index 9562a7c6..71f6c5c6 100644
--- a/io_atomblend_utilities/io_atomblend_utilities.py
+++ b/io_atomblend_utilities/io_atomblend_utilities.py
@@ -372,7 +372,7 @@ def modify_objects(action_type,
 
         # Delete the old object.
         bpy.ops.object.select_all(action='DESELECT')
-        atom.select = True
+        atom.select_set(True)
         bpy.ops.object.delete()
         del(atom)
 
@@ -409,7 +409,7 @@ def modify_objects(action_type,
 
         # Finally, delete the old object
         bpy.ops.object.select_all(action='DESELECT')
-        atom.select = True
+        atom.select_set(True)
         bpy.ops.object.delete()
 
 
@@ -442,7 +442,7 @@ def separate_atoms(scn):
     bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
     # ... delete the new mesh including the separated vertex
     bpy.ops.object.select_all(action='DESELECT')
-    new_object.select = True
+    new_object.select_set(True)
     bpy.ops.object.delete()
 
     # Create new atoms/vacancies at the position of the old atoms
@@ -452,7 +452,7 @@ def separate_atoms(scn):
         # structure. <= this is done 'len(locations)' times. After each
         # duplication, move the new object onto the positions
         bpy.ops.object.select_all(action='DESELECT')
-        atom.ch

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list