remove scriptlinks,
authorCampbell Barton <ideasman42@gmail.com>
Wed, 22 Jul 2009 09:41:41 +0000 (09:41 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 22 Jul 2009 09:41:41 +0000 (09:41 +0000)
they were not working and we have plans for better script integration in 2.5

37 files changed:
source/blender/blenkernel/BKE_object.h
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/exotic.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/screen.c
source/blender/blenkernel/intern/world.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/screen/area.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/space_outliner/outliner.c
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/makesdna/DNA_camera_types.h
source/blender/makesdna/DNA_lamp_types.h
source/blender/makesdna/DNA_material_types.h
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_screen_types.h
source/blender/makesdna/DNA_scriptlink_types.h [deleted file]
source/blender/makesdna/DNA_world_types.h
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_internal.h
source/blender/makesrna/intern/rna_lamp.c
source/blender/makesrna/intern/rna_material.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_scriptlink.c [deleted file]
source/blender/makesrna/intern/rna_world.c
source/blender/python/BPY_extern.h
source/blender/python/intern/bpy_scriptlink.c [deleted file]
source/blender/python/intern/stubs.c
source/blender/windowmanager/intern/wm_files.c

index 3d71193f37a5ea6bb4384a9ddc0a3ec69f42d736..a57529ccf75f917836e0ed38f94be3e058b073d2 100644 (file)
@@ -98,11 +98,6 @@ void object_to_mat4(struct Object *ob, float mat[][4]);
 
 void set_no_parent_ipo(int val);
 
-void disable_where_script(short on);
-int during_script(void);
-void disable_where_scriptlink(short on);
-int during_scriptlink(void);
-
 void where_is_object_time(struct Scene *scene, struct Object *ob, float ctime);
 void where_is_object(struct Scene *scene, struct Object *ob);
 void where_is_object_simul(struct Scene *scene, struct Object *ob);
index d3d21018c1ca7e9fc61474f7b8605bb7bb6618ad..20505356d9569c45db6ce4c2bd8dde972e85a87e 100644 (file)
@@ -387,10 +387,6 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, char *filename)
        /* now tag update flags, to ensure deformers get calculated on redraw */
        DAG_scene_update_flags(CTX_data_scene(C), CTX_data_scene(C)->lay);
        
-       if (G.f & G_DOSCRIPTLINKS) {
-               /* there's an onload scriptlink to execute in screenmain */
-// XXX         mainqenter(ONLOAD_SCRIPT, 1);
-       }
        if (G.sce != filename) /* these are the same at times, should never copy to the same location */
                strcpy(G.sce, filename);
        
index 7e6a652da6b3bb8d9824ac0c5af0d46104ba63f6..6c765b02e5d95a0d02785836074dd60a3229b964 100644 (file)
@@ -1997,8 +1997,6 @@ static void dag_object_time_update_flags(Object *ob)
                }
        }
        
-       if(ob->scriptlink.totscript) ob->recalc |= OB_RECALC_OB;
-       
        if(ob->parent) {
                /* motion path or bone child */
                if(ob->parent->type==OB_CURVE || ob->parent->type==OB_ARMATURE) ob->recalc |= OB_RECALC_OB;
index c7a8b150d3a065ca3e69b73edc25a550ff9d28bd..1797cbe3b96cf5ad520fc1b6f16ea16ca5c84da9 100644 (file)
@@ -1900,16 +1900,10 @@ void write_stl(Scene *scene, char *str)
        if(BLI_testextensie(str,".ble")) str[ strlen(str)-4]= 0;
        if(BLI_testextensie(str,".stl")==0) strcat(str, ".stl");
 
-       if (!during_script()) {
-               if (BLI_exists(str))
-                       ; //XXX if(saveover(str)==0)
-                       //XXX   return;
-       }
-
        fpSTL= fopen(str, "wb");
        
        if(fpSTL==NULL) {
-               if (!during_script()) ; //XXX error("Can't write file");
+               //XXX error("Can't write file");
                return;
        }
        strcpy(temp_dir, str);
@@ -2233,11 +2227,11 @@ void write_vrml(Scene *scene, char *str)
        if(BLI_testextensie(str,".blend")) str[ strlen(str)-6]= 0;
        if(BLI_testextensie(str,".ble")) str[ strlen(str)-4]= 0;
        if(BLI_testextensie(str,".wrl")==0) strcat(str, ".wrl");
-       //XXX saveover()       if(!during_script() && saveover(str)==0) return;
+       //XXX saveover()       if(saveover(str)==0) return;
        
        fp= fopen(str, "w");
        
-       if(fp==NULL && !during_script()) {
+       if(fp==NULL) {
                //XXX error("Can't write file");
                return;
        }
@@ -2544,15 +2538,15 @@ void write_dxf(struct Scene *scene, char *str)
        if(BLI_testextensie(str,".ble")) str[ strlen(str)-4]= 0;
        if(BLI_testextensie(str,".dxf")==0) strcat(str, ".dxf");
 
-       if (!during_script()) {
-               if (BLI_exists(str))
-                       ; //XXX if(saveover(str)==0)
-                       //      return;
+       
+       if (BLI_exists(str)) {
+               ; //XXX if(saveover(str)==0)
+               //      return;
        }
 
        fp= fopen(str, "w");
        
-       if(fp==NULL && !during_script()) {
+       if(fp==NULL) {
                //XXX error("Can't write file");
                return;
        }
index bee63f497ca4884de8174a0b156a04ab0460061d..08a19cada7d49070c91d1c380aa701c11095d1b6 100644 (file)
@@ -80,10 +80,6 @@ void free_material(Material *ma)
 {
        MTex *mtex;
        int a;
-
-#ifndef DISABLE_PYTHON
-       BPY_free_scriptlink(&ma->scriptlink);
-#endif
        
        for(a=0; a<MAX_MTEX; a++) {
                mtex= ma->mtex[a];
@@ -210,10 +206,6 @@ Material *copy_material(Material *ma)
                        id_us_plus((ID *)man->mtex[a]->tex);
                }
        }
-
-#ifndef DISABLE_PYTHON 
-       BPY_copy_scriptlink(&ma->scriptlink);
-#endif
        
        if(ma->ramp_col) man->ramp_col= MEM_dupallocN(ma->ramp_col);
        if(ma->ramp_spec) man->ramp_spec= MEM_dupallocN(ma->ramp_spec);
index 60b34bf0783288cad3a155cb45da595f293e2f0a..e463d007a2dc82687cefbfb7450883987fc4fd15 100644 (file)
@@ -266,10 +266,6 @@ void free_object(Object *ob)
        free_actuators(&ob->actuators);
        
        free_constraints(&ob->constraints);
-
-#ifndef DISABLE_PYTHON 
-       BPY_free_scriptlink(&ob->scriptlink);
-#endif
        
        if(ob->pd){
                if(ob->pd->tex)
@@ -645,10 +641,7 @@ Camera *copy_camera(Camera *cam)
        
        camn= copy_libblock(cam);
        camn->adt= BKE_copy_animdata(cam->adt);
-
-#ifndef DISABLE_PYTHON
-       BPY_copy_scriptlink(&camn->scriptlink);
-#endif 
+       
        return camn;
 }
 
@@ -797,9 +790,7 @@ Lamp *copy_lamp(Lamp *la)
 #endif // XXX old animation system
 
        if (la->preview) lan->preview = BKE_previewimg_copy(la->preview);
-#ifndef DISABLE_PYTHON
-       BPY_copy_scriptlink(&la->scriptlink);
-#endif
+       
        return lan;
 }
 
@@ -857,9 +848,6 @@ void make_local_lamp(Lamp *la)
 
 void free_camera(Camera *ca)
 {
-#ifndef DISABLE_PYTHON
-       BPY_free_scriptlink(&ca->scriptlink);
-#endif
        BKE_free_animdata((ID *)ca);
 }
 
@@ -868,11 +856,6 @@ void free_lamp(Lamp *la)
        MTex *mtex;
        int a;
 
-       /* scriptlinks */
-#ifndef DISABLE_PYTHON
-       BPY_free_scriptlink(&la->scriptlink);
-#endif
-
        for(a=0; a<MAX_MTEX; a++) {
                mtex= la->mtex[a];
                if(mtex && mtex->tex) mtex->tex->id.us--;
@@ -1210,9 +1193,7 @@ Object *copy_object(Object *ob)
                modifier_copyData(md, nmd);
                BLI_addtail(&obn->modifiers, nmd);
        }
-#ifndef DISABLE_PYTHON 
-       BPY_copy_scriptlink(&ob->scriptlink);
-#endif
+
        obn->prop.first = obn->prop.last = NULL;
        copy_properties(&obn->prop, &ob->prop);
        
@@ -1843,26 +1824,6 @@ void set_no_parent_ipo(int val)
        no_parent_ipo= val;
 }
 
-static int during_script_flag=0;
-void disable_where_script(short on)
-{
-       during_script_flag= on;
-}
-
-int during_script(void) {
-       return during_script_flag;
-}
-
-static int during_scriptlink_flag=0;
-void disable_where_scriptlink(short on)
-{
-       during_scriptlink_flag= on;
-}
-
-int during_scriptlink(void) {
-       return during_scriptlink_flag;
-}
-
 void where_is_object_time(Scene *scene, Object *ob, float ctime)
 {
        float *fp1, *fp2, slowmat[4][4] = MAT4_UNITY;
@@ -1962,11 +1923,6 @@ void where_is_object_time(Scene *scene, Object *ob, float ctime)
                
                constraints_clear_evalob(cob);
        }
-#ifndef DISABLE_PYTHON
-       if(ob->scriptlink.totscript && !during_script()) {
-               if (G.f & G_DOSCRIPTLINKS) BPY_do_pyscript((ID *)ob, SCRIPT_REDRAW);
-       }
-#endif
        
        /* set negative scale flag in object */
        Crossf(vec, ob->obmat[0], ob->obmat[1]);
@@ -2338,9 +2294,6 @@ void object_handle_update(Scene *scene, Object *ob)
                        }
                        else
                                where_is_object(scene, ob);
-#ifndef DISABLE_PYTHON
-                       if (G.f & G_DOSCRIPTLINKS) BPY_do_pyscript((ID *)ob, SCRIPT_OBJECTUPDATE);
-#endif
                }
                
                if(ob->recalc & OB_RECALC_DATA) {
@@ -2429,9 +2382,6 @@ void object_handle_update(Scene *scene, Object *ob)
                                                psys_get_modifier(ob, psys)->flag &= ~eParticleSystemFlag_psys_updated;
                                }
                        }
-#ifndef DISABLE_PYTHON
-                       if (G.f & G_DOSCRIPTLINKS) BPY_do_pyscript((ID *)ob, SCRIPT_OBDATAUPDATE);
-#endif
                }
 
                /* the no-group proxy case, we call update */
index 20ed7c1b7eb8399d8a678b305e9b08af6e0afce5..d629654c426054e0f8ed8ded79ff7986abe22792 100644 (file)
@@ -54,7 +54,6 @@
 #include "DNA_meta_types.h"
 #include "DNA_object_types.h"
 #include "DNA_scene_types.h"
-#include "DNA_scriptlink_types.h"
 #include "DNA_texture_types.h"
 #include "DNA_userdef_types.h"
 
@@ -142,10 +141,6 @@ void free_scene(Scene *sce)
 
        BLI_freelistN(&sce->base);
        seq_free_editing(sce->ed);
-       
-#ifndef DISABLE_PYTHON
-       BPY_free_scriptlink(&sce->scriptlink);
-#endif
 
        BKE_free_animdata((ID *)sce);
        BKE_keyingsets_free(&sce->keyingsets);
@@ -398,9 +393,6 @@ void set_scene_bg(Scene *scene)
                ob->ctime= -1234567.0;  /* force ipo to be calculated later */
        }
        /* no full animation update, this to enable render code to work (render code calls own animation updates) */
-       
-       /* do we need FRAMECHANGED in set_scene? */
-//     if (G.f & G_DOSCRIPTLINKS) BPY_do_all_scripts(SCRIPT_FRAMECHANGED, 0);
 }
 
 /* called from creator.c */
@@ -659,9 +651,6 @@ void scene_update_for_newframe(Scene *sce, unsigned int lay)
        /* clear animation overrides */
        // XXX TODO...
        
