Fix #119873: Bake node crash with instanced light objects #119892

Merged
Hans Goudey merged 2 commits from HooglyBoogly/blender:fix-bake-object-instance-crash into blender-v4.1-release 2024-03-25 21:42:16 +01:00

2 Commits

Author SHA1 Message Date
Hans Goudey eb574963ec Add todo comment 2024-03-25 16:18:10 -04:00
Hans Goudey f8e65dd9a7 Fix #119873: Bake node crash with instanced light objects
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
4d0936c7d7 explicitly avoids turning non-geometry object
instances into geometry instances. This code is called to prepare
geometry sets for baking, and baking currently assumes that the baked
instances are always geometry sets.

To fix this, just check the instance type and serialize an empty
geometry set for the crashing object instance case. Compared to before
the crash causing commit, there is no change in behavior, since that
would have created empty geometry sets too.
2024-03-25 15:13:57 -04:00