Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_modifier.c
| Show First 20 Lines • Show All 1,952 Lines • ▼ Show 20 Lines | static void rna_def_modifier_boolean(BlenderRNA *brna) | ||||
| static const EnumPropertyItem prop_operation_items[] = { | static const EnumPropertyItem prop_operation_items[] = { | ||||
| {eBooleanModifierOp_Intersect, "INTERSECT", 0, "Intersect", | {eBooleanModifierOp_Intersect, "INTERSECT", 0, "Intersect", | ||||
| "Keep the part of the mesh that intersects with the other selected object"}, | "Keep the part of the mesh that intersects with the other selected object"}, | ||||
| {eBooleanModifierOp_Union, "UNION", 0, "Union", "Combine two meshes in an additive way"}, | {eBooleanModifierOp_Union, "UNION", 0, "Union", "Combine two meshes in an additive way"}, | ||||
| {eBooleanModifierOp_Difference, "DIFFERENCE", 0, "Difference", "Combine two meshes in a subtractive way"}, | {eBooleanModifierOp_Difference, "DIFFERENCE", 0, "Difference", "Combine two meshes in a subtractive way"}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| static const EnumPropertyItem prop_solver_items[] = { | |||||
| {eBooleanModifierSolver_BMesh, "BMESH", 0, "BMesh", "Use the BMesh boolean solver"}, | |||||
| {eBooleanModifierSolver_Carve, "CARVE", 0, "Carve", "Use the Carve boolean solver"}, | |||||
| {0, NULL, 0, NULL, NULL} | |||||
| }; | |||||
| srna = RNA_def_struct(brna, "BooleanModifier", "Modifier"); | srna = RNA_def_struct(brna, "BooleanModifier", "Modifier"); | ||||
| RNA_def_struct_ui_text(srna, "Boolean Modifier", "Boolean operations modifier"); | RNA_def_struct_ui_text(srna, "Boolean Modifier", "Boolean operations modifier"); | ||||
| RNA_def_struct_sdna(srna, "BooleanModifierData"); | RNA_def_struct_sdna(srna, "BooleanModifierData"); | ||||
| RNA_def_struct_ui_icon(srna, ICON_MOD_BOOLEAN); | RNA_def_struct_ui_icon(srna, ICON_MOD_BOOLEAN); | ||||
| prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_ui_text(prop, "Object", "Mesh object to use for Boolean operation"); | RNA_def_property_ui_text(prop, "Object", "Mesh object to use for Boolean operation"); | ||||
| RNA_def_property_pointer_funcs(prop, NULL, "rna_BooleanModifier_object_set", NULL, "rna_Mesh_object_poll"); | RNA_def_property_pointer_funcs(prop, NULL, "rna_BooleanModifier_object_set", NULL, "rna_Mesh_object_poll"); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK); | RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK); | ||||
| RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update"); | ||||
| prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, prop_operation_items); | RNA_def_property_enum_items(prop, prop_operation_items); | ||||
| RNA_def_property_ui_text(prop, "Operation", ""); | RNA_def_property_ui_text(prop, "Operation", ""); | ||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_update"); | ||||
| prop = RNA_def_property(srna, "solver", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_items(prop, prop_solver_items); | |||||
| RNA_def_property_ui_text(prop, "Solver", ""); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| prop = RNA_def_property(srna, "double_threshold", PROP_FLOAT, PROP_DISTANCE); | prop = RNA_def_property(srna, "double_threshold", PROP_FLOAT, PROP_DISTANCE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "double_threshold"); | RNA_def_property_float_sdna(prop, NULL, "double_threshold"); | ||||
| RNA_def_property_range(prop, 0, 1.0f); | RNA_def_property_range(prop, 0, 1.0f); | ||||
| RNA_def_property_ui_range(prop, 0, 1, 0.0001, 6); | RNA_def_property_ui_range(prop, 0, 1, 0.0001, 6); | ||||
| RNA_def_property_ui_text(prop, "Overlap Threshold", "Threshold for checking overlapping geometry"); | RNA_def_property_ui_text(prop, "Overlap Threshold", "Threshold for checking overlapping geometry"); | ||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_update"); | ||||
| /* BMesh debugging options, only used when G_DEBUG is set */ | /* BMesh debugging options, only used when G_DEBUG is set */ | ||||
| ▲ Show 20 Lines • Show All 2,948 Lines • Show Last 20 Lines | |||||