feat: modules moved and engine moved to submodule

This commit is contained in:
Jan van der Weide 2025-04-12 18:40:44 +02:00
parent dfb5e645cd
commit c33d2130cc
5136 changed files with 225275 additions and 64485 deletions

View file

@ -645,8 +645,7 @@ Array SurfaceTool::commit_to_arrays() {
case Mesh::ARRAY_BONES: {
int count = skin_weights == SKIN_8_WEIGHTS ? 8 : 4;
Vector<int> array;
array.resize(varr_len * count);
array.fill(0);
array.resize_zeroed(varr_len * count);
int *w = array.ptrw();
for (uint32_t idx = 0; idx < vertex_array.size(); idx++) {
@ -669,8 +668,7 @@ Array SurfaceTool::commit_to_arrays() {
Vector<float> array;
int count = skin_weights == SKIN_8_WEIGHTS ? 8 : 4;
array.resize(varr_len * count);
array.fill(0.0f);
array.resize_zeroed(varr_len * count);
float *w = array.ptrw();
for (uint32_t idx = 0; idx < vertex_array.size(); idx++) {
@ -774,7 +772,7 @@ void SurfaceTool::index() {
}
void SurfaceTool::deindex() {
if (index_array.size() == 0) {
if (index_array.is_empty()) {
return; //nothing to deindex
}
@ -1022,7 +1020,7 @@ void SurfaceTool::create_from_blend_shape(const Ref<Mesh> &p_existing, int p_sur
void SurfaceTool::append_from(const Ref<Mesh> &p_existing, int p_surface, const Transform3D &p_xform) {
ERR_FAIL_COND_MSG(p_existing.is_null(), "First argument in SurfaceTool::append_from() must be a valid object of type Mesh");
if (vertex_array.size() == 0) {
if (vertex_array.is_empty()) {
primitive = p_existing->surface_get_primitive_type(p_surface);
format = 0;
}