Details
Description
Create new 3D project, set the light to cast shadows, choose bake lights from 3D view context menu, set valid baking properties and click bake button -> Light baking is done normally.
Add any shader asset into the project via assets view (e.g. foobar.frag). Choose bake lights from 3D view context menu again and click bake button -> Baking log only says "Baking aborted: Invalid View3D object set."
Puppet debug trace will show:
[21124] QShaderBaker: Failed to open C:/dev/qt/DesignStudio/apps/UntitledProject32/content/shaders/foobar.frag.qsb
Note that this happens even if the shader asset is not in use in the project, it just has to exist in in content/shaders folder under the project. Having the shader in any other folder is fine for some reason.
This warning presumably comes from qtshadertools\src\shadertools\qshaderbaker.cpp
QShaderBakerPrivate::readFile() function.
This is somehow related to automatic ShaderTool section in .qmlproject file, if that is commented out, baking works fine. It is unclear why this section should affect light baking at all.