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

Option for saving 'gltf.extras' #200

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

pairote
Copy link

@pairote pairote commented Jun 8, 2019

Hello,

According to the glTF 2.0 specification, extras is one of the properties of the root object for a glTF asset. Its purpose is for storing application-specific data. See: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#reference-gltf

This PR adds a new command line flag --extrasPath for specifying the path to a JSON file that contains an object for storing application-specific data. It also adds an option extras for specifying the object when using obj2gltf as a library. The object will be saved to the top-level of the glTF.

Although the type of extras is any which includes primitive types, the discussion on the glTF spec for primitive extras has resolved — extras should be objects as best practice, and primitive extras may be disallowed in the future. See: KhronosGroup/glTF#1120

Best,

@lilleyse
Copy link
Contributor

lilleyse commented Jun 8, 2019

@pairote before we review can you submit a CLA?

@pairote
Copy link
Author

pairote commented Jun 9, 2019

Hi @lilleyse, I just submitted my CLA to cla@agi.com.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 9, 2019

Thanks again for contributing, @pairote! We received your CLA.

@samjhill
Copy link

can we get this merged? I would love to have this functionality. Thank you!

@samjhill
Copy link

@pjcozzi @lilleyse

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

Successfully merging this pull request may close these issues.

4 participants