diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2003-12-14 04:18:09 +0300 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2003-12-14 04:18:09 +0300 |
commit | 49021f7ec4bfc1313c6cdfeae1f9c32e98cc9cdc (patch) | |
tree | 44e7c4c38bc8c26b5efe0b52b846402589a4ca9a /source/blender/blenkernel/intern/library.c | |
parent | 6653af79142aa929eb3d131f8fced363b2c4b828 (diff) |
BPython - first step for better integration of Python in Blender:
- add a new space: Space Script
- add a new dna struct: Script
- add these two properly everywhere they are meant to
It's not a tiny commit, but most of it is ground work for what is still to be done.
Right now the benefits should be: freeing the Text Editor to be used in a window even while a script w/ gui in "on" and letting more than one currently running script w/ gui be accessible from each window
Some files are added, so some build systems (not autotools) will need updates
Diffstat (limited to 'source/blender/blenkernel/intern/library.c')
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index fb7e6ba8fed..d693148fe94 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -71,6 +71,7 @@ #include "DNA_screen_types.h" #include "DNA_vfont_types.h" #include "DNA_text_types.h" +#include "DNA_script_types.h" #include "DNA_sound_types.h" #include "DNA_group_types.h" #include "DNA_armature_types.h" @@ -86,11 +87,12 @@ #include "BKE_sound.h" #include "BKE_object.h" #include "BKE_screen.h" +#include "BKE_script.h" #include "BKE_mesh.h" #include "BKE_material.h" #include "BKE_curve.h" #include "BKE_mball.h" - #include "BKE_text.h" +#include "BKE_text.h" #include "BKE_texture.h" #include "BKE_scene.h" #include "BKE_image.h" @@ -173,6 +175,8 @@ ListBase *wich_libbase(Main *mainlib, short type) return &(mainlib->vfont); case ID_TXT: return &(mainlib->text); + case ID_SCRIPT: + return &(mainlib->script); case ID_SO: return &(mainlib->sound); case ID_SAMPLE: @@ -225,9 +229,10 @@ int set_listbasepointers(Main *main, ListBase **lb) lb[23]= &(main->group); lb[24]= samples; - lb[25]= 0; - - return 25; + lb[25]= &(main->script); + lb[26]=0; + + return 26; } /* *********** ALLOC AND FREE ***************** @@ -305,6 +310,9 @@ static ID *alloc_libblock_notest(short type) case ID_TXT: id= MEM_callocN(sizeof(Text), "text"); break; + case ID_SCRIPT: + id= MEM_callocN(sizeof(Script), "script"); + break; case ID_SO: id= MEM_callocN(sizeof(bSound), "sound"); break; @@ -450,6 +458,9 @@ void free_libblock(ListBase *lb, void *idv) case ID_TXT: free_text((Text *)id); break; + case ID_SCRIPT: + free_script((Script *)id); + break; case ID_SO: sound_free_sound((bSound *)id); break; |