From 3797fdcfc160e8b413ebb5dc825728a77c72374c Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 12 Feb 2019 13:51:33 +0100 Subject: Modifiers: Make Difference default operation for boolean modifier. Make Difference a default value for boolean modifier operation property. Currently operation property of the boolean modifier is set to Intersect, which is the least frequently used boolean operation of the three available. It is also goes out of sync with Intersect (Boolean) tool, where Difference is a default operation. Reviewers: mont29, brecht, sergey Reviewed By: mont29, brecht, sergey Subscribers: mont29, brecht, campbellbarton, sergey, billreynish Tags: #modifiers Differential Revision: https://developer.blender.org/D4340 --- source/blender/makesrna/intern/rna_modifier.c | 1 + source/blender/modifiers/intern/MOD_boolean.c | 1 + 2 files changed, 2 insertions(+) (limited to 'source') diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 2eaa8314c2d..87283ef0f43 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -2027,6 +2027,7 @@ static void rna_def_modifier_boolean(BlenderRNA *brna) prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, prop_operation_items); + RNA_def_property_enum_default(prop, eBooleanModifierOp_Difference); RNA_def_property_ui_text(prop, "Operation", ""); RNA_def_property_update(prop, 0, "rna_Modifier_update"); diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c index 1a2c448d49d..817d0fc1f5f 100644 --- a/source/blender/modifiers/intern/MOD_boolean.c +++ b/source/blender/modifiers/intern/MOD_boolean.c @@ -63,6 +63,7 @@ static void initData(ModifierData *md) BooleanModifierData *bmd = (BooleanModifierData *)md; bmd->double_threshold = 1e-6f; + bmd->operation = eBooleanModifierOp_Difference; } static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams)) -- cgit v1.2.3