From 5bbaa895eb398f11abb4f109ab63a1301e065b3d Mon Sep 17 00:00:00 2001 From: yyc12345 Date: Fri, 10 Nov 2023 14:59:06 +0800 Subject: [PATCH] fix raw data texture reading error --- bbp_ng/OP_IMPORT_virtools.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bbp_ng/OP_IMPORT_virtools.py b/bbp_ng/OP_IMPORT_virtools.py index 47b1c8d..062f344 100644 --- a/bbp_ng/OP_IMPORT_virtools.py +++ b/bbp_ng/OP_IMPORT_virtools.py @@ -77,11 +77,12 @@ def _import_virtools_textures( for vttexture in reader.get_textures(): # if this image is raw data, save it in external folder before loading + # the attribute of raw data saving is the file path is not absolute path texpath_to_load: str = vttexture.get_file_name() - if vttexture.get_save_options() == UTIL_virtools_types.CK_TEXTURE_SAVEOPTIONS.CKTEXTURE_RAWDATA: + if not os.path.isabs(texpath_to_load): texpath_to_load = os.path.join( rawdata_temp, - os.path.basename(vttexture.get_file_name()) + os.path.basename(texpath_to_load) ) vttexture.save_image(texpath_to_load)