style cleanup: pep8
authorCampbell Barton <ideasman42@gmail.com>
Mon, 8 Oct 2012 08:28:05 +0000 (08:28 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 8 Oct 2012 08:28:05 +0000 (08:28 +0000)
38 files changed:
release/scripts/modules/bl_i18n_utils/bl_process_msg.py
release/scripts/modules/bpy/path.py
release/scripts/modules/bpy_extras/mesh_utils.py
release/scripts/modules/bpy_types.py
release/scripts/modules/bpyml.py
release/scripts/modules/console_python.py
release/scripts/modules/console_shell.py
release/scripts/modules/rna_info.py
release/scripts/modules/rna_xml.py
release/scripts/startup/bl_operators/add_mesh_torus.py
release/scripts/startup/bl_operators/anim.py
release/scripts/startup/bl_operators/clip.py
release/scripts/startup/bl_operators/console.py
release/scripts/startup/bl_operators/mesh.py
release/scripts/startup/bl_operators/object.py
release/scripts/startup/bl_operators/screen_play_rendered_anim.py
release/scripts/startup/bl_operators/wm.py
release/scripts/startup/bl_ui/__init__.py
release/scripts/startup/bl_ui/properties_data_armature.py
release/scripts/startup/bl_ui/properties_data_bone.py
release/scripts/startup/bl_ui/properties_data_modifier.py
release/scripts/startup/bl_ui/properties_object.py
release/scripts/startup/bl_ui/properties_particle.py
release/scripts/startup/bl_ui/properties_physics_cloth.py
release/scripts/startup/bl_ui/properties_physics_common.py
release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
release/scripts/startup/bl_ui/properties_physics_field.py
release/scripts/startup/bl_ui/properties_physics_smoke.py
release/scripts/startup/bl_ui/properties_physics_softbody.py
release/scripts/startup/bl_ui/properties_render.py
release/scripts/startup/bl_ui/properties_texture.py
release/scripts/startup/bl_ui/space_clip.py
release/scripts/startup/bl_ui/space_console.py
release/scripts/startup/bl_ui/space_userpref.py
release/scripts/startup/bl_ui/space_userpref_keymap.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
release/scripts/startup/keyingsets_builtins.py

index 33d3be63b0bbe5e8e2c59dfd42f178bc795e191f..cf545840b6fd4c95dfd58140ec48500ff339c8ac 100644 (file)
@@ -298,7 +298,7 @@ def dump_messages_pytext(messages, check_ctxt):
         # check it has a 'text' argument
         for (arg_pos, (arg_kw, arg)) in enumerate(func.parameters.items()):
             if ((arg_kw in translate_kw) and
-                (arg.is_output == False) and
+                (arg.is_output is False) and
                 (arg.type == 'STRING')):
 
                 func_translate_args.setdefault(func_id, []).append((arg_kw,
index 41fe052c434b36eabdc73d832b974521dcf72d65..d32b69b501cfb49b455a1618bb81098fc7dc7c14 100644 (file)
@@ -264,8 +264,8 @@ def module_names(path, recursive=False):
                 if recursive:
                     for mod_name, mod_path in module_names(directory, True):
                         modules.append(("%s.%s" % (filename, mod_name),
-                                       mod_path,
-                                       ))
+                                        mod_path,
+                                        ))
 
     return modules
 
index ad0fe06b68b5b284ff0366284197ad9374d159e9..ad3cf8c08ec7076c2cb17583b67bee6956d00598 100644 (file)
@@ -232,7 +232,7 @@ def edge_loops_from_tessfaces(mesh, tessfaces=None, seams=()):
                 ed_adj = edges[context_loop[-1]]
                 if len(ed_adj) != 2:
                     # the original edge had 2 other edges
-                    if other_dir and flipped == False:
+                    if other_dir and flipped is False:
                         flipped = True  # only flip the list once
                         context_loop.reverse()
                         ed_adj[:] = []
index 9ad9a7affc3c9ebbb2d21a89e3cf5cbfc8ea644f..4cd823d9184e044b526714cc06ad007d167e7003 100644 (file)
@@ -689,10 +689,10 @@ class Menu(StructRNA, _GenericUI, metaclass=RNAMeta):
         files = []
         for directory in searchpaths:
             files.extend([(f, os.path.join(directory, f))
-                           for f in os.listdir(directory)
-                           if (not f.startswith("."))
-                           if ((filter_ext is None) or
-                               (filter_ext(os.path.splitext(f)[1])))
+                          for f in os.listdir(directory)
+                          if (not f.startswith("."))
+                          if ((filter_ext is None) or
+                              (filter_ext(os.path.splitext(f)[1])))
                           ])
 
         files.sort()
index 42d2bf94fbaa99585208db55ba70ecd78215519c..e942006010b706d4ffe8e2a5a91c5ce3e998dbe8 100644 (file)
@@ -160,7 +160,7 @@ if __name__ == "__main__":
     from bpyml_test import *
 
     draw = [
-         ui()[
+        ui()[
             split()[
                 column()[
                     prop(data='context.scene.render', property='use_stamp_time', text='Time'),
index 582a1c6ae14b3c79543088a9cdbac3c47b2dfa11..18d448b764fbc394d1e297b4435b6a7d28da3f5a 100644 (file)
@@ -30,7 +30,7 @@ _BPY_MAIN_OWN = True
 def add_scrollback(text, text_type):
     for l in text.split("\n"):
         bpy.ops.console.scrollback_append(text=l.replace("\t", "    "),
-            type=text_type)
+                                          type=text_type)
 
 
 def replace_help(namespace):
@@ -195,7 +195,7 @@ def execute(context):
 
     # insert a new blank line
     bpy.ops.console.history_append(text="", current_character=0,
-        remove_duplicates=True)
+                                   remove_duplicates=True)
 
     # Insert the output into the editor
     # not quite correct because the order might have changed,
index 8beff24eedb94bdacc3e6515e975db9eda46d11b..42348f453cd8e3b37c99041b1b78c44b6373bdf8 100644 (file)
@@ -26,7 +26,7 @@ language_id = "shell"
 def add_scrollback(text, text_type):
     for l in text.split("\n"):
         bpy.ops.console.scrollback_append(text=l.replace("\t", "    "),
-            type=text_type)
+                                          type=text_type)
 
 
 def shell_run(text):
@@ -57,7 +57,7 @@ def execute(context):
 
     # insert a new blank line
     bpy.ops.console.history_append(text="", current_character=0,
-        remove_duplicates=True)
+                                   remove_duplicates=True)
 
     sc.prompt = os.getcwd() + PROMPT
     return {'FINISHED'}
index 0ef2ac5164d0127ec1d1784d94a028d3ffcabf51..6f4b63fc99a452d8d70566836657072b639456e7 100644 (file)
@@ -249,7 +249,7 @@ class InfoPropertyRNA:
 
     def get_arg_default(self, force=True):
         default = self.default_str
-        if default and (force or self.is_required == False):
+        if default and (force or self.is_required is False):
             return "%s=%s" % (self.identifier, default)
         return self.identifier
 
@@ -493,7 +493,7 @@ def BuildRNAInfo():
 
     # Arrange so classes are always defined in the correct order
     deps_ok = False
-    while deps_ok == False:
+    while deps_ok is False:
         deps_ok = True
         rna_done = set()
 
index 2ea978419b999ca854baa92eee7c8dc7f39ce9f2..fc8e3125228afad8423e74ad335ef918ae429547 100644 (file)
@@ -250,7 +250,7 @@ def xml2rna(root_xml,
                     if value_xml.startswith("#"):
                         # read hexidecimal value as float array
                         value_xml_split = value_xml[1:]
-                        value_xml_coerce = [int(value_xml_split[i:i + 2], 16) / 255  for i in range(0, len(value_xml_split), 2)]
+                        value_xml_coerce = [int(value_xml_split[i:i + 2], 16) / 255 for i in range(0, len(value_xml_split), 2)]
                         del value_xml_split
                     else:
                         value_xml_split = value_xml.split()
index 6c48ae72e4b9994800b33e6ecde15cd2ce0db2b8..7da4d8a480dc4e23fb2e09f9ce1ac7f41f2a6e18 100644 (file)
@@ -49,9 +49,9 @@ def add_torus(major_rad, minor_rad, major_seg, minor_seg):
             angle = 2 * pi * minor_index / minor_seg
 
             vec = quat * Vector((major_rad + (cos(angle) * minor_rad),
-                                0.0,
-                                (sin(angle) * minor_rad),
-                                ))
+                                 0.0,
+                                 (sin(angle) * minor_rad),
+                                 ))
 
             verts.extend(vec[:])
 
@@ -133,7 +133,7 @@ class AddTorus(Operator, object_utils.AddObjectHelper):
             )
 
     def execute(self, context):