-#ifndef DISABLE_PYTHON
-       if (G.f & G_DOSCRIPTLINKS) BPY_do_all_scripts(SCRIPT_FRAMECHANGED, 0);
-#endif
        /* sets first, we allow per definition current scene to have dependencies on sets */
        for(sce= sce->set; sce; sce= sce->set)
                scene_update(sce, lay);
index d7aa38d5d0341e22bd559141ebdb8631a623c3c0..524120bf014c065085571803945b0eade74cf928 100644 (file)
@@ -291,10 +291,6 @@ void BKE_screen_area_free(ScrArea *sa)
        BKE_spacedata_freelist(&sa->spacedata);
        
        BLI_freelistN(&sa->actionzones);
-       
-#ifndef DISABLE_PYTHON
-       BPY_free_scriptlink(&sa->scriptlink);
-#endif
 }
 
 /* don't free screen itself */
index c84c54b17eebbc1c7e14f789c1cfd263b5a6d4b7..f795c147f54f1ff2fb59cb373e5094ba076317e5 100644 (file)
@@ -36,7 +36,6 @@
 
 #include "DNA_world_types.h"
 #include "DNA_texture_types.h"
-#include "DNA_scriptlink_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_object_types.h"
 #include "DNA_camera_types.h"
@@ -66,10 +65,7 @@ void free_world(World *wrld)
 {
        MTex *mtex;
        int a;
-
-#ifndef DISABLE_PYTHON
-       BPY_free_scriptlink(&wrld->scriptlink);
-#endif
+       
        for(a=0; a<MAX_MTEX; a++) {
                mtex= wrld->mtex[a];
                if(mtex && mtex->tex) mtex->tex->id.us--;
@@ -126,9 +122,6 @@ World *copy_world(World *wrld)
        }
        
        if (wrld->preview) wrldn->preview = BKE_previewimg_copy(wrld->preview);
-#ifndef DISABLE_PYTHON
-       BPY_copy_scriptlink(&wrld->scriptlink);
-#endif
 
 #if 0 // XXX old animation system
        id_us_plus((ID *)wrldn->ipo);
index 5ab30913b18a669504cf96620fed1bd593a23340..8e33979b1346b45f48cf060c48b253dee92d2a1d 100644 (file)
@@ -1565,33 +1565,6 @@ static PreviewImage *direct_link_preview_image(FileData *fd, PreviewImage *old_p
        return prv;
 }
 
-/* ************ READ SCRIPTLINK *************** */
-
-static void lib_link_scriptlink(FileData *fd, ID *id, ScriptLink *slink)
-{
-       int i;
-
-       for(i=0; i<slink->totscript; i++) {
-               slink->scripts[i]= newlibadr(fd, id->lib, slink->scripts[i]);
-       }
-}
-
-static void direct_link_scriptlink(FileData *fd, ScriptLink *slink)
-{
-       slink->scripts= newdataadr(fd, slink->scripts);
-       test_pointer_array(fd, (void **)&slink->scripts);
-       
-       slink->flag= newdataadr(fd, slink->flag);
-
-       if(fd->flags & FD_FLAGS_SWITCH_ENDIAN) {
-               int a;
-
-               for(a=0; a<slink->totscript; a++) {
-                       SWITCH_SHORT(slink->flag[a]);
-               }
-       }
-}
-
 /* ************ READ ANIMATION STUFF ***************** */
 
 /* Legacy Data Support (for Version Patching) ----------------------------- */
@@ -2367,8 +2340,6 @@ static void lib_link_camera(FileData *fd, Main *main)
                        
                        ca->dof_ob= newlibadr_us(fd, ca->id.lib, ca->dof_ob);
                        
-                       lib_link_scriptlink(fd, &ca->id, &ca->scriptlink);
-                       
                        ca->id.flag -= LIB_NEEDLINK;
                }
                ca= ca->id.next;
@@ -2379,8 +2350,6 @@ static void direct_link_camera(FileData *fd, Camera *ca)
 {
        ca->adt= newdataadr(fd, ca->adt);
        direct_link_animdata(fd, ca->adt);
-       
-       direct_link_scriptlink(fd, &ca->scriptlink);
 }
 
 
@@ -2407,8 +2376,6 @@ static void lib_link_lamp(FileData *fd, Main *main)
                        
                        la->ipo= newlibadr_us(fd, la->id.lib, la->ipo); // XXX depreceated - old animation system
                        
-                       lib_link_scriptlink(fd, &la->id, &la->scriptlink);
-                       
                        la->id.flag -= LIB_NEEDLINK;
                }
                la= la->id.next;
@@ -2421,8 +2388,6 @@ static void direct_link_lamp(FileData *fd, Lamp *la)
        
        la->adt= newdataadr(fd, la->adt);
        direct_link_animdata(fd, la->adt);
-       
-       direct_link_scriptlink(fd, &la->scriptlink);
 
        for(a=0; a<MAX_MTEX; a++) {
                la->mtex[a]= newdataadr(fd, la->mtex[a]);
@@ -2568,8 +2533,6 @@ static void lib_link_world(FileData *fd, Main *main)
                                }
                        }
                        
-                       lib_link_scriptlink(fd, &wrld->id, &wrld->scriptlink);
-                       
                        wrld->id.flag -= LIB_NEEDLINK;
                }
                wrld= wrld->id.next;
@@ -2582,8 +2545,6 @@ static void direct_link_world(FileData *fd, World *wrld)
 
        wrld->adt= newdataadr(fd, wrld->adt);
        direct_link_animdata(fd, wrld->adt);
-       
-       direct_link_scriptlink(fd, &wrld->scriptlink);
 
        for(a=0; a<MAX_MTEX; a++) {
                wrld->mtex[a]= newdataadr(fd, wrld->mtex[a]);
@@ -2921,7 +2882,6 @@ static void lib_link_material(FileData *fd, Main *main)
                                        mtex->object= newlibadr(fd, ma->id.lib, mtex->object);
                                }
                        }
-                       lib_link_scriptlink(fd, &ma->id, &ma->scriptlink);
                        
                        if(ma->nodetree)
                                lib_link_ntree(fd, &ma->id, ma->nodetree);
