Closed Clockwork-Muse closed 3 years ago
If you disable the model cache, by setting model-cache-dir
(without arguments) in Config.prc, does the problem go away?
Yes
I suppose I should include the following:
Blender: 2.90/2.91 Panda: 1.10.7 blend2bam 0.17
I'm running this inside a vscode .devcontainer, but that shouldn't be making a difference.
It may be an issue with Panda's model cache then, could you add a self.scene.writeBamFile('scene.bam')
call and run it after loading the file for the first time (or with model cache disabled)?
Then, try loading the resulting bam file and see if the problem is reproduced. If so, please share the bam file.
Issue is present in saved bam file, regardless of whether the model cache is disabled.
There's no difference in the information printed by self.scene.ls()
scene.bam.zip
Thanks, and can you share the .blend file as well for comparison?
scene.blend.zip (Although it should be the default blend file)
I think this is a bug in Panda3D, and I will look into fixing it. You can use this as a workaround:
scene.clearLight()
for light in scene.findAllMatches("**/+Light"):
scene.setLight(light)
I don't think this issue can be fixed in Panda3D 1.10.8 (but will need to be in 1.11), but a workaround can be implemented in blend2bam, see #45.
Thanks!
Sorta.
Taking a blend file and loading it via
loader.loadModel("reference/to/the/file.blend")
, the second time the program is run the light is ...missing. Or something. It's no longer having the same effect on the render result, but the listed position from printing the tree hasn't changed.This only seems to have an effect on "live"
.blend
files - manually packing the.bam
file for distribution works fine. Saving the file resets the issue. So whatever is going is almost certainly related to the conversion cache, but it's not clear why.First run:
Second run:
Changing the light type from point to directional (Sun) makes it imply that the light is rotated around somewhere:
Trivial program file: