diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-03-19 04:47:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-03-19 04:50:23 +0300 |
commit | 8c378c52c83757b9e78d5a98581bf240ed31a1ec (patch) | |
tree | 4a44a8e7fab77f9f812a8940713f14dceeec512c | |
parent | 57f376e9465c6b79ebd4409bc30e0b5930dd4140 (diff) |
Cleanup: identity for None comparison
-rw-r--r-- | add_curve_extra_objects/add_curve_simple.py | 10 | ||||
-rw-r--r-- | add_mesh_BoltFactory/Boltfactory.py | 2 | ||||
-rw-r--r-- | animation_add_corrective_shape_key.py | 4 | ||||
-rw-r--r-- | io_convert_image_to_mesh_img/import_img.py | 14 | ||||
-rw-r--r-- | io_export_dxf/export_dxf.py | 6 | ||||
-rw-r--r-- | io_export_dxf/primitive_exporters/base_exporter.py | 2 | ||||
-rw-r--r-- | io_export_unreal_psk_psa.py | 36 | ||||
-rw-r--r-- | io_import_dxf/dxfimport/do.py | 2 | ||||
-rw-r--r-- | io_import_scene_lwo.py | 2 | ||||
-rw-r--r-- | io_import_scene_unreal_psa_psk.py | 8 | ||||
-rw-r--r-- | io_mesh_ply/__init__.py | 2 | ||||
-rw-r--r-- | io_scene_x/export_x.py | 2 | ||||
-rw-r--r-- | io_scene_x3d/import_x3d.py | 14 | ||||
-rw-r--r-- | mesh_bsurfaces.py | 20 | ||||
-rw-r--r-- | netrender/master.py | 2 | ||||
-rw-r--r-- | netrender/slave.py | 2 | ||||
-rw-r--r-- | object_cloud_gen.py | 2 | ||||
-rw-r--r-- | render_copy_settings/operator.py | 6 | ||||
-rw-r--r-- | render_povray/nodes.py | 14 | ||||
-rwxr-xr-x | rigify/rig_ui_pitchipoy_template.py | 8 | ||||
-rw-r--r-- | ui_translate/update_ui.py | 4 |
21 files changed, 81 insertions, 81 deletions
diff --git a/add_curve_extra_objects/add_curve_simple.py b/add_curve_extra_objects/add_curve_simple.py index 111d8c08..a17e544a 100644 --- a/add_curve_extra_objects/add_curve_simple.py +++ b/add_curve_extra_objects/add_curve_simple.py @@ -1028,7 +1028,7 @@ class Simple(bpy.types.Operator): ##### POLL ##### @classmethod def poll(cls, context): - return context.scene != None + return context.scene is not None ##### EXECUTE ##### def execute(self, context): @@ -1099,7 +1099,7 @@ class BezierPointsFillet(bpy.types.Operator): ##### POLL ##### @classmethod def poll(cls, context): - return context.scene != None + return context.scene is not None ##### EXECUTE ##### def execute(self, context): @@ -1237,7 +1237,7 @@ class BezierDivide(bpy.types.Operator): ##### POLL ##### @classmethod def poll(cls, context): - return context.scene != None + return context.scene is not None ##### EXECUTE ##### def execute(self, context): @@ -1347,7 +1347,7 @@ class SimpleEdit(bpy.types.Operator): nselected = [] n = 0 obj = context.active_object - if obj != None: + if obj is not None: if obj.type == 'CURVE': for i in obj.data.splines: for j in i.bezier_points: @@ -1375,7 +1375,7 @@ class SimpleEdit(bpy.types.Operator): selected = [] n = 0 obj = context.active_object - if obj != None: + if obj is not None: if obj.type == 'CURVE': for i in obj.data.splines: for j in i.bezier_points: diff --git a/add_mesh_BoltFactory/Boltfactory.py b/add_mesh_BoltFactory/Boltfactory.py index 66b0c32f..be0ba617 100644 --- a/add_mesh_BoltFactory/Boltfactory.py +++ b/add_mesh_BoltFactory/Boltfactory.py @@ -266,7 +266,7 @@ class add_mesh_bolt(bpy.types.Operator): ##### POLL ##### @classmethod def poll(cls, context): - return context.scene != None + return context.scene is not None ##### EXECUTE ##### def execute(self, context): diff --git a/animation_add_corrective_shape_key.py b/animation_add_corrective_shape_key.py index 66234f94..efb357f8 100644 --- a/animation_add_corrective_shape_key.py +++ b/animation_add_corrective_shape_key.py @@ -181,7 +181,7 @@ class add_corrective_pose_shape(bpy.types.Operator): @classmethod def poll(cls, context): - return context.active_object != None + return context.active_object is not None def execute(self, context): selection = context.selected_objects @@ -378,7 +378,7 @@ class add_corrective_pose_shape_fast(bpy.types.Operator): @classmethod def poll(cls, context): - return context.active_object != None + return context.active_object is not None def execute(self, context): selection = context.selected_objects diff --git a/io_convert_image_to_mesh_img/import_img.py b/io_convert_image_to_mesh_img/import_img.py index 303991dc..7c9e76d1 100644 --- a/io_convert_image_to_mesh_img/import_img.py +++ b/io_convert_image_to_mesh_img/import_img.py @@ -67,7 +67,7 @@ class hirise_dtm_importer(object): self.__cropXY = False def bin_mode(self, bin_mode=None): - if bin_mode != None: + if bin_mode is not None: self.__bin_mode = bin_mode return self.__bin_mode @@ -503,7 +503,7 @@ class hirise_dtm_importer(object): x = 0 point_offset += len( last_line ) - last_line.count(None) for z in last_line: - if z != None: + if z is not None: coords.append( (x*scale_x, 0.0, z) ) coord += 1 x += 1 @@ -535,7 +535,7 @@ class hirise_dtm_importer(object): # TODO: turn this into a map x = 0 for z in dtm_line: - if z != None: + if z is not None: coords.append( (x*scale_x, y_val, z) ) coord += 1 x += 1 @@ -567,17 +567,17 @@ class hirise_dtm_importer(object): # TODO: implement a triangular face pass - if vals[1] != None: + if vals[1] is not None: previous_point_offset += 1 - if vals[2] != None: + if vals[2] is not None: point_offset += 1 # Squeeze the last point offset increment out of the previous line - if last_line[-1] != None: + if last_line[-1] is not None: previous_point_offset += 1 # Squeeze the last point out of the current line - if dtm_line[-1] != None: + if dtm_line[-1] is not None: point_offset += 1 # remember what we just saw (and forget anything before that) diff --git a/io_export_dxf/export_dxf.py b/io_export_dxf/export_dxf.py index 89aa1d1c..a17f50f2 100644 --- a/io_export_dxf/export_dxf.py +++ b/io_export_dxf/export_dxf.py @@ -204,7 +204,7 @@ def get_view_projection_matrix(context, settings): Currently only orthographic projection is used. (Subject to discussion). """ cam = settings['projectionThrough'] - if cam == None: + if cam is None: mw = mathutils.Matrix() mw.identity() elif cam in projectionMapping.keys(): @@ -238,8 +238,8 @@ def _exportItem(ctx, o, mw, drawing, settings): print('elayer=%s, ecolor=%s, eltype=%s' % (elayer, ecolor, eltype)) #TODO: use o.boundBox for drawing extends ?? - if elayer != None and not drawing.containsLayer(elayer): - if ecolor!=None: tempcolor = ecolor + if elayer is not None and not drawing.containsLayer(elayer): + if ecolor is not None: tempcolor = ecolor else: tempcolor = settings['layercolor_def'] drawing.addLayer(elayer, tempcolor) diff --git a/io_export_dxf/primitive_exporters/base_exporter.py b/io_export_dxf/primitive_exporters/base_exporter.py index 2542a1c0..d3c9663d 100644 --- a/io_export_dxf/primitive_exporters/base_exporter.py +++ b/io_export_dxf/primitive_exporters/base_exporter.py @@ -181,7 +181,7 @@ class BasePrimitiveDXFExporter(object): # #print 'deb: OCS_origin=', OCS_origin #--------- # # ZRotation = rotZ -# if Extrusion!=None: +# if Extrusion is not None: # ZRotation = getZRotation(AXaxis,rot_matrix_invert) # #Zrotmatrix = mathutils.RotationMatrix(-ZRotation, 3, "Z") # rs, rc = sin(ZRotation), cos(ZRotation) diff --git a/io_export_unreal_psk_psa.py b/io_export_unreal_psk_psa.py index c410f91c..7ecef29b 100644 --- a/io_export_unreal_psk_psa.py +++ b/io_export_unreal_psk_psa.py @@ -770,7 +770,7 @@ class SmoothingGroup: def get_valid_smoothgroup_id(self): temp_id = 1 for group in self.neighboring_groups: - if group != None and group.id == temp_id: + if group is not None and group.id == temp_id: if temp_id < 0x80000000: temp_id = temp_id << 1 else: @@ -828,7 +828,7 @@ def add_face_to_smoothgroup( mesh, face, edge_sharing_list, smoothgroup ): edge_id = find_edges(mesh, key) - if edge_id != None: + if edge_id is not None: # not sharp if not( mesh.edges[edge_id].use_edge_sharp): @@ -946,7 +946,7 @@ def meshmerge(selectedobjects): count = 0 #reset count for count in range(len( selectedobjects)): #print("Index:",count) - if selectedobjects[count] != None: + if selectedobjects[count] is not None: me_da = selectedobjects[count].data.copy() #copy data me_ob = selectedobjects[count].copy() #copy object #note two copy two types else it will use the current data or mesh @@ -1016,8 +1016,8 @@ def parse_mesh( mesh, psk ): print(" Material {} '{}'".format(mat_slot_index, slot.name)) MaterialName.append(slot.name) - #if slot.material.texture_slots[0] != None: - #if slot.material.texture_slots[0].texture.image.filepath != None: + #if slot.material.texture_slots[0] is not None: + #if slot.material.texture_slots[0].texture.image.filepath is not None: #print(" Texture path {}".format(slot.material.texture_slots[0].texture.image.filepath)) #create the current material v_material = psk.GetMatByIndex(mat_slot_index) @@ -1314,7 +1314,7 @@ def parse_armature( armature, psk, psa ): verbose("Armature object: {} Armature data: {}".format(armature.name, armature.data.name)) # generate a list of root bone candidates - root_candidates = [b for b in armature.data.bones if b.parent == None and b.use_deform == True] + root_candidates = [b for b in armature.data.bones if b.parent is None and b.use_deform == True] # should be a single, unambiguous result if len(root_candidates) == 0: @@ -1360,7 +1360,7 @@ def recurse_bone( bone, bones, psk, psa, parent_id, parent_matrix, indent="" ): status = "No effect" # calc parented bone transform - if bone.parent != None: + if bone.parent is not None: quat = make_fquat(bone.matrix.to_quaternion()) quat_parent = bone.parent.matrix.to_quaternion().inverted() parent_head = quat_parent * bone.parent.head @@ -1431,7 +1431,7 @@ def parse_animation( armature, udk_bones, actions_to_export, psa ): print("Scene: {} FPS: {} Frames: {} to {}".format(context.scene.name, anim_rate, context.scene.frame_start, context.scene.frame_end)) print("Processing {} action(s)".format(len(actions_to_export))) print() - if armature.animation_data == None: #if animation data was not create for the armature it will skip the exporting action set(s) + if armature.animation_data is None: #if animation data was not create for the armature it will skip the exporting action set(s) print("None Actions Set! skipping...") return restoreAction = armature.animation_data.action # Q: is animation_data always valid? @@ -1505,14 +1505,14 @@ def parse_animation( armature, udk_bones, actions_to_export, psa ): pose_bone = bone_data[1] pose_bone_matrix = mathutils.Matrix(pose_bone.matrix) - if pose_bone.parent != None: + if pose_bone.parent is not None: pose_bone_parent_matrix = mathutils.Matrix(pose_bone.parent.matrix) pose_bone_matrix = pose_bone_parent_matrix.inverted() * pose_bone_matrix head = pose_bone_matrix.to_translation() quat = pose_bone_matrix.to_quaternion().normalized() - if pose_bone.parent != None: + if pose_bone.parent is not None: quat = make_fquat(quat) else: quat = make_fquat_default(quat) @@ -1702,7 +1702,7 @@ def find_armature_and_mesh(): raise Error("No mesh parented to armature") verbose("Found mesh: {}".format(mesh.name)) - if mesh == None or armature == None: + if mesh is None or armature is None: raise Error("Check Mesh and Armature are list!") #if len(armature.pose.bones) == len(mesh.vertex_groups): #print("Armature and Mesh Vertex Groups matches Ok!") @@ -2049,7 +2049,7 @@ def rebuildmesh(obj): uv_layer = mmesh.tessface_uv_textures.active for face in mmesh.tessfaces: smoothings.append(face.use_smooth)#smooth or flat in boolean - if uv_layer != None:#check if there texture data exist + if uv_layer is not None:#check if there texture data exist faceUV = uv_layer.data[face.index] uvs = [] for uv in faceUV.uv: @@ -2159,7 +2159,7 @@ def rebuildarmature(obj): bpy.ops.object.mode_set(mode='EDIT') for bone in obj.data.edit_bones: - if bone.parent != None: + if bone.parent is not None: currentbone.append([bone.name,bone.roll]) else: currentbone.append([bone.name,bone.roll]) @@ -2177,12 +2177,12 @@ def rebuildarmature(obj): if bone.name == bonelist[0]: newbone.roll = bonelist[1] break - if bone.parent != None: + if bone.parent is not None: parentbone = ob_new.data.edit_bones[bone.parent.name] newbone.parent = parentbone ob_new.animation_data_create()#create animation data - if obj.animation_data != None:#check for animation + if obj.animation_data is not None:#check for animation ob_new.animation_data.action = obj.animation_data.action #just make sure it here to do the animations if exist print("Armature Object Name:",ob_new.name) return ob_new @@ -2440,7 +2440,7 @@ def udkcheckmeshline(): bpy.ops.mesh.select_all(action='DESELECT') bpy.context.tool_settings.mesh_select_mode = (True, False, False) #select vertices - if objmesh != None: + if objmesh is not None: print("found mesh") print(objmesh) print(objmesh.data.tessfaces) @@ -2533,7 +2533,7 @@ class OBJECT_OT_ActionSetAnimUpdate(bpy.types.Operator): if len(armatureselected) == 1: armature = armatureselected[0] - if armature != None: + if armature is not None: for bone in armature.pose.bones: bones.append(bone.name) @@ -2617,7 +2617,7 @@ class ExportUDKAnimData(bpy.types.Operator): @classmethod def poll(cls, context): - return context.active_object != None + return context.active_object is not None def execute(self, context): scene = bpy.context.scene diff --git a/io_import_dxf/dxfimport/do.py b/io_import_dxf/dxfimport/do.py index 66551f53..3f80c3a1 100644 --- a/io_import_dxf/dxfimport/do.py +++ b/io_import_dxf/dxfimport/do.py @@ -360,7 +360,7 @@ class Do: if len(spline) % 3 != 1: print("DXF-IMPORT: DO ARC: CHECK PLEASE: ", len(spline), spline) - # curve == None means arc is called from bulge conversion + # curve is None means arc is called from bulge conversion # nothing should be projected at this stage, since the # lwpolyline (the only entity with bulges) will be projected # as a whole afterwards (small little error; took ages to debug) diff --git a/io_import_scene_lwo.py b/io_import_scene_lwo.py index b7e10225..8f1bbbac 100644 --- a/io_import_scene_lwo.py +++ b/io_import_scene_lwo.py @@ -971,7 +971,7 @@ def build_armature(layer_data, bones): else: nb.roll= 0.0 - if prev_bone != None: + if prev_bone is not None: if nb.head == prev_bone.tail: nb.parent= prev_bone diff --git a/io_import_scene_unreal_psa_psk.py b/io_import_scene_unreal_psa_psk.py index 4eaa8a72..c210b771 100644 --- a/io_import_scene_unreal_psa_psk.py +++ b/io_import_scene_unreal_psa_psk.py @@ -594,7 +594,7 @@ def pskimport(infile,importmesh,importbone,bDebugLogPSK,importmultiuvtextures): materials = [] for matcount in range(materialcount): - #if texturedata != None: + #if texturedata is not None: matdata = bpy.data.materials.new(materialname + str(matcount)) #mtex = matdata.texture_slots.new() #mtex.texture = texture[matcount].data @@ -946,7 +946,7 @@ def psaimport(filename,context): _psa_bone = psa_bone() _psa_bone.name = bone.name _psa_bone.Transform = bone.matrix - if bone.parent != None: + if bone.parent is not None: _psa_bone.parent = psa_bones[bone.parent.name] else: _psa_bone.parent = None @@ -975,7 +975,7 @@ def psaimport(filename,context): quat = Raw_Key_List[raw_key_index][1] mat = Matrix() - if pbone.parent != None: + if pbone.parent is not None: quat = quat.conjugated() mat = Matrix.Translation(pos) * quat.to_matrix().to_4x4() mat = pose_bones[bName].parent.matrix * mat @@ -1025,7 +1025,7 @@ def psaimport(filename,context): child.keyframe_insert("rotation_quaternion") for bone in pose_bones: - if bone.parent != None: + if bone.parent is not None: whirlSingleBone(bone,Quaternion((0.707, 0, 0, -0.707))) else: bone.rotation_quaternion *= Quaternion((0.707, -0.707, 0, 0)) * Quaternion((0.707, 0, 0, -0.707)) diff --git a/io_mesh_ply/__init__.py b/io_mesh_ply/__init__.py index 7e2a7037..3e84a4fd 100644 --- a/io_mesh_ply/__init__.py +++ b/io_mesh_ply/__init__.py @@ -134,7 +134,7 @@ class ExportPLY(bpy.types.Operator, ExportHelper, IOPLYOrientationHelper): @classmethod def poll(cls, context): - return context.active_object != None + return context.active_object is not None def execute(self, context): from . import export_ply diff --git a/io_scene_x/export_x.py b/io_scene_x/export_x.py index 64f5ff83..3ecc27e2 100644 --- a/io_scene_x/export_x.py +++ b/io_scene_x/export_x.py @@ -746,7 +746,7 @@ class MeshExportObject(ExportObject): def GetMaterialKey(Material, UVTexture, Index): Image = None - if UVTexture != None and UVTexture.data[Index].image != None: + if UVTexture is not None and UVTexture.data[Index].image is not None: Image = UVTexture.data[Index].image if \ UVTexture.data[Index].image.source == 'FILE' else None diff --git a/io_scene_x3d/import_x3d.py b/io_scene_x3d/import_x3d.py index 269cc557..3416bf22 100644 --- a/io_scene_x3d/import_x3d.py +++ b/io_scene_x3d/import_x3d.py @@ -428,25 +428,25 @@ class vrmlNode(object): # Only available from the root node ''' def getFieldDict(self): - if self.FIELD_NAMESPACE != None: + if self.FIELD_NAMESPACE is not None: return self.FIELD_NAMESPACE else: return self.parent.getFieldDict() ''' def getProtoDict(self): - if self.PROTO_NAMESPACE != None: + if self.PROTO_NAMESPACE is not None: return self.PROTO_NAMESPACE else: return self.parent.getProtoDict() def getDefDict(self): - if self.DEF_NAMESPACE != None: + if self.DEF_NAMESPACE is not None: return self.DEF_NAMESPACE else: return self.parent.getDefDict() def getRouteIpoDict(self): - if self.ROUTE_IPO_NAMESPACE != None: + if self.ROUTE_IPO_NAMESPACE is not None: return self.ROUTE_IPO_NAMESPACE else: return self.parent.getRouteIpoDict() @@ -1107,7 +1107,7 @@ class vrmlNode(object): # fill in DEF/USE key = self.getDefName() - if key != None: + if key is not None: self.getDefDict()[key] = self key = self.getProtoName() @@ -1115,7 +1115,7 @@ class vrmlNode(object): key = self.getExternprotoName() proto_dict = self.getProtoDict() - if key != None: + if key is not None: proto_dict[key] = self # Parse the proto nodes fields @@ -3370,7 +3370,7 @@ def translateTimeSensor(node, action, ancestry): startTime = node.getFieldAsFloat('startTime', 0.0, ancestry) stopTime = node.getFieldAsFloat('stopTime', 250.0, ancestry) - if cycleInterval != None: + if cycleInterval is not None: stopTime = startTime + cycleInterval loop = node.getFieldAsBool('loop', False, ancestry) diff --git a/mesh_bsurfaces.py b/mesh_bsurfaces.py index b90617b0..21c6e50e 100644 --- a/mesh_bsurfaces.py +++ b/mesh_bsurfaces.py @@ -249,7 +249,7 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator): def get_ordered_verts(self, ob, all_selected_edges_idx, all_selected_verts_idx, first_vert_idx, middle_vertex_idx, closing_vert_idx): # Order selected vertices. verts_ordered = [] - if closing_vert_idx != None: + if closing_vert_idx is not None: verts_ordered.append(ob.data.vertices[closing_vert_idx]) verts_ordered.append(ob.data.vertices[first_vert_idx]) @@ -276,10 +276,10 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator): if finish_while: break - if closing_vert_idx != None: + if closing_vert_idx is not None: verts_ordered.append(ob.data.vertices[closing_vert_idx]) - if middle_vertex_idx != None: + if middle_vertex_idx is not None: verts_ordered.append(ob.data.vertices[middle_vertex_idx]) verts_ordered.reverse() @@ -686,13 +686,13 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator): length = (v1.co - v2.co).length - if shortest_edge_length == None: + if shortest_edge_length is None: shortest_edge_length = length else: if length < shortest_edge_length: shortest_edge_length = length - if shortest_edge_length != None: + if shortest_edge_length is not None: edges_merge_distance = shortest_edge_length * 0.5 else: edges_merge_distance = 0 @@ -764,7 +764,7 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator): for vcf_idx in verts_not_movable: dist = abs((object.data.vertices[vcf_idx].co - mathutils.Vector(middle_point_co)).length) - if shortest_dist == None: + if shortest_dist is None: shortest_dist = dist nearest_vert_idx = vcf_idx else: @@ -1130,7 +1130,7 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator): if co_1 != co_2: dist = (mathutils.Vector(co_1) - mathutils.Vector(co_2)).length - if shortest_dist != None: + if shortest_dist is not None: if dist < shortest_dist: shortest_dist = dist else: @@ -1279,7 +1279,7 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator): intersec_coords = mathutils.geometry.intersect_line_line(bp1_co, bp2_co, bp3_co, bp4_co) - if intersec_coords != None: + if intersec_coords is not None: dist = (intersec_coords[0] - intersec_coords[1]).length if dist <= self.crosshatch_merge_distance * 1.5: @@ -1385,7 +1385,7 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator): if i != t and not t in checked_verts: dist = (verts[i].co - verts[t].co).length - if shortest_dist != None: + if shortest_dist is not None: if dist < shortest_dist: shortest_dist = dist nearest_vert = t @@ -1815,7 +1815,7 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator): #### Identify the type of selection made by the user. - if middle_vertex_idx != None: + if middle_vertex_idx is not None: if len(all_chains_tips_idx) == 4 and len(single_unselected_verts_and_neighbors) == 1: # If there are 4 tips (two selection chains), and there is only one single unselected vert (the middle vert). selection_type = "TWO_CONNECTED" else: diff --git a/netrender/master.py b/netrender/master.py index 456e436d..81e62dbb 100644 --- a/netrender/master.py +++ b/netrender/master.py @@ -39,7 +39,7 @@ class MRenderFile(netrender.model.RenderFile): def updateStatus(self): self.found = os.path.exists(self.filepath) - if self.found and self.signature != None: + if self.found and self.signature is not None: found_signature = hashFile(self.filepath) self.found = self.signature == found_signature if not self.found: diff --git a/netrender/slave.py b/netrender/slave.py index a5d97172..3bb1578a 100644 --- a/netrender/slave.py +++ b/netrender/slave.py @@ -69,7 +69,7 @@ def testFile(conn, job_id, slave_id, rfile, job_prefix, main_path=None): found = os.path.exists(job_full_path) - if found and rfile.signature != None: + if found and rfile.signature is not None: found_signature = hashFile(job_full_path) found = found_signature == rfile.signature diff --git a/object_cloud_gen.py b/object_cloud_gen.py index 0c2817da..cac4cd5d 100644 --- a/object_cloud_gen.py +++ b/object_cloud_gen.py @@ -424,7 +424,7 @@ def getActionToDo(obj): elif obj is None: return 'NO_SELECTION_DO_NOTHING' elif "CloudMember" in obj: - if obj["CloudMember"] != None: + if obj["CloudMember"] is not None: if obj["CloudMember"] == "MainObj": return 'DEGENERATE' elif obj["CloudMember"] == "CreatedObj" and len(obj.particle_systems) > 0: diff --git a/render_copy_settings/operator.py b/render_copy_settings/operator.py index f231ac92..4f4c9954 100644 --- a/render_copy_settings/operator.py +++ b/render_copy_settings/operator.py @@ -54,7 +54,7 @@ class RenderCopySettingsPrepare(bpy.types.Operator): @classmethod def poll(cls, context): - return context.scene != None + return context.scene is not None def execute(self, context): cp_sett = context.scene.render_copy_settings @@ -144,7 +144,7 @@ class RenderCopySettingsPreset(bpy.types.Operator): @classmethod def poll(cls, context): - return context.scene != None + return context.scene is not None def execute(self, context): cp_sett = context.scene.render_copy_settings @@ -179,7 +179,7 @@ class RenderCopySettings(bpy.types.Operator): @classmethod def poll(cls, context): - return context.scene != None + return context.scene is not None def execute(self, context): regex = None diff --git a/render_povray/nodes.py b/render_povray/nodes.py index bf6df14a..e6ba843d 100644 --- a/render_povray/nodes.py +++ b/render_povray/nodes.py @@ -54,7 +54,7 @@ class ObjectNodeTree(bpy.types.NodeTree): ob = context.active_object if ob and ob.type not in {'LAMP'}: ma = ob.active_material - if ma != None: + if ma is not None: nt_name = ma.node_tree if nt_name != '': return nt_name, ma, ma @@ -516,7 +516,7 @@ class PovrayColorImageNode(Node, ObjectNodeTree): split = column.split(percentage=0.8,align=True) split.prop_search(self,"image",context.blend_data,"images",text="") split.operator("pov.imageopen",text="",icon="FILESEL") - if im != None: + if im is not None: column.prop(im,"source",text="") column.prop(self,"map_type",text="") column.prop(self,"interpolate",text="") @@ -534,7 +534,7 @@ class PovrayColorImageNode(Node, ObjectNodeTree): split = column.split(percentage=0.8,align=True) split.prop_search(self,"image",context.blend_data,"images",text="") split.operator("pov.imageopen",text="",icon="FILESEL") - if im != None: + if im is not None: column.prop(im,"source",text="") column.prop(self,"map_type",text="") column.prop(self,"interpolate",text="") @@ -592,7 +592,7 @@ class PovrayBumpMapNode(Node, ObjectNodeTree): split = column.split(percentage=0.8,align=True) split.prop_search(self,"image",context.blend_data,"images",text="") split.operator("pov.imageopen",text="",icon="FILESEL") - if im != None: + if im is not None: column.prop(im,"source",text="") column.prop(self,"map_type",text="") column.prop(self,"interpolate",text="") @@ -608,7 +608,7 @@ class PovrayBumpMapNode(Node, ObjectNodeTree): split = column.split(percentage=0.8,align=True) split.prop_search(self,"image",context.blend_data,"images",text="") split.operator("pov.imageopen",text="",icon="FILESEL") - if im != None: + if im is not None: column.prop(im,"source",text="") column.prop(self,"map_type",text="") column.prop(self,"interpolate",text="") @@ -659,7 +659,7 @@ class PovrayImagePatternNode(Node, ObjectNodeTree): split = column.split(percentage=0.8,align=True) split.prop_search(self,"image",context.blend_data,"images",text="") split.operator("pov.imageopen",text="",icon="FILESEL") - if im != None: + if im is not None: column.prop(im,"source",text="") column.prop(self,"map_type",text="") column.prop(self,"interpolate",text="") @@ -678,7 +678,7 @@ class PovrayImagePatternNode(Node, ObjectNodeTree): split = column.split(percentage=0.8,align=True) split.prop_search(self,"image",context.blend_data,"images",text="") split.operator("pov.imageopen",text="",icon="FILESEL") - if im != None: + if im is not None: column.prop(im,"source",text="") column.prop(self,"map_type",text="") column.prop(self,"interpolate",text="") diff --git a/rigify/rig_ui_pitchipoy_template.py b/rigify/rig_ui_pitchipoy_template.py index 5817f9c5..0c9dc1bd 100755 --- a/rigify/rig_ui_pitchipoy_template.py +++ b/rigify/rig_ui_pitchipoy_template.py @@ -538,7 +538,7 @@ class Rigify_Arm_FK2IK(bpy.types.Operator): @classmethod def poll(cls, context): - return (context.active_object != None and context.mode == 'POSE') + return (context.active_object is not None and context.mode == 'POSE') def execute(self, context): use_global_undo = context.user_preferences.edit.use_global_undo @@ -568,7 +568,7 @@ class Rigify_Arm_IK2FK(bpy.types.Operator): @classmethod def poll(cls, context): - return (context.active_object != None and context.mode == 'POSE') + return (context.active_object is not None and context.mode == 'POSE') def execute(self, context): use_global_undo = context.user_preferences.edit.use_global_undo @@ -599,7 +599,7 @@ class Rigify_Leg_FK2IK(bpy.types.Operator): @classmethod def poll(cls, context): - return (context.active_object != None and context.mode == 'POSE') + return (context.active_object is not None and context.mode == 'POSE') def execute(self, context): use_global_undo = context.user_preferences.edit.use_global_undo @@ -632,7 +632,7 @@ class Rigify_Leg_IK2FK(bpy.types.Operator): @classmethod def poll(cls, context): - return (context.active_object != None and context.mode == 'POSE') + return (context.active_object is not None and context.mode == 'POSE') def execute(self, context): use_global_undo = context.user_preferences.edit.use_global_undo diff --git a/ui_translate/update_ui.py b/ui_translate/update_ui.py index c42bcddd..2dd35839 100644 --- a/ui_translate/update_ui.py +++ b/ui_translate/update_ui.py @@ -151,7 +151,7 @@ class UI_OT_i18n_updatetranslation_svn_init_settings(bpy.types.Operator): @classmethod def poll(cls, context): - return context.window_manager != None + return context.window_manager is not None def execute(self, context): if not hasattr(self, "settings"): @@ -211,7 +211,7 @@ class UI_OT_i18n_updatetranslation_svn_settings_select(bpy.types.Operator): @classmethod def poll(cls, context): - return context.window_manager != None + return context.window_manager is not None def execute(self, context): if self.use_invert: |