-        if self.use_abso == True:
+        if self.use_abso is True:
             extra_helper = (self.abso_major_rad - self.abso_minor_rad) * 0.5
             self.major_radius = self.abso_minor_rad + extra_helper
             self.minor_radius = extra_helper
index c5fc3c50f3f57ac0ca6d3390fd03f12c2887fb31..902c7007fb9c4c6537e5315a93494179703a7781 100644 (file)
@@ -214,7 +214,7 @@ class BakeAction(Operator):
                                         'OBJECT' in self.bake_types,
                                         self.clear_constraints,
                                         True,
-                                 )
+                                        )
 
         if action is None:
             self.report({'INFO'}, "Nothing to bake")
@@ -252,8 +252,8 @@ class ClearUselessActions(Operator):
 
         for action in bpy.data.actions:
             # if only user is "fake" user...
-            if ((self.only_unused is False) or
-                (action.use_fake_user and action.users == 1)):
+            if     ((self.only_unused is False) or
+                    (action.use_fake_user and action.users == 1)):
 
                 # if it has F-Curves, then it's a "action library"
                 # (i.e. walk, wave, jump, etc.)
index c45d2f2e7022e7801693a1691b76596008dcbd96..70967a01d1cb9d09e6e998e1124a311cf3282b7c 100644 (file)
@@ -57,7 +57,7 @@ def CLIP_set_viewport_background(context, all_screens, clip, clip_user):
         space_v3d.show_background_images = True
 
     CLIP_spaces_walk(context, all_screens, 'VIEW_3D', 'VIEW_3D',
-                      set_background, clip, clip_user)
+                     set_background, clip, clip_user)
 
 
 def CLIP_camera_for_clip(context, clip):
