You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Okay, nice. I already patched the code in a fork, and I also noticed that many objects derive from GLTF::Object are not children-of-the-root, and according to the official GLTF schema, these should not have a name. So we might need to add an extra base-class GLTF::ChildOfRoot or something, like in the schema.
Okay, nice. I already patched the code in a fork, and I also noticed that many objects derive from GLTF::Object are not children-of-the-root, and according to the official GLTF schema, these should not have a name.
Yes, I did see that conversation on the glTF repo - opened up #228 for tracking it here.
So we might need to add an extra base-class GLTF::ChildOfRoot or something, like in the schema.
I'd be open to that as a solution. Inheritance-wise it's probably easier to remove the concept of name from GLTF::Object and create a subclass called GLTF::RootObject that has a name and all root objects inherit from that. (edit: I misread, I think this is pretty much what you said above). Then, create a GLTF::NameExtra class that we can add to the extras on non-root objects with COLLADA names.
It seems that sometimes the
name
property is written first, and sometimes last.That's because the base class
GLTF::Object::writeJSON
is not always called in the beginning of each override writeJSON method.GLTF::Object::writeJSON
also writes other properties likeextras
andextensions
.I think it is easier to debug and read the JSON when the
name
property always comes first?The text was updated successfully, but these errors were encountered: