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:
authorBrecht Van Lommel <brecht@blender.org>2022-09-01 18:11:48 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-09-01 18:16:50 +0300
commitad4dcfe2273790584743abd83dacb57ce99d16a6 (patch)
tree06130c60ab6d70e5074ad104283ccf038f47d55d
parent414baf9780d9074447378b2e378c3f1dc923da32 (diff)
Fix T100709: baking max ray distance wrong with older .blend files
Add versioning to compensate for bugfix from T97945.
-rw-r--r--source/blender/blenloader/intern/versioning_300.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c
index 49b14dc84a6..5b609483616 100644
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@ -3131,6 +3131,13 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
+ if (!MAIN_VERSION_ATLEAST(bmain, 302, 14)) {
+ /* Compensate for previously wrong squared distance. */
+ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
+ scene->r.bake.max_ray_distance = sasqrt(scene->r.bake.max_ray_distance);
+ }
+ }
+
if (!MAIN_VERSION_ATLEAST(bmain, 303, 1)) {
FOREACH_NODETREE_BEGIN (bmain, ntree, id) {
versioning_replace_legacy_combined_and_separate_color_nodes(ntree);