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>2010-06-17 19:28:40 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-06-17 19:28:40 +0400
commite41e1383012a3c8861979e01d8d63361593051f6 (patch)
tree771ce5755f7dd3ea76da049cdabef73f9a31964a /source/blender/editors/animation
parent1cb7dc55b40ab5270502ac76ed81887bc227ae02 (diff)
rather then naming new actions "Action", use the id name with an action prefix.
avoids having 100's of Action.XXX in a file.
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/keyframing.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 98fcf04a5c1..5089d58883a 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -130,8 +130,11 @@ bAction *verify_adt_action (ID *id, short add)
/* 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;