diff options
author | Howard Trickey <howard.trickey@gmail.com> | 2020-09-13 23:57:27 +0300 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2020-09-13 23:57:27 +0300 |
commit | ab7608af1bd40548cb79a0312f318a32d2fe8596 (patch) | |
tree | 7c547603b7c8de350044aaf4c237d1f0f630caa5 /source/blender/blenloader | |
parent | 9d674708ea7e0a5d7ac698784a7649d2ee73e4f8 (diff) |
Apply patch D8816, from Zachary(AFWS) for collection boolean operand.
Also added code so that exact solver does the whole collection at once.
This patch allows users to use a collection (as an alternative to Object)
for the boolean modifier operand, and therefore get rid of a long modifier stack.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_290.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c index b573fb28474..7805dbdcefa 100644 --- a/source/blender/blenloader/intern/versioning_290.c +++ b/source/blender/blenloader/intern/versioning_290.c @@ -526,19 +526,6 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - - /* Initialize solver for Boolean. */ - if (!DNA_struct_elem_find(fd->filesdna, "BooleanModifierData", "enum", "solver")) { - for (Object *object = bmain->objects.first; object != NULL; object = object->id.next) { - LISTBASE_FOREACH (ModifierData *, md, &object->modifiers) { - if (md->type == eModifierType_Boolean) { - BooleanModifierData *bmd = (BooleanModifierData *)md; - bmd->solver = eBooleanModifierSolver_Fast; - bmd->flag = 0; - } - } - } - } } for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) { @@ -597,6 +584,20 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + /* Solver and Collections for Boolean. */ + if (!DNA_struct_elem_find(fd->filesdna, "BooleanModifierData", "char", "solver")) { + for (Object *object = bmain->objects.first; object != NULL; object = object->id.next) { + LISTBASE_FOREACH (ModifierData *, md, &object->modifiers) { + if (md->type == eModifierType_Boolean) { + BooleanModifierData *bmd = (BooleanModifierData *)md; + bmd->solver = eBooleanModifierSolver_Fast; + bmd->flag = eBooleanModifierFlag_Object; + } + } + } + } + /* Keep this block, even when empty. */ } } |