@@ -329,7 +329,7 @@ object's movement caused by this constraint"""
 
         if not con:
             self.report({'ERROR'},
-                "Motion Tracking constraint to be converted not found")
+                        "Motion Tracking constraint to be converted not found")
 
             return {'CANCELLED'}
 
@@ -341,7 +341,7 @@ object's movement caused by this constraint"""
 
         if not clip:
             self.report({'ERROR'},
-                "Movie clip to use tracking data from isn't set")
+                        "Movie clip to use tracking data from isn't set")
 
             return {'CANCELLED'}
 
@@ -461,9 +461,9 @@ class CLIP_OT_setup_tracking_scene(Operator):
         scene.camera = camob
 
         camob.matrix_local = (Matrix.Translation((7.481, -6.508, 5.344)) *
-            Matrix.Rotation(0.815, 4, 'Z') *
-            Matrix.Rotation(0.011, 4, 'Y') *
-            Matrix.Rotation(1.109, 4, 'X'))
+                              Matrix.Rotation(0.815, 4, 'Z') *
+                              Matrix.Rotation(0.011, 4, 'Y') *
+                              Matrix.Rotation(1.109, 4, 'X'))
 
         return camob
 
@@ -629,7 +629,7 @@ class CLIP_OT_setup_tracking_scene(Operator):
 
         if need_stabilization:
             tree.links.new(distortion.outputs["Image"],
-                stabilize.inputs["Image"])
+                           stabilize.inputs["Image"])
             tree.links.new(stabilize.outputs["Image"], scale.inputs["Image"])
         else:
             tree.links.new(distortion.outputs["Image"], scale.inputs["Image"])
index fd95da02b289eabd3864972e37a778b1c47d6b15..307165a4d18e8c9daed0cb3bf888853f9cfaa3f3 100644 (file)
@@ -129,6 +129,6 @@ class ConsoleLanguage(Operator):
 
         # insert a new blank line
         bpy.ops.console.history_append(text="", current_character=0,
-            remove_duplicates=True)
+                                       remove_duplicates=True)
 
         return {'FINISHED'}
index 3dc25d84acad552712d6e57071099d4b8fcdfdbf..df21349da4785088232c04942b555616c1500c81 100644 (file)
@@ -92,7 +92,7 @@ class MeshMirrorUV(Operator):
             puvs[i] = tuple(uv.uv for uv in uv_loops[lstart:lend])
             puvs_cpy[i] = tuple(uv.copy() for uv in puvs[i])
             puvsel[i] = (False not in
-                               (uv.select for uv in uv_loops[lstart:lend]))
+                         (uv.select for uv in uv_loops[lstart:lend]))
             # Vert idx of the poly.
             vidxs[i] = tuple(l.vertex_index for l in loops[lstart:lend])
             # As we have no poly.center yet...
index 5000d7181823406a024877aeca25d6f2004a3de2..4e90f2e858528c07a4e9f80b6ae7e5e280e64de1 100644 (file)
@@ -408,13 +408,13 @@ class ShapeTransfer(Operator):
                     n2loc_to = v2_to + target_normals[i2] * edlen_to
 
                     pt = barycentric_transform(orig_shape_coords[i1],
-                        v2, v1, n1loc,
-                        v2_to, v1_to, n1loc_to)
+                                               v2, v1, n1loc,
+                                               v2_to, v1_to, n1loc_to)
                     median_coords[i1].append(pt)
 
                     pt = barycentric_transform(orig_shape_coords[i2],
-                        v1, v2, n2loc,
-                        v1_to, v2_to, n2loc_to)
+                                               v1, v2, n2loc,
+                                               v1_to, v2_to, n2loc_to)
                     median_coords[i2].append(pt)
 
             # apply the offsets to the new shape
@@ -507,7 +507,7 @@ class JoinUVs(Operator):
                 if obj_other != obj and obj_other.type == 'MESH':
                     mesh_other = obj_other.data
                     if mesh_other != mesh:
-                        if mesh_other.tag == False:
+                        if mesh_other.tag is False:
                             mesh_other.tag = True
 
                             if len(mesh_other.loops) != nbr_loops:
