quiet warning & minor pep8 edits.
[blender-staging.git] / release / scripts / startup / bl_ui / space_dopesheet.py
index 1ba9a628c1a2b5b40649153898c6c87417709813..930a2029d3213d521b895d1fbfa4a3987a5058c0 100644 (file)
@@ -33,48 +33,52 @@ def dopesheet_filter(layout, context, genericFiltersOnly=False):
     row.prop(dopesheet, "show_only_selected", text="")
     row.prop(dopesheet, "show_hidden", text="")
 
-    if genericFiltersOnly:
-        return
-
-    row = layout.row(align=True)
-    row.prop(dopesheet, "show_transforms", text="")
+    if not genericFiltersOnly:
+        row = layout.row(align=True)
+        row.prop(dopesheet, "show_transforms", text="")
 
-    if is_nla:
-        row.prop(dopesheet, "show_missing_nla", text="")
+        if is_nla:
+            row.prop(dopesheet, "show_missing_nla", text="")
 
-    row = layout.row(align=True)
-    row.prop(dopesheet, "show_scenes", text="")
-    row.prop(dopesheet, "show_worlds", text="")
-    row.prop(dopesheet, "show_nodes", text="")
-
-    if bpy.data.meshes:
-        row.prop(dopesheet, "show_meshes", text="")
-    if bpy.data.shape_keys:
-        row.prop(dopesheet, "show_shapekeys", text="")
-    if bpy.data.materials:
-        row.prop(dopesheet, "show_materials", text="")
-    if bpy.data.lamps:
-        row.prop(dopesheet, "show_lamps", text="")
-    if bpy.data.textures:
-        row.prop(dopesheet, "show_textures", text="")
-    if bpy.data.cameras:
-        row.prop(dopesheet, "show_cameras", text="")
-    if bpy.data.curves:
-        row.prop(dopesheet, "show_curves", text="")
-    if bpy.data.metaballs:
-        row.prop(dopesheet, "show_metaballs", text="")
-    if bpy.data.lattices:
-        row.prop(dopesheet, "show_lattices", text="")
-    if bpy.data.armatures:
-        row.prop(dopesheet, "show_armatures", text="")
-    if bpy.data.particles:
-        row.prop(dopesheet, "show_particles", text="")
-
-    if bpy.data.groups:
         row = layout.row(align=True)
-        row.prop(dopesheet, "show_only_group_objects", text="")
-        if dopesheet.show_only_group_objects:
-            row.prop(dopesheet, "filter_group", text="")
+        row.prop(dopesheet, "show_scenes", text="")
+        row.prop(dopesheet, "show_worlds", text="")
+        row.prop(dopesheet, "show_nodes", text="")
+
+        if bpy.data.meshes:
+            row.prop(dopesheet, "show_meshes", text="")
+        if bpy.data.shape_keys:
+            row.prop(dopesheet, "show_shapekeys", text="")
+        if bpy.data.materials:
+            row.prop(dopesheet, "show_materials", text="")
+        if bpy.data.lamps:
+            row.prop(dopesheet, "show_lamps", text="")
+        if bpy.data.textures:
+            row.prop(dopesheet, "show_textures", text="")
+        if bpy.data.cameras:
+            row.prop(dopesheet, "show_cameras", text="")
+        if bpy.data.curves:
+            row.prop(dopesheet, "show_curves", text="")
+        if bpy.data.metaballs:
+            row.prop(dopesheet, "show_metaballs", text="")
+        if bpy.data.lattices:
+            row.prop(dopesheet, "show_lattices", text="")
+        if bpy.data.armatures:
+            row.prop(dopesheet, "show_armatures", text="")
+        if bpy.data.particles:
+            row.prop(dopesheet, "show_particles", text="")
+
+        if bpy.data.groups:
+            row = layout.row(align=True)
+            row.prop(dopesheet, "show_only_group_objects", text="")
+            if dopesheet.show_only_group_objects:
+                row.prop(dopesheet, "filter_group", text="")
+
+    if not is_nla:
+        row = layout.row(align=True)
+        row.prop(dopesheet, "show_only_matching_fcurves", text="")
+        if dopesheet.show_only_matching_fcurves:
+            row.prop(dopesheet, "filter_fcurve_name", text="")
 
 
 #######################################
@@ -360,3 +364,6 @@ class DOPESHEET_MT_gpencil_frame(bpy.types.Menu):
         #layout.separator()
         #layout.operator("action.copy")
         #layout.operator("action.paste")
+
+if __name__ == "__main__":  # only for live edit.
+    bpy.utils.register_module(__name__)