@@ -2946,8 +2906,6 @@ static void direct_link_material(FileData *fd, Material *ma)
        ma->ramp_col= newdataadr(fd, ma->ramp_col);
        ma->ramp_spec= newdataadr(fd, ma->ramp_spec);
        
-       direct_link_scriptlink(fd, &ma->scriptlink);
-       
        ma->nodetree= newdataadr(fd, ma->nodetree);
        if(ma->nodetree)
                direct_link_nodetree(fd, ma->nodetree);
@@ -3585,7 +3543,6 @@ static void lib_link_object(FileData *fd, Main *main)
                                if(ob->pd->tex)
                                        ob->pd->tex=newlibadr_us(fd, ob->id.lib, ob->pd->tex);
 
-                       lib_link_scriptlink(fd, &ob->id, &ob->scriptlink);
                        lib_link_particlesystems(fd, ob, &ob->id, &ob->particlesystem);
                        lib_link_modifiers(fd, ob);
                }
@@ -3785,8 +3742,6 @@ static void direct_link_object(FileData *fd, Object *ob)
        link_list(fd, &ob->constraintChannels);
 // >>> XXX depreceated - old animation system 
 
-       direct_link_scriptlink(fd, &ob->scriptlink);
-
        ob->mat= newdataadr(fd, ob->mat);
        test_pointer_array(fd, (void **)&ob->mat);
        ob->matbits= newdataadr(fd, ob->matbits);
@@ -4039,8 +3994,6 @@ static void lib_link_scene(FileData *fd, Main *main)
                        }
                        SEQ_END
                        
-                       lib_link_scriptlink(fd, &sce->id, &sce->scriptlink);
-                       
                        if(sce->nodetree) {
                                lib_link_ntree(fd, &sce->id, sce->nodetree);
                                composite_patch(sce->nodetree, sce);
@@ -4216,8 +4169,6 @@ static void direct_link_scene(FileData *fd, Scene *sce)
                        }
                }
        }
-
-       direct_link_scriptlink(fd, &sce->scriptlink);
        
        sce->r.avicodecdata = newdataadr(fd, sce->r.avicodecdata);
        if (sce->r.avicodecdata) {
@@ -4372,9 +4323,6 @@ static void lib_link_screen(FileData *fd, Main *main)
                                
                                sa->full= newlibadr(fd, sc->id.lib, sa->full);
                                
-                               /* space handler scriptlinks */
-                               lib_link_scriptlink(fd, &sc->id, &sa->scriptlink);
-                               
                                for (sl= sa->spacedata.first; sl; sl= sl->next) {
                                        if(sl->spacetype==SPACE_VIEW3D) {
                                                View3D *v3d= (View3D*) sl;
@@ -4553,16 +4501,6 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene)
                while(sa) {
                        SpaceLink *sl;
 
-                       if (sa->scriptlink.totscript) {
-                               /* restore screen area script links */
-                               ScriptLink *slink = &sa->scriptlink;
-                               int script_idx;
-                               for (script_idx = 0; script_idx < slink->totscript; script_idx++) {
-                                       slink->scripts[script_idx] = restore_pointer_by_name(newmain,
-                                               (ID *)slink->scripts[script_idx], 1);
-                               }
-                       }
-
                        for (sl= sa->spacedata.first; sl; sl= sl->next) {
                                if(sl->spacetype==SPACE_VIEW3D) {
                                        View3D *v3d= (View3D*) sl;
@@ -4939,9 +4877,6 @@ static void direct_link_screen(FileData *fd, bScreen *sc)
                sa->v2= newdataadr(fd, sa->v2);
                sa->v3= newdataadr(fd, sa->v3);
                sa->v4= newdataadr(fd, sa->v4);
-
-               /* space handler scriptlinks */
-               direct_link_scriptlink(fd, &sa->scriptlink);
        }
 }
 
@@ -10200,15 +10135,6 @@ static void expand_modifier(FileData *fd, Main *mainvar, ModifierData *md)
        }
 }
 
-static void expand_scriptlink(FileData *fd, Main *mainvar, ScriptLink *slink)
-{
-       int i;
-       
-       for(i=0; i<slink->totscript; i++) {
-               expand_doit(fd, mainvar, slink->scripts[i]);
-       }
-}
-
 static void expand_object(FileData *fd, Main *mainvar, Object *ob)
 {
        ModifierData *md;
@@ -10336,7 +10262,6 @@ static void expand_object(FileData *fd, Main *mainvar, Object *ob)
        if(ob->pd && ob->pd->tex)
                expand_doit(fd, mainvar, ob->pd->tex);
        
-       expand_scriptlink(fd, mainvar, &ob->scriptlink);
 }
 
 static void expand_scene(FileData *fd, Main *mainvar, Scene *sce)
index 9e5fbfc25988b98b995648f03ab7aa88cc638760..0f693b6de31a279f9baeef94c07fe3aca4507706 100644 (file)
@@ -498,12 +498,6 @@ static void write_nodetree(WriteData *wd, bNodeTree *ntree)
                writestruct(wd, DATA, "bNodeLink", 1, link);
 }
 
-static void write_scriptlink(WriteData *wd, ScriptLink *slink)
-{
-       writedata(wd, DATA, sizeof(void *)*slink->totscript, slink->scripts);
-       writedata(wd, DATA, sizeof(short)*slink->totscript, slink->flag);
-}
-
 static void current_screen_compat(Main *mainvar, bScreen **screen)
 {
        wmWindowManager *wm;
@@ -1183,7 +1177,6 @@ static void write_objects(WriteData *wd, ListBase *idbase, int write_undo)
                        write_sensors(wd, &ob->sensors);
                        write_controllers(wd, &ob->controllers);
                        write_actuators(wd, &ob->actuators);
-                       write_scriptlink(wd, &ob->scriptlink);
                        write_pose(wd, ob->pose);
                        write_defgroups(wd, &ob->defbase);
                        write_constraints(wd, &ob->constraints);
@@ -1271,9 +1264,6 @@ static void write_cameras(WriteData *wd, ListBase *idbase)
                        if (cam->id.properties) IDP_WriteProperty(cam->id.properties, wd);
                        
                        if (cam->adt) write_animdata(wd, cam->adt);
-                       
-                       /* direct data */
-                       write_scriptlink(wd, &cam->scriptlink);
                }
 
                cam= cam->id.next;
