addons-contrib: object select_set syntax update
authorNBurn <7nburn@gmail.com>
Fri, 25 Jan 2019 04:40:37 +0000 (23:40 -0500)
committerNBurn <7nburn@gmail.com>
Fri, 25 Jan 2019 04:40:37 +0000 (23:40 -0500)
33 files changed:
add_dimension.py
add_mesh_castle/Castle.py
add_mesh_clusters/__init__.py
add_mesh_space_tree/__init__.py
amaranth/render/meshlight_select.py
amaranth/scene/debug.py
io_atomblend_utilities/io_atomblend_utilities.py
io_directx_bel/import_x.py
io_import_LRO_Lola_MGS_Mola_img.py
io_mesh_gwyddion/import_gwyddion.py
io_mesh_xyz/import_xyz.py
io_points_pcd/pcd_utils.py
io_scene_fpx/fpx_import.py
io_scene_map/export_map.py
io_scene_open_street_map.py
mesh_ktools.py
np_station/np_float_box.py
np_station/np_float_poly.py
np_station/np_float_rectangle.py
np_station/np_point_align.py
np_station/np_point_array.py
np_station/np_point_copy.py
np_station/np_point_distance.py
np_station/np_point_instance.py
np_station/np_point_move.py
np_station/np_point_scale.py
np_station/np_roto_move.py
object_mesh_versions.py
object_particle_hair_net.py
render_shots.py
space_view3d_add_surround_cameras.py
space_view3d_paint_bprojection.py
sun_position/ui_sun.py

index 199f970..090f16f 100644 (file)
@@ -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()
 
index 8681e8a..465e9c2 100644 (file)
@@ -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.
 
index 4e7f8af..971171e 100644 (file)
@@ -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
index 12171b6..cf77a43 100644 (file)
@@ -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')
 
index c315507..00c3071 100644 (file)
@@ -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:
index 03175b3..4226e9a 100755 (executable)
@@ -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"}
index 9562a7c..71f6c5c 100644 (file)
@@ -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.children[0].select = True
+        atom.children[0].select_set(True)
         bpy.context.scene.objects.active = atom.children[0]
         bpy.ops.object.duplicate_move()
         new_atom = bpy.context.scene.objects.active
@@ -639,7 +639,7 @@ def draw_obj(atom_shape, atom):
     new_atom = bpy.context.scene.objects.active
     new_atom.scale = atom.scale + Vector((0.0,0.0,0.0))
     new_atom.name = atom.name + "_tmp"
-    new_atom.select = True
+    new_atom.select_set(True)
 
     return new_atom
 
@@ -667,7 +667,7 @@ def draw_obj_special(atom_shape, atom):
         material_new.halo.add = 0.0
         new_atom.active_material = material_new
         new_atom.name = atom.name
-        new_atom.select = True
+        new_atom.select_set(True)
     # F2+ center
     if atom_shape == '2':
         # Create first a cube
@@ -679,7 +679,7 @@ def draw_obj_special(atom_shape, atom):
         cube = bpy.context.scene.objects.active
         cube.scale = atom.scale + Vector((0.0,0.0,0.0))
         cube.name = atom.name + "_F2+-center"
-        cube.select = True
+        cube.select_set(True)
         # New material for this cube
         material_cube = bpy.data.materials.new(atom.name + "_F2+-center")
         material_cube.diffuse_color = [0.8,0.0,0.0]
@@ -713,7 +713,7 @@ def draw_obj_special(atom_shape, atom):
         cube = bpy.context.scene.objects.active
         cube.scale = atom.scale + Vector((0.0,0.0,0.0))
         cube.name = atom.name + "_F+-center"
-        cube.select = True
+        cube.select_set(True)
         # New material for this cube
         material_cube = bpy.data.materials.new(atom.name + "_F+-center")
         material_cube.diffuse_color = [0.8,0.8,0.0]
@@ -770,7 +770,7 @@ def draw_obj_special(atom_shape, atom):
         cube = bpy.context.scene.objects.active
         cube.scale = atom.scale + Vector((0.0,0.0,0.0))
         cube.name = atom.name + "_F0-center"
-        cube.select = True
+        cube.select_set(True)
         # New material for this cube
         material_cube = bpy.data.materials.new(atom.name + "_F0-center")
         material_cube.diffuse_color = [0.8,0.8,0.8]
index 895af3a..6d3cecf 100644 (file)
@@ -592,7 +592,7 @@ BINARY FORMAT
             armdata = bpy.data.armatures.new(name=armname)
             arm = bpy.data.objects.new(armname,armdata)
             bpy.context.scene.objects.link(arm)
-            arm.select = True
+            arm.select_set(True)
             bpy.context.scene.objects.active = arm
             bpy.ops.object.mode_set(mode='EDIT')
             parent_matrix = Matrix()
index ff35e2b..66e184c 100644 (file)
@@ -443,7 +443,7 @@ class Import(bpy.types.Operator):
         scene = bpy.context.scene
         scene.objects.link(ob_new)
         scene.objects.active = ob_new
-        ob_new.select = True
+        ob_new.select_set(True)
         print ('*** End draw   ***')
         print('*** Start Smooth ***')
         bpy.ops.object.shade_smooth()
