How do I access an imported 3D file?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By kitfox

I’m reading through the Godot documentation for ‘Importing 3D Scenes’. I’ve exported a model from blender in .gltf format and it appears as a resource in my FIleSystem control. If I double click on it, a scene will open displaying the exported data. However, I’m not sure what to do with it next. I’d like to refer to it from another scene I’m writing, so I’m guessing I need to manually open the .gltf resource and then save it as a scene? Will it automatically update if I export again from blender? When I open the resource, should I choose ‘open anyways’ or ‘new inherited’? Or is there some node that takes a .gltf resource as a parameter?

:bust_in_silhouette: Reply From: omggomb

Even though your model is listed as .gltf it is in fact a scene and can be instanced like any other .tscn. It should autoupdate but won’t due to a bug, see the end of this answer.

Anything else than obj will get imported as an entire scene (not resource) by default. This means you can just instance your .gltf directly in the scene tree. If you would rather want individual mesh resources and materials, there is an option to do so, see the docs. This can also be saved as an editor wide default.

The warning when opening an imported scene means that you can’t change that imported scene from within Godot because any reimport would override your changes. That’s what inherited scenes are for, but you can’t delete nodes in the inherited scene, again because reimporting would likely override that deletion.

Note that there is a bug in Godot right now which prevents changed models from reloading automatically. You’ll have to close and reopen the scene you are using the models in to see changes made. See this github issue.

You’ll have to close and reopen the scene you are using the models in to see changes made. See this github issue.

You can also click Scene > Revert Scene at the top of the editor. If you do this often enough, feel free to bind a shortcut to it in the Editor Settings.

Calinou | 2020-02-26 12:45