@@ -1601,8 +1591,6 @@ static void write_materials(WriteData *wd, ListBase *idbase)
                        if(ma->ramp_col) writestruct(wd, DATA, "ColorBand", 1, ma->ramp_col);
                        if(ma->ramp_spec) writestruct(wd, DATA, "ColorBand", 1, ma->ramp_spec);
                        
-                       write_scriptlink(wd, &ma->scriptlink);
-                       
                        /* nodetree is integral part of material, no libdata */
                        if(ma->nodetree) {
                                writestruct(wd, DATA, "bNodeTree", 1, ma->nodetree);
@@ -1633,8 +1621,6 @@ static void write_worlds(WriteData *wd, ListBase *idbase)
                                if(wrld->mtex[a]) writestruct(wd, DATA, "MTex", 1, wrld->mtex[a]);
                        }
                        
-                       write_scriptlink(wd, &wrld->scriptlink);
-                       
                        write_previews(wd, wrld->preview);
                }
                wrld= wrld->id.next;
@@ -1663,8 +1649,6 @@ static void write_lamps(WriteData *wd, ListBase *idbase)
                        if(la->curfalloff)
                                write_curvemapping(wd, la->curfalloff); 
                        
-                       write_scriptlink(wd, &la->scriptlink);
-                       
                        write_previews(wd, la->preview);
                        
                }
@@ -1776,8 +1760,6 @@ static void write_scenes(WriteData *wd, ListBase *scebase)
                        }
                }
                
-               write_scriptlink(wd, &sce->scriptlink);
-               
                if (sce->r.avicodecdata) {
                        writestruct(wd, DATA, "AviCodecData", 1, sce->r.avicodecdata);
                        if (sce->r.avicodecdata->lpFormat) writedata(wd, DATA, sce->r.avicodecdata->cbFormat, sce->r.avicodecdata->lpFormat);
@@ -1919,9 +1901,6 @@ static void write_screens(WriteData *wd, ListBase *scrbase)
                                        writestruct(wd, DATA, "Panel", 1, pa);
                        }
                        
-                       /* space handler scriptlinks */
-                       write_scriptlink(wd, &sa->scriptlink);
-                       
                        sl= sa->spacedata.first;
                        while(sl) {
                                for(ar= sl->regionbase.first; ar; ar= ar->next)
index cdb4322d7f28c8e9f2dd1790f3d192987bcfeec3..80ebdb776385b1106f689d7cb015654dbc9d4f2b 100644 (file)
@@ -910,13 +910,6 @@ void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space)
                ARegion *newar= BKE_area_region_copy(st, ar);
                BLI_addtail(&sa1->regionbase, newar);
        }
-               
-#ifndef DISABLE_PYTHON
-       /* scripts */
-       BPY_free_scriptlink(&sa1->scriptlink);
-       sa1->scriptlink= sa2->scriptlink;
-       BPY_copy_scriptlink(&sa1->scriptlink);  /* copies internal pointers */
-#endif
 }
 
 /* *********** Space switching code *********** */
index e7a615140104199f8b13b3e8e9ca1487ae15873e..8e667fe04385c6bfff50e4d6d0ab08ea6bfb0fc1 100644 (file)
@@ -465,7 +465,6 @@ static void screen_copy(bScreen *to, bScreen *from)
                sa->spacedata.first= sa->spacedata.last= NULL;
                sa->regionbase.first= sa->regionbase.last= NULL;
                sa->actionzones.first= sa->actionzones.last= NULL;
-               sa->scriptlink.totscript= 0;
                
                area_copy_data(sa, saf, 0);
        }
index 40324a5a65f79f9ec0c5946955848aa4e7f9ea9b..e3b8ac10481bbb91724f5dc551325d8a4ceb4e86 100644 (file)
@@ -552,16 +552,6 @@ static void outliner_add_scene_contents(SpaceOops *soops, ListBase *lb, Scene *s
        }
        
        outliner_add_element(soops,  lb, sce->world, te, 0, 0);
-       
-       if(sce->scriptlink.scripts) {
-               int a= 0;
-               tenla= outliner_add_element(soops,  lb, sce, te, TSE_SCRIPT_BASE, 0);
-               tenla->name= "Scripts";
-               for (a=0; a<sce->scriptlink.totscript; a++) {
-                       outliner_add_element(soops, &tenla->subtree, sce->scriptlink.scripts[a], tenla, 0, 0);
-               }
-       }
-
 }
 
 static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *idv, 
@@ -768,15 +758,6 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
                                                ten->directdata= defgroup;
                                        }
                                }
-                               if(ob->scriptlink.scripts) {
-                                       TreeElement *tenla= outliner_add_element(soops, &te->subtree, ob, te, TSE_SCRIPT_BASE, 0);
-                                       int a= 0;
-                                       
-                                       tenla->name= "Scripts";
-                                       for (a=0; a<ob->scriptlink.totscript; a++) {                                                    /*  ** */
-                                               outliner_add_element(soops, &tenla->subtree, ob->scriptlink.scripts[a], te, 0, 0);
-                                       }
-                               }
                                
                                if(ob->dup_group)
                                        outliner_add_element(soops, &te->subtree, ob->dup_group, te, 0, 0);     
index e6d97071ef5584e6a622bc883a313df184abb36e..79912d9ed0ef8ece1a2cb6a8a0dbfff3c6fd0bb9 100644 (file)
@@ -280,17 +280,10 @@ static void text_unlink(Main *bmain, Text *text)
         * disabled it will leave invalid pointers in files! */
 
 #ifndef DISABLE_PYTHON
-       // XXX BPY_clear_bad_scriptlinks(text);
        // XXX BPY_free_pyconstraint_links(text);
        // XXX free_text_controllers(text);
        // XXX free_dome_warp_text(text);
 
-       /* check if this text was used as script link:
-        * this check function unsets the pointers and returns how many
-        * script links used this Text */
-       if(0) // XXX BPY_text_check_all_scriptlinks (text))
-               ; // XXX notifier: allqueue(REDRAWBUTSSCRIPT, 0);
-
        /* equivalently for pynodes: */
        if(0) // XXX nodeDynamicUnlinkText ((ID*)text))
                ; // XXX notifier: allqueue(REDRAWNODE, 0);