@@ -520,7 +520,7 @@ class JoinUVs(Operator):
                                                len(mesh_other.polygons),
                                                nbr_loops,
                                                ),
-                                           )
+                                            )
                             else:
                                 uv_other = mesh_other.uv_layers.active
                                 if not uv_other:
index 32658d353d952fdb0864fed36ebd69bc611a96dd..694412e51d7a7adbdeda6d0336af1f73f908fdfc 100644 (file)
@@ -89,7 +89,7 @@ class PlayRenderedAnim(Operator):
         if player_path == "":
             player_path = guess_player_path(preset)
 
-        if is_movie == False and preset in {'FRAMECYCLER', 'RV', 'MPLAYER'}:
+        if is_movie is False and preset in {'FRAMECYCLER', 'RV', 'MPLAYER'}:
             # replace the number with '#'
             file_a = rd.frame_path(frame=0)
 
index 21843d807429fad07f368aadd5adb6e593b7219e..eac90a8b09130a390885d09ad96026b75b5122fd 100644 (file)
@@ -608,9 +608,9 @@ class WM_OT_context_collection_boolean_set(Operator):
             except:
                 continue
 
-            if value_orig == True:
+            if value_orig is True:
                 is_set = True
-            elif value_orig == False:
+            elif value_orig is False:
                 pass
             else:
                 self.report({'WARNING'}, "Non boolean value found: %s[ ].%s" %
@@ -1583,7 +1583,7 @@ class WM_OT_addon_enable(Operator):
                                           "version %d.%d.%d and might not "
                                           "function (correctly), "
                                           "though it is enabled") %
-                                         info_ver)
+                                          info_ver)
             return {'FINISHED'}
         else:
             return {'CANCELLED'}
index 847807029facd8a621392d1907f2c4365b356f04..09d866c2ae583101c5b8105b46f21e31c2fcd9cf 100644 (file)
@@ -95,7 +95,7 @@ def register():
         items = [('All', "All", ""),
                  ('Enabled', "Enabled", ""),
                  ('Disabled', "Disabled", ""),
-                ]
+                 ]
 
         items_unique = set()
 
@@ -120,7 +120,7 @@ def register():
             items=[('OFFICIAL', "Official", "Officially supported"),
                    ('COMMUNITY', "Community", "Maintained by community developers"),
                    ('TESTING', "Testing", "Newly contributed scripts (excluded from release builds)"),
-                  ],
+                   ],
             name="Support",
             description="Display support level",
             default={'OFFICIAL', 'COMMUNITY'},
index e194d7a13703ac2f3d96a3322b3e8f83e91c3fe1..50c34be141404cdcff15f7b44ce81344fd538b9b 100644 (file)
@@ -285,10 +285,9 @@ class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, Panel):
                 row.prop(itasc, "damping_max", text="Damp", slider=True)
                 row.prop(itasc, "damping_epsilon", text="Eps", slider=True)
 
-from bl_ui.properties_animviz import (
-    MotionPathButtonsPanel,
-    OnionSkinButtonsPanel,
-    )
+from bl_ui.properties_animviz import (MotionPathButtonsPanel,
+                                      OnionSkinButtonsPanel,
+                                      )
 
 
 class DATA_PT_motion_paths(MotionPathButtonsPanel, Panel):
index e6d9affee935111a252efe128caa60b91bc485cf..1e70483864ca2f5ed885913dc46c0a31f038d7f9 100644 (file)
@@ -251,52 +251,52 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel, Panel):
         split.active = pchan.is_in_ik_chain
         row = split.row()
         row.prop(pchan, "ik_stiffness_x", text="Stiffness", slider=True)
-        row.active = pchan.lock_ik_x == False and pchan.is_in_ik_chain
+        row.active = pchan.lock_ik_x is False and pchan.is_in_ik_chain
 
         split = layout.split(percentage=0.25)
         sub = split.row()
 
         sub.prop(pchan, "use_ik_limit_x", text="Limit")
-        sub.active = pchan.lock_ik_x == False and pchan.is_in_ik_chain
+        sub.active = pchan.lock_ik_x is False and pchan.is_in_ik_chain
         sub = split.row(align=True)
         sub.prop(pchan, "ik_min_x", text="")
         sub.prop(pchan, "ik_max_x", text="")
-        sub.active = pchan.lock_ik_x == False and pchan.use_ik_limit_x and pchan.is_in_ik_chain
+        sub.active = pchan.lock_ik_x is False and pchan.use_ik_limit_x and pchan.is_in_ik_chain
 
         split = layout.split(percentage=0.25)
         split.prop(pchan, "lock_ik_y", icon='LOCKED' if pchan.lock_ik_y else 'UNLOCKED', text="Y")
         split.active = pchan.is_in_ik_chain
         row = split.row()
         row.prop(pchan, "ik_stiffness_y", text="Stiffness", slider=True)
