[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22492] branches/blender2.5/blender/source /blender/editors/animation: Animation Editors: Visibility Toggles for Datablocks now work
Joshua Leung
aligorith at gmail.com
Sun Aug 16 04:43:09 CEST 2009
Revision: 22492
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22492
Author: aligorith
Date: 2009-08-16 04:43:06 +0200 (Sun, 16 Aug 2009)
Log Message:
-----------
Animation Editors: Visibility Toggles for Datablocks now work
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/editors/animation/anim_channels_defines.c
branches/blender2.5/blender/source/blender/editors/animation/anim_filter.c
Modified: branches/blender2.5/blender/source/blender/editors/animation/anim_channels_defines.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/animation/anim_channels_defines.c 2009-08-16 02:35:44 UTC (rev 22491)
+++ branches/blender2.5/blender/source/blender/editors/animation/anim_channels_defines.c 2009-08-16 02:43:06 UTC (rev 22492)
@@ -1903,10 +1903,6 @@
else
selected= 0;
- /* enable correct blending mode for icons to work... */
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glEnable(GL_BLEND);
-
/* step 1) draw backdrop ........................................... */
if (acf->draw_backdrop)
acf->draw_backdrop(ac, ale, yminc, ymaxc);
@@ -1954,8 +1950,6 @@
}
}
- glDisable(GL_BLEND); /* End of blending with background (text now gets drawn) */
-
/* step 5) draw name ............................................... */
if (acf->name) {
char name[256]; /* hopefully this will be enough! */
@@ -1981,10 +1975,6 @@
// TODO: when drawing sliders, make those draw instead of these toggles if not enough space
if (v2d) {
- /* set blending again, as text drawing may clear it */
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glEnable(GL_BLEND);
-
/* protect... */
if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PROTECT)) {
/* just skip - drawn as widget now */
@@ -1995,8 +1985,6 @@
/* just skip - drawn as widget now */
offset += ICON_WIDTH;
}
-
- glDisable(GL_BLEND); /* End of blending with background */
}
}
@@ -2058,7 +2046,11 @@
case ACHANNEL_SETTING_MUTE: /* muted eye */
//icon= ((enabled)? ICON_MUTE_IPO_ON : ICON_MUTE_IPO_OFF);
icon= ICON_MUTE_IPO_OFF;
- tooltip= "Do channel(s) contribute to result."; // XXX
+
+ if (ale->type == ALE_FCURVE)
+ tooltip= "Does F-Curve contribute to result.";
+ else
+ tooltip= "Do channels contribute to result.";
break;
default:
Modified: branches/blender2.5/blender/source/blender/editors/animation/anim_filter.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/animation/anim_filter.c 2009-08-16 02:35:44 UTC (rev 22491)
+++ branches/blender2.5/blender/source/blender/editors/animation/anim_filter.c 2009-08-16 02:43:06 UTC (rev 22492)
@@ -374,29 +374,31 @@
*/
#define ANIMDATA_FILTER_CASES(id, adtOk, nlaOk, driversOk, keysOk) \
{\
- if (filter_mode & ANIMFILTER_ANIMDATA) {\
- if ((id)->adt) {\
- adtOk\
+ if ((id)->adt) {\
+ if (!(filter_mode & ANIMFILTER_CURVEVISIBLE) || !((id)->adt->flag & ADT_CURVES_NOT_VISIBLE)) {\
+ if (filter_mode & ANIMFILTER_ANIMDATA) {\
+ adtOk\
+ }\
+ else if (ads->filterflag & ADS_FILTER_ONLYNLA) {\
+ if (ANIMDATA_HAS_NLA(id)) {\
+ nlaOk\
+ }\
+ else if (!(ads->filterflag & ADS_FILTER_NLA_NOACT) && ANIMDATA_HAS_KEYS(id)) {\
+ nlaOk\
+ }\
+ }\
+ else if (ads->filterflag & ADS_FILTER_ONLYDRIVERS) {\
+ if (ANIMDATA_HAS_DRIVERS(id)) {\
+ driversOk\
+ }\
+ }\
+ else {\
+ if (ANIMDATA_HAS_KEYS(id)) {\
+ keysOk\
+ }\
+ }\
}\
}\
- else if (ads->filterflag & ADS_FILTER_ONLYNLA) {\
- if (ANIMDATA_HAS_NLA(id)) {\
- nlaOk\
- }\
- else if (!(ads->filterflag & ADS_FILTER_NLA_NOACT) && ANIMDATA_HAS_KEYS(id)) {\
- nlaOk\
- }\
- }\
- else if (ads->filterflag & ADS_FILTER_ONLYDRIVERS) {\
- if (ANIMDATA_HAS_DRIVERS(id)) {\
- driversOk\
- }\
- }\
- else {\
- if (ANIMDATA_HAS_KEYS(id)) {\
- keysOk\
- }\
- }\
}
@@ -1465,6 +1467,14 @@
worOk= !(ads->filterflag & ADS_FILTER_NOWOR);)
}
+ /* if only F-Curves with visible flags set can be shown, check that
+ * datablocks haven't been set to invisible
+ */
+ if (filter_mode & ANIMFILTER_CURVEVISIBLE) {
+ if ((sce->adt) && (sce->adt->flag & ADT_CURVES_NOT_VISIBLE))
+ sceOk= worOk= 0;
+ }
+
/* check if not all bad (i.e. so there is something to show) */
if ( !(!sceOk && !worOk) ) {
/* add scene data to the list of filtered channels */
@@ -1481,7 +1491,7 @@
Key *key= ob_get_key(ob);
short actOk=1, keyOk=1, dataOk=1, matOk=1, partOk=1;
- /* firstly, check if object can be included, by the following fanimors:
+ /* firstly, check if object can be included, by the following factors:
* - if only visible, must check for layer and also viewport visibility
* - if only selected, must check if object is selected
* - there must be animation data to edit
@@ -1495,6 +1505,14 @@
if (ob->restrictflag & OB_RESTRICT_VIEW) continue;
}
+ /* if only F-Curves with visible flags set can be shown, check that
+ * datablock hasn't been set to invisible
+ */
+ if (filter_mode & ANIMFILTER_CURVEVISIBLE) {
+ if ((ob->adt) && (ob->adt->flag & ADT_CURVES_NOT_VISIBLE))
+ continue;
+ }
+
/* additionally, dopesheet filtering also affects what objects to consider */
if (ads->filterflag) {
/* check selection and object type filters */
More information about the Bf-blender-cvs
mailing list