diff options
Diffstat (limited to 'modules/gltf/structures/gltf_accessor.cpp')
-rw-r--r-- | modules/gltf/structures/gltf_accessor.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/modules/gltf/structures/gltf_accessor.cpp b/modules/gltf/structures/gltf_accessor.cpp index 1ebc00a514..300fce09ff 100644 --- a/modules/gltf/structures/gltf_accessor.cpp +++ b/modules/gltf/structures/gltf_accessor.cpp @@ -39,6 +39,19 @@ void GLTFAccessor::_bind_methods() { BIND_ENUM_CONSTANT(TYPE_MAT3); BIND_ENUM_CONSTANT(TYPE_MAT4); + BIND_ENUM_CONSTANT(COMPONENT_TYPE_NONE); + BIND_ENUM_CONSTANT(COMPONENT_TYPE_SIGNED_BYTE); + BIND_ENUM_CONSTANT(COMPONENT_TYPE_UNSIGNED_BYTE); + BIND_ENUM_CONSTANT(COMPONENT_TYPE_SIGNED_SHORT); + BIND_ENUM_CONSTANT(COMPONENT_TYPE_UNSIGNED_SHORT); + BIND_ENUM_CONSTANT(COMPONENT_TYPE_SIGNED_INT); + BIND_ENUM_CONSTANT(COMPONENT_TYPE_UNSIGNED_INT); + BIND_ENUM_CONSTANT(COMPONENT_TYPE_SINGLE_FLOAT); + BIND_ENUM_CONSTANT(COMPONENT_TYPE_DOUBLE_FLOAT); + BIND_ENUM_CONSTANT(COMPONENT_TYPE_HALF_FLOAT); + BIND_ENUM_CONSTANT(COMPONENT_TYPE_SIGNED_LONG); + BIND_ENUM_CONSTANT(COMPONENT_TYPE_UNSIGNED_LONG); + ClassDB::bind_method(D_METHOD("get_buffer_view"), &GLTFAccessor::get_buffer_view); ClassDB::bind_method(D_METHOD("set_buffer_view", "buffer_view"), &GLTFAccessor::set_buffer_view); ClassDB::bind_method(D_METHOD("get_byte_offset"), &GLTFAccessor::get_byte_offset); @@ -108,7 +121,7 @@ int GLTFAccessor::get_component_type() { } void GLTFAccessor::set_component_type(int p_component_type) { - component_type = p_component_type; + component_type = (GLTFComponentType)p_component_type; } bool GLTFAccessor::get_normalized() { @@ -188,7 +201,7 @@ int GLTFAccessor::get_sparse_indices_component_type() { } void GLTFAccessor::set_sparse_indices_component_type(int p_sparse_indices_component_type) { - sparse_indices_component_type = p_sparse_indices_component_type; + sparse_indices_component_type = (GLTFComponentType)p_sparse_indices_component_type; } int GLTFAccessor::get_sparse_values_buffer_view() { |