diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-11-13 13:49:09 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-11-13 13:49:09 +0300 |
commit | 97d79ca844df2a50b8974d32cb38d9b354adef2d (patch) | |
tree | c4e19399e50e7a780da86d75dc18fba039b4f650 /source | |
parent | b09498700c0e9eaf4e73576a23fe6563d5562b34 (diff) | |
parent | ca1721270a6d3fa8d67b59a014ab94004e24026b (diff) |
Merge branch 'blender-v2.81-release'
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 14 | ||||
-rw-r--r-- | source/creator/CMakeLists.txt | 7 |
2 files changed, 16 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 2f61cfcbc15..cc9db5eafb5 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -1015,6 +1015,7 @@ static void mesh_calc_modifiers(struct Depsgraph *depsgraph, } /* Apply all remaining constructive and deforming modifiers. */ + bool have_non_onlydeform_modifiers_appled = false; for (; md; md = md->next, md_datamask = md_datamask->next) { const ModifierTypeInfo *mti = modifierType_getInfo(md->type); @@ -1026,7 +1027,8 @@ static void mesh_calc_modifiers(struct Depsgraph *depsgraph, continue; } - if ((mti->flags & eModifierTypeFlag_RequiresOriginalData) && mesh_final) { + if ((mti->flags & eModifierTypeFlag_RequiresOriginalData) && + have_non_onlydeform_modifiers_appled) { modifier_setError(md, "Modifier requires original data, bad stack position"); continue; } @@ -1101,15 +1103,17 @@ static void mesh_calc_modifiers(struct Depsgraph *depsgraph, /* if this is not the last modifier in the stack then recalculate the normals * to avoid giving bogus normals to the next modifier see: [#23673] */ else if (isPrevDeform && mti->dependsOnNormals && mti->dependsOnNormals(md)) { - /* XXX, this covers bug #23673, but we may need normal calc for other types */ - if (mesh_final) { - BKE_mesh_vert_coords_apply(mesh_final, deformed_verts); + if (mesh_final == NULL) { + mesh_final = BKE_mesh_copy_for_eval(mesh_input, true); + ASSERT_IS_VALID_MESH(mesh_final); } + BKE_mesh_vert_coords_apply(mesh_final, deformed_verts); } - modwrap_deformVerts(md, &mectx, mesh_final, deformed_verts, num_deformed_verts); } else { + have_non_onlydeform_modifiers_appled = true; + /* determine which data layers are needed by following modifiers */ CustomData_MeshMasks nextmask; if (md_datamask->next) { diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 8a85c75cade..0f8cfee795f 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -1076,3 +1076,10 @@ if(WIN32 AND NOT WITH_PYTHON_MODULE) VS_USER_PROPS "blender.Cpp.user.props" ) endif() + +# ----------------------------------------------------------------------------- +# Post-install script + +if(POSTINSTALL_SCRIPT) + install(SCRIPT ${POSTINSTALL_SCRIPT}) +endif() |