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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-08-12 04:09:57 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-08-12 04:09:57 +0400
commit44e4c5f8316b34835c7900dc649bf8a1570afc0a (patch)
tree99027196ffd166c78c336126d36c36bbc1621a29 /source/blender/editors/animation/anim_channels_edit.c
parent8a340981be174cae842d339f0458ba6b558330c3 (diff)
parent0682c3f1aefe315df5fe64ba8c814adacbd739e5 (diff)
Merged changes in the trunk up to revision 49797.
Diffstat (limited to 'source/blender/editors/animation/anim_channels_edit.c')
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index 3b0234b5424..ee31276a8c4 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -290,10 +290,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);
}
@@ -364,11 +364,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;
@@ -1934,10 +1934,7 @@ static int animchannels_borderselect_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* get settings from operator */
- rect.xmin = RNA_int_get(op->ptr, "xmin");
- rect.ymin = RNA_int_get(op->ptr, "ymin");
- rect.xmax = RNA_int_get(op->ptr, "xmax");
- rect.ymax = RNA_int_get(op->ptr, "ymax");
+ WM_operator_properties_border_to_rcti(op, &rect);
gesture_mode = RNA_int_get(op->ptr, "gesture_mode");
extend = RNA_boolean_get(op->ptr, "extend");
@@ -2156,7 +2153,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) {
@@ -2247,6 +2244,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);
}
@@ -2324,19 +2323,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 */
@@ -2347,7 +2346,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;
@@ -2412,6 +2411,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";
@@ -2424,9 +2425,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);
}
/* ************************************************************************** */