From ffb8ac01a262e8f81e4cf2730e8b81ccdad077ed Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 22 Jul 2009 09:41:41 +0000 Subject: remove scriptlinks, they were not working and we have plans for better script integration in 2.5 --- source/blender/blenkernel/BKE_object.h | 5 -- source/blender/blenkernel/intern/blender.c | 4 -- source/blender/blenkernel/intern/depsgraph.c | 2 - source/blender/blenkernel/intern/exotic.c | 22 +++---- source/blender/blenkernel/intern/material.c | 8 --- source/blender/blenkernel/intern/object.c | 56 +--------------- source/blender/blenkernel/intern/scene.c | 11 ---- source/blender/blenkernel/intern/screen.c | 4 -- source/blender/blenkernel/intern/world.c | 9 +-- source/blender/blenloader/intern/readfile.c | 75 --------------------- source/blender/blenloader/intern/writefile.c | 21 ------ source/blender/editors/screen/area.c | 7 -- source/blender/editors/screen/screen_edit.c | 1 - source/blender/editors/space_outliner/outliner.c | 19 ------ source/blender/editors/space_text/text_ops.c | 7 -- source/blender/editors/space_view3d/view3d_draw.c | 4 -- source/blender/makesdna/DNA_camera_types.h | 2 - source/blender/makesdna/DNA_lamp_types.h | 3 - source/blender/makesdna/DNA_material_types.h | 3 - source/blender/makesdna/DNA_object_types.h | 2 - source/blender/makesdna/DNA_scene_types.h | 3 - source/blender/makesdna/DNA_screen_types.h | 3 - source/blender/makesdna/DNA_scriptlink_types.h | 79 ----------------------- source/blender/makesdna/DNA_world_types.h | 3 - source/blender/makesdna/intern/makesdna.c | 2 - source/blender/makesrna/RNA_access.h | 1 - source/blender/makesrna/intern/makesrna.c | 1 - source/blender/makesrna/intern/rna_internal.h | 1 - source/blender/makesrna/intern/rna_lamp.c | 6 -- source/blender/makesrna/intern/rna_material.c | 5 -- source/blender/makesrna/intern/rna_object.c | 6 -- source/blender/makesrna/intern/rna_scriptlink.c | 48 -------------- source/blender/makesrna/intern/rna_world.c | 4 -- source/blender/python/BPY_extern.h | 9 --- source/blender/python/intern/bpy_scriptlink.c | 73 --------------------- source/blender/python/intern/stubs.c | 2 - source/blender/windowmanager/intern/wm_files.c | 2 - 37 files changed, 12 insertions(+), 501 deletions(-) delete mode 100644 source/blender/makesdna/DNA_scriptlink_types.h delete mode 100644 source/blender/makesrna/intern/rna_scriptlink.c delete mode 100644 source/blender/python/intern/bpy_scriptlink.c (limited to 'source') diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index 3d71193f37a..a57529ccf75 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -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); diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index d3d21018c1c..20505356d95 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -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); diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 7e6a652da6b..6c765b02e5d 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -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; diff --git a/source/blender/blenkernel/intern/exotic.c b/source/blender/blenkernel/intern/exotic.c index c7a8b150d3a..1797cbe3b96 100644 --- a/source/blender/blenkernel/intern/exotic.c +++ b/source/blender/blenkernel/intern/exotic.c @@ -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; } diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index bee63f497ca..08a19cada7d 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -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; amtex[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); diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 60b34bf0783..e463d007a2d 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -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; amtex[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 */ diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 20ed7c1b7eb..d629654c426 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -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); diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index d7aa38d5d03..524120bf014 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -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 */ diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c index c84c54b17ee..f795c147f54 100644 --- a/source/blender/blenkernel/intern/world.c +++ b/source/blender/blenkernel/intern/world.c @@ -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; amtex[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); diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 5ab30913b18..8e33979b134 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -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; itotscript; 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; atotscript; 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; amtex[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; amtex[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; itotscript; 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) diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 9e5fbfc2598..0f693b6de31 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -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) diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index cdb4322d7f2..80ebdb77638 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -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 *********** */ diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index e7a61514010..8e667fe0438 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -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); } diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index 40324a5a65f..e3b8ac10481 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -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; ascriptlink.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; ascriptlink.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); diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index e6d97071ef5..79912d9ed0e 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -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); diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index d80a26e50f8..5e6bfe89165 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -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 } diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h index 8ba7fa8b58d..3d839570e17 100644 --- a/source/blender/makesdna/DNA_camera_types.h +++ b/source/blender/makesdna/DNA_camera_types.h @@ -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; diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h index a1059038777..78c8d1a5607 100644 --- a/source/blender/makesdna/DNA_lamp_types.h +++ b/source/blender/makesdna/DNA_lamp_types.h @@ -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 ********************* */ diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index a2ead6fc33d..1f93bcf1317 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -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; diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 2b0ede846af..ec4cad5c3b4 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -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; diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 60176dd5e6e..c8d0fc9ff5e 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -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; diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index 1be75e97735..cf107230171 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -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 index 9b50eb91a20..00000000000 --- a/source/blender/makesdna/DNA_scriptlink_types.h +++ /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 diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h index 31f0727cf73..200ff6d9324 100644 --- a/source/blender/makesdna/DNA_world_types.h +++ b/source/blender/makesdna/DNA_world_types.h @@ -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 ********************* */ diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index ffd164baaaf..207d6fdd94a 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -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" diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index 50ae05c8544..c60d5710e17 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -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; diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 81c4642f4d5..40bcb4dabbb 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -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}, diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h index 8bc1fcaf926..a1d32d5be78 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -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); diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c index fe14870cf6f..b8150ee3c7d 100644 --- a/source/blender/makesrna/intern/rna_lamp.c +++ b/source/blender/makesrna/intern/rna_lamp.c @@ -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) diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index fd54dd959b2..8f5252dbdac 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -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); diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 29bb3a9b323..30ca39d25de 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -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 index b486cd4a874..00000000000 --- a/source/blender/makesrna/intern/rna_scriptlink.c +++ /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 - -#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 - diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c index c3032326a3d..c41c0a0fcef 100644 --- a/source/blender/makesrna/intern/rna_world.c +++ b/source/blender/makesrna/intern/rna_world.c @@ -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); diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h index c6972793372..db0404c33a8 100644 --- a/source/blender/python/BPY_extern.h +++ b/source/blender/python/BPY_extern.h @@ -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 index e790942aeb5..00000000000 --- a/source/blender/python/intern/bpy_scriptlink.c +++ /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 - -#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; -} - diff --git a/source/blender/python/intern/stubs.c b/source/blender/python/intern/stubs.c index 8d6b5ad9f19..94bdb6ba6ab 100644 --- a/source/blender/python/intern/stubs.c +++ b/source/blender/python/intern/stubs.c @@ -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() {} diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 51389ef890c..c3b317590f1 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -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"); -- cgit v1.2.3