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:
authorCampbell Barton <ideasman42@gmail.com>2012-02-07 02:21:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-02-07 02:21:41 +0400
commitb0f9d3a8afe9aa6acac2911389d003c327e52e56 (patch)
treef6a94e2660b73bb9eccece3396d60d61bc964f4e /source/blender/editors/animation
parenta36ccba3a8bfcdb9415e0d27735ebd36eec8b16a (diff)
parent297a21c39a9b33337b168b32adf0538b11d56510 (diff)
svn merge ^/trunk/blender -r43918:43934
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/anim_markers.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 216bb8d0e08..79d767be63c 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -439,22 +439,28 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag)
void draw_markers_time(const bContext *C, int flag)
{
ListBase *markers= ED_context_get_markers(C);
- View2D *v2d= UI_view2d_fromcontext(C);
+ View2D *v2d;
TimeMarker *marker;
-
+ Scene *scene;
+
if (markers == NULL)
return;
-
+
+ scene = CTX_data_scene(C);
+ v2d = UI_view2d_fromcontext(C);
+
/* unselected markers are drawn at the first time */
for (marker= markers->first; marker; marker= marker->next) {
- if ((marker->flag & SELECT) == 0)
- draw_marker(v2d, marker, CTX_data_scene(C)->r.cfra, flag);
+ if ((marker->flag & SELECT) == 0) {
+ draw_marker(v2d, marker, scene->r.cfra, flag);
+ }
}
/* selected markers are drawn later */
for (marker= markers->first; marker; marker= marker->next) {
- if (marker->flag & SELECT)
- draw_marker(v2d, marker, CTX_data_scene(C)->r.cfra, flag);
+ if (marker->flag & SELECT) {
+ draw_marker(v2d, marker, scene->r.cfra, flag);
+ }
}
}
@@ -550,7 +556,8 @@ static int ed_marker_add(bContext *C, wmOperator *UNUSED(op))
if (markers == NULL)
return OPERATOR_CANCELLED;
- /* two markers can't be at the same place */
+ /* prefer not having 2 markers at the same place,
+ * though the user can move them to overlap once added */
for (marker= markers->first; marker; marker= marker->next) {
if (marker->frame == frame)
return OPERATOR_CANCELLED;