Revision: 19614
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19614
Author: aligorith
Date: 2009-04-09 09:26:49 +0200 (Thu, 09 Apr 2009)
Log Message:
-----------
Animation Editors - Bugfixes:
* Collapse selected channels should now work for most channels. It still
doesn't work for Action Groups for some reason...
* Objects are now deemed to only be selected in Animation Editors if the are
selected (i.e. if they are active but not selected, they are no longer
considered to be selected)
* Outliner updates when scrubbing the TimeLine. As a consequence, anim playback
with an Outliner open is a bit slower now.
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/editors/animation/anim_channels.c
branches/blender2.5/blender/source/blender/editors/animation/anim_filter.c
branches/blender2.5/blender/source/blender/editors/animation/anim_ops.c
branches/blender2.5/blender/source/blender/editors/space_outliner/space_outliner.c
Modified:
branches/blender2.5/blender/source/blender/editors/animation/anim_channels.c
===================================================================
---
branches/blender2.5/blender/source/blender/editors/animation/anim_channels.c
2009-04-09 01:52:29 UTC (rev 19613)
+++
branches/blender2.5/blender/source/blender/editors/animation/anim_channels.c
2009-04-09 07:26:49 UTC (rev 19614)
@@ -100,6 +100,18 @@
else if (smode == ACHANNEL_SETFLAG_ADD) (channel)->flag |=
(sflag); \
else
(channel)->flag &= ~(sflag); \
}
+
+/* set/clear/toggle macro, where the flag is negative
+ * - channel - channel with a 'flag' member that we're setting
+ * - smode - 0=clear, 1=set, 2=toggle
+ * - sflag - bitflag to set
+ */
+#define ACHANNEL_SET_FLAG_NEG(channel, smode, sflag) \
+ { \
+ if (smode == ACHANNEL_SETFLAG_TOGGLE) (channel)->flag ^=
(sflag); \
+ else if (smode == ACHANNEL_SETFLAG_ADD) (channel)->flag &=
~(sflag); \
+ else
(channel)->flag |= (sflag); \
+ }
/* -------------------------- Exposed API -----------------------------------
*/
@@ -716,6 +728,10 @@
/* ------------------- */
+/* macro to be used in setflag_anim_channels */
+#define ASUBCHANNEL_SEL_OK(ale) ( (onlysel == 0) || \
+ ((ale->id) && (GS(ale->id->name)==ID_OB) && (((Object
*)ale->id)->flag & SELECT)) )
+
/* Set/clear a particular flag (setting) for all selected + visible channels
* setting: the setting to modify
* mode: eAnimChannels_SetFlag
@@ -748,6 +764,111 @@
}
}
break;
+
+ case ANIMTYPE_FILLACTD:
+ {
+ bAction *act= (bAction *)ale->data;
+
+ if (ASUBCHANNEL_SEL_OK(ale)) {
+ if (setting == ACHANNEL_SETTING_EXPAND)
{
+ ACHANNEL_SET_FLAG_NEG(act,
mode, ACT_COLLAPSED);
+ }
+ }
+ }
+ break;
+ case ANIMTYPE_FILLDRIVERS:
+ {
+ AnimData *adt= (AnimData *)ale->data;
+
+ if (ASUBCHANNEL_SEL_OK(ale)) {
+ if (setting == ACHANNEL_SETTING_EXPAND)
{
+ ACHANNEL_SET_FLAG_NEG(adt,
mode, ADT_DRIVERS_COLLAPSED);
+ }
+ }
+ }
+ break;
+ case ANIMTYPE_FILLMATD:
+ {
+ Object *ob= (Object *)ale->data;
+
+ // XXX - settings should really be moved out of
ob->nlaflag
+ if ((onlysel == 0) || (ob->flag & SELECT)) {
+ if (setting == ACHANNEL_SETTING_EXPAND)
{
+ if (mode ==
ACHANNEL_SETFLAG_TOGGLE) ob->nlaflag ^= OB_ADS_SHOWMATS;
+ else if (mode ==
ACHANNEL_SETFLAG_ADD) ob->nlaflag |= OB_ADS_SHOWMATS;
+ else
ob->nlaflag &= ~OB_ADS_SHOWMATS;
+ }
+ }
+ }
+ break;
+
+ case ANIMTYPE_DSMAT:
+ {
+ Material *ma= (Material *)ale->data;
+
+ if (ASUBCHANNEL_SEL_OK(ale)) {
+ if (setting == ACHANNEL_SETTING_EXPAND)
{
+ ACHANNEL_SET_FLAG(ma, mode,
MA_DS_EXPAND);
+ }
+ }
+ }
+ break;
+ case ANIMTYPE_DSLAM:
+ {
+ Lamp *la= (Lamp *)ale->data;
+
+ if (ASUBCHANNEL_SEL_OK(ale)) {
+ if (setting == ACHANNEL_SETTING_EXPAND)
{
+ ACHANNEL_SET_FLAG(la, mode,
LA_DS_EXPAND);
+ }
+ }
+ }
+ break;
+ case ANIMTYPE_DSCAM:
+ {
+ Camera *ca= (Camera *)ale->data;
+
+ if (ASUBCHANNEL_SEL_OK(ale)) {
+ if (setting == ACHANNEL_SETTING_EXPAND)
{
+ ACHANNEL_SET_FLAG(ca, mode,
CAM_DS_EXPAND);
+ }
+ }
+ }
+ break;
+ case ANIMTYPE_DSCUR:
+ {
+ Curve *cu= (Curve *)ale->data;
+
+ if (ASUBCHANNEL_SEL_OK(ale)) {
+ if (setting == ACHANNEL_SETTING_EXPAND)
{
+ ACHANNEL_SET_FLAG(cu, mode,
CU_DS_EXPAND);
+ }
+ }
+ }
+ break;
+ case ANIMTYPE_DSSKEY:
+ {
+ Key *key= (Key *)ale->data;
+
+ if (ASUBCHANNEL_SEL_OK(ale)) {
+ if (setting == ACHANNEL_SETTING_EXPAND)
{
+ ACHANNEL_SET_FLAG(key, mode,
KEYBLOCK_DS_EXPAND);
+ }
+ }
+ }
+ break;
+ case ANIMTYPE_DSWOR:
+ {
+ World *wo= (World *)ale->data;
+
+ if (ASUBCHANNEL_SEL_OK(ale)) {
+ if (setting == ACHANNEL_SETTING_EXPAND)
{
+ ACHANNEL_SET_FLAG(wo, mode,
WO_DS_EXPAND);
+ }
+ }
+ }
+ break;
+
case ANIMTYPE_GROUP:
{
bActionGroup *agrp= (bActionGroup *)ale->data;
Modified:
branches/blender2.5/blender/source/blender/editors/animation/anim_filter.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/animation/anim_filter.c
2009-04-09 01:52:29 UTC (rev 19613)
+++ branches/blender2.5/blender/source/blender/editors/animation/anim_filter.c
2009-04-09 07:26:49 UTC (rev 19614)
@@ -869,7 +869,6 @@
static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads,
Base *base, int filter_mode)
{
bAnimListElem *ale=NULL;
- Scene *sce= (Scene *)ads->source;
Object *ob= base->object;
Key *key= ob_get_key(ob);
int items = 0;
@@ -877,7 +876,7 @@
/* add this object as a channel first */
if ((filter_mode & ANIMFILTER_CURVESONLY) == 0) {
/* check if filtering by selection */
- if (ANIMCHANNEL_SELOK( ((base->flag & SELECT) || (base ==
sce->basact)) )) {
+ if ANIMCHANNEL_SELOK((base->flag & SELECT)) {
ale= make_new_animlistelem(base, ANIMTYPE_OBJECT, NULL,
ANIMTYPE_NONE, NULL);
if (ale) {
BLI_addtail(anim_data, ale);
Modified:
branches/blender2.5/blender/source/blender/editors/animation/anim_ops.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/animation/anim_ops.c
2009-04-09 01:52:29 UTC (rev 19613)
+++ branches/blender2.5/blender/source/blender/editors/animation/anim_ops.c
2009-04-09 07:26:49 UTC (rev 19614)
@@ -327,7 +327,7 @@
saction->flag ^= SACTION_DRAWTIME;
}
break;
- case SPACE_IPO: /* IPO Editor */
+ case SPACE_IPO: /* Graph Editor */
{
SpaceIpo *sipo= (SpaceIpo *)CTX_wm_space_data(C);
sipo->flag ^= SIPO_DRAWTIME;
Modified:
branches/blender2.5/blender/source/blender/editors/space_outliner/space_outliner.c
===================================================================
---
branches/blender2.5/blender/source/blender/editors/space_outliner/space_outliner.c
2009-04-09 01:52:29 UTC (rev 19613)
+++
branches/blender2.5/blender/source/blender/editors/space_outliner/space_outliner.c
2009-04-09 07:26:49 UTC (rev 19614)
@@ -120,6 +120,7 @@
case ND_OB_SELECT:
case ND_MODE:
case ND_KEYINGSET:
+ case ND_FRAME:
ED_region_tag_redraw(ar);
break;
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs