Revision: 20169
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20169
Author: aligorith
Date: 2009-05-12 13:36:33 +0200 (Tue, 12 May 2009)
Log Message:
-----------
Graph Editor Bugfix: Drivers for Materials now get shown
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/editors/animation/anim_filter.c
Modified:
branches/blender2.5/blender/source/blender/editors/animation/anim_filter.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/animation/anim_filter.c
2009-05-12 02:03:47 UTC (rev 20168)
+++ branches/blender2.5/blender/source/blender/editors/animation/anim_filter.c
2009-05-12 11:36:33 UTC (rev 20169)
@@ -754,8 +754,18 @@
Material *ma= give_current_material(ob, a);
/* for now, if no material returned, skip (this shouldn't
confuse the user I hope) */
- if (ELEM3(NULL, ma, ma->adt, ma->adt->action)) continue;
+ if (ELEM(NULL, ma, ma->adt))
+ continue;
+ if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS)==0) {
+ if (ANIMDATA_HAS_KEYS(ma) == 0)
+ continue;
+ }
+ else {
+ if (ANIMDATA_HAS_DRIVERS(ma) == 0)
+ continue;
+ }
+
/* make a temp list elem for this */
ld= MEM_callocN(sizeof(LinkData), "DopeSheet-MaterialCache");
ld->data= ma;
@@ -791,10 +801,16 @@
}
}
- /* add material's F-Curve channels? */
+ /* add material's F-Curve or Driver channels? */
if (FILTER_MAT_OBJD(ma) || (filter_mode &
ANIMFILTER_CURVESONLY)) {
+ if ((ads->filterflag &
ADS_FILTER_ONLYDRIVERS)==0) {
// XXX the 'owner' info here is still
subject to improvement
- items += animdata_filter_action(anim_data,
ma->adt->action, filter_mode, ma, ANIMTYPE_DSMAT, (ID *)ma);
+ items +=
animdata_filter_action(anim_data, ma->adt->action, filter_mode, ma,
ANIMTYPE_DSMAT, (ID *)ma);
+ }
+ else {
+ // need to make the ownertype normal
object here... (maybe type should be a separate one for clarity?)
+ items +=
animdata_filter_fcurves(anim_data, ma->adt->drivers.first, NULL, ma,
ANIMTYPE_DSMAT, filter_mode, (ID *)ma);
+ }
}
}
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs