diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-09 00:50:06 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-09 00:50:06 +0400 |
commit | a82bcb38c40fbeeea3715341d07ace5bb56890ed (patch) | |
tree | 5e75b39242729489bd797e94eda9d3e7aecf0f0f | |
parent | b941652219a5fe080bf2d71664a393ca83c238b5 (diff) |
style cleanup: pep8
-rw-r--r-- | io_scene_3ds/import_3ds.py | 1 | ||||
-rw-r--r-- | io_scene_x3d/import_x3d.py | 4 | ||||
-rw-r--r-- | render_povray/render.py | 2 | ||||
-rw-r--r-- | render_povray/ui.py | 12 | ||||
-rw-r--r-- | rigify/rigs/biped/arm/ik.py | 8 | ||||
-rw-r--r-- | rigify/rigs/biped/leg/deform.py | 4 | ||||
-rw-r--r-- | rigify/rigs/biped/leg/fk.py | 4 | ||||
-rw-r--r-- | rigify/rigs/biped/leg/ik.py | 12 | ||||
-rw-r--r-- | rigify/rigs/finger.py | 2 | ||||
-rw-r--r-- | rigify/rigs/misc/delta.py | 2 | ||||
-rw-r--r-- | system_demo_mode/demo_mode.py | 4 | ||||
-rw-r--r-- | system_property_chart.py | 2 |
12 files changed, 28 insertions, 29 deletions
diff --git a/io_scene_3ds/import_3ds.py b/io_scene_3ds/import_3ds.py index 5f0875dc..0da6822b 100644 --- a/io_scene_3ds/import_3ds.py +++ b/io_scene_3ds/import_3ds.py @@ -477,7 +477,6 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH): ## preparando para receber o proximo objeto contextMeshMaterials = [] # matname:[face_idxs] contextMeshUV = None - #contextMesh.vertexUV = 1 # Make sticky coords. # Reset matrix contextMatrix_rot = None #contextMatrix_tx = None diff --git a/io_scene_x3d/import_x3d.py b/io_scene_x3d/import_x3d.py index cbc11c5c..1cfb2837 100644 --- a/io_scene_x3d/import_x3d.py +++ b/io_scene_x3d/import_x3d.py @@ -85,7 +85,7 @@ def vrmlFormat(data): q = not q # invert elif c == '#': - if q == False: + if q is False: return l[:i - 1] return l @@ -2608,7 +2608,7 @@ def load_web3d(path, node.blendObject.animation_data.action = action # Add in hierarchy - if PREF_FLAT == False: + if PREF_FLAT is False: child_dict = {} for node, ancestry in all_nodes: if node.blendObject: diff --git a/render_povray/render.py b/render_povray/render.py index 6da156d9..a92aafb8 100644 --- a/render_povray/render.py +++ b/render_povray/render.py @@ -822,7 +822,7 @@ def write_pov(filename, scene=None, info_callback=None): # Export Hair - if hasattr(ob, 'particle_systems') != False: + if hasattr(ob, 'particle_systems'): for pSys in ob.particle_systems: if not pSys.settings.use_render_emitter: continue #don't render mesh diff --git a/render_povray/ui.py b/render_povray/ui.py index 0af5253e..3c828d0c 100644 --- a/render_povray/ui.py +++ b/render_povray/ui.py @@ -102,7 +102,7 @@ class RenderButtonsPanel(): @classmethod def poll(cls, context): rd = context.scene.render - return (rd.use_game_engine == False) and (rd.engine in cls.COMPAT_ENGINES) + return (rd.use_game_engine is False) and (rd.engine in cls.COMPAT_ENGINES) class MaterialButtonsPanel(): @@ -115,7 +115,7 @@ class MaterialButtonsPanel(): def poll(cls, context): mat = context.material rd = context.scene.render - return mat and (rd.use_game_engine == False) and (rd.engine in cls.COMPAT_ENGINES) + return mat and (rd.use_game_engine is False) and (rd.engine in cls.COMPAT_ENGINES) class TextureButtonsPanel(): @@ -128,7 +128,7 @@ class TextureButtonsPanel(): def poll(cls, context): tex = context.texture rd = context.scene.render - return tex and (rd.use_game_engine == False) and (rd.engine in cls.COMPAT_ENGINES) + return tex and (rd.use_game_engine is False) and (rd.engine in cls.COMPAT_ENGINES) class ObjectButtonsPanel(): @@ -141,7 +141,7 @@ class ObjectButtonsPanel(): def poll(cls, context): obj = context.object rd = context.scene.render - return obj and (rd.use_game_engine == False) and (rd.engine in cls.COMPAT_ENGINES) + return obj and (rd.use_game_engine is False) and (rd.engine in cls.COMPAT_ENGINES) class CameraDataButtonsPanel(): @@ -154,7 +154,7 @@ class CameraDataButtonsPanel(): def poll(cls, context): cam = context.camera rd = context.scene.render - return cam and (rd.use_game_engine == False) and (rd.engine in cls.COMPAT_ENGINES) + return cam and (rd.use_game_engine is False) and (rd.engine in cls.COMPAT_ENGINES) class TextButtonsPanel(): @@ -167,7 +167,7 @@ class TextButtonsPanel(): def poll(cls, context): text = context.space_data rd = context.scene.render - return text and (rd.use_game_engine == False) and (rd.engine in cls.COMPAT_ENGINES) + return text and (rd.use_game_engine is False) and (rd.engine in cls.COMPAT_ENGINES) class RENDER_PT_povray_export_settings(RenderButtonsPanel, bpy.types.Panel): diff --git a/rigify/rigs/biped/arm/ik.py b/rigify/rigs/biped/arm/ik.py index 70720ac9..31383b54 100644 --- a/rigify/rigs/biped/arm/ik.py +++ b/rigify/rigs/biped/arm/ik.py @@ -195,7 +195,7 @@ class Rig: pole_p.lock_scale = True, True, True # Set up custom properties - if self.switch == True: + if self.switch is True: prop = rna_idprop_ui_prop_get(hand_p, "ikfk_switch", create=True) hand_p["ikfk_switch"] = 0.0 prop["soft_min"] = prop["min"] = 0.0 @@ -246,7 +246,7 @@ class Rig: con.name = "ik" con.target = self.obj con.subtarget = uarm - if self.switch == True: + if self.switch is True: # IK/FK switch driver fcurve = con.driver_add("influence") driver = fcurve.driver @@ -261,7 +261,7 @@ class Rig: con.name = "ik" con.target = self.obj con.subtarget = farm - if self.switch == True: + if self.switch is True: # IK/FK switch driver fcurve = con.driver_add("influence") driver = fcurve.driver @@ -276,7 +276,7 @@ class Rig: con.name = "ik" con.target = self.obj con.subtarget = hand - if self.switch == True: + if self.switch is True: # IK/FK switch driver fcurve = con.driver_add("influence") driver = fcurve.driver diff --git a/rigify/rigs/biped/leg/deform.py b/rigify/rigs/biped/leg/deform.py index 79977fad..76f751f1 100644 --- a/rigify/rigs/biped/leg/deform.py +++ b/rigify/rigs/biped/leg/deform.py @@ -95,7 +95,7 @@ class Rig: foot = None heel = None for b in self.obj.data.bones[leg_bones[1]].children: - if b.use_connect == True: + if b.use_connect is True: if len(b.children) >= 1 and has_connected_children(b): foot = b.name else: @@ -108,7 +108,7 @@ class Rig: # Get the toe toe = None for b in self.obj.data.bones[foot].children: - if b.use_connect == True: + if b.use_connect is True: toe = b.name if toe is None: diff --git a/rigify/rigs/biped/leg/fk.py b/rigify/rigs/biped/leg/fk.py index 270fffdb..3d776cb7 100644 --- a/rigify/rigs/biped/leg/fk.py +++ b/rigify/rigs/biped/leg/fk.py @@ -54,7 +54,7 @@ class Rig: foot = None heel = None for b in self.obj.data.bones[leg_bones[1]].children: - if b.use_connect == True: + if b.use_connect is True: if len(b.children) >= 1 and has_connected_children(b): foot = b.name else: @@ -66,7 +66,7 @@ class Rig: # Get the toe toe = None for b in self.obj.data.bones[foot].children: - if b.use_connect == True: + if b.use_connect is True: toe = b.name # Get the toe diff --git a/rigify/rigs/biped/leg/ik.py b/rigify/rigs/biped/leg/ik.py index d114b942..7d01a602 100644 --- a/rigify/rigs/biped/leg/ik.py +++ b/rigify/rigs/biped/leg/ik.py @@ -105,7 +105,7 @@ class Rig: heel = None rocker = None for b in self.obj.data.bones[leg_bones[1]].children: - if b.use_connect == True: + if b.use_connect is True: if len(b.children) >= 1 and has_connected_children(b): foot = b.name else: @@ -120,7 +120,7 @@ class Rig: # Get the toe toe = None for b in self.obj.data.bones[foot].children: - if b.use_connect == True: + if b.use_connect is True: toe = b.name # Get toe @@ -373,7 +373,7 @@ class Rig: pole_p.lock_scale = True, True, True # Set up custom properties - if self.switch == True: + if self.switch is True: prop = rna_idprop_ui_prop_get(foot_p, "ikfk_switch", create=True) foot_p["ikfk_switch"] = 0.0 prop["soft_min"] = prop["min"] = 0.0 @@ -495,7 +495,7 @@ class Rig: con.name = "ik" con.target = self.obj con.subtarget = thigh - if self.switch == True: + if self.switch is True: # IK/FK switch driver fcurve = con.driver_add("influence") driver = fcurve.driver @@ -510,7 +510,7 @@ class Rig: con.name = "ik" con.target = self.obj con.subtarget = shin - if self.switch == True: + if self.switch is True: # IK/FK switch driver fcurve = con.driver_add("influence") driver = fcurve.driver @@ -525,7 +525,7 @@ class Rig: con.name = "ik" con.target = self.obj con.subtarget = foot_ik_target - if self.switch == True: + if self.switch is True: # IK/FK switch driver fcurve = con.driver_add("influence") driver = fcurve.driver diff --git a/rigify/rigs/finger.py b/rigify/rigs/finger.py index 7961a5fd..0dee1b0d 100644 --- a/rigify/rigs/finger.py +++ b/rigify/rigs/finger.py @@ -171,7 +171,7 @@ class Rig: for bone in bones[1:]: pb[bone].lock_location = True, True, True - if pb[self.org_bones[0]].bone.use_connect == True: + if pb[self.org_bones[0]].bone.use_connect is True: pb[bones[0]].lock_location = True, True, True pb[ctrl].lock_scale = True, False, True diff --git a/rigify/rigs/misc/delta.py b/rigify/rigs/misc/delta.py index d61cf695..b32134ff 100644 --- a/rigify/rigs/misc/delta.py +++ b/rigify/rigs/misc/delta.py @@ -43,7 +43,7 @@ class Rig: if bb[bone].children is None: raise MetarigError("RIGIFY ERROR: bone '%s': rig type requires one child" % org_name(bone.name)) - if bb[bone].use_connect == True: + if bb[bone].use_connect is True: raise MetarigError("RIGIFY ERROR: bone '%s': rig type cannot be connected to parent" % org_name(bone.name)) self.obj = obj diff --git a/system_demo_mode/demo_mode.py b/system_demo_mode/demo_mode.py index 54b8ed24..3cce16eb 100644 --- a/system_demo_mode/demo_mode.py +++ b/system_demo_mode/demo_mode.py @@ -390,7 +390,7 @@ class DemoMode(bpy.types.Operator): demo_mode_temp_file() # play this once through then never again # toggle - if DemoMode.enabled and DemoMode.first_run == False: + if DemoMode.enabled and DemoMode.first_run is False: # this actually cancells the previous running instance # should never happen now, DemoModeControl is for this. return {'CANCELLED'} @@ -409,7 +409,7 @@ class DemoMode(bpy.types.Operator): # call from DemoModeControl @classmethod def disable(cls): - if cls.enabled and cls.first_run == False: + if cls.enabled and cls.first_run is False: # this actually cancells the previous running instance # should never happen now, DemoModeControl is for this. cls.enabled = False diff --git a/system_property_chart.py b/system_property_chart.py index 4178ebe0..5ed96aae 100644 --- a/system_property_chart.py +++ b/system_property_chart.py @@ -101,7 +101,7 @@ def _property_chart_draw(self, context): prop_found = False for attr_string in strings: prop_pairs.append(obj_prop_get(obj, attr_string)) - if prop_found == False and prop_pairs[-1] != (None, None): + if prop_found is False and prop_pairs[-1] != (None, None): prop_found = True if prop_found: |