[Bf-blender-cvs] [ad4dcfe2273] blender-v3.3-release: Fix T100709: baking max ray distance wrong with older .blend files
Brecht Van Lommel
noreply at git.blender.org
Thu Sep 1 17:18:33 CEST 2022
Commit: ad4dcfe2273790584743abd83dacb57ce99d16a6
Author: Brecht Van Lommel
Date: Thu Sep 1 17:11:48 2022 +0200
Branches: blender-v3.3-release
https://developer.blender.org/rBad4dcfe2273790584743abd83dacb57ce99d16a6
Fix T100709: baking max ray distance wrong with older .blend files
Add versioning to compensate for bugfix from T97945.
===================================================================
M source/blender/blenloader/intern/versioning_300.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list