From dc4035a6f7247a0975330069c00a1c9de8c971e2 Mon Sep 17 00:00:00 2001 From: MegaMech Date: Tue, 8 Oct 2024 08:55:04 -0600 Subject: [PATCH 1/9] Update f3d_material_presets.py --- fast64_internal/f3d/f3d_material_presets.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/fast64_internal/f3d/f3d_material_presets.py b/fast64_internal/f3d/f3d_material_presets.py index 2a9c26a2b..03fb8b9ff 100644 --- a/fast64_internal/f3d/f3d_material_presets.py +++ b/fast64_internal/f3d/f3d_material_presets.py @@ -6444,4 +6444,20 @@ "sm64_vertex_colored_texture": sm64_vertex_colored_texture, "sm64_vertex_colored_texture_transparent": sm64_vertex_colored_texture_transparent, }, + "mk64": { + "sm64_decal": sm64_decal, + "sm64_environment_map": sm64_environment_map, + "sm64_fog_shaded_texture": sm64_fog_shaded_texture, + "sm64_fog_shaded_texture_cutout": sm64_fog_shaded_texture_cutout, + "sm64_fog_shaded_texture_transparent": sm64_fog_shaded_texture_transparent, + "sm64_shaded_noise": sm64_shaded_noise, + "sm64_shaded_solid": sm64_shaded_solid, + "sm64_shaded_texture": sm64_shaded_texture, + "sm64_shaded_texture_cutout": sm64_shaded_texture_cutout, + "sm64_shaded_texture_transparent": sm64_shaded_texture_transparent, + "sm64_unlit_texture": sm64_unlit_texture, + "sm64_unlit_texture_cutout": sm64_unlit_texture_cutout, + "sm64_vertex_colored_texture": sm64_vertex_colored_texture, + "sm64_vertex_colored_texture_transparent": sm64_vertex_colored_texture_transparent, + }, } From b2ea9f9cbac3b6351f07b7e434635c44c417a1fa Mon Sep 17 00:00:00 2001 From: MegaMech Date: Tue, 8 Oct 2024 12:27:01 -0600 Subject: [PATCH 2/9] Update f3d_material_presets.py --- fast64_internal/f3d/f3d_material_presets.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/fast64_internal/f3d/f3d_material_presets.py b/fast64_internal/f3d/f3d_material_presets.py index 03fb8b9ff..8d85a92f8 100644 --- a/fast64_internal/f3d/f3d_material_presets.py +++ b/fast64_internal/f3d/f3d_material_presets.py @@ -6447,14 +6447,6 @@ "mk64": { "sm64_decal": sm64_decal, "sm64_environment_map": sm64_environment_map, - "sm64_fog_shaded_texture": sm64_fog_shaded_texture, - "sm64_fog_shaded_texture_cutout": sm64_fog_shaded_texture_cutout, - "sm64_fog_shaded_texture_transparent": sm64_fog_shaded_texture_transparent, - "sm64_shaded_noise": sm64_shaded_noise, - "sm64_shaded_solid": sm64_shaded_solid, - "sm64_shaded_texture": sm64_shaded_texture, - "sm64_shaded_texture_cutout": sm64_shaded_texture_cutout, - "sm64_shaded_texture_transparent": sm64_shaded_texture_transparent, "sm64_unlit_texture": sm64_unlit_texture, "sm64_unlit_texture_cutout": sm64_unlit_texture_cutout, "sm64_vertex_colored_texture": sm64_vertex_colored_texture, From 694184f60ca135dfeb7e53cba0ef5189e0d84604 Mon Sep 17 00:00:00 2001 From: MegaMech Date: Tue, 8 Oct 2024 15:29:29 -0600 Subject: [PATCH 3/9] Create mk64_constants.py --- fast64_internal/mk64/mk64_constants.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 fast64_internal/mk64/mk64_constants.py diff --git a/fast64_internal/mk64/mk64_constants.py b/fast64_internal/mk64/mk64_constants.py new file mode 100644 index 000000000..062429f81 --- /dev/null +++ b/fast64_internal/mk64/mk64_constants.py @@ -0,0 +1,20 @@ +from .data import Mk64_Data + +mk64Data = Mk64_Data() + +mk64_world_defaults = { + "geometryMode": { + "zBuffer": True, + "shade": True, + "cullBack": True, + "lighting": True, + "shadeSmooth": True, + }, + "otherModeH": { + "alphaDither": "G_AD_NOISE", + "textureFilter": "G_TF_BILERP", + "perspectiveCorrection": "G_TP_PERSP", + "textureConvert": "G_TC_FILT", + "cycleType": "G_CYC_2CYCLE", + }, +} From 0972ce3cfa1eb04f3912ae39802f60be06aa0601 Mon Sep 17 00:00:00 2001 From: MegaMech Date: Tue, 8 Oct 2024 15:30:27 -0600 Subject: [PATCH 4/9] Update __init__.py --- __init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/__init__.py b/__init__.py index d3e5c548c..e41adbe36 100644 --- a/__init__.py +++ b/__init__.py @@ -25,6 +25,7 @@ from .fast64_internal.utility_anim import utility_anim_register, utility_anim_unregister, ArmatureApplyWithMeshOperator from .fast64_internal.mk64 import MK64_Properties, mk64_register, mk64_unregister +from .fast64_internal.mk64.mk64_constants import mk64_world_defaults from .fast64_internal.f3d.f3d_material import ( F3D_MAT_CUR_VERSION, From 05e7647aa314d644beccfadd01c151a7415b3104 Mon Sep 17 00:00:00 2001 From: MegaMech Date: Tue, 8 Oct 2024 15:32:46 -0600 Subject: [PATCH 5/9] Update f3d_material_presets.py --- fast64_internal/f3d/f3d_material_presets.py | 23 +++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/fast64_internal/f3d/f3d_material_presets.py b/fast64_internal/f3d/f3d_material_presets.py index 8d85a92f8..da4c7f62a 100644 --- a/fast64_internal/f3d/f3d_material_presets.py +++ b/fast64_internal/f3d/f3d_material_presets.py @@ -6445,11 +6445,22 @@ "sm64_vertex_colored_texture_transparent": sm64_vertex_colored_texture_transparent, }, "mk64": { - "sm64_decal": sm64_decal, - "sm64_environment_map": sm64_environment_map, - "sm64_unlit_texture": sm64_unlit_texture, - "sm64_unlit_texture_cutout": sm64_unlit_texture_cutout, - "sm64_vertex_colored_texture": sm64_vertex_colored_texture, - "sm64_vertex_colored_texture_transparent": sm64_vertex_colored_texture_transparent, + "shaded_environment_mapped": shaded_environment_mapped, + "shaded_environment_mapped_transparent": shaded_environment_mapped_transparent, + "shaded_multitexture_lerp": shaded_multitexture_lerp, + "shaded_multitexture_lerp_transparent": shaded_multitexture_lerp_transparent, + "shaded_solid": shaded_solid, + "shaded_multitexture_lerp_transparent_vertex_alpha": shaded_multitexture_lerp_transparent_vertex_alpha, + "shaded_solid_transparent": shaded_solid_transparent, + "shaded_texture": shaded_texture, + "shaded_texture_cutout": shaded_texture_cutout, + "shaded_texture_transparent": shaded_texture_transparent, + "shaded_texture_transparent_vertex_alpha": shaded_texture_transparent_vertex_alpha, + "unlit_texture": unlit_texture, + "unlit_texture_cutout": unlit_texture_cutout, + "unlit_texture_transparent": unlit_texture_transparent, + "vertex_colored_texture": vertex_colored_texture, + "vertex_colored_texture_cutout": vertex_colored_texture_cutout, + "vertex_colored_texture_transparent": vertex_colored_texture_transparent, }, } From 63566f934fd0bd27e1d578ca48d646761003b71f Mon Sep 17 00:00:00 2001 From: MegaMech Date: Tue, 8 Oct 2024 15:45:00 -0600 Subject: [PATCH 6/9] Update mk64_constants.py --- fast64_internal/mk64/mk64_constants.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fast64_internal/mk64/mk64_constants.py b/fast64_internal/mk64/mk64_constants.py index 062429f81..e625c2da0 100644 --- a/fast64_internal/mk64/mk64_constants.py +++ b/fast64_internal/mk64/mk64_constants.py @@ -1,7 +1,3 @@ -from .data import Mk64_Data - -mk64Data = Mk64_Data() - mk64_world_defaults = { "geometryMode": { "zBuffer": True, From 6ed42310cd0925dc4daa07e8eb69b9f21e0d979f Mon Sep 17 00:00:00 2001 From: MegaMech Date: Tue, 15 Oct 2024 09:56:13 -0600 Subject: [PATCH 7/9] Update __init__.py --- __init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/__init__.py b/__init__.py index b70a2d9fb..b6390174c 100644 --- a/__init__.py +++ b/__init__.py @@ -392,6 +392,9 @@ def set_game_defaults(scene: bpy.types.Scene, set_ucode=True): if scene.gameEditorMode == "SM64": f3d_type = "F3D" world_defaults = sm64_world_defaults + elif scene.gameEditorMode == "MK64": + f3d_type = "F3DEX" + world_defaults = mk64_world_defaults elif scene.gameEditorMode == "OOT": f3d_type = "F3DEX2/LX2" world_defaults = oot_world_defaults From 010e500d9496c718584132ceb17074923c812ad6 Mon Sep 17 00:00:00 2001 From: MegaMech Date: Tue, 15 Oct 2024 10:15:25 -0600 Subject: [PATCH 8/9] Update f3d_gbi.py --- fast64_internal/f3d/f3d_gbi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fast64_internal/f3d/f3d_gbi.py b/fast64_internal/f3d/f3d_gbi.py index 1eb5b7d80..a54a58459 100644 --- a/fast64_internal/f3d/f3d_gbi.py +++ b/fast64_internal/f3d/f3d_gbi.py @@ -2001,7 +2001,7 @@ def vertexScrollTemplate( class GfxFormatter: - def __init__(self, scrollMethod: ScrollMethod, texArrayBitSize: int, seg2virtFuncName: Union[str, None]): + def __init__(self, scrollMethod: ScrollMethod, texArrayBitSize: int = 8, seg2virtFuncName: Union[str, None]): self.scrollMethod: ScrollMethod = scrollMethod self.texArrayBitSize = texArrayBitSize self.seg2virtFuncName = seg2virtFuncName From 15269a6ceef4cf4059be8218eef4adcc796746c8 Mon Sep 17 00:00:00 2001 From: MegaMech Date: Wed, 16 Oct 2024 17:40:56 -0600 Subject: [PATCH 9/9] Update f3d_gbi.py --- fast64_internal/f3d/f3d_gbi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fast64_internal/f3d/f3d_gbi.py b/fast64_internal/f3d/f3d_gbi.py index a54a58459..1eb5b7d80 100644 --- a/fast64_internal/f3d/f3d_gbi.py +++ b/fast64_internal/f3d/f3d_gbi.py @@ -2001,7 +2001,7 @@ def vertexScrollTemplate( class GfxFormatter: - def __init__(self, scrollMethod: ScrollMethod, texArrayBitSize: int = 8, seg2virtFuncName: Union[str, None]): + def __init__(self, scrollMethod: ScrollMethod, texArrayBitSize: int, seg2virtFuncName: Union[str, None]): self.scrollMethod: ScrollMethod = scrollMethod self.texArrayBitSize = texArrayBitSize self.seg2virtFuncName = seg2virtFuncName