Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_mesh.c
| Show First 20 Lines • Show All 2,992 Lines • ▼ Show 20 Lines | RNA_def_property_collection_funcs(prop, | ||||
| NULL, | NULL, | ||||
| NULL, | NULL, | ||||
| NULL); | NULL); | ||||
| RNA_def_property_struct_type(prop, "MeshPaintMaskLayer"); | RNA_def_property_struct_type(prop, "MeshPaintMaskLayer"); | ||||
| RNA_def_property_ui_text(prop, "Vertex Paint Mask", "Vertex paint mask"); | RNA_def_property_ui_text(prop, "Vertex Paint Mask", "Vertex paint mask"); | ||||
| rna_def_paint_mask(brna, prop); | rna_def_paint_mask(brna, prop); | ||||
| /* End paint mask */ | /* End paint mask */ | ||||
| /* Remesh */ | |||||
| prop = RNA_def_property(srna, "remesh_voxel_size", PROP_FLOAT, PROP_DISTANCE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "voxel_size"); | |||||
| RNA_def_property_float_default(prop, 0.1f); | |||||
| RNA_def_property_range(prop, 0.00001f, FLT_MAX); | |||||
brecht: A proper range for something like this is hard to define since you don't know the mesh scale or… | |||||
| RNA_def_property_ui_range(prop, 0.0001f, FLT_MAX, 0.01, 4); | |||||
| RNA_def_property_ui_text(prop, | |||||
Done Inline ActionsDescription could be changed to explain how this relates to face size. I wouldn't mention OpenVDB in descriptions at all, that seems like an implementation detail. brecht: Description could be changed to explain how this relates to face size.
I wouldn't mention… | |||||
| "Voxel size", | |||||
Done Inline Actionsrna_Mesh_update_draw should be enough for this and the other two properties, no need to re-evaluate the modifier stack or dependency graph when these change. brecht: `rna_Mesh_update_draw` should be enough for this and the other two properties, no need to re… | |||||
| "Size of the voxel in object space used for volume evaluation. Lower " | |||||
| "values preserve finer details"); | |||||
| RNA_def_property_update(prop, 0, "rna_Mesh_update_draw"); | |||||
| prop = RNA_def_property(srna, "remesh_smooth_normals", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_REMESH_SMOOTH_NORMALS); | |||||
| RNA_def_property_ui_text(prop, "Smooth normals", "Smooth the normals of the remesher result"); | |||||
| RNA_def_property_update(prop, 0, "rna_Mesh_update_draw"); | |||||
| prop = RNA_def_property(srna, "remesh_reproject_paint_mask", PROP_BOOLEAN, PROP_NONE); | |||||
brechtUnsubmitted Done Inline ActionsRename to preserve in the property name too, for consistency. brecht: Rename to `preserve` in the property name too, for consistency. | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_REMESH_REPROJECT_PAINT_MASK); | |||||
| RNA_def_property_boolean_default(prop, false); | |||||
| RNA_def_property_ui_text(prop, "Preserve Paint Mask", "Keep the current mask on the new mesh"); | |||||
Done Inline ActionsA better name for this could be Preserve Paint Mask. Not sure users care that reprojection is involved. But does this need to be an option at all, any reason to not always do it? I guess it can be a bit slow on high poly meshes. brecht: A better name for this could be `Preserve Paint Mask`. Not sure users care that reprojection is… | |||||
| RNA_def_property_update(prop, 0, "rna_Mesh_update_draw"); | |||||
| /* End remesh */ | |||||
| prop = RNA_def_property(srna, "use_auto_smooth", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_auto_smooth", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_AUTOSMOOTH); | RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_AUTOSMOOTH); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, | prop, | ||||
| "Auto Smooth", | "Auto Smooth", | ||||
| "Auto smooth (based on smooth/sharp faces/edges and angle between faces), " | "Auto smooth (based on smooth/sharp faces/edges and angle between faces), " | ||||
| "or use custom split normals data if available"); | "or use custom split normals data if available"); | ||||
| RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); | RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); | ||||
| ▲ Show 20 Lines • Show All 150 Lines • Show Last 20 Lines | |||||
A proper range for something like this is hard to define since you don't know the mesh scale or what kind of units the scene is using.
The hard max should be FLT_MAX at least, I see no reason to limit that.