Skip to content

Asset handling

Frontrider edited this page Dec 29, 2022 · 3 revisions

Previews

The plugin uses EditorInterface.make_mesh_previews to create the thumbnails,and it will try to find the first non-empty mesh in the scene. Any component that has more than one mesh creating its visuals will only have a partial preview.

The alternative, is to have a get_mesh method on the root node that returns the mesh the preview should be made out of. This method might still be bugged, but should work.

Thanks to idbrii the addon finds the first non-empty mesh to get a preview from.

Imports

Under import scripts, there are a set of scripts that are meant to push the asset's mesh to the root to help with some asset kits. They are marked with obj as that style is what they were meant to work with, but should work with other formats as well.

They use an internal import pipeline that allows for a lot of flexibility in how the file should be handled.

This was originally created when I decided to treat the PackedScene resource as the base format as that gives the most flexibility. 3D models can be imported as such, and they can also be made by hand inside godot.

Clone this wiki locally