From 727614e1df42937e7271dbd8e8fa7a3e25fe397c Mon Sep 17 00:00:00 2001 From: Simarilius-uk Date: Sat, 31 Aug 2024 20:53:57 +0100 Subject: [PATCH 1/2] Update entity_import.py --- i_scene_cp77_gltf/importers/entity_import.py | 1 + 1 file changed, 1 insertion(+) diff --git a/i_scene_cp77_gltf/importers/entity_import.py b/i_scene_cp77_gltf/importers/entity_import.py index 1b4e699..0bf0c39 100644 --- a/i_scene_cp77_gltf/importers/entity_import.py +++ b/i_scene_cp77_gltf/importers/entity_import.py @@ -349,6 +349,7 @@ def importEnt( filepath='', appearances=[], exclude_meshes=[], with_materials=Tr y=None z=None bindname=None + bindpt=None pt_trans=[0,0,0] pt_rot=[0,0,0,0] pt_eul=None From 98627d089a162e0b8f52a9b9de5fa6c0384ffaea Mon Sep 17 00:00:00 2001 From: Simarilius-uk Date: Sun, 1 Sep 2024 20:28:03 +0100 Subject: [PATCH 2/2] minor tweak --- i_scene_cp77_gltf/importers/import_with_materials.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/i_scene_cp77_gltf/importers/import_with_materials.py b/i_scene_cp77_gltf/importers/import_with_materials.py index 85ee341..a63cc7b 100644 --- a/i_scene_cp77_gltf/importers/import_with_materials.py +++ b/i_scene_cp77_gltf/importers/import_with_materials.py @@ -135,9 +135,10 @@ def CP77GLBimport(self, with_materials, remap_depot, exclude_unused_mats=True, i if name not in existingMaterials: bpy.data.materials.remove(bpy.data.materials[name], do_unlink=True, do_id_user=True, do_ui_user=True) - #Kwek: Gate this--do the block iff corresponding Material.json exist + #Kwek: Gate this--do the block if corresponding Material.json exist #Kwek: was tempted to do a try-catch, but that is just La-Z #Kwek: Added another gate for materials + DepotPath=None blender_4_scale_armature_bones() if ".anims.glb" in filepath: break @@ -145,8 +146,9 @@ def CP77GLBimport(self, with_materials, remap_depot, exclude_unused_mats=True, i if with_materials==True and has_material_json: matjsonpath = current_file_base_path + ".Material.json" DepotPath, json_apps, mats = jsonload(matjsonpath) - if DepotPath == None: - break + if DepotPath == None: + print('DepotPath not set') + break #DepotPath = str(obj["MaterialRepo"]) + "\\" context=bpy.context if remap_depot and os.path.exists(context.preferences.addons[__name__.split('.')[0]].preferences.depotfolder_path):