diff options
-rw-r--r-- | release/scripts/startup/bl_ui/properties_physics_fluid.py | 5 | ||||
-rw-r--r-- | source/blender/python/SConscript | 3 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_app_build_options.c | 7 |
3 files changed, 14 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 0935f9336e1..1392d21cf15 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -67,7 +67,10 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel): # odd formatting here so translation script can extract string layout.operator("fluid.bake", text=iface_("Bake (Req. Memory: %s)") % fluid.memory_estimate, translate=False, icon='MOD_FLUIDSIM') - layout.prop(fluid, "threads", text="Simulation Threads") + + if bpy.app.build_options.openmp: + layout.prop(fluid, "threads", text="Simulation Threads") + split = layout.split() col = split.column() diff --git a/source/blender/python/SConscript b/source/blender/python/SConscript index 4fb6d771c5b..db5817e6b38 100644 --- a/source/blender/python/SConscript +++ b/source/blender/python/SConscript @@ -169,6 +169,9 @@ if env['WITH_BF_OIIO']: if env['WITH_BF_PLAYER']: defs.append('WITH_PLAYER') + +if env['WITH_BF_OPENMP']: + defs.append('WITH_OPENMP') diff --git a/source/blender/python/intern/bpy_app_build_options.c b/source/blender/python/intern/bpy_app_build_options.c index 60105f73f37..87119fa690d 100644 --- a/source/blender/python/intern/bpy_app_build_options.c +++ b/source/blender/python/intern/bpy_app_build_options.c @@ -66,6 +66,7 @@ static PyStructSequence_Field app_builtopts_info_fields[] = { {(char *)"collada", NULL}, {(char *)"opencolorio", NULL}, {(char *)"player", NULL}, + {(char *)"openmp", NULL}, {NULL} }; @@ -288,6 +289,12 @@ static PyObject *make_builtopts_info(void) SetObjIncref(Py_False); #endif +#ifdef WITH_OPENMP + SetObjIncref(Py_True); +#else + SetObjIncref(Py_False); +#endif + #undef SetObjIncref return builtopts_info; |