diff options
author | Hans Goudey <h.goudey@me.com> | 2020-08-31 19:49:22 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-08-31 19:49:22 +0300 |
commit | fc8533a3c93ce689a712b67680c90b16f226f9b9 (patch) | |
tree | aa8e54acbffb573a7fbed3cb6a89e595d2dd3023 /source/blender/modifiers | |
parent | 7056f180d3a220c0c98999edd0ad3273b46a9ced (diff) |
New Boolean: Always expose solver propery, add warning
After discussion with @howardt, it seems the solver property should
always be exposed, even in lite builds. This commit removes the
ifdefs for that property and adds a warning if the "Exact" solver is
used when Blender is compiled without GMP.
These changes apply to the boolean modifier as well.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_boolean.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c index dbdcaccf6f1..37c3f32f529 100644 --- a/source/blender/modifiers/intern/MOD_boolean.c +++ b/source/blender/modifiers/intern/MOD_boolean.c @@ -324,6 +324,9 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * #ifdef WITH_GMP bool use_exact = bmd->solver == eBooleanModifierSolver_Exact; #else + if (bmd->solver == eBooleanModifierSolver_Exact) { + BKE_modifier_set_error(md, "Compiled without GMP, using fast solver"); + } bool use_exact = false; #endif @@ -390,15 +393,10 @@ static void panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropSep(layout, true); - uiItemR(layout, &ptr, "object", 0, NULL, ICON_NONE); - -#ifndef WITH_GMP - bool use_exact = false; -#else - bool use_exact = RNA_enum_get(&ptr, "solver") == eBooleanModifierSolver_Exact; + const bool use_exact = RNA_enum_get(&ptr, "solver") == eBooleanModifierSolver_Exact; + uiItemR(layout, &ptr, "object", 0, NULL, ICON_NONE); uiItemR(layout, &ptr, "solver", UI_ITEM_R_EXPAND, NULL, ICON_NONE); -#endif if (!use_exact) { uiItemR(layout, &ptr, "double_threshold", 0, NULL, ICON_NONE); |