diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-04-01 17:47:19 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-04-01 17:47:19 +0400 |
commit | 5524ed9ba2d60331abed47c9df0bc2fcf330b36b (patch) | |
tree | e8380010f140f022b77236af171d97083a294006 /source/blender/editors/animation | |
parent | 1360bb6fb0bf0c5c14235c47bf1399accbcecc6f (diff) | |
parent | 689f3aa174ff795044a4dab719edf60b7b1f5bd3 (diff) |
Merged changes in the trunk up to revision 55700.
Conflicts resolved:
source/blender/editors/mesh/mesh_intern.h
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_channels_defines.c | 8 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_markers.c | 47 |
2 files changed, 35 insertions, 20 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 2dae78ce5eb..4b0a99889b3 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -3368,13 +3368,13 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, bAnimChann break; case ACHANNEL_SETTING_EXPAND: /* expanded triangle */ - //icon = ((enabled)? ICON_TRIA_DOWN : ICON_TRIA_RIGHT); + //icon = ((enabled) ? ICON_TRIA_DOWN : ICON_TRIA_RIGHT); icon = ICON_TRIA_RIGHT; tooltip = TIP_("Make channels grouped under this channel visible"); break; case ACHANNEL_SETTING_SOLO: /* NLA Tracks only */ - //icon = ((enabled)? ICON_LAYER_ACTIVE : ICON_LAYER_USED); + //icon = ((enabled) ? ICON_LAYER_ACTIVE : ICON_LAYER_USED); icon = ICON_LAYER_USED; tooltip = TIP_("NLA Track is the only one evaluated for the AnimData block it belongs to"); break; @@ -3383,13 +3383,13 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, bAnimChann case ACHANNEL_SETTING_PROTECT: /* protected lock */ // TODO: what about when there's no protect needed? - //icon = ((enabled)? ICON_LOCKED : ICON_UNLOCKED); + //icon = ((enabled) ? ICON_LOCKED : ICON_UNLOCKED); icon = ICON_UNLOCKED; tooltip = TIP_("Editability of keyframes for this channel"); break; case ACHANNEL_SETTING_MUTE: /* muted speaker */ - //icon = ((enabled)? ICON_MUTE_IPO_ON : ICON_MUTE_IPO_OFF); + //icon = ((enabled) ? ICON_MUTE_IPO_ON : ICON_MUTE_IPO_OFF); icon = ICON_MUTE_IPO_OFF; if (ale->type == ALE_FCURVE) diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index 205f67cf96a..b4bbb14245d 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -1017,24 +1017,35 @@ static void MARKER_OT_duplicate(wmOperatorType *ot) /* ************************** selection ************************************/ /* select/deselect TimeMarker at current frame */ -static void select_timeline_marker_frame(ListBase *markers, int frame, unsigned char shift) +static void select_timeline_marker_frame(ListBase *markers, int frame, bool extend) { - TimeMarker *marker; - int select = 0; - + TimeMarker *marker, *marker_first = NULL; + + /* support for selection cycling */ for (marker = markers->first; marker; marker = marker->next) { - /* if Shift is not set, then deselect Markers */ - if (!shift) marker->flag &= ~SELECT; - - /* this way a not-shift select will allways give 1 selected marker */ - if ((marker->frame == frame) && (!select)) { - if (marker->flag & SELECT) - marker->flag &= ~SELECT; - else - marker->flag |= SELECT; - select = 1; + if (marker->frame == frame) { + if (marker->flag & SELECT) { + marker_first = marker->next; + break; + } + } + } + + /* if extend is not set, then deselect markers */ + if (extend == false) { + for (marker = markers->first; marker; marker = marker->next) { + marker->flag &= ~SELECT; + } + } + + LISTBASE_CIRCULAR_FORWARD_BEGIN (markers, marker, marker_first) { + /* this way a not-extend select will allways give 1 selected marker */ + if (marker->frame == frame) { + marker->flag ^= SELECT; + break; } } + LISTBASE_CIRCULAR_FORWARD_END (markers, marker, marker_first); } static int ed_marker_select(bContext *C, const wmEvent *event, bool extend, bool camera) @@ -1121,6 +1132,8 @@ static int ed_marker_select_invoke_wrapper(bContext *C, wmOperator *op, const wm static void MARKER_OT_select(wmOperatorType *ot) { + PropertyRNA *prop; + /* identifiers */ ot->name = "Select Time Marker"; ot->description = "Select time marker(s)"; @@ -1133,9 +1146,11 @@ static void MARKER_OT_select(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection"); + prop = RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection"); + RNA_def_property_flag(prop, PROP_SKIP_SAVE); #ifdef DURIAN_CAMERA_SWITCH - RNA_def_boolean(ot->srna, "camera", 0, "Camera", "Select the camera"); + prop = RNA_def_boolean(ot->srna, "camera", 0, "Camera", "Select the camera"); + RNA_def_property_flag(prop, PROP_SKIP_SAVE); #endif } |