Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2011-02-02 01:21:43 +0300
committerJoshua Leung <aligorith@gmail.com>2011-02-02 01:21:43 +0300
commitb8d9d10a65f79373cc742bc95c3784950686b7a5 (patch)
tree43126e51f16cb7b3645c263d5e50b3eaa11dedd3 /release
parentbc36e39c233d61b3dbefedb7fa4f98228d225a94 (diff)
Action Editor UI Tweaks:
While animating, I realised that actually the 'only selected' and 'include hidden' DopeSheet filtering options are also useful in the Action Editor, especially while tweaking the animation for some characters, where you'd like to focus only on some of the character's control (i.e. eyelid tweaks, hand tweaks, etc.). The other DopeSheet filtering options aren't so relevant here, so I've excluded them from this.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/ui/space_dopesheet.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/release/scripts/ui/space_dopesheet.py b/release/scripts/ui/space_dopesheet.py
index bf25c7d9595..718ce0b66d9 100644
--- a/release/scripts/ui/space_dopesheet.py
+++ b/release/scripts/ui/space_dopesheet.py
@@ -25,14 +25,17 @@ import bpy
# DopeSheet Filtering
# used for DopeSheet, NLA, and Graph Editors
-def dopesheet_filter(layout, context):
+def dopesheet_filter(layout, context, genericFiltersOnly=False):
dopesheet = context.space_data.dopesheet
is_nla = context.area.type == 'NLA_EDITOR'
row = layout.row(align=True)
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="")
@@ -110,8 +113,12 @@ class DOPESHEET_HT_header(bpy.types.Header):
if st.mode == 'DOPESHEET':
dopesheet_filter(layout, context)
+ elif st.mode == 'ACTION':
+ # 'genericFiltersOnly' limits the options to only the relevant 'generic' subset of
+ # filters which will work here and are useful (especially for character animation)
+ dopesheet_filter(layout, context, genericFiltersOnly=True)
- elif st.mode in ('ACTION', 'SHAPEKEY'):
+ if st.mode in ('ACTION', 'SHAPEKEY'):
layout.template_ID(st, "action", new="action.new")
# Grease Pencil mode doesn't need snapping, as it's frame-aligned only