diff options
author | Lyuma <xn.lyuma@gmail.com> | 2021-11-01 17:31:59 -0700 |
---|---|---|
committer | Lyuma <xn.lyuma@gmail.com> | 2021-11-01 23:22:45 -0700 |
commit | de93d489012772a9a9eaa0a6b962fa411a1ea06c (patch) | |
tree | 8b82dccf3a363bc436fc5ff419132e622eb3a89f /modules/gltf/gltf_mesh.h | |
parent | 5945f43cc8d18976129e7f59003caf3873c90e22 (diff) |
glTF: Fix override materials and non-empty arrays
Keep track of MeshInstance and GeometryInstance override materials in the GLTFMesh object.
Ensure all arrays are non-empty to conform with "minItems":1 in glTF spec.
Diffstat (limited to 'modules/gltf/gltf_mesh.h')
-rw-r--r-- | modules/gltf/gltf_mesh.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/gltf/gltf_mesh.h b/modules/gltf/gltf_mesh.h index 3aba0ede32..cc2be93c09 100644 --- a/modules/gltf/gltf_mesh.h +++ b/modules/gltf/gltf_mesh.h @@ -43,6 +43,7 @@ class GLTFMesh : public Resource { private: Ref<ImporterMesh> mesh; Vector<float> blend_weights; + Array instance_materials; protected: static void _bind_methods(); @@ -52,5 +53,7 @@ public: void set_mesh(Ref<ImporterMesh> p_mesh); Vector<float> get_blend_weights(); void set_blend_weights(Vector<float> p_blend_weights); + Array get_instance_materials(); + void set_instance_materials(Array p_instance_materials); }; #endif // GLTF_MESH_H |