Closed gwihlidal closed 5 years ago
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.
If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!
This is most elegant, nicely done. At first I wasn't crazy about the idea of generating JSON so early in the process -- typically that'd go in the Raw->FBX stage -- but for something as generic as user properties, it's the right move. Thanks!
Oops, I mixed up who did what. So this uses @EscapeZero's existing code and extends it to materials, which is good. I'm less crazy about the needless duplication of the switch statement that translates types to type names. It'd be nice to abstract that out. I may push 0.9.6 out like this, though, and have a go at tidying things up later.
This PR adds support for exporting user properties assigned to materials, previously ignored and missing from the glTF "extras" section.
Now an example materials section in the glTF looks like this (note: halcyonUrl):