diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-10-28 21:47:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-10-28 21:47:13 +0300 |
commit | ac4ff83ca6b5795f4451a7e743d3975aeb17ae3b (patch) | |
tree | c4f3f58a967b6c4df9339ffa159f6bb04d619c0f /source/blender/blenkernel/intern/object.c | |
parent | 705a248c75467ef67eba1cda124fd5375eb4666f (diff) |
added scons option BF_WITH_PYTHON (defined as DISABLE_PYTHON)
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index b6f6820ca73..77c891ee82e 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -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 */ |