Open jabcross opened 4 years ago
Making it so the viewport doesn't descend from the sprite only prevents some of the errors, and now it renders correctly. The error messages are still annoying, tho.
Interestingly, changing the order of the nodes changes the number of errors too.
On further inspection, I attempt to assign the ViewportTexture through GDScript.
The highlighted line doesn't seem to execute; after that, the Sprite3D's texture is still [empty] in the remote inspector.
Found a workaround: setting the texture from code using Viewport::get_texture()
seems to work. However, I think that the other way I tried to do it should have worked as well.
Also, doing this on ready prevents it from rendering in the editor.
Seems like changing the viewport path dynamically doesn't update the vp
pointer in ViewportTexture
.
Still valid in a3a3b02 I re-assigned the viewport path and it reduced error count from 7 to 4. The viewport texture displays correctly despite the error.
EDIT: On another test, seems like this error only appears on saving. I remember some issue where scene is fake-instanced upon save, which might lead to errors. This is probably the case here.
Issue is still fully valid in 3.2.4 beta3 though.
Godot version: commit 9002b045c (Godot 3.2 beta)
OS/device including version: Linux Mint 19
Issue description:
Instancing a Sprite3D with a ViewportTexture that points to a viewport which descends from it generates many errors and doesn't render correctly.
Minimal reproduction project:
viewport_wierdness.zip