Cleanup
This commit is contained in:
@@ -23,7 +23,7 @@ function import_mesh_run(path: string, _clear_layers = true, replace_existing =
|
||||
let ext = substring(path, string_last_index_of(path, ".") + 1, path.length);
|
||||
let importer = map_get(path_mesh_importers, ext);
|
||||
let mesh: any = importer(path);
|
||||
replace_existing ? import_mesh_make_mesh(mesh, path) : import_mesh_add_mesh(mesh);
|
||||
replace_existing ? import_mesh_make_mesh(mesh) : import_mesh_add_mesh(mesh);
|
||||
}
|
||||
|
||||
project_mesh_assets = [path];
|
||||
@@ -143,7 +143,7 @@ function _import_mesh_make_mesh(mesh: any) {
|
||||
}, mesh);
|
||||
}
|
||||
|
||||
function import_mesh_make_mesh(mesh: any, path: string) {
|
||||
function import_mesh_make_mesh(mesh: any) {
|
||||
if (mesh == null || mesh.posa == null || mesh.nora == null || mesh.inda == null || mesh.posa.length == 0) {
|
||||
console_error(strings_error3());
|
||||
return;
|
||||
|
||||
@@ -42,7 +42,7 @@ function import_mesh_run(path: string, replace_existing: bool = true) {
|
||||
mesh.name = path_base_name(path);
|
||||
}
|
||||
|
||||
replace_existing ? import_mesh_make_mesh(mesh, path) : import_mesh_add_mesh(mesh);
|
||||
replace_existing ? import_mesh_make_mesh(mesh) : import_mesh_add_mesh(mesh);
|
||||
|
||||
let has_next: bool = mesh.has_next;
|
||||
while (has_next) {
|
||||
@@ -186,7 +186,7 @@ function import_mesh_first_unwrap_done(mesh: raw_mesh_t) {
|
||||
}
|
||||
}
|
||||
|
||||
function import_mesh_make_mesh(mesh: raw_mesh_t, path: string) {
|
||||
function import_mesh_make_mesh(mesh: raw_mesh_t) {
|
||||
if (mesh == null || mesh.posa == null || mesh.nora == null || mesh.inda == null || mesh.posa.length == 0) {
|
||||
console_error(strings_error3());
|
||||
return;
|
||||
|
||||
@@ -20,7 +20,7 @@ function import_obj_run(path: string, replace_existing: bool = true) {
|
||||
// let v: i32 = math_floor(i / part.udims_u);
|
||||
// part.name = name + "." + (1000 + v * 10 + u + 1);
|
||||
// part.inda = part.udims[i];
|
||||
// i == 0 ? (replace_existing ? import_mesh_make_mesh(part, path) : import_mesh_add_mesh(part)) : import_mesh_add_mesh(part);
|
||||
// i == 0 ? (replace_existing ? import_mesh_make_mesh(part) : import_mesh_add_mesh(part)) : import_mesh_add_mesh(part);
|
||||
// }
|
||||
}
|
||||
else {
|
||||
@@ -133,7 +133,7 @@ function import_obj_run(path: string, replace_existing: bool = true) {
|
||||
}
|
||||
}
|
||||
}
|
||||
replace_existing ? import_mesh_make_mesh(parts[0], path) : import_mesh_add_mesh(parts[0]);
|
||||
replace_existing ? import_mesh_make_mesh(parts[0]) : import_mesh_add_mesh(parts[0]);
|
||||
for (let i: i32 = 1; i < parts.length; ++i) {
|
||||
import_mesh_add_mesh(parts[i]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user