From a44299ccd11759363a18f623f7070c4e2febe33f Mon Sep 17 00:00:00 2001 From: Phil Stopford Date: Mon, 3 Aug 2020 10:08:31 -0400 Subject: 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 --- source/blender/makesdna/DNA_modifier_types.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 9b1543d0f79..2669ca37132 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -1277,7 +1277,11 @@ typedef struct OceanModifierData { struct Ocean *ocean; struct OceanCache *oceancache; + /** Render resolution. */ int resolution; + /** Viewport resolution for the non-render case. */ + int viewport_resolution; + int spatial_size; float wind_velocity; @@ -1294,8 +1298,6 @@ typedef struct OceanModifierData { float foam_coverage; float time; - char _pad1[4]; - /* Spectrum being used. */ int spectrum; -- cgit v1.2.3