diff --git a/add_curve_aceous_galore.py b/add_curve_aceous_galore.py index 9fe59f95fe21c47ca08df41672fbb823bd7817ce..af11b141e911b308a2f70b3663b5163808b1f176 100644 --- a/add_curve_aceous_galore.py +++ b/add_curve_aceous_galore.py @@ -655,7 +655,7 @@ def createCurve(vertArray, options, curveOptions, align_matrix): # create object with newCurve new_obj = bpy.data.objects.new(name, newCurve) # object scene.objects.link(new_obj) # place in active scene - new_obj.selected = True # set as selected + new_obj.select = True # set as selected scene.objects.active = new_obj # set as active new_obj.matrix_world = align_matrix # apply matrix diff --git a/add_curve_torus_knots.py b/add_curve_torus_knots.py index 9567e08ddbb03b6caa47f3ec16121b52d618ba3a..fca11213b98c99b26187376a47fe540874ab7a01 100644 --- a/add_curve_torus_knots.py +++ b/add_curve_torus_knots.py @@ -108,7 +108,7 @@ def createCurve(vertArray, GEO, align_matrix): # create object with newCurve new_obj = bpy.data.objects.new(name, newCurve) # object scene.objects.link(new_obj) # place in active scene - new_obj.selected = True # set as selected + new_obj.select = True # set as selected scene.objects.active = new_obj # set as active new_obj.matrix_world = align_matrix # apply matrix diff --git a/add_mesh_3d_function_surface.py b/add_mesh_3d_function_surface.py index 6d8b609d8563edfa3aa8d103edef1dd0bf635082..79a01ae49c3ac2c0e34c3a8c7c3b59e51a0025aa 100644 --- a/add_mesh_3d_function_surface.py +++ b/add_mesh_3d_function_surface.py @@ -170,7 +170,7 @@ def create_mesh_object(context, verts, edges, faces, name, edit, align_matrix): # Use the active obj and select it. ob_new = obj_act - ob_new.selected = True + ob_new.select = True if obj_act.mode == 'OBJECT': # Get existing mesh datablock. @@ -195,7 +195,7 @@ def create_mesh_object(context, verts, edges, faces, name, edit, align_matrix): # Link new object to the given scene and select it. scene.objects.link(ob_new) - ob_new.selected = True + ob_new.select = True # Place the object at the 3D cursor location. # apply viewRotaion @@ -207,7 +207,7 @@ def create_mesh_object(context, verts, edges, faces, name, edit, align_matrix): bpy.ops.object.mode_set(mode='OBJECT') # Select the active object as well. - obj_act.selected = True + obj_act.select = True # Apply location of new object. scene.update() diff --git a/add_mesh_extras.py b/add_mesh_extras.py index 82290ab89cec9d3a21fc4f8077e446f967ae72a0..ccf74a4ad0804e34c03ff03f3561d6ffaf8eb619 100644 --- a/add_mesh_extras.py +++ b/add_mesh_extras.py @@ -79,7 +79,7 @@ def create_mesh_object(context, verts, edges, faces, name, edit, align_matrix): # Use the active obj and select it. ob_new = obj_act - ob_new.selected = True + ob_new.select = True if obj_act.mode == 'OBJECT': # Get existing mesh datablock. @@ -104,7 +104,7 @@ def create_mesh_object(context, verts, edges, faces, name, edit, align_matrix): # Link new object to the given scene and select it. scene.objects.link(ob_new) - ob_new.selected = True + ob_new.select = True # Place the object at the 3D cursor location. # apply viewRotaion @@ -116,7 +116,7 @@ def create_mesh_object(context, verts, edges, faces, name, edit, align_matrix): bpy.ops.object.mode_set(mode='OBJECT') # Select the active object as well. - obj_act.selected = True + obj_act.select = True # Apply location of new object. scene.update() diff --git a/add_mesh_gears.py b/add_mesh_gears.py index 05aaa17c7e8c2040143df01c132701711331f3fa..92d4e125d684af6ec114d27588f674041bf930f2 100644 --- a/add_mesh_gears.py +++ b/add_mesh_gears.py @@ -113,7 +113,7 @@ def create_mesh_object(context, verts, edges, faces, name, edit, align_matrix): # Use the active obj and select it. ob_new = obj_act - ob_new.selected = True + ob_new.select = True if obj_act.mode == 'OBJECT': # Get existing mesh datablock. @@ -138,7 +138,7 @@ def create_mesh_object(context, verts, edges, faces, name, edit, align_matrix): # Link new object to the given scene and select it. scene.objects.link(ob_new) - ob_new.selected = True + ob_new.select = True # Place the object at the 3D cursor location. # apply viewRotaion @@ -151,7 +151,7 @@ def create_mesh_object(context, verts, edges, faces, name, edit, align_matrix): bpy.ops.object.mode_set(mode='OBJECT') # Select the active object as well. - obj_act.selected = True + obj_act.select = True # Apply location of new object. scene.update() diff --git a/add_mesh_gemstones.py b/add_mesh_gemstones.py index 93546b4261a1972479b7acae34fb72e1a9c7d34f..0b27829eacac74ad952334da0a5e6594acbbd81c 100644 --- a/add_mesh_gemstones.py +++ b/add_mesh_gemstones.py @@ -79,7 +79,7 @@ def create_mesh_object(context, verts, edges, faces, name, edit, align_matrix): # Use the active obj and select it. ob_new = obj_act - ob_new.selected = True + ob_new.select = True if obj_act.mode == 'OBJECT': # Get existing mesh datablock. @@ -104,7 +104,7 @@ def create_mesh_object(context, verts, edges, faces, name, edit, align_matrix): # Link new object to the given scene and select it. scene.objects.link(ob_new) - ob_new.selected = True + ob_new.select = True # Place the object at the 3D cursor location. # apply viewRotaion @@ -116,7 +116,7 @@ def create_mesh_object(context, verts, edges, faces, name, edit, align_matrix): bpy.ops.object.mode_set(mode='OBJECT') # Select the active object as well. - obj_act.selected = True + obj_act.select = True # Apply location of new object. scene.update() diff --git a/add_mesh_pipe_joint.py b/add_mesh_pipe_joint.py index 6fe342519e63847b72614085ebf94c877c132cbc..97f7d2e5b9755b2b7dd2625cf37afcd4212ca3de 100644 --- a/add_mesh_pipe_joint.py +++ b/add_mesh_pipe_joint.py @@ -196,7 +196,7 @@ def create_mesh_object(context, verts, edges, faces, name, edit, align_matrix): # Link new object to the given scene and select it. scene.objects.link(ob_new) - ob_new.selected = True + ob_new.select = True # Place the object at the 3D cursor location. ob_new.matrix_world = align_matrix @@ -207,7 +207,7 @@ def create_mesh_object(context, verts, edges, faces, name, edit, align_matrix): bpy.ops.object.mode_set(mode='OBJECT') # Select the active object as well. - obj_act.selected = True + obj_act.select = True # Apply location of new object. scene.update() diff --git a/add_mesh_solid.py b/add_mesh_solid.py index 04a9f6fd2b12738bddaaff6937ddb630c8d3ec1b..579bb954c3675a14656bcfe6eceb128056468eb3 100644 --- a/add_mesh_solid.py +++ b/add_mesh_solid.py @@ -85,7 +85,7 @@ def create_mesh_object(context, verts, edges, faces, name, edit): # Use the active obj and select it. ob_new = obj_act - ob_new.selected = True + ob_new.select = True if obj_act.mode == 'OBJECT': # Get existing mesh datablock. @@ -110,7 +110,7 @@ def create_mesh_object(context, verts, edges, faces, name, edit): # Link new object to the given scene and select it. scene.objects.link(ob_new) - ob_new.selected = True + ob_new.select = True # Place the object at the 3D cursor location. ob_new.location = scene.cursor_location @@ -123,7 +123,7 @@ def create_mesh_object(context, verts, edges, faces, name, edit): bpy.ops.object.mode_set(mode='OBJECT') # Select the active object as well. - obj_act.selected = True + obj_act.select = True # Apply location of new object. scene.update() diff --git a/add_mesh_twisted_torus.py b/add_mesh_twisted_torus.py index 6de2df1fbe2402448457f4f65f50d76d0f80e11f..e2f5b89fdd872315ef839ce44d4ebb6f587d1663 100644 --- a/add_mesh_twisted_torus.py +++ b/add_mesh_twisted_torus.py @@ -96,7 +96,7 @@ def create_mesh_object(context, verts, edges, faces, name, edit, align_matrix): # Use the active obj and select it. ob_new = obj_act - ob_new.selected = True + ob_new.select = True if obj_act.mode == 'OBJECT': # Get existing mesh datablock. @@ -121,7 +121,7 @@ def create_mesh_object(context, verts, edges, faces, name, edit, align_matrix): # Link new object to the given scene and select it. scene.objects.link(ob_new) - ob_new.selected = True + ob_new.select = True # Place the object at the 3D cursor location. # apply viewRotaion @@ -133,7 +133,7 @@ def create_mesh_object(context, verts, edges, faces, name, edit, align_matrix): bpy.ops.object.mode_set(mode='OBJECT') # Select the active object as well. - obj_act.selected = True + obj_act.select = True # Apply location of new object. scene.update() diff --git a/curve_simplify.py b/curve_simplify.py index 3cb2bfb8e5efe855885ba6afa2cad593ecee0e13..175fffb9529a42cd17fdf8278e97ea0f8db662e2 100644 --- a/curve_simplify.py +++ b/curve_simplify.py @@ -288,7 +288,7 @@ def main(context, obj, options): # create ne object and put into scene newCurve = bpy.data.objects.new("simple_"+obj.name, curve) scene.objects.link(newCurve) - newCurve.selected = True + newCurve.select = True scene.objects.active = newCurve newCurve.matrix_world = obj.matrix_world @@ -303,7 +303,7 @@ def main(context, obj, options): def getFcurveData(obj): fcurves = [] for fc in obj.animation_data.action.fcurves: - if fc.selected: + if fc.select: fcVerts = [vcVert.co.copy().resize3D() for vcVert in fc.keyframe_points.values()] fcurves.append(fcVerts) @@ -312,7 +312,7 @@ def getFcurveData(obj): def selectedfcurves(obj): fcurves_sel = [] for i, fc in enumerate(obj.animation_data.action.fcurves): - if fc.selected: + if fc.select: fcurves_sel.append(fc) return fcurves_sel diff --git a/io_anim_camera.py b/io_anim_camera.py index 1f1b51ab1a37b8c2a453086d0573848d8c934054..23e59fe8885eb981091b58f0869e959affde61c6 100644 --- a/io_anim_camera.py +++ b/io_anim_camera.py @@ -39,7 +39,7 @@ import bpy def writeCameras(context, filepath, frame_start, frame_end, only_selected=False): data_attrs = ['lens', 'shift_x', 'shift_y', 'dof_distance', 'clip_start', 'clip_end', 'draw_size'] - obj_attrs = ['restrict_render'] + obj_attrs = ['hide_render'] fw = open(filepath, 'w').write @@ -48,7 +48,7 @@ def writeCameras(context, filepath, frame_start, frame_end, only_selected=False) cameras = [] for obj in scene.objects: - if only_selected and not obj.selected: + if only_selected and not obj.select: continue if obj.type != 'CAMERA': continue diff --git a/io_export_unreal_psk_psa.py b/io_export_unreal_psk_psa.py index a49ad5216e7388c0238cb9883a7536a240198927..4434ad25f3ba27faa3db64c82f19a8c55cc7a143 100644 --- a/io_export_unreal_psk_psa.py +++ b/io_export_unreal_psk_psa.py @@ -615,8 +615,8 @@ def triangulateNMesh(object): bneedtri = False scene = bpy.context.scene bpy.ops.object.mode_set(mode='OBJECT') - for i in scene.objects: i.selected = False #deselect all objects - object.selected = True + for i in scene.objects: i.select = False #deselect all objects + object.select = True scene.objects.active = object #set the mesh object to current bpy.ops.object.mode_set(mode='OBJECT') print("Checking mesh if needs to convert quad to Tri...") @@ -633,8 +633,8 @@ def triangulateNMesh(object): #note two copy two types else it will use the current data or mesh me_ob.data = me_da bpy.context.scene.objects.link(me_ob)#link the object to the scene #current object location - for i in scene.objects: i.selected = False #deselect all objects - me_ob.selected = True + for i in scene.objects: i.select = False #deselect all objects + me_ob.select = True scene.objects.active = me_ob #set the mesh object to current bpy.ops.object.mode_set(mode='EDIT') #Operators bpy.ops.mesh.select_all(action='SELECT')#select all the face/vertex/edge @@ -1298,12 +1298,12 @@ def fs_callback(filename, context, user_setting): for next_obj in objects: if next_obj.type == 'MESH': blender_meshes.append(next_obj) - if (next_obj.selected): + if (next_obj.select): #print("mesh object select") selectmesh.append(next_obj) if next_obj.type == 'ARMATURE': blender_armature.append(next_obj) - if (next_obj.selected): + if (next_obj.select): #print("armature object select") selectarmature.append(next_obj) diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py index 0bdba5c89ae70160fb9c49a635a59c4513a26935..555c94762518b5f8f3ee3da53de47b81783c5524 100644 --- a/io_import_images_as_planes.py +++ b/io_import_images_as_planes.py @@ -338,7 +338,7 @@ def main(filePath, options, mapping, dimension): plane.data.uv_textures[0].data[0].transp = 'ALPHA' plane.data.uv_textures[0].data[0].twoside = True - plane.selected = True + plane.select = True scene.objects.active = plane # If "Create Single Plane" (filepath and is image) @@ -367,7 +367,7 @@ def main(filePath, options, mapping, dimension): plane.data.uv_textures[0].data[0].transp = 'ALPHA' plane.data.uv_textures[0].data[0].twoside = True - plane.selected = True + plane.select = True scene.objects.active = plane diff --git a/io_import_scene_mhx.py b/io_import_scene_mhx.py index f233b89a4d5380102ba5eb5434eb5f2303d9b713..9800b99c6541dd1ee48f6e09803570e5c7d86c98 100644 --- a/io_import_scene_mhx.py +++ b/io_import_scene_mhx.py @@ -1448,7 +1448,7 @@ def parseBone(bone, bones, tokens, heads, tails): bone.tail = tails[bone.name] + bones[target].tail - tails[target] else: raise NameError("tail-as %s" % val) - elif key == 'restrict_select': + elif key == 'hide_select': pass else: defaultKey(key, val, sub, "bone", [], globals(), locals()) diff --git a/io_import_scene_unreal_psk.py b/io_import_scene_unreal_psk.py index cbedb30e159c96bad9f0cca8ef6086b2a0d73e77..50cb4bdda51afedd1fa54a8add7f58d217108fc0 100644 --- a/io_import_scene_unreal_psk.py +++ b/io_import_scene_unreal_psk.py @@ -360,8 +360,8 @@ def pskimport(infile): #ob_new.data = armdata bpy.context.scene.objects.link(ob_new) #bpy.ops.object.mode_set(mode='OBJECT') - for i in bpy.context.scene.objects: i.selected = False #deselect all objects - ob_new.selected = True + for i in bpy.context.scene.objects: i.select = False #deselect all objects + ob_new.select = True #set current armature to edit the bone bpy.context.scene.objects.active = ob_new #set mode to able to edit the bone diff --git a/io_mesh_raw/import_raw.py b/io_mesh_raw/import_raw.py index a541b2ef83faa1ad88398cbe2aa5e76e7452f5ec..df04df9b4c7677f6b4d3391e4d22b0a6e2f7a890 100644 --- a/io_mesh_raw/import_raw.py +++ b/io_mesh_raw/import_raw.py @@ -101,12 +101,12 @@ def addMeshObj(mesh, objName): scn = bpy.context.scene for o in scn.objects: - o.selected = False + o.select = False mesh.update() nobj = bpy.data.objects.new(objName, mesh) scn.objects.link(nobj) - nobj.selected = True + nobj.select = True if scn.objects.active == None or scn.objects.active.mode == 'OBJECT': scn.objects.active = nobj diff --git a/mesh_relax.py b/mesh_relax.py index ce70b0389d52c45805fea40ac6262901862d4ff4..7d3410d78d9d96a7d5fde62900efefdfaabf44a7 100644 --- a/mesh_relax.py +++ b/mesh_relax.py @@ -57,13 +57,13 @@ def relax_mesh(context): # deselect everything that's not related for obj in context.selected_objects: - obj.selected = False + obj.select = False # get active object obj = context.active_object # duplicate the object so it can be used for the shrinkwrap modifier - obj.selected = True # make sure the object is selected! + obj.select = True # make sure the object is selected! bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.duplicate() target = context.active_object @@ -86,12 +86,12 @@ def relax_mesh(context): bpy.ops.object.modifier_apply(modifier='relax_target') # delete the target object - obj.selected = False - target.selected = True + obj.select = False + target.select = True bpy.ops.object.delete() # go back to initial state - obj.selected = True + obj.select = True bpy.ops.object.mode_set(mode='EDIT') class Relax(bpy.types.Operator): diff --git a/mesh_surface_sketch.py b/mesh_surface_sketch.py index 35876520782ac97313f2e227ac161682544a7f02..37bc2bc7a752a706de1368e2788a6802dd663d06 100644 --- a/mesh_surface_sketch.py +++ b/mesh_surface_sketch.py @@ -184,7 +184,7 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator): all_selected_verts = [] all_verts_idx = [] for ed in self.main_object.data.edges: - if ed.selected: + if ed.select: all_selected_edges_idx.append(ed.index) # Selected vertexes. @@ -717,8 +717,8 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator): #### Join the new mesh to the main object. - ob_surface.selected = True - self.main_object.selected = True + ob_surface.select = True + self.main_object.select = True bpy.context.scene.objects.active = bpy.data.objects[self.main_object.name] bpy.ops.object.join() bpy.ops.object.editmode_toggle() diff --git a/object_cloud_gen.py b/object_cloud_gen.py index 2494e102884099ed2b0c217943f9acad50e77a31..8b9f0e1f2722c6507b7d22d35b207e478a33d878 100644 --- a/object_cloud_gen.py +++ b/object_cloud_gen.py @@ -62,7 +62,7 @@ def makeObjectIntoBoundBox(object, sizeDifference): bpy.ops.object.select_all(action='DESELECT') # Select the object - object.selected = True + object.select = True # Go into Edit Mode bpy.ops.object.mode_set(mode='EDIT') @@ -149,7 +149,7 @@ def applyScaleRotLoc(scene, obj): bpy.ops.object.select_all(action='DESELECT') # Select the object - obj.selected = True + obj.select = True scene.objects.active = obj #bpy.ops.object.rotation_apply() @@ -164,7 +164,7 @@ def totallyDeleteObject(scene, obj): bpy.ops.object.select_all(action='DESELECT') # Select the object and delete it. - obj.selected = True + obj.select = True scene.objects.active = obj # Delete all material slots in obj @@ -207,7 +207,7 @@ def addNewObject(scene, name, copyobj): # Link new object to the given scene and select it. scene.objects.link(ob_new) - ob_new.selected = True + ob_new.select = True return ob_new @@ -221,7 +221,7 @@ def combineObjects(scene, combined, listobjs): bpy.ops.object.select_all(action='DESELECT') # Select the new object. - combined.selected = True + combined.select = True scene.objects.active = combined # Add data @@ -381,7 +381,7 @@ class GenerateCloud(bpy.types.Operator): # press generate again if they want. for eachMember in definitionObjects: eachMember.max_draw_type = 'SOLID' - eachMember.selected = True + eachMember.select = True #scene.objects.active = eachMember #TODO Delete this when render bug caused by degenerate is fixed. @@ -402,7 +402,7 @@ class GenerateCloud(bpy.types.Operator): selectedObjects[0]) bounds.max_draw_type = 'BOUNDS' - bounds.restrict_render = False + bounds.hide_render = False # Just add a Definition Property designating this # as the main object. @@ -426,14 +426,14 @@ class GenerateCloud(bpy.types.Operator): selObj["CloudMember"] = "DefinitioinObj" selObj.name = "DefinitioinObj" selObj.max_draw_type = 'WIRE' - selObj.restrict_render = True + selObj.hide_render = True makeParent(bounds, selObj, scene) # Do the same to the 1. object since it is no longer in list. firstObject["CloudMember"] = "DefinitioinObj" firstObject.name = "DefinitioinObj" firstObject.max_draw_type = 'WIRE' - firstObject.restrict_render = True + firstObject.hide_render = True makeParent(bounds, firstObject, scene) ###############Create Cloud for putting Cloud Mesh############ @@ -441,7 +441,7 @@ class GenerateCloud(bpy.types.Operator): cloud = addNewObject(scene, "CloudMesh", bounds) cloud["CloudMember"] = "CreatedObj" cloud.max_draw_type = 'WIRE' - cloud.restrict_render = True + cloud.hide_render = True makeParent(bounds, cloud, scene) @@ -481,7 +481,7 @@ class GenerateCloud(bpy.types.Operator): bpy.ops.object.select_all(action='DESELECT') # Select the object. - bounds.selected = True + bounds.select = True scene.objects.active = bounds # Turn bounds object into a box. @@ -577,7 +577,7 @@ class GenerateCloud(bpy.types.Operator): cloudPnts = addNewObject(scene, "CloudPoints", bounds) cloudPnts["CloudMember"] = "CreatedObj" cloudPnts.max_draw_type = 'WIRE' - cloudPnts.restrict_render = True + cloudPnts.hide_render = True makeParent(bounds, cloudPnts, scene) @@ -623,7 +623,7 @@ class GenerateCloud(bpy.types.Operator): bpy.ops.object.select_all(action='DESELECT') # Select the object. - cloud.selected = True + cloud.select = True scene.objects.active = cloud bpy.ops.object.particle_system_remove() @@ -653,7 +653,7 @@ class GenerateCloud(bpy.types.Operator): mVolume.scattering = .13 # Select the object. - bounds.selected = True + bounds.select = True scene.objects.active = bounds return {'FINISHED'} diff --git a/object_fracture/fracture_ops.py b/object_fracture/fracture_ops.py index 7448e005727f8fa73153a007d06a8fa9cf68d2f9..b2aa84420cfcdedc5883bb9790aa899889573e32 100644 --- a/object_fracture/fracture_ops.py +++ b/object_fracture/fracture_ops.py @@ -91,7 +91,7 @@ def create_cutter(context, crack_type, scale, roughness): v.co[1] += roughness * scale * 0.1 * (random.random() - 0.5) v.co[2] += roughness * scale * 0.1 * (random.random() - 0.5) - bpy.context.scene.objects.active.selected = True + bpy.context.scene.objects.active.select = True ''' # Adding fracture material @@ -160,7 +160,7 @@ def getIslands(shard): for gi in range(0, gindex): bpy.ops.object.select_all(action='DESELECT') bpy.context.scene.objects.active = shard - shard.selected = True + shard.select = True bpy.ops.object.duplicate(linked=False, mode=1) a = bpy.context.scene.objects.active sm = a.data @@ -174,7 +174,7 @@ def getIslands(shard): if vgi[x] != gi: #print('getIslands: selecting') #print('getIslands: ' + str(x)) - a.data.verts[x].selected = True + a.data.verts[x].select = True print(bpy.context.scene.objects.active.name) @@ -201,9 +201,9 @@ def boolop(ob, cutter, op): gsize = sizex + sizey + sizez bpy.ops.object.select_all() - ob.selected = True + ob.select = True sce.objects.active = ob - cutter.selected = False + cutter.select = False bpy.ops.object.modifier_add(type='BOOLEAN') a = sce.objects.active @@ -295,7 +295,7 @@ def fracture_basic(context, nshards, crack_type, roughness): shards = [] for ob in context.scene.objects: - if ob.selected: + if ob.select: tobesplit.append(ob) i = 1 # I counts shards, starts with 1 - the original object @@ -327,7 +327,7 @@ def fracture_group(context, group): shards = [] for ob in context.scene.objects: - if (ob.selected + if (ob.select and (len(ob.users_group) == 0 or ob.users_group[0].name != group)): tobesplit.append(ob) diff --git a/space_view3d_materials_utils.py b/space_view3d_materials_utils.py index 524203549172387568cd010e2c8e9c18a183a69e..dca94e5ca8b658acde3b353e03e9e4b3c4db63eb 100644 --- a/space_view3d_materials_utils.py +++ b/space_view3d_materials_utils.py @@ -124,17 +124,17 @@ def select_material_by_name(find_mat): ms = ob.material_slots.values() for m in ms: if m.material.name == find_mat: - ob.selected = True + ob.select = True #the active object may not have the mat! #set it to one that does! scn.objects.active = ob break else: - ob.selected = False + ob.select = False #deselect non-meshes else: - ob.selected = False + ob.select = False else: #it's editmode, so select the faces @@ -152,9 +152,9 @@ def select_material_by_name(find_mat): me = ob.data for f in me.faces: if f.material_index in slot_indeces: - f.selected = True + f.select = True else: - f.selected = False + f.select = False me.update if editmode: bpy.ops.object.mode_set(mode = 'EDIT') @@ -384,7 +384,7 @@ def assign_mat(matname="Default"): f.material_index = index elif allfaces == False: for f in me.faces: - if f.selected: + if f.select: f.material_index = index me.update diff --git a/space_view3d_panel_measure.py b/space_view3d_panel_measure.py index e462f4b311cc3df31d9d58c499b3d6be1036b6dc..cbe68b09abe1f94fc36f23b299e46bdb9731b330 100644 --- a/space_view3d_panel_measure.py +++ b/space_view3d_panel_measure.py @@ -191,7 +191,7 @@ def getMeasurePoints(context): # Get the selected vertices. # @todo: Better (more efficient) way to do this? - verts_selected = [v for v in mesh.verts if v.selected == 1] + verts_selected = [v for v in mesh.verts if v.select == 1] if len(verts_selected) == 0: # Nothing selected. @@ -368,7 +368,7 @@ def objectSurfaceArea(obj, selectedOnly, globalSpace): # Count the area of all the faces. for face in mesh.faces: - if not selectedOnly or face.selected: + if not selectedOnly or face.select: if globalSpace: areaTotal += faceAreaGlobal(face, obj) else: @@ -676,7 +676,7 @@ class VIEW3D_PT_measure(bpy.types.Panel): # Get the selected vertices. # @todo: Better (more efficient) way to do this? - verts_selected = [v for v in mesh.verts if v.selected == 1] + verts_selected = [v for v in mesh.verts if v.select == 1] if len(verts_selected) == 0: # Nothing selected. @@ -784,7 +784,7 @@ class VIEW3D_PT_measure(bpy.types.Panel): # Get selected faces # @todo: Better (more efficient) way to do this? faces_selected = [f for f in mesh.faces - if f.selected == 1] + if f.select == 1] if len(faces_selected) > 0: area = objectSurfaceArea(obj, True, diff --git a/space_view3d_spacebar_menu.py b/space_view3d_spacebar_menu.py index fdfc85ed74a0f784e07c9a901a513f1a80ef8047..180b1775d8d92ddb8432d97fe120ac3d7e9e0c47 100644 --- a/space_view3d_spacebar_menu.py +++ b/space_view3d_spacebar_menu.py @@ -1374,7 +1374,7 @@ def edgeIntersect(context, operator): bpy.ops.object.mode_set(mode='OBJECT') for e in mesh.edges: - if e.selected: + if e.select: edges.append(e) if is_editmode: