From 49f2638efd4c792f12f82454537890dbb56a03aa Mon Sep 17 00:00:00 2001 From: luboslenco Date: Wed, 6 Aug 2025 08:29:17 +0200 Subject: [PATCH] Fix blend import --- base/sources/ts/import_blend_material.ts | 7 ------- base/sources/ts/import_blend_mesh.ts | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/base/sources/ts/import_blend_material.ts b/base/sources/ts/import_blend_material.ts index 8c348ecb..bc047d5a 100644 --- a/base/sources/ts/import_blend_material.ts +++ b/base/sources/ts/import_blend_material.ts @@ -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; diff --git a/base/sources/ts/import_blend_mesh.ts b/base/sources/ts/import_blend_mesh.ts index 6a5e6568..d2349db5 100644 --- a/base/sources/ts/import_blend_mesh.ts +++ b/base/sources/ts/import_blend_mesh.ts @@ -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 + "\"");