diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-31 07:11:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-31 07:11:39 +0300 |
commit | 0876fce0094ad3e37be4b197ef8850757eacd37b (patch) | |
tree | bdcd409899a59f1d0239b14d0ec79a7e5f531a06 /source/blender/blenkernel/intern | |
parent | 50dab4fc37d33352c2f1c6181da9d54799e36a12 (diff) |
rename and negate DISABLE_PYTHON --> WITH_PYTHON
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 10 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/context.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/exotic.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/fcurve.c | 12 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/fmodifier.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/script.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/text.c | 6 |
9 files changed, 24 insertions, 24 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 1892f6f0a27..5f387500dd1 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -70,7 +70,7 @@ #include "BKE_shrinkwrap.h" #include "BKE_mesh.h" -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON #include "BPY_extern.h" #endif @@ -1983,7 +1983,7 @@ static void pycon_id_looper (bConstraint *con, ConstraintIDFunc func, void *user /* Whether this approach is maintained remains to be seen (aligorith) */ static void pycon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime)) { -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON bPythonConstraint *data= con->data; #endif @@ -2003,7 +2003,7 @@ static void pycon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraintT constraint_target_to_mat4(cob->scene, ct->tar, ct->subtarget, ct->matrix, CONSTRAINT_SPACE_WORLD, ct->space, con->headtail); /* only execute target calculation if allowed */ -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON if (G.f & G_SCRIPT_AUTOEXEC) BPY_pyconstraint_target(data, ct); #endif @@ -2014,7 +2014,7 @@ static void pycon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraintT static void pycon_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets) { -#ifdef DISABLE_PYTHON +#ifndef WITH_PYTHON (void)con; (void)cob; (void)targets; /* unused */ return; #else @@ -2034,7 +2034,7 @@ static void pycon_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targ /* Now, run the actual 'constraint' function, which should only access the matrices */ BPY_pyconstraint_eval(data, cob, targets); -#endif /* DISABLE_PYTHON */ +#endif /* WITH_PYTHON */ } static bConstraintTypeInfo CTI_PYTHON = { diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c index a5d96baf049..e1a7ef7bbef 100644 --- a/source/blender/blenkernel/intern/context.c +++ b/source/blender/blenkernel/intern/context.c @@ -46,7 +46,7 @@ #include "BKE_main.h" #include "BKE_screen.h" -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON #include "BPY_extern.h" #endif @@ -425,7 +425,7 @@ static int ctx_data_get(bContext *C, const char *member, bContextDataResult *res int ret= 0; memset(result, 0, sizeof(bContextDataResult)); -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON if(CTX_py_dict_get(C)) { return BPY_context_get(C, member, result); // if (BPY_context_get(C, member, result)) diff --git a/source/blender/blenkernel/intern/exotic.c b/source/blender/blenkernel/intern/exotic.c index 5e2ca921ef2..a1af728c562 100644 --- a/source/blender/blenkernel/intern/exotic.c +++ b/source/blender/blenkernel/intern/exotic.c @@ -79,7 +79,7 @@ #include "BKE_DerivedMesh.h" #include "BKE_curve.h" -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON #include "BPY_extern.h" #endif @@ -489,7 +489,7 @@ int BKE_read_exotic(Scene *scene, char *name) read_stl_mesh_binary(scene, name); retval = 1; } -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON // TODO: this should not be in the kernel... else { // unknown format, call Python importloader if (BPY_call_importloader(name)) { @@ -499,7 +499,7 @@ int BKE_read_exotic(Scene *scene, char *name) } } -#endif /* DISABLE_PYTHON */ +#endif /* WITH_PYTHON */ //XXX waitcursor(0); } } diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 1575f69209f..75029af4b10 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -53,7 +53,7 @@ #include "RNA_access.h" -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON #include "BPY_extern.h" #endif @@ -1174,7 +1174,7 @@ void driver_free_variable (ChannelDriver *driver, DriverVar *dvar) else MEM_freeN(dvar); -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON /* since driver variables are cached, the expression needs re-compiling too */ if(driver->type==DRIVER_TYPE_PYTHON) driver->flag |= DRIVER_FLAG_RENAMEVAR; @@ -1231,7 +1231,7 @@ DriverVar *driver_add_new_variable (ChannelDriver *driver) /* set the default type to 'single prop' */ driver_change_variable_type(dvar, DVAR_TYPE_SINGLE_PROP); -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON /* since driver variables are cached, the expression needs re-compiling too */ if(driver->type==DRIVER_TYPE_PYTHON) driver->flag |= DRIVER_FLAG_RENAMEVAR; @@ -1258,7 +1258,7 @@ void fcurve_free_driver(FCurve *fcu) driver_free_variable(driver, dvar); } -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON /* free compiled driver expression */ if (driver->expr_comp) BPY_DECREF(driver->expr_comp); @@ -1406,7 +1406,7 @@ static float evaluate_driver (ChannelDriver *driver, float UNUSED(evaltime)) case DRIVER_TYPE_PYTHON: /* expression */ { -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON /* check for empty or invalid expression */ if ( (driver->expression[0] == '\0') || (driver->flag & DRIVER_FLAG_INVALID) ) @@ -1420,7 +1420,7 @@ static float evaluate_driver (ChannelDriver *driver, float UNUSED(evaltime)) */ driver->curval= BPY_eval_driver(driver); } -#endif /* DISABLE_PYTHON*/ +#endif /* WITH_PYTHON*/ } break; diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c index c900f178ca7..5ef41d17d63 100644 --- a/source/blender/blenkernel/intern/fmodifier.c +++ b/source/blender/blenkernel/intern/fmodifier.c @@ -802,13 +802,13 @@ static void fcm_python_copy (FModifier *fcm, FModifier *src) static void fcm_python_evaluate (FCurve *UNUSED(fcu), FModifier *UNUSED(fcm), float *UNUSED(cvalue), float UNUSED(evaltime)) { -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON //FMod_Python *data= (FMod_Python *)fcm->data; /* FIXME... need to implement this modifier... * It will need it execute a script using the custom properties */ -#endif /* DISABLE_PYTHON */ +#endif /* WITH_PYTHON */ } static FModifierTypeInfo FMI_PYTHON = { diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 6b53e538f8e..41c4fece1a4 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -27,7 +27,7 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON #include <Python.h> #endif diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 5ade08478a2..e006c48aca5 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -96,7 +96,7 @@ #include "LBM_fluidsim.h" -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON #include "BPY_extern.h" #endif diff --git a/source/blender/blenkernel/intern/script.c b/source/blender/blenkernel/intern/script.c index c07032f71d7..6ffac09e843 100644 --- a/source/blender/blenkernel/intern/script.c +++ b/source/blender/blenkernel/intern/script.c @@ -36,7 +36,7 @@ /* -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON #include "BPY_extern.h" // Blender Python library #endif */ diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index cb3c0c08cc0..09910481bf9 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -53,7 +53,7 @@ #include "BKE_text.h" #include "BKE_utildefines.h" -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON #include "BPY_extern.h" #endif @@ -167,7 +167,7 @@ void free_text(Text *text) if(text->name) MEM_freeN(text->name); MEM_freeN(text->undo_buf); -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON if (text->compiled) BPY_free_compiled_text(text); #endif } @@ -683,7 +683,7 @@ int txt_get_span (TextLine *from, TextLine *to) static void txt_make_dirty (Text *text) { text->flags |= TXT_ISDIRTY; -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON if (text->compiled) BPY_free_compiled_text(text); #endif } |