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>2010-02-17 15:03:23 +0300
committerJoshua Leung <aligorith@gmail.com>2010-02-17 15:03:23 +0300
commit779078000603881d20c944dc0f8b101a07f6b751 (patch)
tree6d790e62fbf8631d255303721b6f655b61b13fb9 /source/blender/editors
parent2eeef0ba7b5a0c3f2117ba04ef2accf892418e13 (diff)
Animation Editors: DopeSheet filter for Object-level animation
Added a new option to filter the out Object-level (i.e. transforms, object visibility/settings, and also bone animation) animation data from the channels list. As most of these settings are transforms, I've used the transform manipulator icon and named the RNA setting display_transforms. This is useful when trying to filter out only material animation data for example, as requested by Colin.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/anim_filter.c29
-rw-r--r--source/blender/editors/interface/interface_templates.c17
2 files changed, 23 insertions, 23 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 9f6f76dc3c1..2bd4ab34fa5 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -1667,7 +1667,7 @@ static int animdata_filter_dopesheet_ob (bAnimContext *ac, ListBase *anim_data,
return items;
/* Action, Drivers, or NLA */
- if (ob->adt) {
+ if (ob->adt && !(ads->filterflag & ADS_FILTER_NOOBJ)) {
adt= ob->adt;
ANIMDATA_FILTER_CASES(ob,
{ /* AnimData blocks - do nothing... */ },
@@ -2168,19 +2168,22 @@ static int animdata_filter_dopesheet (bAnimContext *ac, ListBase *anim_data, bDo
/* check filters for datatypes */
/* object */
actOk= 0;
+ if (!(ads->filterflag & ADS_FILTER_NOOBJ)) {
+ ANIMDATA_FILTER_CASES(ob,
+ {
+ /* for the special AnimData blocks only case, we only need to add
+ * the block if it is valid... then other cases just get skipped (hence ok=0)
+ */
+ ANIMDATA_ADD_ANIMDATA(ob);
+ actOk=0;
+ },
+ actOk= 1;,
+ actOk= 1;,
+ actOk= 1;)
+ }
+
keyOk= 0;
- ANIMDATA_FILTER_CASES(ob,
- {
- /* for the special AnimData blocks only case, we only need to add
- * the block if it is valid... then other cases just get skipped (hence ok=0)
- */
- ANIMDATA_ADD_ANIMDATA(ob);
- actOk=0;
- },
- actOk= 1;,
- actOk= 1;,
- actOk= 1;)
- if (key) {
+ if ((key) && !(ads->filterflag & ADS_FILTER_NOSHAPEKEYS)) {
/* shapekeys */
ANIMDATA_FILTER_CASES(key,
{
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index c327d4515d3..6de11e9486e 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -77,26 +77,23 @@ void uiTemplateDopeSheetFilter(uiLayout *layout, bContext *C, PointerRNA *ptr)
ScrArea *sa= CTX_wm_area(C);
uiLayout *row= layout;
short nlaActive= ((sa) && (sa->spacetype==SPACE_NLA));
-
+
/* more 'generic' filtering options */
- if (nlaActive)
- row= uiLayoutRow(layout, 1);
-
+ row= uiLayoutRow(layout, 1);
+
uiItemR(row, "", 0, ptr, "only_selected", 0);
-
+ uiItemR(row, "", 0, ptr, "display_transforms", 0); // xxx: include in another position instead?
+
if (nlaActive)
uiItemR(row, "", 0, ptr, "include_missing_nla", 0);
-
- if (nlaActive)
- row= layout;
-
+
/* datatype based - only available datatypes are shown */
row= uiLayoutRow(layout, 1);
uiItemR(row, "", 0, ptr, "display_scene", 0);
uiItemR(row, "", 0, ptr, "display_world", 0);
uiItemR(row, "", 0, ptr, "display_node", 0);
-
+
if (mainptr && mainptr->mesh.first)
uiItemR(row, "", 0, ptr, "display_mesh", 0);
if (mainptr && mainptr->key.first)