Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-07-22 13:41:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-07-22 13:41:41 +0400
commitffb8ac01a262e8f81e4cf2730e8b81ccdad077ed (patch)
tree50164a24cd3b1c43d9c720949c02b7da1542a05f /source/blender/blenkernel
parent53c1b562af9a0c8f66ae9f406fa2b50aee32a569 (diff)
remove scriptlinks,
they were not working and we have plans for better script integration in 2.5
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_object.h5
-rw-r--r--source/blender/blenkernel/intern/blender.c4
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c2
-rw-r--r--source/blender/blenkernel/intern/exotic.c22
-rw-r--r--source/blender/blenkernel/intern/material.c8
-rw-r--r--source/blender/blenkernel/intern/object.c56
-rw-r--r--source/blender/blenkernel/intern/scene.c11
-rw-r--r--source/blender/blenkernel/intern/screen.c4
-rw-r--r--source/blender/blenkernel/intern/world.c9
9 files changed, 12 insertions, 109 deletions
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; 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);
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; 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 */
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; 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);