index f880d15..9f16ca8 100644 (file)
@@ -268,7 +268,7 @@ def create_mesh(data_list,
         # 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),
index 798d923..07640a0 100644 (file)
@@ -544,7 +544,7 @@ def import_xyz(Ball_type,
         # 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),
@@ -658,7 +658,7 @@ def import_xyz(Ball_type,
     bpy.ops.object.select_all(action='DESELECT')
     obj = None
     for obj in STRUCTURE:
-        obj.select = True
+        obj.select_set(True)
     # activate the last selected object (perhaps another should be active?)
     if obj:
         bpy.context.scene.objects.active = obj
@@ -674,7 +674,7 @@ def build_frames(frame_delta, frame_skip):
 
         bpy.ops.object.select_all(action='DESELECT')
         bpy.context.scene.objects.active = element
-        element.select = True
+        element.select_set(True)
         bpy.ops.object.shape_key_add(True)
 
     frame_skip += 1
index b2e94ab..e2c1744 100644 (file)
@@ -42,7 +42,7 @@ def create_and_link_mesh(name, points):
 
     obj = bpy.data.objects.new(name, mesh)
     scene.objects.link(obj)
-    obj.select = True
+    obj.select_set(True)
 
 
 def import_pcd(filepath, name="new_pointcloud"):
index 6b7170f..18c967a 100644 (file)
@@ -979,7 +979,7 @@ class FptImporter():
         width = fpx_table_data.get_value("width", default=0.0)
         obj.location = (width / 2.0, -1600.0, 550.0)
         obj.rotation_euler = (radians(63.0), 0.0, 0.0)
-        obj.select = True
+        obj.select_set(True)
         obj.layers = FptImporter.LAYERS_AO
         camera.lens_unit = 'FOV'
         camera.clip_start = 1.0 # 1.0mm
@@ -1414,7 +1414,7 @@ class FptImporter():
         offset_x = tex_size_width - 2.0 * (tex_loc_x - box_x)
         offset_y = tex_size_length - 2.0 * (tex_loc_y - box_y)
 
-        blender_object.select = True
+        blender_object.select_set(True)
         self.__scene.objects.active = blender_object
         self.__scene.update()
         if ops.object.convert.poll():
@@ -2660,7 +2660,7 @@ class FptImporter():
             #blender_empty_object_new.instance_type = 'COLLECTION'
             #blender_empty_object_new.instance_collection = blender_group
             blender_empty_object_new.layers = layers
-            blender_empty_object_new.select = True
+            blender_empty_object_new.select_set(True)
             """
             active_object = self.__scene.objects.active
             self.__scene.objects.active = blender_empty_object_new
index 5c310f7..0660eb3 100644 (file)
@@ -390,7 +390,7 @@ def split_objects(context, objects):
 
     bpy.ops.object.select_all(action='DESELECT')
     for ob in objects:
-        ob.select = True
+        ob.select_set(True)
 
     bpy.ops.object.duplicate()
     objects = bpy.context.selected_objects
@@ -400,7 +400,7 @@ def split_objects(context, objects):
     tot_ob = len(objects)
     for i, ob in enumerate(objects):
         print("Splitting object: %d/%d" % (i, tot_ob))
-        ob.select = True
+        ob.select_set(True)
 
         if ob.type == "MESH":
             scene.objects.active = ob
@@ -442,7 +442,7 @@ def split_objects(context, objects):
                 bpy.ops.object.mode_set(mode='OBJECT')
             final_objects += split_objects
 
-        ob.select = False
+        ob.select_set(False)
 
     print(final_objects)
     return final_objects
index 357b94c..9d661e3 100644 (file)
@@ -241,7 +241,7 @@ def read(context, filepath, scale=100.0, tag=False, utm=False):
     scene = context.scene
     scene.objects.link(obj)
     scene.objects.active = obj
-    obj.select = True
+    obj.select_set(True)
 
     # entry points for other addons
     obj['osmfile'] = filepath
index 8fb665b..9867e1b 100644 (file)
@@ -117,7 +117,7 @@ class lattice_to_selection(bpy.types.Operator):
                     # check if object type is not MESH and then deselect it
                     for x in bpy.context.selected_objects:
                         if bpy.data.objects[x.name].type != 'MESH':
-                            bpy.data.objects[x.name].select = False
+                            bpy.data.objects[x.name].select_set(False)
 
 
                     org_objs = bpy.context.selected_objects
@@ -153,14 +153,14 @@ class lattice_to_selection(bpy.types.Operator):
                     bpy.ops.object.select_all(action='DESELECT')
 
                     # select and delete the tmp_object
-                    bpy.data.objects[tmp_obj].select = True
+                    bpy.data.objects[tmp_obj].select_set(True)
                     bpy.ops.object.delete(use_global=False)
 
                     # select all the original objects and assign the lattice deformer
                     for i in org_objs:
                        if bpy.data.objects[i.name].type == 'MESH' :
                            bpy.context.scene.objects.active = bpy.data.objects[i.name]
-                           bpy.data.objects[i.name].select = True
+                           bpy.data.objects[i.name].select_set(True)
 
                            bpy.ops.object.modifier_add(type='LATTICE')
                            lattice_name = bpy.context.object.modifiers[len(bpy.context.object.modifiers)-1].name
@@ -169,19 +169,19 @@ class lattice_to_selection(bpy.types.Operator):
                                for x in bpy.context.object.modifiers:
                                    bpy.ops.object.modifier_move_up(modifier=lattice_name)
                        else:
-                           bpy.data.objects[i.name].select = True
+                           bpy.data.objects[i.name].select_set(True)
 
 
                     if parent_to:
 
-                        bpy.data.objects[lattice_obj.name].select = True
+                        bpy.data.objects[lattice_obj.name].select_set(True)
                         bpy.context.scene.objects.active = bpy.data.objects[lattice_obj.name]
 
                         bpy.ops.object.parent_set(type='OBJECT', keep_transform=True)
                     else:
 
                         bpy.ops.object.select_all(action='DESELECT')
-                        bpy.data.objects[lattice_obj.name].select = True
+                        bpy.data.objects[lattice_obj.name].select_set(True)
                         bpy.context.scene.objects.active = bpy.data.objects[lattice_obj.name]
 
 
@@ -222,7 +222,7 @@ class lattice_to_selection(bpy.types.Operator):
                     bpy.ops.object.select_all(action='DESELECT')
 
                     bpy.context.scene.objects.active = bpy.data.objects[tmp_obj]
-                    bpy.data.objects[tmp_obj].select = True
+                    bpy.data.objects[tmp_obj].select_set(True)
 
 
                     if bpy.context.object.modifiers:
@@ -248,12 +248,12 @@ class lattice_to_selection(bpy.types.Operator):
                     bpy.ops.object.select_all(action='DESELECT')
 
 
-                    bpy.data.objects[tmp_obj].select = True
+                    bpy.data.objects[tmp_obj].select_set(True)
 
                     bpy.ops.object.delete(use_global=False)
 
                     bpy.context.scene.objects.active = bpy.data.objects[active_obj]
-                    bpy.data.objects[active_obj].select = True
+                    bpy.data.objects[active_obj].select_set(True)
 
                     bpy.ops.object.modifier_add(type='LATTICE')
                     lattice_name = bpy.context.object.modifiers[len(bpy.context.object.modifiers)-1].name
@@ -267,7 +267,7 @@ class lattice_to_selection(bpy.types.Operator):
 
                     bpy.ops.object.select_all(action='DESELECT')
 
-                    bpy.data.objects[lattice_obj.name].select = True
+                    bpy.data.objects[lattice_obj.name].select_set(True)
                     bpy.context.scene.objects.active = bpy.data.objects[lattice_obj.name]
 
                     bpy.context.object.data.interpolation_type_u = interpolation
index 2d609d6..7555172 100644 (file)
@@ -218,7 +218,7 @@ class NPFBPrepareContext(bpy.types.Operator):
         if flag == 'RUNTRANS0':
             helper = NP020FB.helper
             bpy.ops.object.select_all(action = 'DESELECT')
-            helper.select = True
+            helper.select_set(True)
             bpy.context.scene.objects.active = helper
             bpy.context.tool_settings.use_snap = False
             bpy.context.tool_settings.snap_element = 'VERTEX'
@@ -265,7 +265,7 @@ class NPFBPrepareContext(bpy.types.Operator):
 
             bpy.ops.object.select_all(action = 'DESELECT')
             if corner_brush == False: helper.location = pointloc
-            helper.select = True
+            helper.select_set(True)
             bpy.ops.transform.rotate(value = ang_hor ,axis = Vector((0.0, 0.0, 1.0)))
             bpy.ops.transform.rotate(value = rot_ang ,axis = rot_axis)
             NP020FB.trans_custom = True
@@ -693,7 +693,7 @@ class NPFBGenerateGeometry(bpy.types.Operator):
             bpy.ops.mesh.normals_make_consistent()
             bpy.ops.object.mode_set(mode = 'OBJECT')
             bpy.ops.object.select_all(action = 'DESELECT')
-            boxob.select = True
+            boxob.select_set(True)
             bpy.ops.object.origin_set(type = 'ORIGIN_GEOMETRY')
             if wire:
                 boxob.show_wire = True
@@ -725,16 +725,16 @@ class NPFBRestoreContext(bpy.types.Operator):
         boxob = NP020FB.boxob
         helper.hide = False
         bpy.ops.object.select_all(action = 'DESELECT')
-        helper.select = True
+        helper.select_set(True)
         bpy.ops.object.delete('EXEC_DEFAULT')
         if boxob == None:
             for ob in selob:
-                ob.select = True
+                ob.select_set(True)
             if NP020FB.acob is not None:
                 bpy.context.scene.objects.active = NP020FB.acob
                 bpy.ops.object.mode_set(mode = NP020FB.edit_mode)
         else:
-            boxob.select = True
+            boxob.select_set(True)
             bpy.context.scene.objects.active = boxob
             bpy.ops.object.mode_set(mode = NP020FB.edit_mode)
         if NP020FB.trans_custom: bpy.ops.transform.delete_orientation()
index 2f9c70d..f30a1a2 100644 (file)
@@ -195,7 +195,7 @@ class NPFPGetSelection(bpy.types.Operator):
         NP020FP.selob = selob
         # De-selecting objects in prepare for other processes in the script:
         for ob in selob:
-            ob.select = False
+            ob.select_set(False)
         np_print('01_get_selection_END')
         return {'FINISHED'}
 
@@ -250,8 +250,8 @@ class NPFPAddPoints(bpy.types.Operator):
         end = bpy.context.object
         end.name = 'NP_FP_end'
         NP020FP.end = end
-        start.select = True
-        end.select = True
+        start.select_set(True)
+        end.select_set(True)
         bpy.context.tool_settings.use_snap = False
         bpy.context.tool_settings.snap_element = NP020FP.snap
         bpy.context.tool_settings.snap_target = 'ACTIVE'
@@ -668,12 +668,12 @@ class NPFPRunTranslate(bpy.types.Operator):
             # PRESS is taken by transform.translate operator
             bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
             bpy.ops.object.select_all(action='DESELECT')
-            start.select = True
-            end.select = True
+            start.select_set(True)
+            end.select_set(True)
             bpy.ops.object.delete('EXEC_DEFAULT')
             if selob is not polyob:
                 for ob in selob:
-                    ob.select = True
+                    ob.select_set(True)
             else:
                 polyob.select = True
             NP020FP.startloc3d = (0.0, 0.0, 0.0)
@@ -699,12 +699,12 @@ class NPFPRunTranslate(bpy.types.Operator):
             # PRESS is taken by transform.translate operator
             bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
             bpy.ops.object.select_all(action='DESELECT')
-            start.select = True
-            end.select = True
+            start.select_set(True)
+            end.select_set(True)
             bpy.ops.object.delete('EXEC_DEFAULT')
             if selob is not polyob:
                 for ob in selob:
-                    ob.select = True
+                    ob.select_set(True)
             else:
                 polyob.select = True
             NP020FP.startloc3d = (0.0, 0.0, 0.0)
@@ -1176,12 +1176,12 @@ class NPFPRunNavigate(bpy.types.Operator):
             bpy.ops.object.select_all(action='DESELECT')
             start.hide = False
             end.hide = False
-            start.select = True
-            end.select = True
+            start.select_set(True)
+            end.select_set(True)
             bpy.ops.object.delete('EXEC_DEFAULT')
             if selob is not polyob:
                 for ob in selob:
-                    ob.select = True
+                    ob.select_set(True)
             else:
                 polyob.select = True
             NP020FP.startloc3d = (0.0, 0.0, 0.0)
@@ -1255,7 +1255,7 @@ class NPFPChangePhase(bpy.types.Operator):
         NP020FP.startloc3d = startloc3d
         NP020FP.endloc3d = endloc3d
         bpy.ops.object.select_all(action='DESELECT')
-        end.select = True
+        end.select_set(True)
         NP020FP.snap = NP020FP.snap
         bpy.context.tool_settings.use_snap = False
         bpy.context.tool_settings.snap_element = NP020FP.snap
@@ -1353,7 +1353,7 @@ class NPFPMakeSegment(bpy.types.Operator):
         start.location = endloc3d
         end.location = endloc3d
         bpy.ops.object.select_all(action='DESELECT')
-        end.select = True
+        end.select_set(True)
         NP020FP.start = start
         NP020FP.end = end
         NP020FP.phase = 2
@@ -1389,12 +1389,12 @@ class NPFPDeletePoints(bpy.types.Operator):
         bpy.ops.object.select_all(action='DESELECT')
         start.hide = False
         end.hide = False
-        start.select = True
-        end.select = True
+        start.select_set(True)
+        end.select_set(True)
         bpy.ops.object.delete('EXEC_DEFAULT')
         if selob is not polyob:
             for ob in selob:
-                ob.select = True
+                ob.select_set(True)
         else:
             polyob.select = True
         NP020FP.startloc3d = (0.0, 0.0, 0.0)
@@ -1797,7 +1797,7 @@ class NPFPRunNavEx(bpy.types.Operator):
             # XXX selob and polyob are undefined
             if selob is not polyob:
                 for ob in selob:
-                    ob.select = True
+                    ob.select_set(True)
             else:
                 polyob.select = True
 
@@ -2140,7 +2140,7 @@ class NPFPRunExtrude(bpy.types.Operator):
             bpy.ops.object.select_all(action='DESELECT')
             if selob is not polyob:
                 for ob in selob:
-                    ob.select = True
+                    ob.select_set(True)
             else:
                 polyob.select = True
             NP020FP.startloc3d = (0.0, 0.0, 0.0)
@@ -2174,7 +2174,7 @@ class NPFPRunExtrude(bpy.types.Operator):
             bpy.ops.object.select_all(action='DESELECT')
             if selob is not polyob:
                 for ob in selob:
-                    ob.select = True
+                    ob.select_set(True)
             else:
                 polyob.select = True
             NP020FP.startloc3d = (0.0, 0.0, 0.0)
@@ -2274,7 +2274,7 @@ class NPFPRunBevel(bpy.types.Operator):
             bpy.ops.object.select_all(action='DESELECT')
             if selob is not polyob:
                 for ob in selob:
-                    ob.select = True
+                    ob.select_set(True)
             else:
                 polyob.select = True
             NP020FP.startloc3d = (0.0, 0.0, 0.0)
@@ -2304,7 +2304,7 @@ class NPFPRunBevel(bpy.types.Operator):
             bpy.ops.object.select_all(action='DESELECT')
             if selob is not polyob:
                 for ob in selob:
-                    ob.select = True
+                    ob.select_set(True)
             else:
                 polyob.select = True
             NP020FP.startloc3d = (0.0, 0.0, 0.0)
@@ -2360,7 +2360,7 @@ class NPFPRunBevel(bpy.types.Operator):
             bpy.ops.object.select_all(action='DESELECT')
             if selob is not polyob:
                 for ob in selob:
-                    ob.select = True
+                    ob.select_set(True)
             else:
                 polyob.select = True
             NP020FP.startloc3d = (0.0, 0.0, 0.0)
index 678884f..fed86fb 100644 (file)
@@ -217,7 +217,7 @@ class NPFRPrepareContext(bpy.types.Operator):
         if flag == 'RUNTRANS0':
             helper = NP020FR.helper
             bpy.ops.object.select_all(action = 'DESELECT')
-            helper.select = True
+            helper.select_set(True)
             bpy.context.scene.objects.active = helper
             bpy.context.tool_settings.use_snap = False
             bpy.context.tool_settings.snap_element = 'VERTEX'
@@ -264,7 +264,7 @@ class NPFRPrepareContext(bpy.types.Operator):
 
             bpy.ops.object.select_all(action = 'DESELECT')
             if corner_brush == False: helper.location = pointloc
-            helper.select = True
+            helper.select_set(True)
             bpy.ops.transform.rotate(value = ang_hor ,axis = Vector((0.0, 0.0, 1.0)))
             bpy.ops.transform.rotate(value = rot_ang ,axis = rot_axis)
             NP020FR.trans_custom = True
@@ -643,7 +643,7 @@ class NPFRGenerateGeometry(bpy.types.Operator):
             scn.objects.active = recob
             scn.update()
             bpy.ops.object.select_all(action = 'DESELECT')
-            recob.select = True
+            recob.select_set(True)
             bpy.ops.object.origin_set(type = 'ORIGIN_GEOMETRY')
             bpy.ops.object.mode_set(mode = 'EDIT')
             bpy.ops.mesh.select_all(action = 'SELECT')
@@ -679,16 +679,16 @@ class NPFRRestoreContext(bpy.types.Operator):
         recob = NP020FR.recob
         helper.hide = False
         bpy.ops.object.select_all(action = 'DESELECT')
-        helper.select = True
+        helper.select_set(True)
         bpy.ops.object.delete('EXEC_DEFAULT')
         if recob == None:
             for ob in selob:
-                ob.select = True
+                ob.select_set(True)
             if NP020FR.acob is not None:
                 bpy.context.scene.objects.active = NP020FR.acob
                 bpy.ops.object.mode_set(mode = NP020FR.edit_mode)
         else:
-            recob.select = True
+            recob.select_set(True)
             bpy.context.scene.objects.active = recob
             bpy.ops.object.mode_set(mode = NP020FR.edit_mode)
         if NP020FR.trans_custom: bpy.ops.transform.delete_orientation()
index 66c6b80..88c5f77 100644 (file)
@@ -178,7 +178,7 @@ class NPPLPrepareContext(bpy.types.Operator):
         np_print('prepare, NP020PL.flag = ', flag)
 
         bpy.ops.object.select_all(action = 'DESELECT')
-        helper.select = True
+        helper.select_set(True)
         bpy.context.scene.objects.active = helper
         bpy.context.tool_settings.use_snap = False
         bpy.context.tool_settings.snap_element = 'VERTEX'
@@ -527,7 +527,7 @@ class NPPLAlignSelected(bpy.types.Operator):
         copy = False
 
         bpy.ops.object.select_all(action = 'DESELECT')
-        helper.select = True
+        helper.select_set(True)
         bpy.ops.object.delete('EXEC_DEFAULT')
 
 
@@ -564,12 +564,12 @@ class NPPLAlignSelected(bpy.types.Operator):
         scn.update()
 
         bpy.ops.object.select_all(action = 'DESELECT')
-        fromob.select = True
+        fromob.select_set(True)
         bpy.ops.object.origin_set(type = 'ORIGIN_GEOMETRY')
 
 
         for ob in selob:
-            ob.select = True
+            ob.select_set(True)
 
         if flag == 'ALIGN':
             value = (tome.vertices[0].co) - (fromme.vertices[0].co + fromob.location)
@@ -585,10 +585,10 @@ class NPPLAlignSelected(bpy.types.Operator):
                 bpy.ops.transform.rotate(value = -rot_ang, axis = rot_axis)
                 np_print('fromme.vertices = ', fromme.vertices)
                 bpy.ops.object.select_all(action = 'DESELECT')
-                fromob.select = True
+                fromob.select_set(True)
                 bpy.ops.object.transform_apply(location=False,rotation=True,scale=True)
                 for ob in selob:
-                    ob.select = True
+                    ob.select_set(True)
                 scn.update()
                 #if scale:
                     #bpy.ops.transform_resize(value=(1.0, 1.0, 1.0))
@@ -603,15 +603,15 @@ class NPPLAlignSelected(bpy.types.Operator):
                     bpy.context.scene.cursor_location = tome.vertices[1].co
                     bpy.ops.transform.rotate(value = -rot_ang, axis = rot_axis)
                     bpy.ops.object.select_all(action = 'DESELECT')
-                    fromob.select = True
+                    fromob.select_set(True)
                     bpy.ops.object.transform_apply(location=False,rotation=True,scale=True)
                     for ob in selob:
-                        ob.select = True
+                        ob.select_set(True)
                     if ((tome.vertices[2].co - proj_t)).angle(((fromme.vertices[2].co + fromob.location) - proj_f)) != 0: bpy.ops.transform.rotate(value = 2*rot_ang, axis = rot_axis)
 
         bpy.ops.object.select_all(action = 'DESELECT')
-        fromob.select = True
-        toob.select = True
+        fromob.select_set(True)
+        toob.select_set(True)
         bpy.ops.object.delete('EXEC_DEFAULT')
 
         return{'FINISHED'}
@@ -627,7 +627,7 @@ class NPPLRestoreContext(bpy.types.Operator):
         bpy.ops.object.select_all(action = 'DESELECT')
         selob = NP020PL.selob
         for ob in selob:
-            ob.select = True
+            ob.select_set(True)
         if NP020PL.acob is not None:
             bpy.context.scene.objects.active = NP020PL.acob
             bpy.ops.object.mode_set(mode = NP020PL.edit_mode)
index 6cfa3dc..ae05ecf 100644 (file)
@@ -246,8 +246,8 @@ class NPPAPrepareContext(bpy.types.Operator):
     def execute(self, context):
         take = NP020PA.take
         place = NP020PA.place
-        take.select = True
-        place.select = True
+        take.select_set(True)
+        place.select_set(True)
         bpy.context.scene.objects.active = place
         bpy.context.tool_settings.use_snap = False
         bpy.context.tool_settings.snap_element = 'VERTEX'
@@ -283,24 +283,24 @@ class NPPARunTranslate(bpy.types.Operator):
         elif event.type in ('LEFTMOUSE','RET','NUMPAD_ENTER') and event.value == 'RELEASE':
             bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
             if flag == 'RUNTRANSZERO':
-                take.select = False
-                place.select = False
+                take.select_set(False)
+                place.select_set(False)
                 NP020PA.ar13d = copy.deepcopy(take.location)
                 NP020PA.ar23d = copy.deepcopy(place.location)
                 NP020PA.firsttake3d = copy.deepcopy(take.location)
                 for ob in selob:
-                   ob.select = True
+                   ob.select_set(True)
                 bpy.ops.object.duplicate()
                 NP020PA.nextob = bpy.context.selected_objects
                 NP020PA.prevob = selob
-                place.select = True
+                place.select_set(True)
                 NP020PA.flag = 'RUNTRANSFIRST_break'
             elif flag == 'RUNTRANSFIRST':
                 NP020PA.deltavec_safe = copy.deepcopy(NP020PA.deltavec)
                 np_print('deltavec_safe = ', NP020PA.deltavec_safe)
                 NP020PA.ar13d = copy.deepcopy(take.location)
                 NP020PA.ar23d = copy.deepcopy(place.location)
-                place.select = False
+                place.select_set(False)
                 bpy.ops.object.duplicate()
                 prevob = NP020PA.prevob
                 nextob = NP020PA.nextob
@@ -308,7 +308,7 @@ class NPPARunTranslate(bpy.types.Operator):
                 NP020PA.prevob = nextob
                 NP020PA.nextob = bpy.context.selected_objects
                 take.location = copy.deepcopy(place.location)
-                place.select = True
+                place.select_set(True)
                 NP020PA.flag = 'ARRAYTRANS'
 
             else:
@@ -353,7 +353,7 @@ class NPPARunTranslate(bpy.types.Operator):
                 np_print('deltavec_safe = ', NP020PA.deltavec_safe)
                 NP020PA.ar13d = copy.deepcopy(take.location)
                 NP020PA.ar23d = copy.deepcopy(place.location)
-                place.select = False
+                place.select_set(False)
                 bpy.ops.object.duplicate()
                 prevob = NP020PA.prevob
                 nextob = NP020PA.nextob
@@ -361,7 +361,7 @@ class NPPARunTranslate(bpy.types.Operator):
                 NP020PA.prevob = nextob
                 NP020PA.nextob = bpy.context.selected_objects
                 take.location = copy.deepcopy(place.location)
-                place.select = True
+                place.select_set(True)
                 NP020PA.flag = 'ARRAYTRANS'
             else:
                 np_print('UNKNOWN FLAG')
@@ -374,21 +374,21 @@ class NPPARunTranslate(bpy.types.Operator):
             if flag == 'RUNTRANSZERO':
                 NP020PA.flag = 'EXIT'
             elif flag == 'RUNTRANSFIRST':
-                place.select = False
+                place.select_set(False)
                 prevob = NP020PA.prevob
                 nextob = NP020PA.nextob
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in prevob:
-                    ob.select = True
+                    ob.select_set(True)
                 NP020PA.flag = 'EXIT'
             elif flag == 'RUNTRANSNEXT':
-                place.select = False
+                place.select_set(False)
                 prevob = NP020PA.prevob
                 nextob = NP020PA.nextob
                 NP020PA.selob = prevob
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in prevob:
-                    ob.select = True
+                    ob.select_set(True)
                 NP020PA.flag = 'EXIT'
             else:
                 np_print('UNKNOWN FLAG')
@@ -596,9 +596,9 @@ class NPPANavTranslate(bpy.types.Operator):
                 nextob = NP020PA.nextob
                 for ob in nextob:
                     ob.hide = False
-                place.select = False
+                place.select_set(False)
                 bpy.ops.transform.translate(value = navdelta)
-                place.select = True
+                place.select_set(True)
                 NP020PA.flag = 'RUNTRANSFIRST'
             else:
                 np_print('UNKNOWN FLAG')
@@ -615,17 +615,17 @@ class NPPANavTranslate(bpy.types.Operator):
             take.hide = False
             place.hide = False
             if flag == 'NAVTRANSZERO':
-                place.select = False
+                place.select_set(False)
                 NP020PA.flag = 'EXIT'
             elif flag == 'NAVTRANSFIRST':
-                place.select = False
+                place.select_set(False)
                 prevob = NP020PA.prevob
                 nextob = NP020PA.nextob
                 for ob in nextob:
                     ob.hide = False
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in prevob:
-                    ob.select = True
+                    ob.select_set(True)
                 NP020PA.flag = 'ARRAYTRANS'
             else:
                 np_print('UNKNOWN FLAG')
@@ -638,17 +638,17 @@ class NPPANavTranslate(bpy.types.Operator):
             take.hide = False
             place.hide = False
             if flag == 'NAVTRANSZERO':
-                place.select = False
+                place.select_set(False)
                 NP020PA.flag = 'EXIT'
             elif flag == 'NAVTRANSFIRST':
-                place.select = False
+                place.select_set(False)
                 prevob = NP020PA.prevob
                 nextob = NP020PA.nextob
                 for ob in nextob:
                     ob.hide = False
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in prevob:
-                    ob.select = True
+                    ob.select_set(True)
                 NP020PA.flag = 'EXIT'
             else:
                 np_print('UNKNOWN FLAG')
@@ -768,11 +768,11 @@ class NPPAArrayTranslate(bpy.types.Operator):
             selob = bpy.context.selected_objects
             bpy.ops.object.select_all(action='DESELECT')
             for ob in arob:
-                ob.select = True
+                ob.select_set(True)
                 bpy.ops.object.modifier_apply(modifier = ardict[ob][0].name)
-                ob.select = False
+                ob.select_set(False)
             for ob in selob:
-                ob.select = True
+                ob.select_set(True)
             NP020PA.flag = 'EXIT'
             np_print('06_ArrayTrans_enter_FINISHED',';','flag = ', NP020PA.flag)
             return{'FINISHED'}
@@ -786,7 +786,7 @@ class NPPAArrayTranslate(bpy.types.Operator):
             selob = bpy.context.selected_objects
             bpy.ops.object.select_all(action='DESELECT')
             for ob in arob:
-                ob.select = True
+                ob.select_set(True)
                 ob.modifiers.remove(ardict[ob][0])
                 np_print('NP020PA.count', NP020PA.count)
                 for i in range(1, NP020PA.count):
@@ -794,7 +794,7 @@ class NPPAArrayTranslate(bpy.types.Operator):
                     bpy.ops.transform.translate(value = value)
                 bpy.ops.object.select_all(action='DESELECT')
             for ob in selob:
-                ob.select = True
+                ob.select_set(True)
             NP020PA.flag = 'EXIT'
             np_print('06_ArrayTrans_ctrl_tab_FINISHED',';','flag = ', NP020PA.flag)
             return{'FINISHED'}
@@ -808,7 +808,7 @@ class NPPAArrayTranslate(bpy.types.Operator):
             selob = bpy.context.selected_objects
             bpy.ops.object.select_all(action='DESELECT')
             for ob in arob:
-                ob.select = True
+                ob.select_set(True)
                 ob.modifiers.remove(ardict[ob][0])
                 np_print('NP020PA.count', NP020PA.count)
                 for i in range(1, NP020PA.count):
@@ -816,7 +816,7 @@ class NPPAArrayTranslate(bpy.types.Operator):
                     bpy.ops.transform.translate(value = value)
                 bpy.ops.object.select_all(action='DESELECT')
             for ob in selob:
-                ob.select = True
+                ob.select_set(True)
             NP020PA.flag = 'EXIT'
             np_print('06_ArrayTrans_tab_FINISHED',';','flag = ', NP020PA.flag)
             return{'FINISHED'}
@@ -877,7 +877,7 @@ class NPPAArrayTranslate(bpy.types.Operator):
             selob = NP020PA.selob
             lenselob = len(selob)
             for i, ob in enumerate(selob):
-                ob.select = True
+                ob.select_set(True)
                 if i == lenselob-1:
                     bpy.context.scene.objects.active = ob
             args = (self, context)
@@ -1043,20 +1043,20 @@ class NPPARestoreContext(bpy.types.Operator):
         take = NP020PA.take
         place = NP020PA.place
         bpy.ops.object.select_all(action='DESELECT')
-        take.select = True
-        place.select = True
+        take.select_set(True)
+        place.select_set(True)
         if NP020PA.prevob != None:
             prevob = NP020PA.prevob
             nextob = NP020PA.nextob
             if prevob is not selob:
                 for i, ob in enumerate(prevob):
-                    ob.select = True
+                    ob.select_set(True)
             for i, ob in enumerate(nextob):
-                ob.select = True
+                ob.select_set(True)
         bpy.ops.object.delete('EXEC_DEFAULT')
         lenselob = len(selob)
         for i, ob in enumerate(selob):
-            ob.select = True
+            ob.select_set(True)
             if i == lenselob-1:
                 bpy.context.scene.objects.active = ob
         NP020PA.take = None
index 7e353d3..5d6a2d9 100644 (file)
@@ -246,8 +246,8 @@ class NPPCPrepareContext(bpy.types.Operator):
     def execute(self, context):
         take = NP020PC.take
         place = NP020PC.place
-        take.select = True
-        place.select = True
+        take.select_set(True)
+        place.select_set(True)
         bpy.context.scene.objects.active = place
         bpy.context.tool_settings.use_snap = False
         bpy.context.tool_settings.snap_element = 'VERTEX'
@@ -283,22 +283,22 @@ class NPPCRunTranslate(bpy.types.Operator):
         elif event.type in ('LEFTMOUSE','RET','NUMPAD_ENTER') and event.value == 'RELEASE':
             bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
             if flag == 'RUNTRANSZERO':
-                take.select = False
-                place.select = False
+                take.select_set(False)
+                place.select_set(False)
                 NP020PC.firsttake3d = copy.deepcopy(take.location)
                 for ob in selob:
-                   ob.select = True
+                   ob.select_set(True)
                 bpy.ops.object.duplicate()
                 NP020PC.nextob = bpy.context.selected_objects
                 NP020PC.prevob = selob
-                place.select = True
+                place.select_set(True)
                 NP020PC.flag = 'RUNTRANSFIRST_break'
             elif flag == 'RUNTRANSFIRST':
                 NP020PC.deltavec_safe = copy.deepcopy(NP020PC.deltavec)
                 np_print('deltavec_safe = ', NP020PC.deltavec_safe)
                 NP020PC.ar13d = copy.deepcopy(take.location)
                 NP020PC.ar23d = copy.deepcopy(place.location)
-                place.select = False
+                place.select_set(False)
                 bpy.ops.object.duplicate()
                 prevob = NP020PC.prevob
                 nextob = NP020PC.nextob
@@ -307,14 +307,14 @@ class NPPCRunTranslate(bpy.types.Operator):
                 NP020PC.nextob = bpy.context.selected_objects
                 NP020PC.selob = nextob
                 take.location = copy.deepcopy(place.location)
-                place.select = True
+                place.select_set(True)
                 NP020PC.flag = 'RUNTRANSNEXT_break'
             elif flag == 'RUNTRANSNEXT':
                 NP020PC.deltavec_safe = copy.deepcopy(NP020PC.deltavec)
                 np_print('deltavec_safe = ', NP020PC.deltavec_safe)
                 NP020PC.ar13d = copy.deepcopy(take.location)
                 NP020PC.ar23d = copy.deepcopy(place.location)
-                place.select = False
+                place.select_set(False)
                 bpy.ops.object.duplicate()
                 prevob = NP020PC.prevob
                 nextob = NP020PC.nextob
@@ -323,7 +323,7 @@ class NPPCRunTranslate(bpy.types.Operator):
                 NP020PC.nextob = bpy.context.selected_objects
                 NP020PC.selob = nextob
                 take.location = copy.deepcopy(place.location)
-                place.select = True
+                place.select_set(True)
                 NP020PC.flag = 'RUNTRANSNEXT_break'
             else:
                 np_print('UNKNOWN FLAG')
@@ -368,21 +368,21 @@ class NPPCRunTranslate(bpy.types.Operator):
             if flag == 'RUNTRANSZERO':
                 NP020PC.flag = 'EXIT'
             elif flag == 'RUNTRANSFIRST':
-                place.select = False
+                place.select_set(False)
                 prevob = NP020PC.prevob
                 nextob = NP020PC.nextob
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in nextob:
-                    ob.select = True
+                    ob.select_set(True)
                 NP020PC.selob = prevob
                 NP020PC.flag = 'EXIT'
             elif flag == 'RUNTRANSNEXT':
-                place.select = False
+                place.select_set(False)
                 prevob = NP020PC.prevob
                 nextob = NP020PC.nextob
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in nextob:
-                    ob.select = True
+                    ob.select_set(True)
                 NP020PC.selob = prevob
                 NP020PC.flag = 'EXIT'
             else:
@@ -396,21 +396,21 @@ class NPPCRunTranslate(bpy.types.Operator):
             if flag == 'RUNTRANSZERO':
                 NP020PC.flag = 'EXIT'
             elif flag == 'RUNTRANSFIRST':
-                place.select = False
+                place.select_set(False)
                 prevob = NP020PC.prevob
                 nextob = NP020PC.nextob
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in prevob:
-                    ob.select = True
+                    ob.select_set(True)
                 NP020PC.flag = 'EXIT'
             elif flag == 'RUNTRANSNEXT':
-                place.select = False
+                place.select_set(False)
                 prevob = NP020PC.prevob
                 nextob = NP020PC.nextob
                 NP020PC.selob = prevob
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in prevob:
-                    ob.select = True
+                    ob.select_set(True)
                 NP020PC.flag = 'EXIT'
             else:
                 np_print('UNKNOWN FLAG')
@@ -640,9 +640,9 @@ class NPPCNavTranslate(bpy.types.Operator):
                 nextob = NP020PC.nextob
                 for ob in nextob:
                     ob.hide = False
-                place.select = False
+                place.select_set(False)
                 bpy.ops.transform.translate(value = navdelta)
-                place.select = True
+                place.select_set(True)
                 NP020PC.flag = 'RUNTRANSFIRST'
             elif flag == 'NAVTRANSNEXT':
                 takeloc3d = NP020PC.takeloc3d
@@ -651,9 +651,9 @@ class NPPCNavTranslate(bpy.types.Operator):
                 nextob = NP020PC.nextob
                 for ob in nextob:
                     ob.hide = False
-                place.select = False
+                place.select_set(False)
                 bpy.ops.transform.translate(value = navdelta)
-                place.select = True
+                place.select_set(True)
                 NP020PC.flag = 'RUNTRANSNEXT'
             else:
                 np_print('UNKNOWN FLAG')
@@ -670,27 +670,27 @@ class NPPCNavTranslate(bpy.types.Operator):
             take.hide = False
             place.hide = False
             if flag == 'NAVTRANSZERO':
-                place.select = False
+                place.select_set(False)
                 NP020PC.flag = 'EXIT'
             elif flag == 'NAVTRANSFIRST':
-                place.select = False
+                place.select_set(False)
                 prevob = NP020PC.prevob
                 nextob = NP020PC.nextob
                 for ob in nextob:
                     ob.hide = False
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in prevob:
-                    ob.select = True
+                    ob.select_set(True)
                 NP020PC.flag = 'EXIT'
             elif flag == 'NAVTRANSNEXT':
-                place.select = False
+                place.select_set(False)
                 prevob = NP020PC.prevob
                 nextob = NP020PC.nextob
                 for ob in nextob:
                     ob.hide = False
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in prevob:
-                    ob.select = True
+                    ob.select_set(True)
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 NP020PC.flag = 'ARRAYTRANS'
             else:
@@ -704,20 +704,20 @@ class NPPCNavTranslate(bpy.types.Operator):
             take.hide = False
             place.hide = False
             if flag == 'NAVTRANSZERO':
-                place.select = False
+                place.select_set(False)
                 NP020PC.flag = 'EXIT'
             elif flag == 'NAVTRANSFIRST':
-                place.select = False
+                place.select_set(False)
                 prevob = NP020PC.prevob
                 nextob = NP020PC.nextob
                 for ob in nextob:
                     ob.hide = False
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in prevob:
-                    ob.select = True
+                    ob.select_set(True)
                 NP020PC.flag = 'EXIT'
             elif flag == 'NAVTRANSNEXT':
-                place.select = False
+                place.select_set(False)
                 prevob = NP020PC.prevob
                 nextob = NP020PC.nextob
                 NP020PC.selob = prevob
@@ -725,7 +725,7 @@ class NPPCNavTranslate(bpy.types.Operator):
                     ob.hide = False
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in prevob:
-                    ob.select = True
+                    ob.select_set(True)
                 NP020PC.flag = 'EXIT'
             else:
                 np_print('UNKNOWN FLAG')
@@ -1137,12 +1137,12 @@ class NPPCRestoreContext(bpy.types.Operator):
         take = NP020PC.take
         place = NP020PC.place
         bpy.ops.object.select_all(action='DESELECT')
-        take.select = True
-        place.select = True
+        take.select_set(True)
+        place.select_set(True)
         bpy.ops.object.delete('EXEC_DEFAULT')
         lenselob = len(selob)
         for i, ob in enumerate(selob):
-            ob.select = True
+            ob.select_set(True)
             if i == lenselob-1:
                 bpy.context.scene.objects.active = ob
         NP020PC.take = None
index 1d85912..053c180 100644 (file)
@@ -179,7 +179,7 @@ class NP020PDGetSelection(bpy.types.Operator):
         NP020PD.selob = selob
         # De-selecting objects in prepare for other processes in the script:
         for ob in selob:
-            ob.select = False
+            ob.select_set(False)
         np_print('01_get_selection_END')
         return {'FINISHED'}
 
@@ -237,8 +237,8 @@ class NP020PDAddPoints(bpy.types.Operator):
         end = bpy.context.object
         end.name = 'NP_PD_end'
         NP020PD.end = end
-        start.select = True
-        end.select = True
+        start.select_set(True)
+        end.select_set(True)
         bpy.context.tool_settings.use_snap = False
         bpy.context.tool_settings.snap_element = NP020PD.snap
         bpy.context.tool_settings.snap_target = 'ACTIVE'
@@ -938,11 +938,11 @@ class NP020PDRunTranslate(bpy.types.Operator):
         # taken by transform.translate operator
             bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
             bpy.ops.object.select_all(action='DESELECT')
-            start.select = True
-            end.select = True
+            start.select_set(True)
+            end.select_set(True)
             bpy.ops.object.delete('EXEC_DEFAULT')
             for ob in selob:
-                ob.select = True
+                ob.select_set(True)
             NP020PD.startloc3d = (0.0, 0.0, 0.0)
             NP020PD.endloc3d = (0.0, 0.0, 0.0)
             NP020PD.phase = 0
@@ -1309,11 +1309,11 @@ class NP020PDRunNavigate(bpy.types.Operator):
             bpy.ops.object.select_all(action='DESELECT')
             start.hide = False
             end.hide = False
-            start.select = True
-            end.select = True
+            start.select_set(True)
+            end.select_set(True)
             bpy.ops.object.delete('EXEC_DEFAULT')
             for ob in selob:
-                ob.select = True
+                ob.select_set(True)
             NP020PD.startloc3d = (0.0, 0.0, 0.0)
             NP020PD.endloc3d = (0.0, 0.0, 0.0)
             NP020PD.phase = 0
@@ -1376,7 +1376,7 @@ class NP020PDChangePhase(bpy.types.Operator):
         NP020PD.startloc3d = startloc3d
         NP020PD.endloc3d = endloc3d
         bpy.ops.object.select_all(action='DESELECT')
-        end.select = True
+        end.select_set(True)
         bpy.context.tool_settings.use_snap = False
         bpy.context.tool_settings.snap_element = NP020PD.snap
         bpy.context.tool_settings.snap_target = 'ACTIVE'
@@ -1416,11 +1416,11 @@ class NP020PDHoldResult(bpy.types.Operator):
         # taken by transform.translate operator
             bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
             bpy.ops.object.select_all(action='DESELECT')
-            start.select = True
-            end.select = True
+            start.select_set(True)
+            end.select_set(True)
             bpy.ops.object.delete('EXEC_DEFAULT')
             for ob in selob:
-                ob.select = True
+                ob.select_set(True)
             NP020PD.startloc3d = (0.0, 0.0, 0.0)
             NP020PD.endloc3d = (0.0, 0.0, 0.0)
             NP020PD.phase = 0
@@ -1501,11 +1501,11 @@ class NP020PDDeletePoints(bpy.types.Operator):
         start = NP020PD.start
         end = NP020PD.end
         bpy.ops.object.select_all(action='DESELECT')
-        start.select = True
-        end.select = True
+        start.select_set(True)
+        end.select_set(True)
         bpy.ops.object.delete('EXEC_DEFAULT')
         for ob in selob:
-            ob.select = True
+            ob.select_set(True)
         NP020PD.startloc3d = (0.0, 0.0, 0.0)
         NP020PD.endloc3d = (0.0, 0.0, 0.0)
         NP020PD.phase = 0
index f640ff1..36d24f9 100644 (file)
@@ -246,8 +246,8 @@ class NPPIPrepareContext(bpy.types.Operator):
     def execute(self, context):
         take = NP020PI.take
         place = NP020PI.place
-        take.select = True
-        place.select = True
+        take.select_set(True)
+        place.select_set(True)
         bpy.context.scene.objects.active = place
         bpy.context.tool_settings.use_snap = False
         bpy.context.tool_settings.snap_element = 'VERTEX'
@@ -283,25 +283,25 @@ class NPPIRunTranslate(bpy.types.Operator):
         elif event.type in ('LEFTMOUSE','RET','NUMPAD_ENTER') and event.value == 'RELEASE':
             bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
             if flag == 'RUNTRANSZERO':
-                take.select = False
-                place.select = False
+                take.select_set(False)
+                place.select_set(False)
                 NP020PI.firsttake3d = copy.deepcopy(take.location)
                 for ob in selob:
-                   ob.select = True
+                   ob.select_set(True)
                 bpy.ops.object.duplicate(linked = True)
                 NP020PI.nextob = bpy.context.selected_objects
                 NP020PI.prevob = selob
-                place.select = True
+                place.select_set(True)
                 NP020PI.flag = 'RUNTRANSFIRST_break'
             elif flag == 'RUNTRANSFIRST':
                 NP020PI.deltavec_safe = copy.deepcopy(NP020PI.deltavec)
                 np_print('deltavec_safe = ', NP020PI.deltavec_safe)
                 NP020PI.ar13d = copy.deepcopy(take.location)
                 NP020PI.ar23d = copy.deepcopy(place.location)
-                place.select = False
+                place.select_set(False)
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in NP020PI.selob:
-                    ob.select = True
+                    ob.select_set(True)
                 bpy.ops.object.duplicate(linked = True)
                 value = (place.location - NP020PI.firsttake3d).to_tuple(4)
                 bpy.ops.transform.translate(value = value)
@@ -312,7 +312,7 @@ class NPPIRunTranslate(bpy.types.Operator):
                 NP020PI.prevob = nextob
                 NP020PI.nextob = bpy.context.selected_objects
                 take.location = copy.deepcopy(place.location)
-                place.select = True
+                place.select_set(True)
                 bpy.context.scene.objects.active = place
                 NP020PI.flag = 'RUNTRANSNEXT_break'
             elif flag == 'RUNTRANSNEXT':
@@ -320,10 +320,10 @@ class NPPIRunTranslate(bpy.types.Operator):
                 np_print('deltavec_safe = ', NP020PI.deltavec_safe)
                 NP020PI.ar13d = copy.deepcopy(take.location)
                 NP020PI.ar23d = copy.deepcopy(place.location)
-                place.select = False
+                place.select_set(False)
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in NP020PI.selob:
-                    ob.select = True
+                    ob.select_set(True)
                 bpy.ops.object.duplicate(linked = True)
                 value = (place.location - NP020PI.firsttake3d).to_tuple(4)
                 bpy.ops.transform.translate(value = value)
@@ -334,7 +334,7 @@ class NPPIRunTranslate(bpy.types.Operator):
                 NP020PI.prevob = nextob
                 NP020PI.nextob = bpy.context.selected_objects
                 take.location = copy.deepcopy(place.location)
-                place.select = True
+                place.select_set(True)
                 NP020PI.flag = 'RUNTRANSNEXT_break'
             else:
                 np_print('UNKNOWN FLAG')
@@ -379,21 +379,21 @@ class NPPIRunTranslate(bpy.types.Operator):
             if flag == 'RUNTRANSZERO':
                 NP020PI.flag = 'EXIT'
             elif flag == 'RUNTRANSFIRST':
-                place.select = False
+                place.select_set(False)
                 prevob = NP020PI.prevob
                 nextob = NP020PI.nextob
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in prevob:
-                    ob.select = True
+                    ob.select_set(True)
                 NP020PI.selob = prevob
                 NP020PI.flag = 'EXIT'
             elif flag == 'RUNTRANSNEXT':
-                place.select = False
+                place.select_set(False)
                 prevob = NP020PI.prevob
                 nextob = NP020PI.nextob
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in prevob:
-                    ob.select = True
+                    ob.select_set(True)
                 NP020PI.selob = prevob
                 NP020PI.flag = 'EXIT'
             else:
@@ -407,21 +407,21 @@ class NPPIRunTranslate(bpy.types.Operator):
             if flag == 'RUNTRANSZERO':
                 NP020PI.flag = 'EXIT'
             elif flag == 'RUNTRANSFIRST':
-                place.select = False
+                place.select_set(False)
                 prevob = NP020PI.prevob
                 nextob = NP020PI.nextob
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in prevob:
-                    ob.select = True
+                    ob.select_set(True)
                 NP020PI.flag = 'EXIT'
             elif flag == 'RUNTRANSNEXT':
-                place.select = False
+                place.select_set(False)
                 prevob = NP020PI.prevob
                 nextob = NP020PI.nextob
                 NP020PI.selob = prevob
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in prevob:
-                    ob.select = True
+                    ob.select_set(True)
                 NP020PI.flag = 'EXIT'
             else:
                 np_print('UNKNOWN FLAG')
@@ -650,9 +650,9 @@ class NPPINavTranslate(bpy.types.Operator):
                 nextob = NP020PI.nextob
                 for ob in nextob:
                     ob.hide = False
-                place.select = False
+                place.select_set(False)
                 bpy.ops.transform.translate(value = navdelta)
-                place.select = True
+                place.select_set(True)
                 NP020PI.flag = 'RUNTRANSFIRST'
             elif flag == 'NAVTRANSNEXT':
                 takeloc3d = NP020PI.takeloc3d
@@ -661,9 +661,9 @@ class NPPINavTranslate(bpy.types.Operator):
                 nextob = NP020PI.nextob
                 for ob in nextob:
                     ob.hide = False
-                place.select = False
+                place.select_set(False)
                 bpy.ops.transform.translate(value = navdelta)
-                place.select = True
+                place.select_set(True)
                 NP020PI.flag = 'RUNTRANSNEXT'
             else:
                 np_print('UNKNOWN FLAG')
@@ -680,27 +680,27 @@ class NPPINavTranslate(bpy.types.Operator):
             take.hide = False
             place.hide = False
             if flag == 'NAVTRANSZERO':
-                place.select = False
+                place.select_set(False)
                 NP020PI.flag = 'EXIT'
             elif flag == 'NAVTRANSFIRST':
-                place.select = False
+                place.select_set(False)
                 prevob = NP020PI.prevob
                 nextob = NP020PI.nextob
                 for ob in nextob:
                     ob.hide = False
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in prevob:
-                    ob.select = True
+                    ob.select_set(True)
                 NP020PI.flag = 'EXIT'
             elif flag == 'NAVTRANSNEXT':
-                place.select = False
+                place.select_set(False)
                 prevob = NP020PI.prevob
                 nextob = NP020PI.nextob
                 for ob in nextob:
                     ob.hide = False
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in prevob:
-                    ob.select = True
+                    ob.select_set(True)
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 NP020PI.flag = 'ARRAYTRANS'
             else:
@@ -714,20 +714,20 @@ class NPPINavTranslate(bpy.types.Operator):
             take.hide = False
             place.hide = False
             if flag == 'NAVTRANSZERO':
-                place.select = False
+                place.select_set(False)
                 NP020PI.flag = 'EXIT'
             elif flag == 'NAVTRANSFIRST':
-                place.select = False
+                place.select_set(False)
                 prevob = NP020PI.prevob
                 nextob = NP020PI.nextob
                 for ob in nextob:
                     ob.hide = False
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in prevob:
-                    ob.select = True
+                    ob.select_set(True)
                 NP020PI.flag = 'EXIT'
             elif flag == 'NAVTRANSNEXT':
-                place.select = False
+                place.select_set(False)
                 prevob = NP020PI.prevob
                 nextob = NP020PI.nextob
                 NP020PI.selob = prevob
@@ -735,7 +735,7 @@ class NPPINavTranslate(bpy.types.Operator):
                     ob.hide = False
                 bpy.ops.object.delete('EXEC_DEFAULT')
                 for ob in prevob:
-                    ob.select = True
+                    ob.select_set(True)
                 NP020PI.flag = 'EXIT'
             else:
                 np_print('UNKNOWN FLAG')
@@ -1147,12 +1147,12 @@ class NPPIRestoreContext(bpy.types.Operator):
         take = NP020PI.take
         place = NP020PI.place
         bpy.ops.object.select_all(action='DESELECT')
-        take.select = True
-        place.select = True
+        take.select_set(True)
+        place.select_set(True)
         bpy.ops.object.delete('EXEC_DEFAULT')
         lenselob = len(selob)
         for i, ob in enumerate(selob):
-            ob.select = True
+            ob.select_set(True)
             if i == lenselob-1:
                 bpy.context.scene.objects.active = ob
         NP020PI.take = None
index bdc8627..13166e9 100644 (file)
@@ -212,8 +212,8 @@ class NPPMPrepareContext(bpy.types.Operator):
         selob = NP020PM.selob
         helper = NP020PM.helper
         for ob in selob:
-            ob.select = False
-        helper.select = True
+            ob.select_set(False)
+        helper.select_set(True)
         bpy.context.scene.objects.active = helper
         bpy.context.tool_settings.use_snap = False
         bpy.context.tool_settings.snap_element = 'VERTEX'
@@ -267,7 +267,7 @@ class NPPMRunTranslate(bpy.types.Operator):
                 return {'FINISHED'}
             elif flag == 'PLACE':
                 for ob in selob:
-                    ob.select = True
+                    ob.select_set(True)
                 bpy.context.scene.objects.active = helper
             args = (self, context)
             self._handle = bpy.types.SpaceView3D.draw_handler_add(DRAW_RunTranslate, args, 'WINDOW', 'POST_PIXEL')
@@ -358,10 +358,10 @@ class NPPMRestoreContext(bpy.types.Operator):
         selob = NP020PM.selob
         helper = NP020PM.helper
         bpy.ops.object.select_all(action = 'DESELECT')
-        helper.select = True
+        helper.select_set(True)
         bpy.ops.object.delete('EXEC_DEFAULT')
         for ob in selob:
-            ob.select = True
+            ob.select_set(True)
             bpy.context.scene.objects.active = ob
         bpy.context.tool_settings.use_snap = NP020PM.use_snap
         bpy.context.tool_settings.snap_element = NP020PM.snap_element
index 514b932..b6e1c97 100644 (file)
@@ -283,7 +283,7 @@ class NPPSPrepareContext(bpy.types.Operator):
             bpy.context.space_data.pivot_point = 'CURSOR'
             bpy.context.space_data.transform_orientation = 'GLOBAL'
             for ob in selob:
-                ob.select = True
+                ob.select_set(True)
                 bpy.context.scene.objects.active = ob
             axis = (False, False, False)
             if mode == 0:
@@ -862,7 +862,7 @@ class NPPSRestoreContext(bpy.types.Operator):
         selob = NP020PS.selob
         bpy.ops.object.select_all(action = 'DESELECT')
         for ob in selob:
-            ob.select = True
+            ob.select_set(True)
             bpy.context.scene.objects.active = ob
         bpy.context.tool_settings.use_snap = NP020PS.use_snap
         bpy.context.tool_settings.snap_element = NP020PS.snap_element
index 1f59e7a..832e5aa 100644 (file)
@@ -187,12 +187,12 @@ class NPRMPrepareContext(bpy.types.Operator):
             rot_ang = Vector ((0.0, 0.0, 1.0)).angle(ndef)
             np_print('rot_axis, rot_ang =', rot_axis, degrees(rot_ang))
             bpy.ops.object.select_all(action = 'DESELECT')
-            helper.select = True
+            helper.select_set(True)
             bpy.ops.transform.rotate(value = rot_ang ,axis = rot_axis)
             bpy.ops.transform.create_orientation(use = True)
             #bpy.ops.transform.rotate(value = -rot_ang ,axis = rot_axis)
             for ob in selob:
-                ob.select = True
+                ob.select_set(True)
             bpy.context.scene.objects.active = helper
             bpy.context.tool_settings.use_snap = False
             bpy.context.tool_settings.snap_element = 'VERTEX'
@@ -202,8 +202,8 @@ class NPRMPrepareContext(bpy.types.Operator):
             bpy.context.scene.cursor_location = centerloc
         else:
             for ob in selob:
-                ob.select = False
-            helper.select = True
+                ob.select_set(False)
+            helper.select_set(True)
             bpy.context.scene.objects.active = helper
             bpy.context.tool_settings.use_snap = False
             bpy.context.tool_settings.snap_element = 'VERTEX'
@@ -924,10 +924,10 @@ class NPRMRestoreContext(bpy.types.Operator):
         helper = NP020RM.helper
         helper.hide = False
         bpy.ops.object.select_all(action = 'DESELECT')
-        helper.select = True
+        helper.select_set(True)
         bpy.ops.object.delete('EXEC_DEFAULT')
         for ob in selob:
-            ob.select = True
+            ob.select_set(True)
 
         bpy.context.tool_settings.use_snap = NP020RM.use_snap
         bpy.context.tool_settings.snap_element = NP020RM.snap_element
index 2c67d54..ac82ec3 100644 (file)
@@ -83,7 +83,7 @@ class KTX_Cleanup(bpy.types.Operator):
 
     def execute(self, context):
         for o in bpy.data.objects:
-            o.select = False
+            o.select_set(False)
         context.scene.objects.active = None
         return {'FINISHED'}
 
index 77b4cf1..05bf917 100644 (file)
@@ -293,7 +293,7 @@ def changeSelection(thisObject):
 
     bpy.ops.object.select_all(action='DESELECT')
     bpy.context.scene.objects.active=thisObject
-    thisObject.select=True
+    thisObject.select_set(True)
 
     return storedActive, storedSelected
 
@@ -302,7 +302,7 @@ def restoreSelection(storedActive, storedSelected):
     bpy.context.scene.objects.active=storedActive
     bpy.ops.object.select_all(action='DESELECT')
     for sel in storedSelected:
-        sel.select = True
+        sel.select_set(True)
 
 def removeParticleSystem(object, particleSystem):
     override = {"object": object, "particle_system": particleSystem}
index d2fb947..f9e8f71 100644 (file)
@@ -258,7 +258,7 @@ def frames_from_verts(ob, end, shape, mode):
 
 def keyframes_handler(scn, ob, shape, mode):
     bpy.ops.object.select_all(action='DESELECT')
-    ob.select = True
+    ob.select_set(True)
 
     start = ob.rs_shotshape_nav if ob.rs_shotshape_nav_start else 0
 
index 7fb3d4c..549fd11 100644 (file)
@@ -138,7 +138,7 @@ class AddSurroundCamerasOperator(bpy.types.Operator):
 
         # sel/activate origin
         bpy.ops.object.select_all(action='DESELECT')
-        obj_origin.select = True
+        obj_origin.select_set(True)
         scene.objects.active = obj_origin
 
         context.window_manager.previous_num_surround_screens = numScreens
index 1c781b4..174da5e 100644 (file)
@@ -982,7 +982,7 @@ class AddBProjectionPlane(Operator):
             em.name = BProjection_Empty
 
             context.scene.objects.active = ob
-            ob.select = True
+            ob.select_set(True)
 
             bpy.ops.object.editmode_toggle()
 
@@ -1005,9 +1005,9 @@ class AddBProjectionPlane(Operator):
             if em.custom_sub > 0:
                 bpy.ops.mesh.subdivide(number_cuts=em.custom_sub)
 
-            em.select = True
+            em.select_set(True)
             bpy.ops.object.hook_add_selob()
-            em.select = False
+            em.select_set(False)
             em.hide = True
 
             self.creatematerial(context)
@@ -1117,16 +1117,16 @@ class RemoveBProjectionPlane(Operator):
 
             bpy.ops.object.editmode_toggle()
 
-            ob.select = False
+            ob.select_set(False)
 
             em = bpy.data.objects[BProjection_Empty]
             context.scene.objects.active = em
             em.hide = False
-            em.select = True
+            em.select_set(True)
             bpy.ops.object.delete()
 
             context.scene.objects.active = ob
-            ob.select = True
+            ob.select_set(True)
 
             reinitkey()
             ob = context.object
@@ -1239,9 +1239,9 @@ class ChangeObject(Operator):
                     bpy.ops.object.shape_key_remove()
                 bpy.ops.object.shape_key_remove()
 
-                ob.select = False
+                ob.select_set(False)
 
-                bplane.select = True
+                bplane.select_set(True)
                 context.scene.objects.active = bplane
                 for ms in (ms for ms in bplane.material_slots if ms.name != BProjection_Material):
                     bplane.active_material = ms.material
@@ -1257,8 +1257,8 @@ class ChangeObject(Operator):
                 bpy.ops.object.join()
 
                 em.hide = False
-                em.select = True
-                new_ob.select = False
+                em.select_set(True)
+                new_ob.select_set(False)
                 bpy.ops.object.location_clear()
                 bpy.ops.object.rotation_clear()
                 bpy.ops.object.scale_clear()
@@ -1267,8 +1267,8 @@ class ChangeObject(Operator):
                 bpy.ops.object.hook_add_selob()
                 bpy.ops.object.editmode_toggle()
                 em.hide = True
-                em.select = False
-                new_ob.select = True
+                em.select_set(False)
+                new_ob.select_set(True)
                 em.custom_active_object = new_ob.name
                 tmp = em.custom_c3d
                 em.custom_c3d = False
index 7bb0860..65c22dc 100644 (file)
@@ -575,7 +575,7 @@ class SunPos_OT_ClearObjectGroup(bpy.types.Operator):
         Sun.verify_ObjectGroup()
         try:
             for x in Sun.Selected_objects:
-                x.select = True
+                x.select_set(True)
         except:
             pass
         del Sun.Selected_objects[:]