index d80a26e50f8e971e470d7c2d4535025a47248cc6..5e6bfe89165a36d452ae19b462ea0357b70157e5 100644 (file)
@@ -2085,10 +2085,6 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar)
                //      addafterqueue(ar->win, BACKBUFDRAW, 1);
                //}
        }
-       
-#ifndef DISABLE_PYTHON
-       /* XXX here was scriptlink */
-#endif 
 }
 
 
index 8ba7fa8b58d9d96391f5100e5a7f831127bbd3a1..3d839570e17511ada799c5b7b7df249219392983 100644 (file)
@@ -32,7 +32,6 @@
 #define DNA_CAMERA_TYPES_H
 
 #include "DNA_ID.h"
-#include "DNA_scriptlink_types.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -61,7 +60,6 @@ typedef struct Camera {
 
        struct Ipo *ipo;                        // XXX depreceated... old animation system
        
-       ScriptLink scriptlink;
        struct Object *dof_ob;
 } Camera;
 
index a10590387778b0714c5a816c5d331d56a7ba9c86..78c8d1a5607a1936f40e65aa1c58c3febbe9fb84 100644 (file)
@@ -32,7 +32,6 @@
 #define DNA_LAMP_TYPES_H
 
 #include "DNA_ID.h"
-#include "DNA_scriptlink_types.h"
 
 #ifndef MAX_MTEX
 #define MAX_MTEX       18
@@ -110,8 +109,6 @@ typedef struct Lamp {
        
        /* preview */
        struct PreviewImage *preview;
-
-       ScriptLink scriptlink;
 } Lamp;
 
 /* **************** LAMP ********************* */
index a2ead6fc33d8a1618587f3d20e6c2b13b485e5ae..1f93bcf13173d1d3c9e9a25a896849e735a22537 100644 (file)
@@ -32,7 +32,6 @@
 #define DNA_MATERIAL_TYPES_H
 
 #include "DNA_ID.h"
-#include "DNA_scriptlink_types.h"
 #include "DNA_listBase.h"
 
 #ifndef MAX_MTEX
@@ -134,8 +133,6 @@ typedef struct Material {
        /* yafray: absorption color, dispersion parameters and material preset menu */
        float YF_ar, YF_ag, YF_ab, YF_dscale, YF_dpwr;
        int YF_dsmp, YF_preset, YF_djit;
-       
-       ScriptLink scriptlink;
 
        ListBase gpumaterial;           /* runtime */
 } Material;
index 2b0ede846af77457ff62b2e8289c852a0fededd8..ec4cad5c3b4aa5348eac17adb7a2606e4fc4db3a 100644 (file)
@@ -35,7 +35,6 @@
 
 #include "DNA_listBase.h"
 #include "DNA_ID.h"
-#include "DNA_scriptlink_types.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -172,7 +171,6 @@ typedef struct Object {
        float empty_drawsize;
        float dupfacesca;       /* dupliface scale */
        
-       ScriptLink scriptlink;
        ListBase prop;
        ListBase sensors;
        ListBase controllers;
