forked from bartvdbraak/blender
Code Cleanup: check is / is not when comparing singletons.
This commit is contained in:
parent
60dc2f521b
commit
e3958015db
@ -206,13 +206,13 @@ class DNACatalogHTML:
|
||||
<td>${size}</td>
|
||||
</tr>"""
|
||||
|
||||
if field.Type.Structure == None or field.Name.IsPointer():
|
||||
if field.Type.Structure is None or field.Name.IsPointer():
|
||||
|
||||
# ${reference}
|
||||
reference = field.Name.AsReference(parentReference)
|
||||
|
||||
# ${struct}
|
||||
if parentReference != None:
|
||||
if parentReference is not None:
|
||||
struct = '<a href="#{0}">{0}</a>'.format(structure.Type.Name)
|
||||
else:
|
||||
struct = structure.Type.Name
|
||||
@ -240,7 +240,7 @@ class DNACatalogHTML:
|
||||
|
||||
structure_field = Template(structure_field_template).substitute(d)
|
||||
|
||||
elif field.Type.Structure != None:
|
||||
elif field.Type.Structure is not None:
|
||||
reference = field.Name.AsReference(parentReference)
|
||||
structure_field = self.StructureFields(field.Type.Structure, reference, offset)
|
||||
|
||||
|
@ -329,7 +329,7 @@ class DNAName:
|
||||
self.Name = name
|
||||
|
||||
def AsReference(self, parent):
|
||||
if parent == None:
|
||||
if parent is None:
|
||||
result = ""
|
||||
else:
|
||||
result = parent+"."
|
||||
|
@ -93,7 +93,7 @@ class ExportCyclesXML(bpy.types.Operator, ExportHelper):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.active_object != None
|
||||
return (context.active_object is not None)
|
||||
|
||||
def execute(self, context):
|
||||
filepath = bpy.path.ensure_ext(self.filepath, ".xml")
|
||||
|
@ -166,7 +166,7 @@ class DATA_PT_geometry_curve(CurveButtonsPanel, Panel):
|
||||
col.prop(curve, "bevel_object", text="")
|
||||
|
||||
row = col.row()
|
||||
row.active = curve.bevel_object != None
|
||||
row.active = (curve.bevel_object is not None)
|
||||
row.prop(curve, "use_fill_caps")
|
||||
|
||||
|
||||
|
@ -79,7 +79,7 @@ def seek(r, txt, recurs):
|
||||
except:
|
||||
keys = None
|
||||
|
||||
if keys != None:
|
||||
if keys is not None:
|
||||
if PRINT_DATA:
|
||||
print(txt + '.keys() - ' + str(r.keys()))
|
||||
|
||||
|
@ -74,7 +74,7 @@ def render_gl(context, filepath, shade):
|
||||
|
||||
def render_gl_all_modes(context, obj, filepath=""):
|
||||
|
||||
assert(obj != None)
|
||||
assert(obj is not None)
|
||||
assert(filepath != "")
|
||||
|
||||
scene = context.scene
|
||||
|
Loading…
Reference in New Issue
Block a user