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:
authorPhil Stopford <philstopford>2020-08-03 17:08:31 +0300
committerHans Goudey <h.goudey@me.com>2020-08-03 17:08:31 +0300
commita44299ccd11759363a18f623f7070c4e2febe33f (patch)
tree3a79c861a40a557c291d93519601f10003e3c274 /source/blender/makesrna/intern/rna_modifier.c
parent30b52b6a4aa808ce7258a17cba2090ac1950ef94 (diff)
Ocean Modifier: Add viewport resolution
Following work done in 2.83, the resolution control is now a real level-of-detail parameter. It is now useful to be able to set the resolution for display independently from render. This is true for both mesh generation and mesh deformation modes. For compatibility with old scenes, resolution is retained and is the render resolution. Old modifiers loaded have the value of resolution also applied to viewport resolution. This allows newer modifiers to be used in older versions without trouble Differential Revision: https://developer.blender.org/D8336
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index ea33307060c..a891194550f 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -113,7 +113,7 @@ const EnumPropertyItem rna_enum_object_modifier_type_items[] = {
{0, "", 0, N_("Generate"), ""},
{eModifierType_Array,
"ARRAY",
- ICON_MOD_ARRAY,
+ ICON_MOD_ARRAY,
"Array",
"Create copies of the shape with offsets"},
{eModifierType_Bevel,
@@ -5712,7 +5712,17 @@ static void rna_def_modifier_ocean(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 1, 1024);
RNA_def_property_ui_range(prop, 1, 32, 1, -1);
- RNA_def_property_ui_text(prop, "Resolution", "Resolution of the generated surface");
+ RNA_def_property_ui_text(
+ prop, "Render Resolution", "Resolution of the generated surface for rendering and baking");
+ RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
+
+ prop = RNA_def_property(srna, "viewport_resolution", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_sdna(prop, NULL, "viewport_resolution");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_range(prop, 1, 1024);
+ RNA_def_property_ui_range(prop, 1, 32, 1, -1);
+ RNA_def_property_ui_text(
+ prop, "Viewport Resolution", "Viewport resolution of the generated surface");
RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
prop = RNA_def_property(srna, "spatial_size", PROP_INT, PROP_NONE);