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

Let GLTF labeled assets be accessed by their names #12511

Closed
viridia opened this issue Mar 16, 2024 · 1 comment
Closed

Let GLTF labeled assets be accessed by their names #12511

viridia opened this issue Mar 16, 2024 · 1 comment
Labels
C-Enhancement A new feature S-Needs-Triage This issue needs to be labelled

Comments

@viridia
Copy link
Contributor

viridia commented Mar 16, 2024

What problem does this solve or what need does it fill?

Most of my GLTF assets contain multiple scenes - they are catalogs of objects. It's cumbersome to have to look up scenes in "named_scenes", it would be nice if I could simply load the named scene (using the name I assign in Blender) as a labeled asset. I realize there's an issue because names can collide, but I think there's a simple solution.

What solution would you like?

The solution is to use prefixes. A material named "Foo" will have a label "Material.Foo".

For scenes, we could either use "Scene.", or alternatively since loading scenes is so common, make scenes the exception that don't require a label. So the "SmallWoodenTable" object in "carpentry.glb" would either be "carpentry.glb#Scene.SmallWoodenTable" or "carpentry.glb#SmallWoodenTable".

Of course, there's still a possibility of collisions, but people will quickly learn not to author assets that have name collisions.

What alternative(s) have you considered?

Currently I'm dereferencing the asset and then looking up in named_scenes, but this requires a whole extra system to peek inside the asset once it's loaded. Not ideal.

Using numbered scenes, e.g. "Scene0" is a total non-starter because the numbers aren't stable.

@viridia viridia added C-Enhancement A new feature S-Needs-Triage This issue needs to be labelled labels Mar 16, 2024
@mockersf
Copy link
Member

duplicate of #10715

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Enhancement A new feature S-Needs-Triage This issue needs to be labelled
Projects
None yet
Development

No branches or pull requests

2 participants