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>2007-03-12 09:21:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-03-12 09:21:58 +0300
commit021cd4aac3f28f39b39d4e5a4434d17999106f82 (patch)
treebc1c14b8a6d252e208106dda0cee696dfd4e6d98 /source/blender/src/headerbuttons.c
parent268fdb742532860120071c2886ee1811a6ead3b3 (diff)
python api
removed most custom add_*data* wrappers from Main.c removed makeCurrent() from Text.c (was never in a release), use "bpy.texts.active = text" now clamp new image sizes made add_empty_action accept a string rather then a blocktype since the blocktype was only being used to choose one of 3 strings anyway.
Diffstat (limited to 'source/blender/src/headerbuttons.c')
-rw-r--r--source/blender/src/headerbuttons.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/src/headerbuttons.c b/source/blender/src/headerbuttons.c
index 43759b63782..c631fa0e431 100644
--- a/source/blender/src/headerbuttons.c
+++ b/source/blender/src/headerbuttons.c
@@ -942,10 +942,15 @@ void do_global_buttons(unsigned short event)
/* Store current action */
if (!idtest){
- if (act)
+ if (act) {
idtest= (ID *)copy_action(act);
- else
- idtest=(ID *)add_empty_action(ob->type==OB_ARMATURE?ID_PO:ID_OB);
+ } else {
+ if (ID_OB==ob->type) {
+ idtest=(ID *)add_empty_action("ObAction");
+ } else {
+ idtest=(ID *)add_empty_action("Action");
+ }
+ }
idtest->us--;
}