Fix blend import

This commit is contained in:
luboslenco
2025-08-06 08:29:17 +02:00
parent 71002ac0c2
commit 49f2638efd
2 changed files with 2 additions and 9 deletions
-7
View File
@@ -29,15 +29,8 @@ function import_blend_material_run(path: string) {
}
function _import_blend_material() {
let current: gpu_texture_t = _draw_current;
let in_use: bool = gpu_in_use;
if (in_use) draw_end();
console_toast(tr("Baking material"));
if (in_use) draw_begin(current);
sys_notify_on_init(function () {
let save: string;
+2 -2
View File
@@ -33,7 +33,7 @@ function import_blend_mesh_run(path: string, replace_existing: bool = true) {
let save: string = "tmp.obj";
if (path_is_protected()) {
save = iron_internal_save_path() + save;
save = iron_internal_save_path() + "data/" + save;
}
///if arm_windows
@@ -44,7 +44,7 @@ function import_blend_mesh_run(path: string, replace_existing: bool = true) {
// Have to use ; instead of \n on windows
let py: string = "\
import bpy;\
bpy.ops.wm.obj_export(filepath='" + save + "',export_triangulated_mesh=True,export_materials=False,check_existing=False)";
bpy.ops.wm.obj_export(filepath='data/" + save + "',export_triangulated_mesh=True,export_materials=False,check_existing=False)";
let bl: string = string_replace_all(config_raw.blender, " ", "\\ ");
iron_sys_command(bl + " \"" + path + "\" -b --python-expr \"" + py + "\"");