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

when importing .gltf with separate meshes, naming of imported meshes is unintuitive and different than what it was in < 3.4 #54922

Closed
Rbetik opened this issue Nov 12, 2021 · 15 comments

Comments

@Rbetik
Copy link

Rbetik commented Nov 12, 2021

Godot version

3.4

System information

Mac OS Mojave 10.14.4

Issue description

When importing .gltf with option 'import with separate objects ' resulting .mesh files are named as 'scene name' + default type from 3d editor instead of custom name as it was in previous versions

Steps to reproduce

  1. import .gltf with separate objects
  2. look at names of resulting .mesh files

Minimal reproduction project

weight_paint_import_bug

Edited: Url was incorrect.

@fire
Copy link
Member

fire commented Nov 12, 2021

Can you give an example what you want it to be if you can change the name?

@Rbetik
Copy link
Author

Rbetik commented Nov 12, 2021

How it worked in 3.3.4 (and below ) seemed pretty intuitive, mesh name was the same as name of meshinstance class in .gltf scene, which is the same as name of object in 3d modeling tool.

@betalars
Copy link
Contributor

Can replicate, went here to make this an issue myself.

I get, that this behavior might help when users do messy naming conventions, but it breaks your project, when you are using previously established proper naming conventions.

Also: I would add that the use legacy names checkbox seems to not be working right now. (I would assume this is intended so users may keep the naming convention as it previously worked)

Please fix this ASAP. I was just in the process of updating all my meshes and import files to use a good naming scheme so I can find everything and now I have to redo that entirely. Not looking forward to having to redo that process again.
image

@betalars
Copy link
Contributor

Can you give an example what you want it to be if you can change the name?

I think the change is fine and I think I will adjust my naming convention to fit the new system (well I have to anyway, because I cannot wait for the fix). I just think the Checkbox should work so users can keep their existing conventions.

This being said: I think I have a slight preference for using the old scheme as default and have the checkbox be relabelled to something like "Include root file name"

@joeyeroq
Copy link

joeyeroq commented Nov 26, 2021

This change is not fine, the gltf file name should not be part (a prefix) of the mesh name. This change has unfortunately has spilled over to the godot 4 version and hopefully will be reversed.

@Calinou Calinou added this to the 3.5 milestone Nov 27, 2021
@Calinou
Copy link
Member

Calinou commented Nov 27, 2021

This is a regression from #49120 (which is a 3.x backport of a larger feature). See #45545 and #47074 for original PRs against the master branch that modify relevant files.

In the 3.x branch, use_legacy_names is true by default:

r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "nodes/use_legacy_names"), true));

However, I can see that it's forcibly set to false for files that do not have an existing .import file (not to be confused with the top-level .import/ folder):

params["nodes/use_legacy_names"] = false;

@betalars
Copy link
Contributor

betalars commented Dec 2, 2021

However, I can see that it's forcibly set to false for files that do not have an existing .import file (not to be confused with the top-level .import/ folder):

Is there a way to override that for users?

@Calinou
Copy link
Member

Calinou commented Dec 2, 2021

Is there a way to override that for users?

Select the glTF file in the FileSystem dock, go to the Import dock, check Use Legacy Names and click Reimport:

image

I can confirm that it's disabled for newly imported glTF scenes, as I said above.

@betalars
Copy link
Contributor

betalars commented Dec 4, 2021

I can confirm that it's disabled for newly imported glTF scenes, as I said above.

Just to confirm: this means if I first imported an glTF with an older version of godot, that checkbox can work, but if I used godot 3.4 for adding that file to my project the legacy-names checkbox won't work no matter what.

Because currently it is not working no matter what for me right now...

@akien-mga
Copy link
Member

See #55796, there was indeed a regression in 3.4-stable which made the nodes/use_legacy_names option not functional, since it wouldn't see the regex module as available.

This was fixed by #54911 which is included in 3.4.1.

You can either reimport models with 3.4.1 RC 2 or 3.3.4 stable and they should have the legacy names, unless the option is disabled.

@RockyMadio
Copy link

Thank you.

Those compression options will make the meshes load faster during runtime?

@Calinou
Copy link
Member

Calinou commented Dec 19, 2021

Those compression options will make the meshes load faster during runtime?

Mesh compression is mostly about improving rendering performance and reducing battery usage on mobile platforms. It's unlikely to affect loading times.

@RockyMadio
Copy link

Is this issue already solved in the new/current build?

@Calinou
Copy link
Member

Calinou commented Feb 26, 2022

Is this issue already solved in the new/current build?

No, see #56447.

@RockyMadio
Copy link

No, see #56447.

Thank you

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

8 participants