[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29527] trunk/blender/source/blender/ editors/animation/keyframing.c: rather then naming new actions "Action", use the id name with an action prefix.

Campbell Barton ideasman42 at gmail.com
Thu Jun 17 17:28:41 CEST 2010


Revision: 29527
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29527
Author:   campbellbarton
Date:     2010-06-17 17:28:40 +0200 (Thu, 17 Jun 2010)

Log Message:
-----------
rather then naming new actions "Action", use the id name with an action prefix.
avoids having 100's of Action.XXX in a file.

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

Modified: trunk/blender/source/blender/editors/animation/keyframing.c
===================================================================
--- trunk/blender/source/blender/editors/animation/keyframing.c	2010-06-17 14:47:03 UTC (rev 29526)
+++ trunk/blender/source/blender/editors/animation/keyframing.c	2010-06-17 15:28:40 UTC (rev 29527)
@@ -130,8 +130,11 @@
 		
 	/* init action if none available yet */
 	// TODO: need some wizardry to handle NLA stuff correct
-	if ((adt->action == NULL) && (add))
-		adt->action= add_empty_action("Action");
+	if ((adt->action == NULL) && (add)) {
+		char actname[sizeof(id->name)-2];
+		BLI_snprintf(actname, sizeof(actname), "%sAction", id->name+2);
+		adt->action= add_empty_action(actname);
+	}
 		
 	/* return the action */
 	return adt->action;





More information about the Bf-blender-cvs mailing list