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>2012-08-08 17:55:30 +0400
committerJoshua Leung <aligorith@gmail.com>2012-08-08 17:55:30 +0400
commit73c191b53483530a3acc3f7a9eefda0e161bd9c2 (patch)
treeeabc64bee7399d924a7a9dee8f3a1dad2f939ff5 /source/blender/editors/animation
parent69095a65d91d2f6f89c28455232e0d31c33093e4 (diff)
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.
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index 9cd2b29afa6..c10579d2d30 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -287,10 +287,10 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, short datatype, s
{
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 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, short datatype, s
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 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
}
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 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
/* 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 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
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 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
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 int animchannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent *
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 @@ static void ANIM_OT_channels_click(wmOperatorType *ot)
/* 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);
}
/* ************************************************************************** */