diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-12-11 12:24:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-12-11 12:24:39 +0300 |
commit | 8cd7b428774fedf16cd6164b60615666045fb1fc (patch) | |
tree | 969fee690c618bcd597826e2244d5d36917c1aba /source/blender/makesrna | |
parent | 8ae8b62a0ed148863e8b64480a0c15f1d068fbf5 (diff) |
BMesh: Add option to use BMesh boolean modifier
This uses a bmesh-intersection, BLI_kdtree and watertight intersections to perform boolean operations.
For now keep both BMesh and Carve booleans usable at once for testing & bug reports,
however we plan to phase out Carve by next release.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 4ca7493eb13..bf35752dcf6 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -1883,6 +1883,34 @@ static void rna_def_modifier_boolean(BlenderRNA *brna) RNA_def_property_enum_items(prop, prop_operation_items); RNA_def_property_ui_text(prop, "Operation", ""); RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + /* BMesh intersection options */ + prop = RNA_def_property(srna, "use_bmesh", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "bm_flag", eBooleanModifierBMeshFlag_Enabled); + RNA_def_property_ui_text(prop, "Use BMesh", "Use BMesh boolean calculation"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop = RNA_def_property(srna, "use_bmesh_separate", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "bm_flag", eBooleanModifierBMeshFlag_BMesh_Separate); + RNA_def_property_ui_text(prop, "Separate", "Keep edges separate"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop = RNA_def_property(srna, "use_bmesh_dissolve", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "bm_flag", eBooleanModifierBMeshFlag_BMesh_NoDissolve); + RNA_def_property_ui_text(prop, "Dissolve", "Dissolve verts created from tessellated intersection"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop = RNA_def_property(srna, "use_bmesh_connect_regions", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "bm_flag", eBooleanModifierBMeshFlag_BMesh_NoConnectRegions); + RNA_def_property_ui_text(prop, "Calculate Holes", "Connect regions (needed for hole filling)"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_DISTANCE); + RNA_def_property_float_sdna(prop, NULL, "threshold"); + RNA_def_property_range(prop, 0, 1.0f); + RNA_def_property_ui_range(prop, 0, 1, 1, 7); + RNA_def_property_ui_text(prop, "Threshold", ""); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); } static void rna_def_modifier_array(BlenderRNA *brna) |