[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49695] trunk/blender/source/blender/ editors/animation/anim_channels_edit.c: Bugfix [#32250] Dubious selection mode in Dopesheet and Action Editor makes it
Joshua Leung
aligorith at gmail.com
Wed Aug 8 15:55:30 CEST 2012
Revision: 49695
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49695
Author: aligorith
Date: 2012-08-08 13:55:30 +0000 (Wed, 08 Aug 2012)
Log Message:
-----------
Bugfix [#32250] Dubious selection mode in Dopesheet and Action Editor makes it
impossible to delete ungrouped channels
* Active flag wouldn't get cleared off selected Groups and FCurves when clicking
on them again to deselect them
* Disabled property defaults saving for click-handling operator for channels.
While testing the fix for this bug, I noticed that the property-defaults stuff
was leading to selections always defaulting to "extend" once this had been used
once.
Modified Paths:
--------------
trunk/blender/source/blender/editors/animation/anim_channels_edit.c
Modified: trunk/blender/source/blender/editors/animation/anim_channels_edit.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_channels_edit.c 2012-08-08 12:16:46 UTC (rev 49694)
+++ trunk/blender/source/blender/editors/animation/anim_channels_edit.c 2012-08-08 13:55:30 UTC (rev 49695)
@@ -287,10 +287,10 @@
{
Base *base = (Base *)ale->data;
Object *ob = base->object;
-
+
ACHANNEL_SET_FLAG(base, sel, SELECT);
ACHANNEL_SET_FLAG(ob, sel, SELECT);
-
+
if (ob->adt) {
ACHANNEL_SET_FLAG(ob, sel, ADT_UI_SELECTED);
}
@@ -360,11 +360,11 @@
ACHANNEL_SET_FLAG(gpl, sel, GP_LAYER_SELECT);
}
break;
-
+
case ANIMTYPE_MASKLAYER:
{
MaskLayer *masklay = (MaskLayer *)ale->data;
-
+
ACHANNEL_SET_FLAG(masklay, sel, MASK_LAYERFLAG_SELECT);
}
break;
@@ -2152,7 +2152,7 @@
}
else {
Base *b;
-
+
/* deselect all */
/* TODO: should this deselect all other types of channels too? */
for (b = sce->base.first; b; b = b->next) {
@@ -2242,6 +2242,8 @@
/* if group is selected now, make group the 'active' one in the visible list */
if (agrp->flag & AGRP_SELECTED)
ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, agrp, ANIMTYPE_GROUP);
+ else
+ ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, NULL, ANIMTYPE_GROUP);
notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
}
@@ -2319,19 +2321,19 @@
case ANIMTYPE_MASKDATABLOCK:
{
Mask *mask = (Mask *)ale->data;
-
+
/* toggle expand
* - although the triangle widget already allows this, the whole channel can also be used for this purpose
*/
mask->flag ^= MASK_ANIMF_EXPAND;
-
+
notifierFlags |= (ND_ANIMCHAN | NA_EDITED);
}
break;
case ANIMTYPE_MASKLAYER:
{
MaskLayer *masklay = (MaskLayer *)ale->data;
-
+
/* select/deselect */
if (selectmode == SELECT_INVERT) {
/* invert selection status of this layer only */
@@ -2342,7 +2344,7 @@
ANIM_deselect_anim_channels(ac, ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR);
masklay->flag |= MASK_LAYERFLAG_SELECT;
}
-
+
notifierFlags |= (ND_ANIMCHAN | NA_EDITED);
}
break;
@@ -2407,6 +2409,8 @@
static void ANIM_OT_channels_click(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* identifiers */
ot->name = "Mouse Click on Channels";
ot->idname = "ANIM_OT_channels_click";
@@ -2419,9 +2423,13 @@
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- /* id-props */
- RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY
- RNA_def_boolean(ot->srna, "children_only", 0, "Select Children Only", ""); // CTRLKEY|SHIFTKEY
+ /* properties */
+ /* NOTE: don't save settings, otherwise, can end up with some weird behaviour (sticky extend) */
+ prop = RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+
+ prop = RNA_def_boolean(ot->srna, "children_only", 0, "Select Children Only", ""); // CTRLKEY|SHIFTKEY
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
/* ************************************************************************** */
More information about the Bf-blender-cvs
mailing list