-        row.active = pchan.lock_ik_y == False and pchan.is_in_ik_chain
+        row.active = pchan.lock_ik_y is False and pchan.is_in_ik_chain
 
         split = layout.split(percentage=0.25)
         sub = split.row()
 
         sub.prop(pchan, "use_ik_limit_y", text="Limit")
-        sub.active = pchan.lock_ik_y == False and pchan.is_in_ik_chain
+        sub.active = pchan.lock_ik_y is False and pchan.is_in_ik_chain
 
         sub = split.row(align=True)
         sub.prop(pchan, "ik_min_y", text="")
         sub.prop(pchan, "ik_max_y", text="")
-        sub.active = pchan.lock_ik_y == False and pchan.use_ik_limit_y and pchan.is_in_ik_chain
+        sub.active = pchan.lock_ik_y is False and pchan.use_ik_limit_y and pchan.is_in_ik_chain
 
         split = layout.split(percentage=0.25)
         split.prop(pchan, "lock_ik_z", icon='LOCKED' if pchan.lock_ik_z else 'UNLOCKED', text="Z")
         split.active = pchan.is_in_ik_chain
         sub = split.row()
         sub.prop(pchan, "ik_stiffness_z", text="Stiffness", slider=True)
-        sub.active = pchan.lock_ik_z == False and pchan.is_in_ik_chain
+        sub.active = pchan.lock_ik_z is False and pchan.is_in_ik_chain
 
         split = layout.split(percentage=0.25)
         sub = split.row()
 
         sub.prop(pchan, "use_ik_limit_z", text="Limit")
-        sub.active = pchan.lock_ik_z == False and pchan.is_in_ik_chain
+        sub.active = pchan.lock_ik_z is False and pchan.is_in_ik_chain
         sub = split.row(align=True)
         sub.prop(pchan, "ik_min_z", text="")
         sub.prop(pchan, "ik_max_z", text="")
-        sub.active = pchan.lock_ik_z == False and pchan.use_ik_limit_z and pchan.is_in_ik_chain
+        sub.active = pchan.lock_ik_z is False and pchan.use_ik_limit_z and pchan.is_in_ik_chain
 
         split = layout.split(percentage=0.25)
         split.label(text="Stretch:")
index ed390be49f5aea07449c33fd925e4aa5783ae333..0398cb36b189a51d717c8dd902f200879233bfed 100644 (file)
@@ -397,7 +397,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
 
         col = layout.column()
 
-        if md.use_mirror_merge == True:
+        if md.use_mirror_merge is True:
             col.prop(md, "merge_threshold")
         col.label(text="Mirror Object:")
         col.prop(md, "mirror_object", text="")
@@ -559,7 +559,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
 
         col = split.column()
         row = col.row()
-        row.active = (md.object is None or md.use_object_screw_offset == False)
+        row.active = (md.object is None or md.use_object_screw_offset is False)
         row.prop(md, "screw_offset")
         row = col.row()
         row.active = (md.object is not None)
index f2c631b7ab1f5dfb4d4809f982d65cf9bebc3aa6..8a668b5d95b55b7abaae5a715d231085a525edf1 100644 (file)
@@ -290,10 +290,8 @@ class OBJECT_PT_relations_extras(ObjectButtonsPanel, Panel):
         row.prop(ob, "slow_parent_offset", text="Offset")
 
 
-from bl_ui.properties_animviz import (
-    MotionPathButtonsPanel,
-    OnionSkinButtonsPanel,
-    )
+from bl_ui.properties_animviz import (MotionPathButtonsPanel,
+                                      OnionSkinButtonsPanel)
 
 
 class OBJECT_PT_motion_paths(MotionPathButtonsPanel, Panel):
index aa0ea1d2d9ef24cb092d5b9a7c0a4fc9236c395e..f29589faa2df686062d300955e8a28c501d5aa42 100644 (file)
@@ -21,12 +21,11 @@ import bpy
 from bpy.types import Panel
 from rna_prop_ui import PropertyPanel
 
-from bl_ui.properties_physics_common import (
-    point_cache_ui,
-    effector_weights_ui,
-    basic_force_field_settings_ui,
-    basic_force_field_falloff_ui,
-    )
+from bl_ui.properties_physics_common import (point_cache_ui,
+                                             effector_weights_ui,
+                                             basic_force_field_settings_ui,
+                                             basic_force_field_falloff_ui,
+                                             )
 
 
 def particle_panel_enabled(context, psys):
@@ -52,7 +51,7 @@ def particle_panel_poll(cls, context):
     if not settings:
         return False
 
-    return settings.is_fluid == False and (engine in cls.COMPAT_ENGINES)
+    return settings.is_fluid is False and (engine in cls.COMPAT_ENGINES)
 
 
 def particle_get_settings(context):
@@ -133,13 +132,13 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
             split = layout.split(percentage=0.32)
             col = split.column()
             col.label(text="Name:")
-            if part.is_fluid == False:
+            if part.is_fluid is False:
                 col.label(text="Settings:")
                 col.label(text="Type:")
 
             col = split.column()
             col.prop(psys, "name", text="")
-            if part.is_fluid == False:
+            if part.is_fluid is False:
                 row = col.row()
                 row.enabled = particle_panel_enabled(context, psys)
                 row.template_ID(psys, "settings", new="particle.new")
@@ -279,7 +278,7 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
 
         cloth = psys.cloth.settings
 
-        layout.enabled = psys.use_hair_dynamics and psys.point_cache.is_baked == False
+        layout.enabled = psys.use_hair_dynamics and psys.point_cache.is_baked is False
 
         split = layout.split()
 
@@ -813,7 +812,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
             sub.active = (part.use_strand_primitive is False)
             sub.prop(part, "use_render_adaptive")
             sub = col.column()
-            sub.active = part.use_render_adaptive or part.use_strand_primitive == True
+            sub.active = part.use_render_adaptive or part.use_strand_primitive is True
             sub.prop(part, "adaptive_angle")
             sub = col.column()
             sub.active = (part.use_render_adaptive is True and part.use_strand_primitive is False)
@@ -831,9 +830,9 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
             row = layout.row()
             col = row.column()
 
-            if part.type == 'HAIR' and part.use_strand_primitive == True and part.child_type == 'INTERPOLATED':
+            if part.type == 'HAIR' and part.use_strand_primitive is True and part.child_type == 'INTERPOLATED':
                 layout.prop(part, "use_simplify")
-                if part.use_simplify == True:
+                if part.use_simplify is True:
                     row = layout.row()
                     row.prop(part, "simplify_refsize")
                     row.prop(part, "simplify_rate")
@@ -841,7 +840,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
                     row = layout.row()
                     row.prop(part, "use_simplify_viewport")
                     sub = row.row()
-                    sub.active = part.use_simplify_viewport == True
+                    sub.active = part.use_simplify_viewport is True
                     sub.prop(part, "simplify_viewport")
 
         elif part.render_type == 'OBJECT':
@@ -988,11 +987,11 @@ class PARTICLE_PT_draw(ParticleButtonsPanel, Panel):
 
         if part.draw_percentage != 100 and psys is not None:
             if part.type == 'HAIR':
-                if psys.use_hair_dynamics and psys.point_cache.is_baked == False:
+                if psys.use_hair_dynamics and psys.point_cache.is_baked is False:
                     layout.row().label(text="Display percentage makes dynamics inaccurate without baking!")
             else:
                 phystype = part.physics_type
-                if phystype != 'NO' and phystype != 'KEYED' and psys.point_cache.is_baked == False:
+                if phystype != 'NO' and phystype != 'KEYED' and psys.point_cache.is_baked is False:
                     layout.row().label(text="Display percentage makes dynamics inaccurate without baking!")
 
         row = layout.row()
index 33b977b5f04f2591f47b621710d190e39c074615..e5db1eec37ed8e0bf8669b72c2999b39636fce82 100644 (file)
 import bpy
 from bpy.types import Menu, Panel
 
-from bl_ui.properties_physics_common import (
-    point_cache_ui,
-    effector_weights_ui,
-    )
+from bl_ui.properties_physics_common import (point_cache_ui,
+                                             effector_weights_ui)
 
 
 def cloth_panel_enabled(md):
@@ -178,7 +176,7 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel):
         ob = context.object
         cloth = context.cloth.settings
 
-        layout.active = cloth.use_stiffness_scale      and cloth_panel_enabled(md)
+        layout.active = (cloth.use_stiffness_scale and cloth_panel_enabled(md))
 
         split = layout.split()
 
index 7f824d94431eaae41767090030b624220e20f2aa..00a35b233dad575284cf570d56cd7e196c2bc60e 100644 (file)
@@ -160,7 +160,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
 
         col = split.column()
 
-        if cache.is_baked == True:
+        if cache.is_baked is True:
             col.operator("ptcache.free_bake", text="Free Bake")
         else:
             col.operator("ptcache.bake", text="Bake").bake = True
index db0794d8a8a1009b157ad8616060973b8f207c47..fa37e9cd10f7992b0b7609524ca33b0e55f83870 100644 (file)
 import bpy
 from bpy.types import Panel
 
-from bl_ui.properties_physics_common import (
-    point_cache_ui,
-    effector_weights_ui,
-    )
+from bl_ui.properties_physics_common import (point_cache_ui,
+                                             effector_weights_ui,
+                                             )
 
 
 class PhysicButtonsPanel():
index 569037cb0da0233c64e07b204680502d8212c5a2..6b5612d78365664a116717af9e0c94428bdcbe85 100644 (file)
 import bpy
 from bpy.types import Panel
 
