Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing SpatialMaterials with images causes errors in the debugger #4

Open
TwistedTwigleg opened this issue Oct 13, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@TwistedTwigleg
Copy link
Owner

Right now when you import a scene with a SpatialMaterial, you get a bunch of errors in the debugger saying the following:

Condition ' !f ' is true. returned: ERR_CANT_OPEN

This is because saved SpatialMaterials currently do not have their images cleared before being saved. This means when the DSCN file is being loaded and the SpatialMaterial is created, it tries to load images at RID's that do not exist.

This does not cause any problems beyond some annoying messages though, because the images in the material are replaced with the saved images in the DSCN shortly after.


The solution to this is to clear any references to images in the SpatialMaterial before saving the SpatialMaterial, similar to what is being done for Sprite nodes. Unfortunately when I tried clearing the images in materials previously, it cleared the images in the currently open scene as well.

Ideally, saved SpatialMaterials will have all their images cleared before being saved, which will remove these errors in the debugger. The problem is clearing the references without altering the materials in the scene.

@TwistedTwigleg TwistedTwigleg added the bug Something isn't working label Oct 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant