[Bf-blender-cvs] [3797fdcfc16] master: Modifiers: Make Difference default operation for boolean modifier.

Bastien Montagne noreply at git.blender.org
Tue Feb 12 14:16:32 CET 2019


Commit: 3797fdcfc160e8b413ebb5dc825728a77c72374c
Author: Bastien Montagne
Date:   Tue Feb 12 13:51:33 2019 +0100
Branches: master
https://developer.blender.org/rB3797fdcfc160e8b413ebb5dc825728a77c72374c

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

===================================================================

M	source/blender/makesrna/intern/rna_modifier.c
M	source/blender/modifiers/intern/MOD_boolean.c

===================================================================

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))



More information about the Bf-blender-cvs mailing list