From 9185c3b17d4572262c17459265d407b2d90d56b8 Mon Sep 17 00:00:00 2001 From: DoctorPresto <111536029+DoctorPresto@users.noreply.github.com> Date: Mon, 15 Jan 2024 12:39:13 -0500 Subject: [PATCH 1/5] fix extras schema --- i_scene_cp77_gltf/main/animtools.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/i_scene_cp77_gltf/main/animtools.py b/i_scene_cp77_gltf/main/animtools.py index 86fcba0..52a6160 100644 --- a/i_scene_cp77_gltf/main/animtools.py +++ b/i_scene_cp77_gltf/main/animtools.py @@ -139,8 +139,8 @@ def add_anim_props(animation, action): track_keys_json = json.dumps(track_keys) # Add properties to the action - action["schemaType"] = schema['type'] - action["schemaVersion"] = schema['version'] + action["schema"] = schema + # action["schemaVersion"] = schema['version'] action["animationType"] = animation_type action["frameClamping"] = frame_clamping action["frameClampingStartFrame"] = frame_clamping_start_frame @@ -150,8 +150,8 @@ def add_anim_props(animation, action): action["constTrackKeys"] = const_track_keys action["trackKeys"] = track_keys action["fallbackFrameIndices"] = fallback_frame_indices - action["preferSIMD"] = optimizationHints['preferSIMD'] - action["maxRotationCompression"] = optimizationHints['maxRotationCompression'] + action["optimizationHints"] = optimizationHints + #action["maxRotationCompression"] = optimizationHints['maxRotationCompression'] # Set the custom property on the action From 152745d02eaa240ddde0ab29c58ba5ee9d3b34cd Mon Sep 17 00:00:00 2001 From: Simarilius-uk Date: Thu, 25 Jan 2024 22:19:12 +0000 Subject: [PATCH 2/5] Update import_with_materials.py update_gi wasnt being passed and was screwing up the other params after it. --- i_scene_cp77_gltf/importers/import_with_materials.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i_scene_cp77_gltf/importers/import_with_materials.py b/i_scene_cp77_gltf/importers/import_with_materials.py index 2da43ef..3c1b83e 100644 --- a/i_scene_cp77_gltf/importers/import_with_materials.py +++ b/i_scene_cp77_gltf/importers/import_with_materials.py @@ -13,7 +13,7 @@ def objs_in_col(top_coll, objtype): return sum([len([o for o in col.objects if o.type==objtype]) for col in top_coll.children_recursive])+len([o for o in top_coll.objects if o.type==objtype]) -def CP77GLBimport(self, exclude_unused_mats=True, image_format='png', with_materials=True, filepath='', hide_armatures=True, update_gi=True, import_garmentsupport=False, files=[], directory='', appearances=[]): +def CP77GLBimport(self, exclude_unused_mats=True, image_format='png', with_materials=True, filepath='', hide_armatures=True, import_garmentsupport=False, files=[], directory='', appearances=[]): context=bpy.context loadfiles=self.files From 0711fec85fba6ab9b2c753d8bcf2f91a884090f8 Mon Sep 17 00:00:00 2001 From: Simarilius-uk Date: Thu, 25 Jan 2024 22:20:28 +0000 Subject: [PATCH 3/5] Update attribute_import.py delete the params from the default importer, write them with our bit. --- i_scene_cp77_gltf/importers/attribute_import.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/i_scene_cp77_gltf/importers/attribute_import.py b/i_scene_cp77_gltf/importers/attribute_import.py index b518e58..e8a4aa6 100644 --- a/i_scene_cp77_gltf/importers/attribute_import.py +++ b/i_scene_cp77_gltf/importers/attribute_import.py @@ -12,11 +12,11 @@ def manage_garment_support(existingMeshes, gltf_importer_data): mesh = bpy.data.meshes[name] for prim in gltf_importer.data.meshes[curMeshCount].primitives: if '_GARMENTSUPPORTWEIGHT' in prim.attributes: - indices = get_indices(gltf_importer, prim) - - add_vertex_color_attribute('_GARMENTSUPPORTWEIGHT', 'GarmentSupportWeight', gltf_importer, mesh, prim, indices) - - add_vertex_color_attribute('_GARMENTSUPPORTCAP', 'GarmentSupportCap', gltf_importer, mesh, prim, indices) + indices = get_indices(gltf_importer, prim) + mesh.color_attributes.remove(mesh.color_attributes['_GARMENTSUPPORTWEIGHT']) + add_vertex_color_attribute('_GARMENTSUPPORTWEIGHT', '_GARMENTSUPPORTWEIGHT', gltf_importer, mesh, prim, indices) + mesh.color_attributes.remove(mesh.color_attributes['_GARMENTSUPPORTCAP']) + add_vertex_color_attribute('_GARMENTSUPPORTCAP', '_GARMENTSUPPORTCAP', gltf_importer, mesh, prim, indices) mesh.color_attributes.render_color_index = 0 curMeshCount = curMeshCount + 1 From deb0ce948f1f3192b0b0b9074d9e5a974338f353 Mon Sep 17 00:00:00 2001 From: Simarilius-uk Date: Sat, 27 Jan 2024 18:33:34 +0000 Subject: [PATCH 4/5] Update simple_build.yml --- .github/workflows/simple_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/simple_build.yml b/.github/workflows/simple_build.yml index e77760d..17eaa74 100644 --- a/.github/workflows/simple_build.yml +++ b/.github/workflows/simple_build.yml @@ -10,12 +10,12 @@ jobs: Build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: vimtor/action-zip@v1.1 with: files: i_scene_cp77_gltf/ dest: latest_build.zip - - uses: actions/upload-artifact@v3.1.3 + - uses: actions/upload-artifact@v4 with: name: my-artifact path: ${{ github.workspace }}/latest_build.zip From 85ee7f7285429664494e72100783a6a91f626ea9 Mon Sep 17 00:00:00 2001 From: DoctorPresto <111536029+DoctorPresto@users.noreply.github.com> Date: Wed, 31 Jan 2024 01:29:16 -0500 Subject: [PATCH 5/5] bump version avoids confusion when helping people with installs from build artifacts/ pulled directly from main rather than a release --- i_scene_cp77_gltf/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i_scene_cp77_gltf/__init__.py b/i_scene_cp77_gltf/__init__.py index c8dce3e..c8569b2 100644 --- a/i_scene_cp77_gltf/__init__.py +++ b/i_scene_cp77_gltf/__init__.py @@ -25,7 +25,7 @@ bl_info = { "name": "Cyberpunk 2077 IO Suite", "author": "HitmanHimself, Turk, Jato, dragonzkiller, kwekmaster, glitchered, Simarilius, Doctor Presto, shotlastc, Rudolph2109", - "version": (1, 5, 2, 2), + "version": (1, 5, 2, 3), "blender": (3, 6, 0), "location": "File > Import-Export", "description": "Import and Export WolvenKit Cyberpunk2077 gLTF models with materials, Import .streamingsector and .ent from .json",