-from bl_ui.properties_physics_common import (
-    basic_force_field_settings_ui,
-    basic_force_field_falloff_ui,
-    )
+from bl_ui.properties_physics_common import (basic_force_field_settings_ui,
+                                             basic_force_field_falloff_ui,
+                                             )
 
 
 class PhysicButtonsPanel():
index 1b333f1e505e93090b5aace47d72ecf58ca5569c..acbaad4f9610beb9f55e64f40e7f27e79b30e4ee 100644 (file)
 import bpy
 from bpy.types import Panel
 
-from bl_ui.properties_physics_common import (
-    point_cache_ui,
-    effector_weights_ui,
-    )
+from bl_ui.properties_physics_common import (point_cache_ui,
+                                             effector_weights_ui)
 
 
 class PhysicButtonsPanel():
index b043c1f9b68825eba155792e81e76f7a3b6b3b1e..a69e7955de54ab6c8fde1032a51bf7a30fc8cb1f 100644 (file)
 import bpy
 from bpy.types import Panel
 
-from bl_ui.properties_physics_common import (
-    point_cache_ui,
-    effector_weights_ui,
-    )
+from bl_ui.properties_physics_common import (point_cache_ui,
+                                             effector_weights_ui)
 
 
 def softbody_panel_enabled(md):
index 74f4c719cd5c5c267b5f24542829b321b33d03f4..544462e124246203d4fdcac9498d3556d6b93601 100644 (file)
@@ -225,7 +225,7 @@ class RENDER_PT_dimensions(RenderButtonsPanel, Panel):
         # TODO: Change the following to iterate over existing presets
         custom_framerate = (fps_rate not in {23.98, 24, 25, 29.97, 30, 50, 59.94, 60})
 
-        if custom_framerate == True:
+        if custom_framerate is True:
             fps_label_text = "Custom (" + str(fps_rate) + " fps)"
         else:
             fps_label_text = str(fps_rate) + " fps"
index 46a17675c91e9915379f517acf78915d3717fb36..9e6bfe6889edb883e8c9b3fd9187ecc2dad15571 100644 (file)
@@ -111,8 +111,14 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, Panel):
         engine = context.scene.render.engine
         if not (hasattr(context, "texture_slot") or hasattr(context, "texture_node")):
             return False
-        return ((context.material or context.world or context.lamp or context.brush or context.texture or context.particle_system or isinstance(context.space_data.pin_id, ParticleSettings))
-            and (engine in cls.COMPAT_ENGINES))
+        return ((context.material or
+                 context.world or
+                 context.lamp or
+                 context.brush or
+                 context.texture or
+                 context.particle_system or
+                 isinstance(context.space_data.pin_id, ParticleSettings)) and
+                (engine in cls.COMPAT_ENGINES))
 
     def draw(self, context):
         layout = self.layout
index b0e8a847084f0ff58dfef43792ea696c109e1678..7732a0c6400f3574ab022b2bbaa75586494f5b72 100644 (file)
@@ -942,7 +942,7 @@ class CLIP_MT_track(Menu):
         props.action = 'UPTO'
 
         props = layout.operator("clip.clear_track_path",
-            text="Clear Track Path")
+                                text="Clear Track Path")
         props.action = 'ALL'
 
         layout.separator()
@@ -957,7 +957,7 @@ class CLIP_MT_track(Menu):
 
         layout.separator()
         props = layout.operator("clip.track_markers",
-            text="Track Frame Backwards")
+                                text="Track Frame Backwards")
         props.backwards = True
 
         props = layout.operator("clip.track_markers", text="Track Backwards")
index 7ded4954f80ef6c3d9b6b830288bdaaf1276186e..5ff179902a3dee2f7e51b8b0fe51e914afb4fb27 100644 (file)
@@ -86,7 +86,7 @@ class CONSOLE_MT_language(Menu):
 def add_scrollback(text, text_type):
     for l in text.split("\n"):
         bpy.ops.console.scrollback_append(text=l.replace('\t', '    '),
-            type=text_type)
+                                          type=text_type)
 
 if __name__ == "__main__":  # only for live edit.
     bpy.utils.register_module(__name__)
index 64bf1e2934841a13bb4c74072a7f129ef68d75de..0c3c0e5a6963013a29f47dc23861a93c8ff8c8f9 100644 (file)
@@ -1084,10 +1084,10 @@ class USERPREF_PT_addons(Panel):
                 continue
 
             # check if addon should be visible with current filters
-            if ((filter == "All") or
-                (filter == info["category"]) or
-                (filter == "Enabled" and is_enabled) or
-                (filter == "Disabled" and not is_enabled)):
+            if     ((filter == "All") or
+                    (filter == info["category"]) or
+                    (filter == "Enabled" and is_enabled) or
+                    (filter == "Disabled" and not is_enabled)):
 
                 if search and search not in info["name"].lower():
                     if info["author"]:
