Animation Editors: Name-based filtering

I'm finally yielding to months of feature requesting, and adding
support for filtering F-Curves by name, where the "name" here is the
text which is displayed for each F-Curve in the Animation Editor
channel lists.

To use, just enable the magnifying-glass toggle on the DopeSheet
filtering settings, and enter a snippet of text to find within the
names of channels you wish to filter. This is case insensitive, and
currently doesn't support any wildcard/regrex fanciness.

Some examples:
loc  <--- location curves only
x loc <--- x location curves only
x eul <--- x rotation curves only
rot <--- rotation curves only
etc.
This commit is contained in:
Joshua Leung
2011-04-01 12:21:41 +00:00
parent 94ec34fb04
commit 2bd22ec559
4 changed files with 102 additions and 45 deletions

View 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 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:
if not genericFiltersOnly:
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_transforms", 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="")
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="")
#######################################