Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c110
1 files changed, 67 insertions, 43 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 455fb1c50c9..36db4e5b33a 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -275,7 +275,7 @@ const EnumPropertyItem rna_enum_object_modifier_type_items[] = {
ICON_MOD_EXPLODE,
"Explode",
"Break apart the mesh faces and let them follow particles"},
- {eModifierType_Fluid, "FLUID", ICON_MOD_FLUIDSIM, "Fluid Simulation", ""},
+ {eModifierType_Fluid, "FLUID", ICON_MOD_FLUIDSIM, "Fluid", ""},
{eModifierType_Ocean, "OCEAN", ICON_MOD_OCEAN, "Ocean", "Generate a moving ocean surface"},
{eModifierType_ParticleInstance,
"PARTICLE_INSTANCE",
@@ -700,10 +700,10 @@ static StructRNA *rna_Modifier_refine(struct PointerRNA *ptr)
return &RNA_MeshCacheModifier;
case eModifierType_LaplacianDeform:
return &RNA_LaplacianDeformModifier;
- case eModifierType_Wireframe:
- return &RNA_WireframeModifier;
case eModifierType_Weld:
return &RNA_WeldModifier;
+ case eModifierType_Wireframe:
+ return &RNA_WireframeModifier;
case eModifierType_DataTransfer:
return &RNA_DataTransferModifier;
case eModifierType_NormalEdit:
@@ -5128,6 +5128,11 @@ static void rna_def_modifier_remesh(BlenderRNA *brna)
0,
"Sharp",
"Output a surface that reproduces sharp edges and corners from the input mesh"},
+ {MOD_REMESH_VOXEL,
+ "VOXEL",
+ 0,
+ "Voxel",
+ "Output a mesh corresponding to the volume of the original mesh"},
{0, NULL, 0, NULL, NULL},
};
@@ -5181,6 +5186,25 @@ static void rna_def_modifier_remesh(BlenderRNA *brna)
"edges closer to the input");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ prop = RNA_def_property(srna, "voxel_size", PROP_FLOAT, PROP_DISTANCE);
+ RNA_def_property_float_sdna(prop, NULL, "voxel_size");
+ RNA_def_property_ui_range(prop, 0.0001, 2, 0.1, 3);
+ RNA_def_property_ui_text(prop,
+ "Voxel Size",
+ "Size of the voxel in object space used for volume evaluation. Lower "
+ "values preserve finer details");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop = RNA_def_property(srna, "adaptivity", PROP_FLOAT, PROP_DISTANCE);
+ RNA_def_property_float_sdna(prop, NULL, "adaptivity");
+ RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
+ RNA_def_property_ui_text(
+ prop,
+ "Adaptivity",
+ "Reduces the final face count by simplifying geometry where detail is not needed, "
+ "generating triangles. A value greater than 0 disables Fix Poles");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
prop = RNA_def_property(srna, "use_remove_disconnected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_REMESH_FLOOD_FILL);
RNA_def_property_ui_text(prop, "Remove Disconnected Pieces", "");
@@ -5758,6 +5782,45 @@ static void rna_def_modifier_laplaciandeform(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
+static void rna_def_modifier_weld(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna = RNA_def_struct(brna, "WeldModifier", "Modifier");
+ RNA_def_struct_ui_text(srna, "Weld Modifier", "Weld modifier");
+ RNA_def_struct_sdna(srna, "WeldModifierData");
+ RNA_def_struct_ui_icon(srna, ICON_AUTOMERGE_OFF);
+
+ prop = RNA_def_property(srna, "merge_threshold", PROP_FLOAT, PROP_DISTANCE);
+ RNA_def_property_float_sdna(prop, NULL, "merge_dist");
+ RNA_def_property_range(prop, 0, FLT_MAX);
+ RNA_def_property_ui_range(prop, 0, 1, 0.001, 6);
+ RNA_def_property_ui_text(prop, "Merge Distance", "Limit below which to merge vertices");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop = RNA_def_property(srna, "max_interactions", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_sdna(prop, NULL, "max_interactions");
+ RNA_def_property_ui_text(
+ prop,
+ "Duplicate Limit",
+ "For a better performance, limits the number of elements found per vertex. "
+ "(0 makes it infinite)");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
+ RNA_def_property_ui_text(
+ prop, "Vertex Group", "Vertex group name for selecting the affected areas");
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeldModifier_defgrp_name_set");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WELD_INVERT_VGROUP);
+ RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+}
+
static void rna_def_modifier_wireframe(BlenderRNA *brna)
{
StructRNA *srna;
@@ -5841,45 +5904,6 @@ static void rna_def_modifier_wireframe(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
-static void rna_def_modifier_weld(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna = RNA_def_struct(brna, "WeldModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Weld Modifier", "Weld modifier");
- RNA_def_struct_sdna(srna, "WeldModifierData");
- RNA_def_struct_ui_icon(srna, ICON_AUTOMERGE_OFF);
-
- prop = RNA_def_property(srna, "merge_threshold", PROP_FLOAT, PROP_DISTANCE);
- RNA_def_property_float_sdna(prop, NULL, "merge_dist");
- RNA_def_property_range(prop, 0, FLT_MAX);
- RNA_def_property_ui_range(prop, 0, 1, 0.001, 6);
- RNA_def_property_ui_text(prop, "Merge Distance", "Limit below which to merge vertices");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
-
- prop = RNA_def_property(srna, "max_interactions", PROP_INT, PROP_UNSIGNED);
- RNA_def_property_int_sdna(prop, NULL, "max_interactions");
- RNA_def_property_ui_text(
- prop,
- "Duplicate Limit",
- "For a better performance, limits the number of elements found per vertex. "
- "(0 makes it infinite)");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
-
- prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
- RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
- RNA_def_property_ui_text(
- prop, "Vertex Group", "Vertex group name for selecting the affected areas");
- RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeldModifier_defgrp_name_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
-
- prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WELD_INVERT_VGROUP);
- RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
-}
-
static void rna_def_modifier_datatransfer(BlenderRNA *brna)
{
StructRNA *srna;
@@ -6605,8 +6629,8 @@ void RNA_def_modifier(BlenderRNA *brna)
rna_def_modifier_triangulate(brna);
rna_def_modifier_meshcache(brna);
rna_def_modifier_laplaciandeform(brna);
- rna_def_modifier_wireframe(brna);
rna_def_modifier_weld(brna);
+ rna_def_modifier_wireframe(brna);
rna_def_modifier_datatransfer(brna);
rna_def_modifier_normaledit(brna);
rna_def_modifier_meshseqcache(brna);