diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-01-05 14:15:57 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-01-05 14:15:57 +0300 |
commit | 288c45db59ff866969240b1c4a735089b5b4abeb (patch) | |
tree | 30958768fee603ff6e879c65a7a6dca17186622e | |
parent | 7ec87612504f25fc2f1873ce19d138edafb14d7a (diff) |
Marker Bugfixes ("Make Links to Scene" operator):
Some tweaks for this operator, found while scanning through the
current state of the markers code. These seem to be correct judging
from the overall direction the code is going in, though the intention
of this operator seems a bit unclear from the naming.
- Fixed potential issue where with only some markers selected (and the
last one selected not being the last marker in the source scene), you
could end up chaining the source and destination marker lists together
improperly.
- Clarified description/error messages...
-rw-r--r-- | source/blender/editors/animation/anim_markers.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index 2f5ad28c8f2..35b163ec5be 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -1076,6 +1076,8 @@ static void MARKER_OT_delete(wmOperatorType *ot) } +/* **************** make links to scene ***************** */ + static int ed_marker_make_links_scene_exec(bContext *C, wmOperator *op) { ListBase *markers= context_get_markers(C); @@ -1088,7 +1090,7 @@ static int ed_marker_make_links_scene_exec(bContext *C, wmOperator *op) } if(scene_to == CTX_data_scene(C)) { - BKE_report(op->reports, RPT_ERROR, "Can't link objects into the same scene"); + BKE_report(op->reports, RPT_ERROR, "Can't re-link markers into the same scene"); return OPERATOR_CANCELLED; } @@ -1096,6 +1098,8 @@ static int ed_marker_make_links_scene_exec(bContext *C, wmOperator *op) for (marker= markers->first; marker; marker= marker->next) { if(marker->flag & SELECT) { marker_new= MEM_dupallocN(marker); + marker_new->prev= marker_new->next = NULL; + BLI_addtail(&scene_to->markers, marker_new); } } @@ -1109,7 +1113,7 @@ static void MARKER_OT_make_links_scene(wmOperatorType *ot) /* identifiers */ ot->name= "Make Links to Scene"; - ot->description= "Link markers to another scene"; + ot->description= "Copy selected markers to another scene"; ot->idname= "MARKER_OT_make_links_scene"; /* api callbacks */ |