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

Add Blender Exporter Version to Generator String or Asset Extras #19

Open
robertlong opened this issue Sep 30, 2021 · 6 comments
Open
Labels
implementation old is this still relevant ?

Comments

@robertlong
Copy link
Member

We should put the version of the Blender Exporter in the exported glTF file so we can debug issues with the exporter.

@antpb
Copy link
Contributor

antpb commented Dec 12, 2021

Feel like I have a pretty good idea of how to add this in. Just curious where it should go.

Here is existing json from an exported glb. Where would we want to add the property?

JSON{"asset":{"generator":"Khronos glTF Blender I/O v1.6.16","version":"2.0"},"extensionsUsed":["OMI_audio_emitter"],"scene":0,"scenes":...

Currently it exports for extensionsUsed as OMI_audio_emitter I could see us adding a property for version in there, but I feel like I'm missing something that may already support that.

I've been reading up here: https://github.com/KhronosGroup/glTF-Blender-IO/tree/master/example-addons/example_gltf_extension

And found in the example there was a version defined for an extension (unused in the final glb): https://github.com/KhronosGroup/glTF-Blender-IO/blob/master/example-addons/example_gltf_extension/__init__.py#L6

I assume gather_asset_hook would allow us to add the version there too.

Still digging but thought I'd seed the question on where version should be. I looked into adding it at the individual instance level but that didn't make sense. I think it should be somehow related to the extensionsUsed property and as global as possible.

Side question, Should extensionsUsed be OMI Blender Exporter or an underscored variation of that?

@humbletim
Copy link
Contributor

Technically extensionsUsed can include any unique set of string [1-*] values, but the de facto standard seems to be using PREFIX_ALL_CAPS_UNDERSCORED identifiers. At one point the idea of including a version number surfaced -- like OMI_audio_emitter_1_0.

I believe the most recent consensus re: revisioning the spec itself was that this initial release represents conceptual 1.0, and any successor version would require its own standalone spec.

Re: versioning the Blender OMI Add-On -- that still seems to be an open question. Personally I think appending ; OMI Add-On v0.01 to generator could make sense (given some tools already seem to report on the generator value), or adding our own dedicated version property under asset.

@robertlong
Copy link
Member Author

Yeah, what @humbletim said. Either appending it to the generator property so that it shows up in other tools that already use it, or adding it to a new extras field. I'm not certain which is best yet though.

@antpb
Copy link
Contributor

antpb commented Dec 15, 2021

Starting work here: humbletim/omi-blender-gltf#1

Currently that PR will allow us to create GLTF that look like this

JSON{"asset":{"extras":{"OMI_Blender_GLTF_Version":"0.0.1"},"generator":"Khronos glTF Blender I/O v1.6.16","version":"2.0"},"extensionsUsed":["OMI_audio_emitter"],"extensions":{"OMI_audio_emitter":{"audioSources":[{"name":"","uri":"https://xp3d.io/wp-content/uploads/2021/12/OutdoorFestival_audio3.mp3","mimeType":"audio/mpeg"}],"audioEmitters":[{"type":"global","gain":0,"loop":true,"autoPlay":true,"source":0,"coneInnerAngle":0,"coneOuterAngle":0,"coneOuterGain":0,"distanceModel":"inverse","maxDistance":0,"refDistance":0,"rolloffFactor":0,"name":""},

@aaronfranke
Copy link
Member

Is this issue still relevant? The PR in the last comment has been merged.

@yankscally yankscally added the old is this still relevant ? label Jan 3, 2025
@yankscally
Copy link

Is this issue still relevant? The PR in the last comment has been merged.

I'm going to add an old label to these, and at the meeting we can discuss closing them? see my issue #241

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
implementation old is this still relevant ?
Projects
None yet
Development

No branches or pull requests

5 participants