index 6646da4a91a7d4f369483df3c6c934bd110e6c61..da498268b9bb2777003d46ba59682295c9d8682c 100644 (file)
@@ -218,8 +218,8 @@ class InputKeyMapPanel:
             layout.context_pointer_set("keymap", km)
 
             filtered_items = [kmi for kmi in km.keymap_items
-                              if filter_text in kmi.idname.lower() or
-                                 filter_text in kmi.name.lower()]
+                              if (filter_text in kmi.idname.lower() or
+                                  filter_text in kmi.name.lower())]
 
             if filtered_items:
                 col = layout.column()
index a77c5818fca342aa661d25033ffb8e954b18c6d8..a21d852715898120982c7b33b1c72b408be149fa 100644 (file)
@@ -223,8 +223,8 @@ class VIEW3D_MT_transform_armature(VIEW3D_MT_transform_base):
         layout.separator()
 
         obj = context.object
-        if (obj.type == 'ARMATURE' and obj.mode in {'EDIT', 'POSE'} and
-            obj.data.draw_type in {'BBONE', 'ENVELOPE'}):
+        if     (obj.type == 'ARMATURE' and obj.mode in {'EDIT', 'POSE'} and
+                obj.data.draw_type in {'BBONE', 'ENVELOPE'}):
             layout.operator("transform.transform", text="Scale Envelope/BBone").mode = 'BONE_SIZE'
 
         if context.edit_object and context.edit_object.type == 'ARMATURE':
@@ -580,7 +580,7 @@ class VIEW3D_MT_select_edit_mesh(Menu):
         layout.separator()
 
         layout.operator("mesh.select_by_number_vertices", text="By Number of Verts")
-        if context.scene.tool_settings.mesh_select_mode[2] == False:
+        if context.scene.tool_settings.mesh_select_mode[2] is False:
             layout.operator("mesh.select_non_manifold", text="Non Manifold")
         layout.operator("mesh.select_loose_verts", text="Loose Verts/Edges")
         layout.operator_menu_enum("mesh.select_similar", "type", text="Similar")
@@ -2282,7 +2282,7 @@ class VIEW3D_PT_view3d_properties(Panel):
             if lock_object.type == 'ARMATURE':
                 col.prop_search(view, "lock_bone", lock_object.data,
                                 "edit_bones" if lock_object.mode == 'EDIT'
-                                             else "bones",
+                                else "bones",
                                 text="")
         else:
             col.prop(view, "lock_cursor", text="Lock to Cursor")
index 1b67b30d17a5cfd1642c7bee07aaebbc6e2cbbf8..0d939b2de780b57023bcf00995ff724362632af0 100644 (file)
@@ -520,8 +520,8 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
             row = col.row(align=True)
 
             ups = toolsettings.unified_paint_settings
-            if ((ups.use_unified_size and ups.use_locked_size) or
-                ((not ups.use_unified_size) and brush.use_locked_size)):
+            if     ((ups.use_unified_size and ups.use_locked_size) or
+                    ((not ups.use_unified_size) and brush.use_locked_size)):
                 self.prop_unified_size(row, context, brush, "use_locked_size", icon='LOCKED')
                 self.prop_unified_size(row, context, brush, "unprojected_radius", slider=True, text="Radius")
             else:
@@ -707,8 +707,8 @@ class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel):
     @classmethod
     def poll(cls, context):
         settings = cls.paint_settings(context)
-        return (settings and settings.brush and (context.sculpt_object or
-                             context.image_paint_object))
+        return (settings and settings.brush and
+                (context.sculpt_object or context.image_paint_object))
 
     def draw(self, context):
         layout = self.layout
@@ -747,10 +747,12 @@ class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
     @classmethod
     def poll(cls, context):
         settings = cls.paint_settings(context)
-        return (settings and settings.brush and (context.sculpt_object or
-                             context.vertex_paint_object or
-                             context.weight_paint_object or
-                             context.image_paint_object))
+        return (settings and
+                settings.brush and
+                (context.sculpt_object or
+                 context.vertex_paint_object or
+                 context.weight_paint_object or
+                 context.image_paint_object))
 
     def draw(self, context):
         layout = self.layout
index b7693880f9c04deaf8e06cb98259f93520ae60f4..6ad873757383c91e7e4a7a7f74408f04b18ec05b 100644 (file)
@@ -360,10 +360,10 @@ class BUILTIN_KSI_WholeCharacter(KeyingSetInfo):
         # add rotation properties if they will
         if bone.lock_rotations_4d:
             # can check individually
-            if (bone.lock_rotation == (False, False, False)) and (bone.lock_rotation_w == False):
+            if (bone.lock_rotation == (False, False, False)) and (bone.lock_rotation_w is False):
                 ksi.addProp(ks, bone, prop)
             else:
-                if bone.lock_rotation_w == False:
+                if bone.lock_rotation_w is False:
                     ksi.addProp(ks, bone, prop, 0)  # w = 0
 
                 for i in range(3):