[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34093] trunk/blender/source/blender/ editors/animation/anim_markers.c: Marker Bugfixes ("Make Links to Scene" operator):

Joshua Leung aligorith at gmail.com
Wed Jan 5 12:15:57 CET 2011


Revision: 34093
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=34093
Author:   aligorith
Date:     2011-01-05 12:15:57 +0100 (Wed, 05 Jan 2011)

Log Message:
-----------
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...

Modified Paths:
--------------
    trunk/blender/source/blender/editors/animation/anim_markers.c

Modified: trunk/blender/source/blender/editors/animation/anim_markers.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_markers.c	2011-01-05 10:54:30 UTC (rev 34092)
+++ trunk/blender/source/blender/editors/animation/anim_markers.c	2011-01-05 11:15:57 UTC (rev 34093)
@@ -1076,6 +1076,8 @@
 	
 }
 
+/* **************** 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 @@
 	}
 
 	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 @@
 	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 @@
 
 	/* 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 */





More information about the Bf-blender-cvs mailing list