|
@@ -934,58 +934,58 @@ Error GLTFDocument::_encode_accessors(Ref<GLTFState> p_state) {
|
|
return OK;
|
|
return OK;
|
|
}
|
|
}
|
|
|
|
|
|
-String GLTFDocument::_get_accessor_type_name(const GLTFAccessorType p_accessor_type) {
|
|
|
|
- if (p_accessor_type == GLTFAccessorType::TYPE_SCALAR) {
|
|
|
|
|
|
+String GLTFDocument::_get_accessor_type_name(const GLTFAccessor::GLTFAccessorType p_accessor_type) {
|
|
|
|
+ if (p_accessor_type == GLTFAccessor::TYPE_SCALAR) {
|
|
return "SCALAR";
|
|
return "SCALAR";
|
|
}
|
|
}
|
|
- if (p_accessor_type == GLTFAccessorType::TYPE_VEC2) {
|
|
|
|
|
|
+ if (p_accessor_type == GLTFAccessor::TYPE_VEC2) {
|
|
return "VEC2";
|
|
return "VEC2";
|
|
}
|
|
}
|
|
- if (p_accessor_type == GLTFAccessorType::TYPE_VEC3) {
|
|
|
|
|
|
+ if (p_accessor_type == GLTFAccessor::TYPE_VEC3) {
|
|
return "VEC3";
|
|
return "VEC3";
|
|
}
|
|
}
|
|
- if (p_accessor_type == GLTFAccessorType::TYPE_VEC4) {
|
|
|
|
|
|
+ if (p_accessor_type == GLTFAccessor::TYPE_VEC4) {
|
|
return "VEC4";
|
|
return "VEC4";
|
|
}
|
|
}
|
|
|
|
|
|
- if (p_accessor_type == GLTFAccessorType::TYPE_MAT2) {
|
|
|
|
|
|
+ if (p_accessor_type == GLTFAccessor::TYPE_MAT2) {
|
|
return "MAT2";
|
|
return "MAT2";
|
|
}
|
|
}
|
|
- if (p_accessor_type == GLTFAccessorType::TYPE_MAT3) {
|
|
|
|
|
|
+ if (p_accessor_type == GLTFAccessor::TYPE_MAT3) {
|
|
return "MAT3";
|
|
return "MAT3";
|
|
}
|
|
}
|
|
- if (p_accessor_type == GLTFAccessorType::TYPE_MAT4) {
|
|
|
|
|
|
+ if (p_accessor_type == GLTFAccessor::TYPE_MAT4) {
|
|
return "MAT4";
|
|
return "MAT4";
|
|
}
|
|
}
|
|
ERR_FAIL_V("SCALAR");
|
|
ERR_FAIL_V("SCALAR");
|
|
}
|
|
}
|
|
|
|
|
|
-GLTFAccessorType GLTFDocument::_get_accessor_type_from_str(const String &p_string) {
|
|
|
|
|
|
+GLTFAccessor::GLTFAccessorType GLTFDocument::_get_accessor_type_from_str(const String &p_string) {
|
|
if (p_string == "SCALAR") {
|
|
if (p_string == "SCALAR") {
|
|
- return GLTFAccessorType::TYPE_SCALAR;
|
|
|
|
|
|
+ return GLTFAccessor::TYPE_SCALAR;
|
|
}
|
|
}
|
|
|
|
|
|
if (p_string == "VEC2") {
|
|
if (p_string == "VEC2") {
|
|
- return GLTFAccessorType::TYPE_VEC2;
|
|
|
|
|
|
+ return GLTFAccessor::TYPE_VEC2;
|
|
}
|
|
}
|
|
if (p_string == "VEC3") {
|
|
if (p_string == "VEC3") {
|
|
- return GLTFAccessorType::TYPE_VEC3;
|
|
|
|
|
|
+ return GLTFAccessor::TYPE_VEC3;
|
|
}
|
|
}
|
|
if (p_string == "VEC4") {
|
|
if (p_string == "VEC4") {
|
|
- return GLTFAccessorType::TYPE_VEC4;
|
|
|
|
|
|
+ return GLTFAccessor::TYPE_VEC4;
|
|
}
|
|
}
|
|
|
|
|
|
if (p_string == "MAT2") {
|
|
if (p_string == "MAT2") {
|
|
- return GLTFAccessorType::TYPE_MAT2;
|
|
|
|
|
|
+ return GLTFAccessor::TYPE_MAT2;
|
|
}
|
|
}
|
|
if (p_string == "MAT3") {
|
|
if (p_string == "MAT3") {
|
|
- return GLTFAccessorType::TYPE_MAT3;
|
|
|
|
|
|
+ return GLTFAccessor::TYPE_MAT3;
|
|
}
|
|
}
|
|
if (p_string == "MAT4") {
|
|
if (p_string == "MAT4") {
|
|
- return GLTFAccessorType::TYPE_MAT4;
|
|
|
|
|
|
+ return GLTFAccessor::TYPE_MAT4;
|
|
}
|
|
}
|
|
|
|
|
|
- ERR_FAIL_V(GLTFAccessorType::TYPE_SCALAR);
|
|
|
|
|
|
+ ERR_FAIL_V(GLTFAccessor::TYPE_SCALAR);
|
|
}
|
|
}
|
|
|
|
|
|
Error GLTFDocument::_parse_accessors(Ref<GLTFState> p_state) {
|
|
Error GLTFDocument::_parse_accessors(Ref<GLTFState> p_state) {
|
|
@@ -1088,7 +1088,7 @@ String GLTFDocument::_get_component_type_name(const uint32_t p_component) {
|
|
return "<Error>";
|
|
return "<Error>";
|
|
}
|
|
}
|
|
|
|
|
|
-Error GLTFDocument::_encode_buffer_view(Ref<GLTFState> p_state, const double *p_src, const int p_count, const GLTFAccessorType p_accessor_type, const int p_component_type, const bool p_normalized, const int p_byte_offset, const bool p_for_vertex, GLTFBufferViewIndex &r_accessor, const bool p_for_vertex_indices) {
|
|
|
|
|
|
+Error GLTFDocument::_encode_buffer_view(Ref<GLTFState> p_state, const double *p_src, const int p_count, const GLTFAccessor::GLTFAccessorType p_accessor_type, const int p_component_type, const bool p_normalized, const int p_byte_offset, const bool p_for_vertex, GLTFBufferViewIndex &r_accessor, const bool p_for_vertex_indices) {
|
|
const int component_count_for_type[7] = {
|
|
const int component_count_for_type[7] = {
|
|
1, 2, 3, 4, 4, 9, 16
|
|
1, 2, 3, 4, 4, 9, 16
|
|
};
|
|
};
|
|
@@ -1103,18 +1103,18 @@ Error GLTFDocument::_encode_buffer_view(Ref<GLTFState> p_state, const double *p_
|
|
switch (p_component_type) {
|
|
switch (p_component_type) {
|
|
case COMPONENT_TYPE_BYTE:
|
|
case COMPONENT_TYPE_BYTE:
|
|
case COMPONENT_TYPE_UNSIGNED_BYTE: {
|
|
case COMPONENT_TYPE_UNSIGNED_BYTE: {
|
|
- if (p_accessor_type == TYPE_MAT2) {
|
|
|
|
|
|
+ if (p_accessor_type == GLTFAccessor::TYPE_MAT2) {
|
|
skip_every = 2;
|
|
skip_every = 2;
|
|
skip_bytes = 2;
|
|
skip_bytes = 2;
|
|
}
|
|
}
|
|
- if (p_accessor_type == TYPE_MAT3) {
|
|
|
|
|
|
+ if (p_accessor_type == GLTFAccessor::TYPE_MAT3) {
|
|
skip_every = 3;
|
|
skip_every = 3;
|
|
skip_bytes = 1;
|
|
skip_bytes = 1;
|
|
}
|
|
}
|
|
} break;
|
|
} break;
|
|
case COMPONENT_TYPE_SHORT:
|
|
case COMPONENT_TYPE_SHORT:
|
|
case COMPONENT_TYPE_UNSIGNED_SHORT: {
|
|
case COMPONENT_TYPE_UNSIGNED_SHORT: {
|
|
- if (p_accessor_type == TYPE_MAT3) {
|
|
|
|
|
|
+ if (p_accessor_type == GLTFAccessor::TYPE_MAT3) {
|
|
skip_every = 6;
|
|
skip_every = 6;
|
|
skip_bytes = 4;
|
|
skip_bytes = 4;
|
|
}
|
|
}
|
|
@@ -1296,7 +1296,7 @@ Error GLTFDocument::_encode_buffer_view(Ref<GLTFState> p_state, const double *p_
|
|
return OK;
|
|
return OK;
|
|
}
|
|
}
|
|
|
|
|
|
-Error GLTFDocument::_decode_buffer_view(Ref<GLTFState> p_state, double *p_dst, const GLTFBufferViewIndex p_buffer_view, const int p_skip_every, const int p_skip_bytes, const int p_element_size, const int p_count, const GLTFAccessorType p_accessor_type, const int p_component_count, const int p_component_type, const int p_component_size, const bool p_normalized, const int p_byte_offset, const bool p_for_vertex) {
|
|
|
|
|
|
+Error GLTFDocument::_decode_buffer_view(Ref<GLTFState> p_state, double *p_dst, const GLTFBufferViewIndex p_buffer_view, const int p_skip_every, const int p_skip_bytes, const int p_element_size, const int p_count, const GLTFAccessor::GLTFAccessorType p_accessor_type, const int p_component_count, const int p_component_type, const int p_component_size, const bool p_normalized, const int p_byte_offset, const bool p_for_vertex) {
|
|
const Ref<GLTFBufferView> bv = p_state->buffer_views[p_buffer_view];
|
|
const Ref<GLTFBufferView> bv = p_state->buffer_views[p_buffer_view];
|
|
|
|
|
|
int stride = p_element_size;
|
|
int stride = p_element_size;
|
|
@@ -1427,12 +1427,12 @@ Vector<double> GLTFDocument::_decode_accessor(Ref<GLTFState> p_state, const GLTF
|
|
switch (a->component_type) {
|
|
switch (a->component_type) {
|
|
case COMPONENT_TYPE_BYTE:
|
|
case COMPONENT_TYPE_BYTE:
|
|
case COMPONENT_TYPE_UNSIGNED_BYTE: {
|
|
case COMPONENT_TYPE_UNSIGNED_BYTE: {
|
|
- if (a->accessor_type == TYPE_MAT2) {
|
|
|
|
|
|
+ if (a->accessor_type == GLTFAccessor::TYPE_MAT2) {
|
|
skip_every = 2;
|
|
skip_every = 2;
|
|
skip_bytes = 2;
|
|
skip_bytes = 2;
|
|
element_size = 8; //override for this case
|
|
element_size = 8; //override for this case
|
|
}
|
|
}
|
|
- if (a->accessor_type == TYPE_MAT3) {
|
|
|
|
|
|
+ if (a->accessor_type == GLTFAccessor::TYPE_MAT3) {
|
|
skip_every = 3;
|
|
skip_every = 3;
|
|
skip_bytes = 1;
|
|
skip_bytes = 1;
|
|
element_size = 12; //override for this case
|
|
element_size = 12; //override for this case
|
|
@@ -1440,7 +1440,7 @@ Vector<double> GLTFDocument::_decode_accessor(Ref<GLTFState> p_state, const GLTF
|
|
} break;
|
|
} break;
|
|
case COMPONENT_TYPE_SHORT:
|
|
case COMPONENT_TYPE_SHORT:
|
|
case COMPONENT_TYPE_UNSIGNED_SHORT: {
|
|
case COMPONENT_TYPE_UNSIGNED_SHORT: {
|
|
- if (a->accessor_type == TYPE_MAT3) {
|
|
|
|
|
|
+ if (a->accessor_type == GLTFAccessor::TYPE_MAT3) {
|
|
skip_every = 6;
|
|
skip_every = 6;
|
|
skip_bytes = 4;
|
|
skip_bytes = 4;
|
|
element_size = 16; //override for this case
|
|
element_size = 16; //override for this case
|
|
@@ -1474,7 +1474,7 @@ Vector<double> GLTFDocument::_decode_accessor(Ref<GLTFState> p_state, const GLTF
|
|
indices.resize(a->sparse_count);
|
|
indices.resize(a->sparse_count);
|
|
const int indices_component_size = _get_component_type_size(a->sparse_indices_component_type);
|
|
const int indices_component_size = _get_component_type_size(a->sparse_indices_component_type);
|
|
|
|
|
|
- Error err = _decode_buffer_view(p_state, indices.ptrw(), a->sparse_indices_buffer_view, 0, 0, indices_component_size, a->sparse_count, TYPE_SCALAR, 1, a->sparse_indices_component_type, indices_component_size, false, a->sparse_indices_byte_offset, false);
|
|
|
|
|
|
+ Error err = _decode_buffer_view(p_state, indices.ptrw(), a->sparse_indices_buffer_view, 0, 0, indices_component_size, a->sparse_count, GLTFAccessor::TYPE_SCALAR, 1, a->sparse_indices_component_type, indices_component_size, false, a->sparse_indices_byte_offset, false);
|
|
if (err != OK) {
|
|
if (err != OK) {
|
|
return Vector<double>();
|
|
return Vector<double>();
|
|
}
|
|
}
|
|
@@ -1536,7 +1536,7 @@ GLTFAccessorIndex GLTFDocument::_encode_accessor_as_ints(Ref<GLTFState> p_state,
|
|
p_state->buffers.push_back(Vector<uint8_t>());
|
|
p_state->buffers.push_back(Vector<uint8_t>());
|
|
}
|
|
}
|
|
int64_t size = p_state->buffers[0].size();
|
|
int64_t size = p_state->buffers[0].size();
|
|
- const GLTFAccessorType accessor_type = GLTFAccessorType::TYPE_SCALAR;
|
|
|
|
|
|
+ const GLTFAccessor::GLTFAccessorType accessor_type = GLTFAccessor::TYPE_SCALAR;
|
|
int component_type;
|
|
int component_type;
|
|
if (max_index > 65535 || p_for_vertex) {
|
|
if (max_index > 65535 || p_for_vertex) {
|
|
component_type = GLTFDocument::COMPONENT_TYPE_INT;
|
|
component_type = GLTFDocument::COMPONENT_TYPE_INT;
|
|
@@ -1650,7 +1650,7 @@ GLTFAccessorIndex GLTFDocument::_encode_accessor_as_vec2(Ref<GLTFState> p_state,
|
|
p_state->buffers.push_back(Vector<uint8_t>());
|
|
p_state->buffers.push_back(Vector<uint8_t>());
|
|
}
|
|
}
|
|
int64_t size = p_state->buffers[0].size();
|
|
int64_t size = p_state->buffers[0].size();
|
|
- const GLTFAccessorType accessor_type = GLTFAccessorType::TYPE_VEC2;
|
|
|
|
|
|
+ const GLTFAccessor::GLTFAccessorType accessor_type = GLTFAccessor::TYPE_VEC2;
|
|
const int component_type = GLTFDocument::COMPONENT_TYPE_FLOAT;
|
|
const int component_type = GLTFDocument::COMPONENT_TYPE_FLOAT;
|
|
|
|
|
|
accessor->max = type_max;
|
|
accessor->max = type_max;
|
|
@@ -1703,7 +1703,7 @@ GLTFAccessorIndex GLTFDocument::_encode_accessor_as_color(Ref<GLTFState> p_state
|
|
p_state->buffers.push_back(Vector<uint8_t>());
|
|
p_state->buffers.push_back(Vector<uint8_t>());
|
|
}
|
|
}
|
|
int64_t size = p_state->buffers[0].size();
|
|
int64_t size = p_state->buffers[0].size();
|
|
- const GLTFAccessorType accessor_type = GLTFAccessorType::TYPE_VEC4;
|
|
|
|
|
|
+ const GLTFAccessor::GLTFAccessorType accessor_type = GLTFAccessor::TYPE_VEC4;
|
|
const int component_type = GLTFDocument::COMPONENT_TYPE_FLOAT;
|
|
const int component_type = GLTFDocument::COMPONENT_TYPE_FLOAT;
|
|
|
|
|
|
accessor->max = type_max;
|
|
accessor->max = type_max;
|
|
@@ -1770,7 +1770,7 @@ GLTFAccessorIndex GLTFDocument::_encode_accessor_as_weights(Ref<GLTFState> p_sta
|
|
p_state->buffers.push_back(Vector<uint8_t>());
|
|
p_state->buffers.push_back(Vector<uint8_t>());
|
|
}
|
|
}
|
|
int64_t size = p_state->buffers[0].size();
|
|
int64_t size = p_state->buffers[0].size();
|
|
- const GLTFAccessorType accessor_type = GLTFAccessorType::TYPE_VEC4;
|
|
|
|
|
|
+ const GLTFAccessor::GLTFAccessorType accessor_type = GLTFAccessor::TYPE_VEC4;
|
|
const int component_type = GLTFDocument::COMPONENT_TYPE_FLOAT;
|
|
const int component_type = GLTFDocument::COMPONENT_TYPE_FLOAT;
|
|
|
|
|
|
accessor->max = type_max;
|
|
accessor->max = type_max;
|
|
@@ -1821,7 +1821,7 @@ GLTFAccessorIndex GLTFDocument::_encode_accessor_as_joints(Ref<GLTFState> p_stat
|
|
p_state->buffers.push_back(Vector<uint8_t>());
|
|
p_state->buffers.push_back(Vector<uint8_t>());
|
|
}
|
|
}
|
|
int64_t size = p_state->buffers[0].size();
|
|
int64_t size = p_state->buffers[0].size();
|
|
- const GLTFAccessorType accessor_type = GLTFAccessorType::TYPE_VEC4;
|
|
|
|
|
|
+ const GLTFAccessor::GLTFAccessorType accessor_type = GLTFAccessor::TYPE_VEC4;
|
|
const int component_type = GLTFDocument::COMPONENT_TYPE_UNSIGNED_SHORT;
|
|
const int component_type = GLTFDocument::COMPONENT_TYPE_UNSIGNED_SHORT;
|
|
|
|
|
|
accessor->max = type_max;
|
|
accessor->max = type_max;
|
|
@@ -1874,7 +1874,7 @@ GLTFAccessorIndex GLTFDocument::_encode_accessor_as_quaternions(Ref<GLTFState> p
|
|
p_state->buffers.push_back(Vector<uint8_t>());
|
|
p_state->buffers.push_back(Vector<uint8_t>());
|
|
}
|
|
}
|
|
int64_t size = p_state->buffers[0].size();
|
|
int64_t size = p_state->buffers[0].size();
|
|
- const GLTFAccessorType accessor_type = GLTFAccessorType::TYPE_VEC4;
|
|
|
|
|
|
+ const GLTFAccessor::GLTFAccessorType accessor_type = GLTFAccessor::TYPE_VEC4;
|
|
const int component_type = GLTFDocument::COMPONENT_TYPE_FLOAT;
|
|
const int component_type = GLTFDocument::COMPONENT_TYPE_FLOAT;
|
|
|
|
|
|
accessor->max = type_max;
|
|
accessor->max = type_max;
|
|
@@ -1949,7 +1949,7 @@ GLTFAccessorIndex GLTFDocument::_encode_accessor_as_floats(Ref<GLTFState> p_stat
|
|
p_state->buffers.push_back(Vector<uint8_t>());
|
|
p_state->buffers.push_back(Vector<uint8_t>());
|
|
}
|
|
}
|
|
int64_t size = p_state->buffers[0].size();
|
|
int64_t size = p_state->buffers[0].size();
|
|
- const GLTFAccessorType accessor_type = GLTFAccessorType::TYPE_SCALAR;
|
|
|
|
|
|
+ const GLTFAccessor::GLTFAccessorType accessor_type = GLTFAccessor::TYPE_SCALAR;
|
|
const int component_type = GLTFDocument::COMPONENT_TYPE_FLOAT;
|
|
const int component_type = GLTFDocument::COMPONENT_TYPE_FLOAT;
|
|
|
|
|
|
accessor->max = type_max;
|
|
accessor->max = type_max;
|
|
@@ -1999,7 +1999,7 @@ GLTFAccessorIndex GLTFDocument::_encode_accessor_as_vec3(Ref<GLTFState> p_state,
|
|
p_state->buffers.push_back(Vector<uint8_t>());
|
|
p_state->buffers.push_back(Vector<uint8_t>());
|
|
}
|
|
}
|
|
int64_t size = p_state->buffers[0].size();
|
|
int64_t size = p_state->buffers[0].size();
|
|
- const GLTFAccessorType accessor_type = GLTFAccessorType::TYPE_VEC3;
|
|
|
|
|
|
+ const GLTFAccessor::GLTFAccessorType accessor_type = GLTFAccessor::TYPE_VEC3;
|
|
const int component_type = GLTFDocument::COMPONENT_TYPE_FLOAT;
|
|
const int component_type = GLTFDocument::COMPONENT_TYPE_FLOAT;
|
|
|
|
|
|
accessor->max = type_max;
|
|
accessor->max = type_max;
|
|
@@ -2075,7 +2075,7 @@ GLTFAccessorIndex GLTFDocument::_encode_sparse_accessor_as_vec3(Ref<GLTFState> p
|
|
p_state->buffers.push_back(Vector<uint8_t>());
|
|
p_state->buffers.push_back(Vector<uint8_t>());
|
|
}
|
|
}
|
|
int64_t size = p_state->buffers[0].size();
|
|
int64_t size = p_state->buffers[0].size();
|
|
- const GLTFAccessorType accessor_type = GLTFAccessorType::TYPE_VEC3;
|
|
|
|
|
|
+ const GLTFAccessor::GLTFAccessorType accessor_type = GLTFAccessor::TYPE_VEC3;
|
|
const int component_type = GLTFDocument::COMPONENT_TYPE_FLOAT;
|
|
const int component_type = GLTFDocument::COMPONENT_TYPE_FLOAT;
|
|
|
|
|
|
sparse_accessor->normalized = false;
|
|
sparse_accessor->normalized = false;
|
|
@@ -2103,7 +2103,7 @@ GLTFAccessorIndex GLTFDocument::_encode_sparse_accessor_as_vec3(Ref<GLTFState> p
|
|
} else {
|
|
} else {
|
|
sparse_accessor->sparse_indices_component_type = GLTFDocument::COMPONENT_TYPE_UNSIGNED_SHORT;
|
|
sparse_accessor->sparse_indices_component_type = GLTFDocument::COMPONENT_TYPE_UNSIGNED_SHORT;
|
|
}
|
|
}
|
|
- if (_encode_buffer_view(p_state, changed_indices.ptr(), changed_indices.size(), GLTFAccessorType::TYPE_SCALAR, sparse_accessor->sparse_indices_component_type, sparse_accessor->normalized, sparse_accessor->sparse_indices_byte_offset, false, buffer_view_i_indices) != OK) {
|
|
|
|
|
|
+ if (_encode_buffer_view(p_state, changed_indices.ptr(), changed_indices.size(), GLTFAccessor::TYPE_SCALAR, sparse_accessor->sparse_indices_component_type, sparse_accessor->normalized, sparse_accessor->sparse_indices_byte_offset, false, buffer_view_i_indices) != OK) {
|
|
return -1;
|
|
return -1;
|
|
}
|
|
}
|
|
// We use changed_indices.size() here, because we must pass the number of vec3 values rather than the number of components.
|
|
// We use changed_indices.size() here, because we must pass the number of vec3 values rather than the number of components.
|
|
@@ -2180,7 +2180,7 @@ GLTFAccessorIndex GLTFDocument::_encode_accessor_as_xform(Ref<GLTFState> p_state
|
|
p_state->buffers.push_back(Vector<uint8_t>());
|
|
p_state->buffers.push_back(Vector<uint8_t>());
|
|
}
|
|
}
|
|
int64_t size = p_state->buffers[0].size();
|
|
int64_t size = p_state->buffers[0].size();
|
|
- const GLTFAccessorType accessor_type = GLTFAccessorType::TYPE_MAT4;
|
|
|
|
|
|
+ const GLTFAccessor::GLTFAccessorType accessor_type = GLTFAccessor::TYPE_MAT4;
|
|
const int component_type = GLTFDocument::COMPONENT_TYPE_FLOAT;
|
|
const int component_type = GLTFDocument::COMPONENT_TYPE_FLOAT;
|
|
|
|
|
|
accessor->max = type_max;
|
|
accessor->max = type_max;
|
|
@@ -2234,9 +2234,9 @@ Vector<Color> GLTFDocument::_decode_accessor_as_color(Ref<GLTFState> p_state, co
|
|
}
|
|
}
|
|
|
|
|
|
const int accessor_type = p_state->accessors[p_accessor]->accessor_type;
|
|
const int accessor_type = p_state->accessors[p_accessor]->accessor_type;
|
|
- ERR_FAIL_COND_V(!(accessor_type == TYPE_VEC3 || accessor_type == TYPE_VEC4), ret);
|
|
|
|
|
|
+ ERR_FAIL_COND_V(!(accessor_type == GLTFAccessor::TYPE_VEC3 || accessor_type == GLTFAccessor::TYPE_VEC4), ret);
|
|
int vec_len = 3;
|
|
int vec_len = 3;
|
|
- if (accessor_type == TYPE_VEC4) {
|
|
|
|
|
|
+ if (accessor_type == GLTFAccessor::TYPE_VEC4) {
|
|
vec_len = 4;
|
|
vec_len = 4;
|
|
}
|
|
}
|
|
|
|
|