From 365bf103d1f66824180a592c11cb4181c5791719 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Thu, 1 Oct 2020 17:58:43 +0200 Subject: Volumes: support lower resolution in viewport The adds a new option to simplify volumes in the viewport. The setting can be found in the Simplify panel in the render properties. Volume objects use OpenVDB grids, which are sparse. For rendering, we have to convert sparse grids to dense grids (for now). Those require significantly more memory. Therefore, it's often a good idea to reduce the resolution of volumes in the viewport. Reviewers: brecht Differential Revision: https://developer.blender.org/D9040 Ref T73201. --- source/blender/blenloader/intern/versioning_290.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/blenloader/intern') diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c index 1b9e53ded63..400403a4636 100644 --- a/source/blender/blenloader/intern/versioning_290.c +++ b/source/blender/blenloader/intern/versioning_290.c @@ -762,6 +762,12 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) } } + if (!MAIN_VERSION_ATLEAST(bmain, 291, 7)) { + LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { + scene->r.simplify_volumes = 1.0f; + } + } + /** * Versioning code until next subversion bump goes here. * -- cgit v1.2.3