index 60176dd5e6ebf70c25b056811b8eeaa1cf8a31ab..c8d0fc9ff5e61412e250059d99a03cfb73944898 100644 (file)
@@ -36,7 +36,6 @@ extern "C" {
 #include "DNA_brush_types.h"
 #include "DNA_vec_types.h"
 #include "DNA_listBase.h"
-#include "DNA_scriptlink_types.h"
 #include "DNA_ID.h"
 
 struct Object;
@@ -660,8 +659,6 @@ typedef struct Scene {
        struct RenderData r;
        struct AudioData audio;         /* DEPRECATED 2.5 */
        
-       ScriptLink scriptlink;
-       
        ListBase markers;
        ListBase transform_spaces;
        
index 1be75e977354a0f555b0accff5956b3a753b7c29..cf10723017130e132564fe2467dae4ae0aacda28 100644 (file)
@@ -31,7 +31,6 @@
 #include "DNA_view2d_types.h"
 #include "DNA_vec_types.h"
 
-#include "DNA_scriptlink_types.h"
 #include "DNA_ID.h"
 
 struct SpaceType;
@@ -125,8 +124,6 @@ typedef struct ScrArea {
        short pad;
        short do_refresh;                               /* private, for spacetype refresh callback */
        short cursor, flag;
-
-       ScriptLink scriptlink;
        
        struct SpaceType *type;         /* callbacks for this space type */
        
diff --git a/source/blender/makesdna/DNA_scriptlink_types.h b/source/blender/makesdna/DNA_scriptlink_types.h
deleted file mode 100644 (file)
index 9b50eb9..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * blenlib/DNA_object_types.h (mar-2001 nzc)
- *     
- * Scriptlink is hard-coded in object for some reason.
- *
- * $Id$ 
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-#ifndef DNA_SCRIPTLINK_TYPES_H
-#define DNA_SCRIPTLINK_TYPES_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct ID;
-
-typedef struct ScriptLink {
-       struct ID **scripts;
-       short *flag;
-       
-       short actscript, totscript;
-       int pad;
-} ScriptLink;
-
-/* **************** SCRIPTLINKS ********************* */
-
-#define SCRIPT_FRAMECHANGED    1
-#define SCRIPT_ONLOAD 2
-#define SCRIPT_REDRAW  4
-#define SCRIPT_ONSAVE  8
-#define SCRIPT_RENDER 16
-/* POSTRENDER is not meant for the UI, it simply calls the
- * RENDER script links for clean-up actions */
-#define SCRIPT_POSTRENDER 32
-
-#define SCRIPT_OBJECTUPDATE 64
-#define SCRIPT_OBDATAUPDATE 128
-
-/* **************** SPACE HANDLERS ********************* */
-/* these are special scriptlinks that can be assigned to
- * a given space in a given ScrArea to:
- * - (EVENT type) handle events sent to that space;
- * - (EVENT_ALL type): handle release events, too;
- * - (DRAW type) draw on the space after its own drawing function finishes.
- */
-#define SPACEHANDLER_VIEW3D_DRAW 1
-#define SPACEHANDLER_VIEW3D_EVENT 2
-#define SPACEHANDLER_VIEW3D_EVENT_ALL 3
-
-
-#ifdef __cplusplus
-}
-#endif
-#endif
index 31f0727cf73553cfd3519acae35327a8f4b83a81..200ff6d9324dd4984b2e7cfb0b91d69699878dc0 100644 (file)
@@ -32,7 +32,6 @@
 #define DNA_WORLD_TYPES_H
 
 #include "DNA_ID.h"
-#include "DNA_scriptlink_types.h"
 
 struct AnimData;
 struct Ipo;
@@ -124,8 +123,6 @@ typedef struct World {
        /* previews */
        struct PreviewImage *preview;
 
-       ScriptLink scriptlink;
-
 } World;
 
 /* **************** WORLD ********************* */
index ffd164baaaf56628508cc1787dc2aa09326b307a..207d6fdd94a2754e42210dcce532f961f5ebb97b 100644 (file)
@@ -76,7 +76,6 @@ char *includefiles[] = {
        "DNA_ID.h",
        "DNA_ipo_types.h",
        "DNA_key_types.h",
-       "DNA_scriptlink_types.h",
        "DNA_text_types.h",
        "DNA_packedFile_types.h",
        "DNA_camera_types.h",
@@ -1105,7 +1104,6 @@ int main(int argc, char ** argv)
 #include "DNA_ID.h"
 #include "DNA_ipo_types.h"
 #include "DNA_key_types.h"
-#include "DNA_scriptlink_types.h"
 #include "DNA_text_types.h"
 #include "DNA_packedFile_types.h"
 #include "DNA_camera_types.h"
index 50ae05c854464861f65c0e60b9bb5dd96d69823d..c60d5710e1713979d5e8c05160920f4ada3bd070 100644 (file)
@@ -338,7 +338,6 @@ extern StructRNA RNA_SceneRenderData;
 extern StructRNA RNA_SceneRenderLayer;
 extern StructRNA RNA_SceneSequence;
 extern StructRNA RNA_Screen;
-extern StructRNA RNA_ScriptLink;
 extern StructRNA RNA_Sculpt;
 extern StructRNA RNA_Sensor;
 extern StructRNA RNA_Sequence;
index 81c4642f4d55ac745e35d508a33c142e6113cb1d..40bcb4dabbb6b338653840139b321862c16446e1 100644 (file)
@@ -1938,7 +1938,6 @@ RNAProcessItem PROCESS_ITEMS[]= {
        {"rna_render.c", NULL, RNA_def_render},
        {"rna_scene.c", NULL, RNA_def_scene},
        {"rna_screen.c", NULL, RNA_def_screen},
-       {"rna_scriptlink.c", NULL, RNA_def_scriptlink},
        {"rna_sensor.c", NULL, RNA_def_sensor},
        {"rna_sequence.c", NULL, RNA_def_sequence},
        {"rna_space.c", NULL, RNA_def_space},
index 8bc1fcaf9262a23a152b094abe796a52b7be2689..a1d32d5be784efd5e5ffd30573d6ea1d3f96acdc 100644 (file)
@@ -151,7 +151,6 @@ void RNA_def_render(struct BlenderRNA *brna);
 void RNA_def_rna(struct BlenderRNA *brna);
 void RNA_def_scene(struct BlenderRNA *brna);
 void RNA_def_screen(struct BlenderRNA *brna);
-void RNA_def_scriptlink(struct BlenderRNA *brna);
 void RNA_def_sensor(struct BlenderRNA *brna);
 void RNA_def_sequence(struct BlenderRNA *brna);
 void RNA_def_space(struct BlenderRNA *brna);
index fe14870cf6f1ea24b86a23317ff745acc046a87e..b8150ee3c7d98833a19af7a6bc4866ea99be3353 100644 (file)
@@ -350,12 +350,6 @@ static void rna_def_lamp(BlenderRNA *brna)
 
        /* textures */
        rna_def_mtex_common(srna, "rna_Lamp_mtex_begin", "rna_Lamp_active_texture_get", "rna_Lamp_active_texture_index_set", "LampTextureSlot");
-
-       /* script link */
-       prop= RNA_def_property(srna, "script_link", PROP_POINTER, PROP_NEVER_NULL);
-       RNA_def_property_pointer_sdna(prop, NULL, "scriptlink");
-       RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-       RNA_def_property_ui_text(prop, "Script Link", "Scripts linked to this lamp.");
 }
 
 static void rna_def_lamp_falloff(StructRNA *srna)
index fd54dd959b24fab78ae213cfd713ac1237aeb889..8f5252dbdac8f61beb74ba0887ef0bd40008fad4 100644 (file)
@@ -1242,11 +1242,6 @@ void RNA_def_material(BlenderRNA *brna)
        /* common */
        rna_def_animdata_common(srna);
        rna_def_mtex_common(srna, "rna_Material_mtex_begin", "rna_Material_active_texture_get", "rna_Material_active_texture_index_set", "MaterialTextureSlot");
-
-       prop= RNA_def_property(srna, "script_link", PROP_POINTER, PROP_NEVER_NULL);
-       RNA_def_property_pointer_sdna(prop, NULL, "scriptlink");
-       RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-       RNA_def_property_ui_text(prop, "Script Link", "Scripts linked to this material.");
        
        rna_def_material_colors(srna);
        rna_def_material_diffuse(srna);
index 29bb3a9b323bbd36ceb02f39f8e00bc28bfc06a5..30ca39d25de5837d75934a049f09de610b1cd737 100644 (file)
@@ -1309,12 +1309,6 @@ static void rna_def_object(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Time Offset Add Parent", "Add the parents time offset value");
        RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
 
-       /* script link */
-
-       prop= RNA_def_property(srna, "script_link", PROP_POINTER, PROP_NEVER_NULL);
-       RNA_def_property_pointer_sdna(prop, NULL, "scriptlink");
-       RNA_def_property_ui_text(prop, "Script Link", "Scripts linked to this object.");
-
        /* drawing */
 
        prop= RNA_def_property(srna, "max_draw_type", PROP_ENUM, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_scriptlink.c b/source/blender/makesrna/intern/rna_scriptlink.c
deleted file mode 100644 (file)
index b486cd4..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- *
- * Contributor(s): Blender Foundation (2008).
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <stdlib.h>
-
-#include "RNA_define.h"
-#include "RNA_types.h"
-
-#include "rna_internal.h"
-
-#include "DNA_scriptlink_types.h"
-
-#ifdef RNA_RUNTIME
-
-#else
-
-void RNA_def_scriptlink(BlenderRNA *brna)
-{
-       StructRNA *srna;
-
-       srna= RNA_def_struct(brna, "ScriptLink", NULL);
-       RNA_def_struct_ui_text(srna, "Script Link", "Scripts linked to a datablock, to be executed on changes to the datablock.");
-       RNA_def_struct_ui_icon(srna, ICON_PYTHON);
-}
-
-#endif
-
index c3032326a3dbf8d4693ab232ec2e29c06aed4041..c41c0a0fcef8d65ef39f42660a0414418dd3ea82 100644 (file)
@@ -470,10 +470,6 @@ void RNA_def_world(BlenderRNA *brna)
        RNA_def_property_pointer_funcs(prop, "rna_World_stars_get", NULL, NULL);
        RNA_def_property_ui_text(prop, "Stars", "World stars settings.");
 
-       prop= RNA_def_property(srna, "script_link", PROP_POINTER, PROP_NEVER_NULL);
-       RNA_def_property_pointer_sdna(prop, NULL, "scriptlink");
-       RNA_def_property_ui_text(prop, "Script Link", "Scripts linked to this object.");
-
        rna_def_ambient_occlusion(brna);
        rna_def_world_mist(brna);
        rna_def_world_stars(brna);
index c697279337234303f0af6625d2b765c9398246df..db0404c33a8ee1744a41ae94ed80d0b41c501583 100644 (file)
@@ -37,7 +37,6 @@ struct Text; /* defined in DNA_text_types.h */
 struct ID; /* DNA_ID.h */
 struct Object; /* DNA_object_types.h */
 struct ChannelDriver; /* DNA_anim_types.h */
-struct ScriptLink; /* DNA_scriptlink_types.h */
 struct ListBase; /* DNA_listBase.h */
 struct SpaceText; /* DNA_space_types.h */
 struct SpaceScript; /* DNA_space_types.h */
@@ -110,13 +109,7 @@ extern "C" {
        int BPY_run_script(struct Script *script);
        void BPY_free_compiled_text( struct Text *text );
 
-       void BPY_clear_bad_scriptlinks( struct Text *byebye );
        int BPY_has_onload_script( void );
-       void BPY_do_all_scripts( short event, short anim );
-       int BPY_check_all_scriptlinks( struct Text *text );
-       void BPY_do_pyscript( struct ID *id, short event );
-       void BPY_free_scriptlink( struct ScriptLink *slink );
-       void BPY_copy_scriptlink( struct ScriptLink *scriptlink );
 
        int BPY_is_spacehandler(struct Text *text, char spacetype);
        int BPY_del_spacehandler(struct Text *text, struct ScrArea *sa);
@@ -145,8 +138,6 @@ extern "C" {
        void BPY_DECREF(void *pyob_ptr);        /* Py_DECREF() */
 
 /* void BPY_Err_Handle(struct Text *text); */
-/* void BPY_clear_bad_scriptlink(struct ID *id, struct Text *byebye); */
-/* void BPY_clear_bad_scriptlist(struct ListBase *, struct Text *byebye); */
 /* int BPY_spacetext_is_pywin(struct SpaceText *st); */
 
 #ifdef __cplusplus
diff --git a/source/blender/python/intern/bpy_scriptlink.c b/source/blender/python/intern/bpy_scriptlink.c
deleted file mode 100644 (file)
index e790942..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * $Id:
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version. 
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- *
- * The Original Code is Copyright (C) 2008 Blender Foundation.
- * All rights reserved.
- *
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <string.h>
-
-#include "MEM_guardedalloc.h"
-
-#include "DNA_lamp_types.h"
-#include "DNA_camera_types.h"
-#include "DNA_world_types.h"
-#include "DNA_scene_types.h"
-#include "DNA_material_types.h"
-
-#include "BLI_blenlib.h"
-
-#include "BKE_blender.h"
-#include "BKE_global.h"
-#include "BKE_library.h"
-#include "BKE_main.h"
-
-
-/* only copies internal pointers, scriptlink usually is integral part of a struct */
-void BPY_copy_scriptlink( struct ScriptLink *scriptlink )
-{
-       
-       if( scriptlink->totscript ) {
-               scriptlink->scripts = MEM_dupallocN(scriptlink->scripts);               
-               scriptlink->flag = MEM_dupallocN(scriptlink->flag);             
-       }
-       
-       return;
-}
-
-/* not free slink itself */
-void BPY_free_scriptlink( struct ScriptLink *slink )
-{
-       if( slink->totscript ) {
-               if( slink->flag ) {
-                       MEM_freeN( slink->flag );
-                       slink->flag= NULL;
-               }
-               if( slink->scripts ) {
-                       MEM_freeN( slink->scripts );
-                       slink->scripts= NULL;
-               }
-       }
-       
-       return;
-}
-
index 8d6b5ad9f19b85e8a2c970c4e06d408daf466024..94bdb6ba6ab48c530f3aef28e851a9931b0e34e6 100644 (file)
@@ -30,9 +30,7 @@
 void BPY_post_start_python() {}
 //void BPY_run_python_script() {}
 //void BPY_start_python() {}
-void BPY_do_all_scripts() {}
 void BPY_call_importloader() {}
-void BPY_do_pyscript() {}
 void BPY_clear_script() {}
 //void BPY_free_compiled_text() {}
 void BPY_pyconstraint_eval() {}
index 51389ef890c38c9d06d453dc55a7b67e3089ec70..c3b317590f16d717d70a4de51e61067de38a9760 100644 (file)
@@ -554,8 +554,6 @@ void WM_write_file(bContext *C, char *target, ReportList *reports)
        }
  
        /* send the OnSave event */
-// XXX if (G.f & G_DOSCRIPTLINKS) BPY_do_pyscript(&CTX_data_scene(C)->id, SCRIPT_ONSAVE);
-
        for (li= G.main->library.first; li; li= li->id.next) {
                if (BLI_streq(li->name, target)) {
                        BKE_report(reports, RPT_ERROR, "Cannot overwrite used library");