added scons option BF_WITH_PYTHON (defined as DISABLE_PYTHON)
This commit is contained in:
@@ -111,7 +111,9 @@
|
||||
|
||||
#include "LBM_fluidsim.h"
|
||||
|
||||
#ifndef DISABLE_PYTHON
|
||||
#include "BPY_extern.h"
|
||||
#endif
|
||||
|
||||
#include "GPU_material.h"
|
||||
|
||||
@@ -269,8 +271,10 @@ void free_object(Object *ob)
|
||||
free_constraints(&ob->constraints);
|
||||
free_constraint_channels(&ob->constraintChannels);
|
||||
free_nlastrips(&ob->nlastrips);
|
||||
|
||||
|
||||
#ifndef DISABLE_PYTHON
|
||||
BPY_free_scriptlink(&ob->scriptlink);
|
||||
#endif
|
||||
|
||||
if(ob->pd){
|
||||
if(ob->pd->tex)
|
||||
@@ -637,9 +641,9 @@ Camera *copy_camera(Camera *cam)
|
||||
|
||||
camn= copy_libblock(cam);
|
||||
id_us_plus((ID *)camn->ipo);
|
||||
|
||||
#ifndef DISABLE_PYTHON
|
||||
BPY_copy_scriptlink(&camn->scriptlink);
|
||||
|
||||
#endif
|
||||
return camn;
|
||||
}
|
||||
|
||||
@@ -786,9 +790,9 @@ Lamp *copy_lamp(Lamp *la)
|
||||
id_us_plus((ID *)lan->ipo);
|
||||
|
||||
if (la->preview) lan->preview = BKE_previewimg_copy(la->preview);
|
||||
|
||||
#ifndef DISABLE_PYTHON
|
||||
BPY_copy_scriptlink(&la->scriptlink);
|
||||
|
||||
#endif
|
||||
return lan;
|
||||
}
|
||||
|
||||
@@ -846,7 +850,9 @@ void make_local_lamp(Lamp *la)
|
||||
|
||||
void free_camera(Camera *ca)
|
||||
{
|
||||
#ifndef DISABLE_PYTHON
|
||||
BPY_free_scriptlink(&ca->scriptlink);
|
||||
#endif
|
||||
}
|
||||
|
||||
void free_lamp(Lamp *la)
|
||||
@@ -855,8 +861,9 @@ void free_lamp(Lamp *la)
|
||||
int a;
|
||||
|
||||
/* scriptlinks */
|
||||
|
||||
#ifndef DISABLE_PYTHON
|
||||
BPY_free_scriptlink(&la->scriptlink);
|
||||
#endif
|
||||
|
||||
for(a=0; a<MAX_MTEX; a++) {
|
||||
mtex= la->mtex[a];
|
||||
@@ -1202,9 +1209,9 @@ 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);
|
||||
|
||||
@@ -1918,10 +1925,11 @@ void where_is_object_time(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]);
|
||||
@@ -2288,7 +2296,9 @@ void object_handle_update(Object *ob)
|
||||
}
|
||||
else
|
||||
where_is_object(ob);
|
||||
#ifndef DISABLE_PYTHON
|
||||
if (G.f & G_DOSCRIPTLINKS) BPY_do_pyscript((ID *)ob, SCRIPT_OBJECTUPDATE);
|
||||
#endif
|
||||
}
|
||||
|
||||
if(ob->recalc & OB_RECALC_DATA) {
|
||||
@@ -2364,7 +2374,9 @@ void object_handle_update(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 */
|
||||
|
||||
Reference in New Issue
Block a user