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

Generate json pointer #951

Closed
jjcasmar opened this issue Feb 26, 2020 · 3 comments
Closed

Generate json pointer #951

jjcasmar opened this issue Feb 26, 2020 · 3 comments

Comments

@jjcasmar
Copy link
Contributor

I am implementing a first draft of EXT_property_animation. My idea is to have a proff of concept of the extension working and then try to move the extension so it can be ratified.

The extension allows to animate any property using json pointers. It is something like this:

"animations" : [
    {
        "extensions" : {
            "EXT_property_animation" : {
                "channels" : [
                    {
                        "sampler" : 0,
                        "target" : "/materials/1/pbrMetallicRoughness/roughnessFactor"
                    },
                    {
                        "sampler" : 1,
                        "target" : "/materials/1/pbrMetallicRoughness/baseColorFactor"
                    }
                ]
            }
        }
    ]

Right now, the exporter generates a python scene which represents the glTF scene, and then is converted to json. In the python scene, a glTF.Node references a glTF.Mesh. When it is converted to json, that reference is converted to an index.

I would like to know if its possible to also convert it to a json pointer to ease the implementation of EXT_property_animation

@donmccurdy
Copy link
Contributor

Related: #776

@jjcasmar
Copy link
Contributor Author

The extension itself will be implemented as a gltf hook

@donmccurdy
Copy link
Contributor

I would like to know if its possible to also convert it to a json pointer to ease the implementation of EXT_property_animation

Sorry, I think the answer here is no, nothing currently exists that generates JSON pointers. Probably this addon can make some guarantees about the order in which objects will be written to JSON, once they are in the Python scene, but I don't think we can do more than that.

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

No branches or pull requests

2 participants