forked from bartvdbraak/blender
Fluid UI:
* Display Simulation threads only, when built with OpenMP.
This commit is contained in:
parent
608dc78241
commit
674d82d783
@ -67,7 +67,10 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
|
|||||||
# odd formatting here so translation script can extract string
|
# odd formatting here so translation script can extract string
|
||||||
layout.operator("fluid.bake", text=iface_("Bake (Req. Memory: %s)") % fluid.memory_estimate,
|
layout.operator("fluid.bake", text=iface_("Bake (Req. Memory: %s)") % fluid.memory_estimate,
|
||||||
translate=False, icon='MOD_FLUIDSIM')
|
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()
|
split = layout.split()
|
||||||
|
|
||||||
col = split.column()
|
col = split.column()
|
||||||
|
@ -169,6 +169,9 @@ if env['WITH_BF_OIIO']:
|
|||||||
|
|
||||||
if env['WITH_BF_PLAYER']:
|
if env['WITH_BF_PLAYER']:
|
||||||
defs.append('WITH_PLAYER')
|
defs.append('WITH_PLAYER')
|
||||||
|
|
||||||
|
if env['WITH_BF_OPENMP']:
|
||||||
|
defs.append('WITH_OPENMP')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -66,6 +66,7 @@ static PyStructSequence_Field app_builtopts_info_fields[] = {
|
|||||||
{(char *)"collada", NULL},
|
{(char *)"collada", NULL},
|
||||||
{(char *)"opencolorio", NULL},
|
{(char *)"opencolorio", NULL},
|
||||||
{(char *)"player", NULL},
|
{(char *)"player", NULL},
|
||||||
|
{(char *)"openmp", NULL},
|
||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -288,6 +289,12 @@ static PyObject *make_builtopts_info(void)
|
|||||||
SetObjIncref(Py_False);
|
SetObjIncref(Py_False);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WITH_OPENMP
|
||||||
|
SetObjIncref(Py_True);
|
||||||
|
#else
|
||||||
|
SetObjIncref(Py_False);
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef SetObjIncref
|
#undef SetObjIncref
|
||||||
|
|
||||||
return builtopts_info;
|
return builtopts_info;
|
||||||
|
Loading…
Reference in New Issue
Block a user