Skip to content

Commit

Permalink
Assign the min values in gltf accessors
Browse files Browse the repository at this point in the history
  • Loading branch information
lyuma authored and lekoder committed Dec 18, 2021
1 parent a311d88 commit 144bfdf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/gltf/gltf_document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1690,6 +1690,7 @@ GLTFAccessorIndex GLTFDocument::_encode_accessor_as_vec2(Ref<GLTFState> state, c
for (int32_t min_i = 0; min_i < min.size(); min_i++) {
write_min[min_i] = type_min[min_i];
}
accessor->min = min;
accessor->normalized = false;
accessor->count = p_attribs.size();
accessor->type = type;
Expand Down Expand Up @@ -1749,6 +1750,7 @@ GLTFAccessorIndex GLTFDocument::_encode_accessor_as_color(Ref<GLTFState> state,
for (int32_t min_i = 0; min_i < min.size(); min_i++) {
write_min[min_i] = type_min[min_i];
}
accessor->min = min;
accessor->normalized = false;
accessor->count = p_attribs.size();
accessor->type = type;
Expand Down Expand Up @@ -1825,6 +1827,7 @@ GLTFAccessorIndex GLTFDocument::_encode_accessor_as_weights(Ref<GLTFState> state
for (int32_t min_i = 0; min_i < min.size(); min_i++) {
write_min[min_i] = type_min[min_i];
}
accessor->min = min;
accessor->normalized = false;
accessor->count = p_attribs.size();
accessor->type = type;
Expand Down Expand Up @@ -1883,6 +1886,7 @@ GLTFAccessorIndex GLTFDocument::_encode_accessor_as_joints(Ref<GLTFState> state,
for (int32_t min_i = 0; min_i < min.size(); min_i++) {
write_min[min_i] = type_min[min_i];
}
accessor->min = min;
accessor->normalized = false;
accessor->count = p_attribs.size();
accessor->type = type;
Expand Down Expand Up @@ -1943,6 +1947,7 @@ GLTFAccessorIndex GLTFDocument::_encode_accessor_as_quats(Ref<GLTFState> state,
for (int32_t min_i = 0; min_i < min.size(); min_i++) {
write_min[min_i] = type_min[min_i];
}
accessor->min = min;
accessor->normalized = false;
accessor->count = p_attribs.size();
accessor->type = type;
Expand Down Expand Up @@ -2019,6 +2024,7 @@ GLTFAccessorIndex GLTFDocument::_encode_accessor_as_floats(Ref<GLTFState> state,
for (int32_t min_i = 0; min_i < min.size(); min_i++) {
write_min[min_i] = type_min[min_i];
}
accessor->min = min;
accessor->normalized = false;
accessor->count = ret_size;
accessor->type = type;
Expand Down Expand Up @@ -2076,6 +2082,7 @@ GLTFAccessorIndex GLTFDocument::_encode_accessor_as_vec3(Ref<GLTFState> state, c
for (int32_t min_i = 0; min_i < min.size(); min_i++) {
write_min[min_i] = type_min[min_i];
}
accessor->min = min;
accessor->normalized = false;
accessor->count = p_attribs.size();
accessor->type = type;
Expand Down Expand Up @@ -2155,6 +2162,7 @@ GLTFAccessorIndex GLTFDocument::_encode_accessor_as_xform(Ref<GLTFState> state,
for (int32_t min_i = 0; min_i < min.size(); min_i++) {
write_min[min_i] = type_min[min_i];
}
accessor->min = min;
accessor->normalized = false;
accessor->count = p_attribs.size();
accessor->type = type;
Expand Down

0 comments on commit 144bfdf

Please sign in to comment.