[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60501] trunk/blender/source/blender/ editors/animation/keyframing.c: Bugfix: All actions created when keyframing now have their "id-root" set appropriately
Joshua Leung
aligorith at gmail.com
Wed Oct 2 14:14:50 CEST 2013
Revision: 60501
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60501
Author: aligorith
Date: 2013-10-02 12:14:50 +0000 (Wed, 02 Oct 2013)
Log Message:
-----------
Bugfix: All actions created when keyframing now have their "id-root" set appropriately
This means that it will no longer be possible to accidentally load a nodetree action in
the Action Editor (object-level actions only), resulting in F-Curves getting
invalidated/disabled.
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 2013-10-02 10:18:43 UTC (rev 60500)
+++ trunk/blender/source/blender/editors/animation/keyframing.c 2013-10-02 12:14:50 UTC (rev 60501)
@@ -141,9 +141,18 @@
/* init action if none available yet */
/* TODO: need some wizardry to handle NLA stuff correct */
if ((adt->action == NULL) && (add)) {
+ /* init action name from name of ID block */
char actname[sizeof(id->name) - 2];
BLI_snprintf(actname, sizeof(actname), "%sAction", id->name + 2);
+
+ /* create action */
adt->action = add_empty_action(G.main, actname);
+
+ /* set ID-type from ID-block that this is going to be assigned to
+ * so that users can't accidentally break actions by assigning them
+ * to the wrong places
+ */
+ adt->action->idroot = GS(id->name);
}
/* return the action */
More information about the Bf-blender-cvs
mailing list