Skip to content

Commit d6a5c8e

Browse files
Merge pull request #207 from Simarilius-uk/main
Blender 4.4 compat
2 parents 14b7f36 + d1d0bfe commit d6a5c8e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

i_scene_cp77_gltf/importers/entity_import.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,8 @@ def importEnt(with_materials, filepath='', appearances=[], exclude_meshes=[], in
750750
obj = draw_capsule_collider(submeshName, new_col, r, h, position, rotation, physmat, collision_type)
751751
except Exception as e:
752752
print('uh oh', e)
753-
753+
if rig:
754+
rig.pose_position = 'REST'
754755
if not cp77_addon_prefs.non_verbose:
755756
if app_name:
756757
print('')

i_scene_cp77_gltf/importers/import_with_materials.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,10 @@ def CP77GLBimport(self, with_materials, remap_depot, exclude_unused_mats=True, i
100100
filename=os.path.splitext(f['name'])[0]
101101
filepath = os.path.join(directory, f['name'])
102102
vers = bpy.app.version
103-
if vers[0] == 4 and vers[1] >= 2:
103+
if vers[0] == 4 and vers[1] >= 2 and vers[1] < 4:
104104
gltf_importer = glTFImporter(filepath, { "files": None, "loglevel": 0, "import_pack_images" :True, "merge_vertices" :False, "import_shading" : 'NORMALS', "bone_heuristic":heuristic, "guess_original_bind_pose" : False, "import_user_extensions": "",'disable_bone_shape':octos, 'bone_shape_scale_factor':1.0})
105+
elif vers[0] == 4 and vers[1] > 3:
106+
gltf_importer = glTFImporter(filepath, { "files": None, "loglevel": 0, "import_pack_images" :True, "merge_vertices" :False, "import_shading" : 'NORMALS', "bone_heuristic":heuristic, "guess_original_bind_pose" : False, "import_user_extensions": "",'disable_bone_shape':octos, 'bone_shape_scale_factor':1.0, 'import_scene_extras':True,'import_select_created_objects':True})
105107
else:
106108
gltf_importer = glTFImporter(filepath, { "files": None, "loglevel": 0, "import_pack_images" :True, "merge_vertices" :False, "import_shading" : 'NORMALS', "bone_heuristic":heuristic, "guess_original_bind_pose" : False, "import_user_extensions": "",'disable_bone_shape':octos,})
107109
gltf_importer.read()

0 commit comments

Comments
 (0)