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

Changing type in import dock should not require editor restart #64856

Closed
lyuma opened this issue Aug 24, 2022 · 8 comments
Closed

Changing type in import dock should not require editor restart #64856

lyuma opened this issue Aug 24, 2022 · 8 comments

Comments

@lyuma
Copy link
Contributor

lyuma commented Aug 24, 2022

Godot version

4.0.alpha 14

System information

Windows 10

Issue description

Changing the type of a .glb model to AnimationLibrary is expected to be a common operation. Currently, this requires restarting the Godot editor for every file changed.

From a jitsi conversation with reduz, changing the type of a resource to an incompatible type (for example, PackedScene -> AnimationLibrary) should not require an editor restart.

dialog showing import restart needed

The unknown question is which cases of texture types can avoid a restart.
What about going to Keep File (no import) and back?

Steps to reproduce

  1. Import a gltf document
  2. Change the Import As to Animation Library and click Import
  3. A confirmation dialog pops up asking the user to save all scenes and restart.

Minimal reproduction project

N/A

@Calinou
Copy link
Member

Calinou commented Aug 24, 2022

Related to godotengine/godot-proposals#2500.

@cyraid
Copy link

cyraid commented Oct 18, 2023

Related to godotengine/godot-proposals#2500.

@Calinou How is this related to the proposal mentioned in 2500 ? This proposal mentions when changing import type it Godot shouldn't have to restart every time.

@lyuma
Copy link
Contributor Author

lyuma commented Oct 18, 2023

It looks like proposal godotengine/godot-proposals#2500 (beware: not bug #2500 which is unrelated) is related in terms of allowing changing the default import type, which would reduce the need to change the type after the fact:

There should be a way to specify, for a given extension (e.g. png, obj, csv), what should be the default ResourceImporter used to import any newly added asset with this extension.

This should likely be a project setting, ...

So it is not the entire solution to this issue but might mitigate how often the import settings need to be changed, for some file formats.

I think for .glb in particular, godotengine/godot-proposals#2500 would not address the issue, becasue the most common workflow is to bring in a character and then also bring in sets of animations. Those are almost always in the same format: all .fbx or all .glb, because they are often created in the same modeling software (such as Blender, Maya). Furthermore there are many non-animation assets brought in as .glb files, so it would be unreasonable to change .glb to default to AnimationLibrary in an actual project.

@cyraid
Copy link

cyraid commented Oct 18, 2023

@lyuma I would think being allowed to have, say, an import group of assets (like Unity) would solve a lot too. For example, an aseprite file has animation and texture assets, etc. FBX would have animation, model data, materials, etc. Currently you can embed or extract with advanced 3D importer, but what about other formats that have multiple assets? It would be nice to see a group for the asset in the filesystem tree under that asset and click and drag as appropriate. This would solve having to change the 'type' as it would import into the current asset group, thus changing the need to restart when changing type?

@lyuma
Copy link
Contributor Author

lyuma commented Oct 18, 2023

You can solve this with the advanced importer workflow, since it can extract animations into animation files. one approach that could work would be if something could automatically create a library with these extracted animations.

There's a bit of redundancy in terms of AnimationLibrary import workflow vs the advanced importer anim.res extraction workflow, which seems to be the favorite of some people I asked recently.

What if the "group" concept could be done by the filesystem automatically if a .import file is detected with advanced import settings that extracts to a group of resources? Just an idea.

@cyraid
Copy link

cyraid commented Oct 18, 2023

What if the "group" concept could be done by the filesystem automatically if a .import file is detected with advanced import settings that extracts to a group of resources? Just an idea.

Yup. You'd have my vote then.

I'll have to check more into the advanced import settings.

Edit: I ran into ..

func _get_resource_type():
	return "StandardMaterial3D"

.. in the docs, and it still troubles me that it really should allow multiple types per import, if an array is returned it'd go into "group" mode.

@AThousandShips
Copy link
Member

Does this still apply after:

@lyuma
Copy link
Contributor Author

lyuma commented Feb 21, 2024

Pretty sure this was fixed.
image
Comment or re-open if this issue still happens.

@lyuma lyuma closed this as completed Feb 21, 2024
@AThousandShips AThousandShips added this to the 4.2 milestone Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants