[OOT/MM] Remove "oot" prefix from some enums and switch to them (#553)

remove "oot" prefix from some enums and switch to them
This commit is contained in:
Yanis
2025-06-22 21:24:42 +02:00
committed by GitHub
parent 2c87745bb7
commit f84d179de5
12 changed files with 76 additions and 285 deletions
+36 -37
View File
@@ -12,7 +12,7 @@ from .actor_data import Z64_ActorData
# TODO: get this from XML
ootEnumNightSeq = [
oot_enum_nature_id = [
("Custom", "Custom", "Custom"),
("0x00", "General Night", "NATURE_ID_GENERAL_NIGHT"),
("0x01", "Market Entrance", "NATURE_ID_MARKET_ENTRANCE"),
@@ -64,7 +64,7 @@ enum_ambiance_id = [
# ---
ootEnumSkybox = [
oot_enum_skybox = [
("Custom", "Custom", "Custom"),
("0x00", "None", "None"),
("0x01", "Standard Sky", "Standard Sky"),
@@ -104,7 +104,7 @@ mm_enum_skybox = [
("SKYBOX_CUTSCENE_MAP", "Cutscene Map", "0x05"),
]
ootEnumCloudiness = [
oot_enum_skybox_config = [
("Custom", "Custom", "Custom"),
("0x00", "Sunny", "Sunny"),
("0x01", "Cloudy", "Cloudy"),
@@ -142,7 +142,7 @@ mm_enum_skybox_config = [
("SKYBOX_CONFIG_27", "SKYBOX_CONFIG_27", "0x1B"),
]
ootEnumLinkIdle = [
oot_enum_environment_type = [
("Custom", "Custom", "Custom"),
("0x00", "Default", "Default"),
("0x01", "Sneezing", "Sneezing"),
@@ -165,8 +165,7 @@ mm_enum_environment_type = [
("ROOM_ENV_UNK_STRETCH_3", "Unknown Stretch 3", "0x06"),
]
# see RoomType enum
ootEnumRoomBehaviour = [
oot_enum_room_type = [
("Custom", "Custom", "Custom"),
("0x00", "Default", "Default"),
("0x01", "Dungeon Behavior (Z-Target, Sun's Song)", "Dungeon Behavior (Z-Target, Sun's Song)"),
@@ -186,7 +185,7 @@ mm_enum_room_type = [
("ROOM_TYPE_BOSS", "Boss", "0x05"),
]
ootEnumFloorSetting = [
oot_enum_floor_property = [
("Custom", "Custom", "Custom"),
("0x00", "Default", "Default"),
("0x05", "Trigger Respawn", "Trigger Respawn"),
@@ -212,7 +211,7 @@ mm_enum_floor_property = [
("0x0D", "Trigger Void (runs `Player_Action_1`)", "FLOOR_PROPERTY_13"),
]
enum_floor_property = [
oot_enum_floor_type = [
("Custom", "Custom", "Custom"),
("0x00", "Default", "Default"),
("0x01", "Haunted Wasteland Camera", "Haunted Wasteland Camera"),
@@ -256,7 +255,7 @@ enum_floor_effect = [
("0x02", "Walkable (Preserves Exit Flags)", "FLOOR_EFFECT_2"),
]
ootEnumCameraSType = [
oot_enum_camera_setting_type = [
("Custom", "Custom", "Custom"),
("CAM_SET_NONE", "None", "None"),
("CAM_SET_NORMAL0", "Normal0", "Normal0"),
@@ -506,7 +505,7 @@ mm_enum_camera_setting_type = [
]
# order here sets order on the UI
ootEnumCSListType = [
oot_enum_cs_list_type = [
# Col 1
("TextList", "Text List", "Textbox", "ALIGN_BOTTOM", 0),
("MiscList", "Misc List", "Misc", "OPTIONS", 7),
@@ -873,30 +872,30 @@ class Z64_Data:
self.cs_index_start = 4
self.cs_list_type_to_cmd["Transition"] = "CS_TRANSITION"
self.cs_list_type_to_cmd["RumbleList"] = "CS_RUMBLE_CONTROLLER_LIST"
self.ootEnumNightSeq = ootEnumNightSeq
self.ootEnumSkybox = ootEnumSkybox
self.ootEnumCloudiness = ootEnumCloudiness
self.ootEnumLinkIdle = ootEnumLinkIdle
self.ootEnumRoomBehaviour = ootEnumRoomBehaviour
self.ootEnumFloorSetting = ootEnumFloorSetting
self.enum_floor_property = enum_floor_property
self.ootEnumCameraSType = ootEnumCameraSType
self.ootEnumCSListType = ootEnumCSListType
self.enum_nature_id = oot_enum_nature_id
self.enum_skybox = oot_enum_skybox
self.enum_skybox_config = oot_enum_skybox_config
self.enum_environment_type = oot_enum_environment_type
self.enum_room_type = oot_enum_room_type
self.enum_floor_property = oot_enum_floor_property
self.enum_floor_type = oot_enum_floor_type
self.enum_camera_setting_type = oot_enum_camera_setting_type
self.enum_cs_list_type = oot_enum_cs_list_type
self.skeleton_dict = oot_skeleton_dict
self.enum_skeleton_mode = oot_enum_skeleton_mode
elif self.game == "MM":
self.cs_index_start = 1
self.cs_list_type_to_cmd["Transition"] = "CS_TRANSITION_LIST"
self.cs_list_type_to_cmd["RumbleList"] = "CS_RUMBLE_LIST"
self.ootEnumNightSeq = enum_ambiance_id
self.ootEnumSkybox = mm_enum_skybox
self.ootEnumCloudiness = mm_enum_skybox_config
self.ootEnumLinkIdle = mm_enum_environment_type
self.ootEnumRoomBehaviour = mm_enum_room_type
self.ootEnumFloorSetting = mm_enum_floor_property
self.enum_floor_property = mm_enum_floor_type
self.ootEnumCameraSType = mm_enum_camera_setting_type
self.ootEnumCSListType = mm_enum_cs_list_type
self.enum_nature_id = enum_ambiance_id
self.enum_skybox = mm_enum_skybox
self.enum_skybox_config = mm_enum_skybox_config
self.enum_environment_type = mm_enum_environment_type
self.enum_room_type = mm_enum_room_type
self.enum_floor_property = mm_enum_floor_property
self.enum_floor_type = mm_enum_floor_type
self.enum_camera_setting_type = mm_enum_camera_setting_type
self.enum_cs_list_type = mm_enum_cs_list_type
self.skeleton_dict = mm_skeleton_dict
self.enum_skeleton_mode = mm_enum_skeleton_mode
else:
@@ -927,15 +926,15 @@ class Z64_Data:
"chest_content": self.actors.ootEnumChestContent,
"navi_msg_id": self.actors.ootEnumNaviMessageData,
"collectibles": self.actors.ootEnumCollectibleItems,
"skyboxID": self.ootEnumSkybox,
"skyboxCloudiness": self.ootEnumCloudiness,
"nightSeq": self.ootEnumNightSeq,
"roomBehaviour": self.ootEnumRoomBehaviour,
"linkIdleMode": self.ootEnumLinkIdle,
"floorSetting": self.ootEnumFloorSetting,
"floorProperty": self.enum_floor_property,
"camSType": self.ootEnumCameraSType,
"cs_list_type": self.ootEnumCSListType,
"skybox": self.enum_skybox,
"skybox_config": self.enum_skybox_config,
"nature_id": self.enum_nature_id,
"room_type": self.enum_room_type,
"environment_type": self.enum_environment_type,
"floor_property": self.enum_floor_property,
"floor_type": self.enum_floor_type,
"camera_setting_type": self.enum_camera_setting_type,
"cs_list_type": self.enum_cs_list_type,
"skeleton_mode": self.enum_skeleton_mode,
}
@@ -4,17 +4,6 @@ ootEnumConveyer = [
("Water", "Water", "Water"),
]
ootEnumFloorSetting = [
("Custom", "Custom", "Custom"),
("0x00", "Default", "Default"),
("0x05", "Void (Small)", "Void (Small)"),
("0x06", "Grab Wall", "Grab Wall"),
("0x08", "Stop Air Momentum", "Stop Air Momentum"),
("0x09", "Fall Instead Of Jumping", "Fall Instead Of Jumping"),
("0x0B", "Dive", "Dive"),
("0x0C", "Void (Large)", "Void (Large)"),
]
ootEnumWallSetting = [
("Custom", "Custom", "Custom"),
("0x00", "None", "None"),
@@ -27,22 +16,6 @@ ootEnumWallSetting = [
("0x07", "Push Block", "Push Block"),
]
enum_floor_property = [
("Custom", "Custom", "Custom"),
("0x00", "None", "None"),
("0x01", "Haunted Wasteland Camera", "Haunted Wasteland Camera"),
("0x02", "Hurt Floor (Spikes)", "Hurt Floor (Spikes)"),
("0x03", "Hurt Floor (Lava)", "Hurt Floor (Lava)"),
("0x04", "Shallow Sand", "Shallow Sand"),
("0x05", "Slippery", "Slippery"),
("0x06", "No Fall Damage", "No Fall Damage"),
("0x07", "Quicksand Crossing (Epona Uncrossable)", "Quicksand Crossing (Epona Uncrossable)"),
("0x08", "Jabu Jabu's Belly", "Jabu Jabu's Belly"),
("0x09", "Void", "Void"),
("0x0A", "Link Looks Up", "Link Looks Up"),
("0x0B", "Quicksand Crossing (Epona Crossable)", "Quicksand Crossing (Epona Crossable)"),
]
ootEnumCollisionTerrain = [
("Custom", "Custom", "Custom"),
("0x00", "Walkable", "Walkable"),
@@ -82,76 +55,6 @@ ootEnumCameraCrawlspaceSType = [
("CAM_SET_CRAWLSPACE", "Crawlspace", "Crawlspace"),
]
ootEnumCameraSType = [
("Custom", "Custom", "Custom"),
("CAM_SET_NONE", "None", "None"),
("CAM_SET_NORMAL0", "Normal0", "Normal0"),
("CAM_SET_NORMAL1", "Normal1", "Normal1"),
("CAM_SET_DUNGEON0", "Dungeon0", "Dungeon0"),
("CAM_SET_DUNGEON1", "Dungeon1", "Dungeon1"),
("CAM_SET_NORMAL3", "Normal3", "Normal3"),
("CAM_SET_HORSE0", "Horse", "Horse"),
("CAM_SET_BOSS_GOMA", "Boss_gohma", "Boss_gohma"),
("CAM_SET_BOSS_DODO", "Boss_dodongo", "Boss_dodongo"),
("CAM_SET_BOSS_BARI", "Boss_barinade", "Boss_barinade"),
("CAM_SET_BOSS_FGANON", "Boss_phantom_ganon", "Boss_phantom_ganon"),
("CAM_SET_BOSS_BAL", "Boss_volvagia", "Boss_volvagia"),
("CAM_SET_BOSS_SHADES", "Boss_bongo", "Boss_bongo"),
("CAM_SET_BOSS_MOFA", "Boss_morpha", "Boss_morpha"),
("CAM_SET_TWIN0", "Twinrova_platform", "Twinrova_platform"),
("CAM_SET_TWIN1", "Twinrova_floor", "Twinrova_floor"),
("CAM_SET_BOSS_GANON1", "Boss_ganondorf", "Boss_ganondorf"),
("CAM_SET_BOSS_GANON2", "Boss_ganon", "Boss_ganon"),
("CAM_SET_TOWER0", "Tower_climb", "Tower_climb"),
("CAM_SET_TOWER1", "Tower_unused", "Tower_unused"),
("CAM_SET_FIXED0", "Market_balcony", "Market_balcony"),
("CAM_SET_FIXED1", "Chu_bowling", "Chu_bowling"),
("CAM_SET_CIRCLE0", "Pivot_crawlspace", "Pivot_crawlspace"),
("CAM_SET_CIRCLE2", "Pivot_shop_browsing", "Pivot_shop_browsing"),
("CAM_SET_CIRCLE3", "Pivot_in_front", "Pivot_in_front"),
("CAM_SET_PREREND0", "Prerend_fixed", "Prerend_fixed"),
("CAM_SET_PREREND1", "Prerend_pivot", "Prerend_pivot"),
("CAM_SET_PREREND3", "Prerend_side_scroll", "Prerend_side_scroll"),
("CAM_SET_DOOR0", "Door0", "Door0"),
("CAM_SET_DOORC", "Doorc", "Doorc"),
("CAM_SET_RAIL3", "Crawlspace", "Crawlspace"),
("CAM_SET_START0", "Start0", "Start0"),
("CAM_SET_START1", "Start1", "Start1"),
("CAM_SET_FREE0", "Free0", "Free0"),
("CAM_SET_FREE2", "Free2", "Free2"),
("CAM_SET_CIRCLE4", "Pivot_corner", "Pivot_corner"),
("CAM_SET_CIRCLE5", "Pivot_water_surface", "Pivot_water_surface"),
("CAM_SET_DEMO0", "Cs_0", "Cs_0"),
("CAM_SET_DEMO1", "Twisted_Hallway", "Twisted_Hallway"),
("CAM_SET_MORI1", "Forest_birds_eye", "Forest_birds_eye"),
("CAM_SET_ITEM0", "Slow_chest_cs", "Slow_chest_cs"),
("CAM_SET_ITEM1", "Item_unused", "Item_unused"),
("CAM_SET_DEMO3", "Cs_3", "Cs_3"),
("CAM_SET_DEMO4", "Cs_attention", "Cs_attention"),
("CAM_SET_UFOBEAN", "Bean_generic", "Bean_generic"),
("CAM_SET_LIFTBEAN", "Bean_lost_woods", "Bean_lost_woods"),
("CAM_SET_SCENE0", "Scene_unused", "Scene_unused"),
("CAM_SET_SCENE1", "Scene_transition", "Scene_transition"),
("CAM_SET_HIDAN1", "Fire_platform", "Fire_platform"),
("CAM_SET_HIDAN2", "Fire_staircase", "Fire_staircase"),
("CAM_SET_MORI2", "Forest_unused", "Forest_unused"),
("CAM_SET_MORI3", "Defeat_poe", "Defeat_poe"),
("CAM_SET_TAKO", "Big_octo", "Big_octo"),
("CAM_SET_SPOT05A", "Meadow_birds_eye", "Meadow_birds_eye"),
("CAM_SET_SPOT05B", "Meadow_unused", "Meadow_unused"),
("CAM_SET_HIDAN3", "Fire_birds_eye", "Fire_birds_eye"),
("CAM_SET_ITEM2", "Turn_around", "Turn_around"),
("CAM_SET_CIRCLE6", "Pivot_vertical", "Pivot_vertical"),
("CAM_SET_NORMAL2", "Normal2", "Normal2"),
("CAM_SET_FISHING", "Fishing", "Fishing"),
("CAM_SET_DEMOC", "Cs_c", "Cs_c"),
("CAM_SET_UO_FIBER", "Jabu_tentacle", "Jabu_tentacle"),
("CAM_SET_DUNGEON2", "Dungeon2", "Dungeon2"),
("CAM_SET_TEPPEN", "Directed_yaw", "Directed_yaw"),
("CAM_SET_CIRCLE7", "Pivot_from_side", "Pivot_from_side"),
("CAM_SET_NORMAL4", "Normal4", "Normal4"),
]
decomp_compat_map_CameraSType = {
"CAM_SET_HORSE0": "CAM_SET_HORSE",
"CAM_SET_BOSS_GOMA": "CAM_SET_BOSS_GOHMA",
+9 -10
View File
@@ -1,19 +1,18 @@
import math
from bpy.props import StringProperty, PointerProperty, IntProperty, EnumProperty, BoolProperty, FloatProperty
from bpy.types import PropertyGroup, Camera, Object, Material, UILayout
from bpy.types import PropertyGroup, Object, Material, UILayout
from bpy.utils import register_class, unregister_class
from ...game_data import game_data
from ...utility import prop_split
from ..utility import drawEnumWithCustom
from ..constants import ootEnumSceneID
from .constants import (
ootEnumFloorSetting,
ootEnumWallSetting,
enum_floor_property,
ootEnumConveyer,
enum_conveyor_speed,
ootEnumCollisionTerrain,
ootEnumCollisionSound,
ootEnumCameraSType,
)
@@ -45,7 +44,7 @@ class OOTCollisionExportSettings(PropertyGroup):
class OOTCameraPositionProperty(PropertyGroup):
index: IntProperty(min=0)
bgImageOverrideIndex: IntProperty(default=-1, min=-1)
camSType: EnumProperty(items=ootEnumCameraSType, default="CAM_SET_NONE")
camSType: EnumProperty(items=lambda self, context: game_data.z64.get_enum("camera_setting_type"), default=1)
camSTypeCustom: StringProperty(default="CAM_SET_NONE")
hasPositionData: BoolProperty(default=True, name="Has Position Data")
@@ -68,11 +67,11 @@ class OOTMaterialCollisionProperty(PropertyGroup):
eponaBlock: BoolProperty()
decreaseHeight: BoolProperty()
floorSettingCustom: StringProperty(default="0x00")
floorSetting: EnumProperty(items=ootEnumFloorSetting, default="0x00")
floorSetting: EnumProperty(items=lambda self, context: game_data.z64.get_enum("floor_property"), default=1)
wallSettingCustom: StringProperty(default="0x00")
wallSetting: EnumProperty(items=ootEnumWallSetting, default="0x00")
floorPropertyCustom: StringProperty(default="0x00")
floorProperty: EnumProperty(items=enum_floor_property, default="0x00")
floorProperty: EnumProperty(items=lambda self, context: game_data.z64.get_enum("floor_type"), default=1)
exitID: IntProperty(default=0, min=0)
cameraID: IntProperty(default=0, min=0)
isWallDamage: BoolProperty()
@@ -109,9 +108,9 @@ class OOTMaterialCollisionProperty(PropertyGroup):
layout.prop(self, "isWallDamage", text="Is Wall Damage")
layout.prop(self, "hookshotable", text="Hookshotable")
drawEnumWithCustom(layout, self, "floorSetting", "Floor Setting", "")
drawEnumWithCustom(layout, self, "floorSetting", "Floor Property", "")
drawEnumWithCustom(layout, self, "wallSetting", "Wall Setting", "")
drawEnumWithCustom(layout, self, "floorProperty", "Floor Property", "")
drawEnumWithCustom(layout, self, "floorProperty", "Floor Type", "")
layout.prop(self, "ignoreCameraCollision", text="Ignore Camera Collision")
layout.prop(self, "ignoreActorCollision", text="Ignore Actor Collision")
-95
View File
@@ -15,24 +15,6 @@ ootEnumHeaderMenuComplete = [
("Child Day", "Child Day", "Child Day"),
] + ootEnumHeaderMenu
ootEnumLinkIdle = [
("Custom", "Custom", "Custom"),
("0x00", "Default", "Default"),
("0x01", "Sneezing", "Sneezing"),
("0x02", "Wiping Forehead", "Wiping Forehead"),
("0x04", "Yawning", "Yawning"),
("0x07", "Gasping For Breath", "Gasping For Breath"),
("0x09", "Brandish Sword", "Brandish Sword"),
("0x0A", "Adjust Tunic", "Adjust Tunic"),
("0xFF", "Hops On Epona", "Hops On Epona"),
]
ootEnumCloudiness = [
("Custom", "Custom", "Custom"),
("0x00", "Sunny", "Sunny"),
("0x01", "Cloudy", "Cloudy"),
]
ootEnumCameraMode = [
("Custom", "Custom", "Custom"),
("0x00", "Default", "Default"),
@@ -70,37 +52,6 @@ ootEnumMapLocation = [
("0x16", "Grottos & Fairy Fountains", "Grottos & Fairy Fountains"),
]
ootEnumSkybox = [
("Custom", "Custom", "Custom"),
("0x00", "None", "None"),
("0x01", "Standard Sky", "Standard Sky"),
("0x02", "Hylian Bazaar", "Hylian Bazaar"),
("0x03", "Brown Cloudy Sky", "Brown Cloudy Sky"),
("0x04", "Market Ruins", "Market Ruins"),
("0x05", "Black Cloudy Night", "Black Cloudy Night"),
("0x07", "Link's House", "Link's House"),
("0x09", "Market (Main Square, Day)", "Market (Main Square, Day)"),
("0x0A", "Market (Main Square, Night)", "Market (Main Square, Night)"),
("0x0B", "Happy Mask Shop", "Happy Mask Shop"),
("0x0C", "Know-It-All Brothers' House", "Know-It-All Brothers' House"),
("0x0E", "Kokiri Twins' House", "Kokiri Twins' House"),
("0x0F", "Stable", "Stable"),
("0x10", "Stew Lady's House", "Stew Lady's House"),
("0x11", "Kokiri Shop", "Kokiri Shop"),
("0x13", "Goron Shop", "Goron Shop"),
("0x14", "Zora Shop", "Zora Shop"),
("0x16", "Kakariko Potions Shop", "Kakariko Potions Shop"),
("0x17", "Hylian Potions Shop", "Hylian Potions Shop"),
("0x18", "Bomb Shop", "Bomb Shop"),
("0x1A", "Dog Lady's House", "Dog Lady's House"),
("0x1B", "Impa's House", "Impa's House"),
("0x1C", "Gerudo Tent", "Gerudo Tent"),
("0x1D", "Environment Color", "Environment Color"),
("0x20", "Mido's House", "Mido's House"),
("0x21", "Saria's House", "Saria's House"),
("0x22", "Dog Guy's House", "Dog Guy's House"),
]
ootEnumSkyboxLighting = [
# see ``LightMode`` enum in ``z64environment.h``
("Custom", "Custom", "Custom"),
@@ -234,41 +185,6 @@ ootEnumMusicSeq = [
("NA_BGM_NATURE_SFX_RAIN", "Nature Ambiance: Rain", "Nature Ambiance: Rain"),
]
ootEnumNightSeq = [
("Custom", "Custom", "Custom"),
("0x00", "Standard night [day and night cycle]", "0x00"),
("0x01", "Standard night [Kakariko]", "0x01"),
("0x02", "Distant storm [Graveyard]", "0x02"),
("0x03", "Howling wind and cawing [Ganon's Castle]", "0x03"),
("0x04", "Wind + night birds [Kokiri]", "0x04"),
("0x05", "Wind + crickets", "0x05"),
("0x06", "Wind", "0x06"),
("0x07", "Howling wind", "0x07"),
("0x08", "Wind + crickets", "0x08"),
("0x09", "Wind + crickets", "0x09"),
("0x0A", "Tubed howling wind [Wasteland]", "0x0A"),
("0x0B", "Tubed howling wind [Colossus]", "0x0B"),
("0x0C", "Wind", "0x0C"),
("0x0D", "Wind + crickets", "0x0D"),
("0x0E", "Wind + crickets", "0x0E"),
("0x0F", "Wind + birds", "0x0F"),
("0x10", "Wind + crickets", "0x10"),
("0x11", "?", "0x11"),
("0x12", "Wind + crickets", "0x12"),
("0x13", "Day music always playing", "0x13"),
("0x14", "Silence", "0x14"),
("0x16", "Silence", "0x16"),
("0x17", "High tubed wind + rain", "0x17"),
("0x18", "Silence", "0x18"),
("0x19", "Silence", "0x19"),
("0x1A", "High tubed wind + rain", "0x1A"),
("0x1B", "Silence", "0x1B"),
("0x1C", "Rain", "0x1C"),
("0x1D", "High tubed wind + rain", "0x1D"),
("0x1E", "Silence", "0x1E"),
("0x1F", "High tubed wind + rain ", "0x1F"),
]
ootEnumGlobalObject = [
("Custom", "Custom", "Custom"),
("OBJECT_INVALID", "None", "None"),
@@ -527,17 +443,6 @@ ootEnumCamTransition = [
# ("0xFF", "0xFF", "0xFF"),
]
# see curRoom.behaviorType1
ootEnumRoomBehaviour = [
("Custom", "Custom", "Custom"),
("0x00", "Default", "Default"),
("0x01", "Dungeon Behavior (Z-Target, Sun's Song)", "Dungeon Behavior (Z-Target, Sun's Song)"),
("0x02", "Disable Backflips/Sidehops", "Disable Backflips/Sidehops"),
("0x03", "Disable Color Dither", "Disable Color Dither"),
("0x04", "(?) Horse Camera Related", "(?) Horse Camera Related"),
("0x05", "Disable Darker Screen Effect (NL/Spins)", "Disable Darker Screen Effect (NL/Spins)"),
]
ootEnumDrawConfig = [
("Custom", "Custom", "Custom"),
("SDC_DEFAULT", "Default", "Default"),
-13
View File
@@ -47,19 +47,6 @@ ootEnumCSWriteType = [
("Object", "Object", "Reference to Blender object representing cutscene", "", 2),
]
# order here sets order on the UI
ootEnumCSListType = [
("TextList", "Text List", "Textbox", "ALIGN_BOTTOM", 0),
("MiscList", "Misc List", "Misc", "OPTIONS", 7),
("RumbleList", "Rumble List", "Rumble Controller", "OUTLINER_OB_FORCE_FIELD", 8),
("Transition", "Transition", "Transition", "COLORSET_10_VEC", 1),
("LightSettingsList", "Light Settings List", "Lighting", "LIGHT_SUN", 2),
("TimeList", "Time List", "Time", "TIME", 3),
("StartSeqList", "Start Seq List", "Play BGM", "PLAY", 4),
("StopSeqList", "Stop Seq List", "Stop BGM", "SNAP_FACE", 5),
("FadeOutSeqList", "Fade-Out Seq List", "Fade BGM", "IPO_EASE_IN_OUT", 6),
]
csListTypeToIcon = {
"TextList": "ALIGN_BOTTOM",
"Transition": "COLORSET_10_VEC",
+2 -2
View File
@@ -8,7 +8,7 @@ from bpy.utils import register_class, unregister_class
from ...utility import PluginError, raisePluginError
from ...game_data import game_data
from ..collection_utility import getCollection
from .constants import ootEnumCSTextboxType, ootEnumCSListType
from .constants import ootEnumCSTextboxType
from .importer import importCutsceneData
from ..exporter.cutscene import Cutscene
@@ -36,7 +36,7 @@ class OOTCSListAdd(Operator):
bl_options = {"REGISTER", "UNDO"}
collectionType: StringProperty()
listType: EnumProperty(items=ootEnumCSListType)
listType: EnumProperty(items=lambda self, context: game_data.z64.get_enum("cs_list_type"))
objName: StringProperty()
def execute(self, context):
+6 -6
View File
@@ -19,7 +19,6 @@ from .motion.operators import (
from .constants import (
ootEnumCSTextboxType,
ootEnumCSListType,
ootEnumCSTextboxTypeIcons,
ootCSSubPropToName,
csListTypeToIcon,
@@ -190,7 +189,7 @@ class OOTCSRumbleProperty(OOTCutsceneCommon, PropertyGroup):
class OOTCSListProperty(PropertyGroup):
expandTab: BoolProperty(default=True)
listType: EnumProperty(items=ootEnumCSListType)
listType: EnumProperty(items=lambda self, context: game_data.z64.get_enum("cs_list_type"))
textList: CollectionProperty(type=OOTCSTextProperty)
lightSettingsList: CollectionProperty(type=OOTCSLightSettingsProperty)
timeList: CollectionProperty(type=OOTCSTimeProperty)
@@ -205,7 +204,8 @@ class OOTCSListProperty(PropertyGroup):
def draw_props(self, layout: UILayout, listIndex: int, objName: str, collectionType: str):
box = layout.box().column()
enumName = getEnumName(ootEnumCSListType, self.listType)
enum_cs_list_type = game_data.z64.get_enum("cs_list_type")
enumName = getEnumName(enum_cs_list_type, self.listType)
# Draw current command tab
box.prop(
@@ -264,7 +264,7 @@ class OOTCSListProperty(PropertyGroup):
addOp.objName = objName
else:
addOp = box.operator(
OOTCollectionAdd.bl_idname, text="Add item to " + getEnumName(ootEnumCSListType, self.listType)
OOTCollectionAdd.bl_idname, text="Add item to " + getEnumName(enum_cs_list_type, self.listType)
)
addOp.option = len(data)
addOp.collectionType = collectionType + "." + attrName
@@ -278,7 +278,7 @@ class OOTCSListProperty(PropertyGroup):
p.draw_props(box, self, listIndex, i, objName, collectionType, enumName.removesuffix(" List"))
if len(data) == 0:
box.label(text="No items in " + getEnumName(ootEnumCSListType, self.listType))
box.label(text="No items in " + getEnumName(enum_cs_list_type, self.listType))
class OOTCutsceneCommandBase:
@@ -365,7 +365,7 @@ class OOTCutsceneProperty(PropertyGroup):
csDestinationCustom: StringProperty(default="CS_DEST_CUSTOM")
csDestinationStartFrame: IntProperty(name="Start Frame", min=0, default=99)
csLists: CollectionProperty(type=OOTCSListProperty, name="Cutscene Lists")
menuTab: EnumProperty(items=ootEnumCSListType)
menuTab: EnumProperty(items=lambda self, context: game_data.z64.get_enum("cs_list_type"))
preview: PointerProperty(type=OOTCutscenePreviewProperty)
+2 -3
View File
@@ -8,7 +8,6 @@ from ..utility import setCustomProperty
from ..model_classes import OOTF3DContext
from ..room.properties import OOTRoomHeaderProperty
from ...game_data import game_data
from ..constants import ootEnumLinkIdle, ootEnumRoomBehaviour
from .utility import getDataMatch, stripName, parse_commands_data
from .classes import SharedSceneData
from .constants import headerNames
@@ -82,8 +81,8 @@ def parseRoomCommands(
elif command == "SCENE_CMD_ECHO_SETTINGS":
roomHeader.echo = args[0]
elif command == "SCENE_CMD_ROOM_BEHAVIOR":
setCustomProperty(roomHeader, "roomBehaviour", args[0], ootEnumRoomBehaviour)
setCustomProperty(roomHeader, "linkIdleMode", args[1], ootEnumLinkIdle)
setCustomProperty(roomHeader, "roomBehaviour", args[0], game_data.z64.get_enum("room_type"))
setCustomProperty(roomHeader, "linkIdleMode", args[1], game_data.z64.get_enum("environment_type"))
roomHeader.showInvisibleActors = args[2] == "true" or args[2] == "1"
roomHeader.disableWarpSongs = args[3] == "true" or args[3] == "1"
elif command == "SCENE_CMD_SKYBOX_DISABLES":
@@ -6,6 +6,7 @@ import mathutils
from random import random
from bpy.types import Material
from ...game_data import game_data
from ...utility import PluginError, parentObject, hexOrDecInt, get_include_data, yUpToZUp
from ..exporter.collision.surface import SurfaceType
from ..exporter.collision.polygons import CollisionPoly
@@ -17,12 +18,9 @@ from .utility import getDataMatch, getBits, checkBit, createCurveFromPoints, str
from .classes import SharedSceneData
from ..collision.constants import (
ootEnumFloorSetting,
ootEnumWallSetting,
enum_floor_property,
ootEnumCollisionTerrain,
ootEnumCollisionSound,
ootEnumCameraSType,
ootEnumCameraCrawlspaceSType,
enum_conveyor_speed,
)
@@ -80,7 +78,7 @@ def parseCamPosData(setting: str, sceneData: str, posDataName: str, index: int,
camObj = bpy.data.objects.new(objName, camera)
bpy.context.scene.collection.objects.link(camObj)
camProp = camObj.ootCameraPositionProperty
setCustomProperty(camProp, "camSType", setting, ootEnumCameraSType)
setCustomProperty(camProp, "camSType", setting, game_data.z64.get_enum("camera_setting_type"))
camProp.hasPositionData = posDataName != "NULL" and posDataName != "0"
camProp.index = orderIndex
@@ -178,9 +176,9 @@ def parseSurfaceParams(
):
col_props.eponaBlock = surface_type.isHorseBlocked
col_props.decreaseHeight = surface_type.isSoft
setCustomProperty(col_props, "floorSetting", surface_type.floorProperty, ootEnumFloorSetting)
setCustomProperty(col_props, "floorSetting", surface_type.floorProperty, game_data.z64.get_enum("floor_property"))
setCustomProperty(col_props, "wallSetting", surface_type.wallType, ootEnumWallSetting)
setCustomProperty(col_props, "floorProperty", surface_type.floorType, enum_floor_property)
setCustomProperty(col_props, "floorProperty", surface_type.floorType, game_data.z64.get_enum("floor_type"))
col_props.exitID = surface_type.exitIndex
col_props.cameraID = surface_type.bgCamIndex
col_props.isWallDamage = surface_type.isWallDamage
+4 -6
View File
@@ -7,6 +7,7 @@ import mathutils
from pathlib import Path
from typing import Optional
from ...game_data import game_data
from ...utility import PluginError, readFile, parentObject, hexOrDecInt, gammaInverse
from ...f3d.f3d_parser import parseMatrices
from ..exporter.scene.general import EnvLightSettings
@@ -23,14 +24,11 @@ from .scene_pathways import parsePathList
from ..constants import (
ootEnumAudioSessionPreset,
ootEnumNightSeq,
ootEnumMusicSeq,
ootEnumCameraMode,
ootEnumMapLocation,
ootEnumNaviHints,
ootEnumGlobalObject,
ootEnumSkybox,
ootEnumCloudiness,
ootEnumSkyboxLighting,
)
@@ -272,7 +270,7 @@ def parseSceneCommands(
for command, args in cmd_map.items():
if command == "SCENE_CMD_SOUND_SETTINGS":
setCustomProperty(sceneHeader, "audioSessionPreset", args[0], ootEnumAudioSessionPreset)
setCustomProperty(sceneHeader, "nightSeq", args[1], ootEnumNightSeq)
setCustomProperty(sceneHeader, "nightSeq", args[1], game_data.z64.get_enum("nature_id"))
setCustomProperty(sceneHeader, "musicSeq", args[2], ootEnumMusicSeq)
elif command == "SCENE_CMD_ROOM_LIST":
# Assumption that all scenes use the same room list.
@@ -316,8 +314,8 @@ def parseSceneCommands(
entranceList = None
elif command == "SCENE_CMD_SKYBOX_SETTINGS":
setCustomProperty(sceneHeader, "skyboxID", args[0], ootEnumSkybox)
setCustomProperty(sceneHeader, "skyboxCloudiness", args[1], ootEnumCloudiness)
setCustomProperty(sceneHeader, "skyboxID", args[0], game_data.z64.get_enum("skybox"))
setCustomProperty(sceneHeader, "skyboxCloudiness", args[1], game_data.z64.get_enum("skybox_config"))
setCustomProperty(sceneHeader, "skyboxLighting", args[2], ootEnumSkyboxLighting)
elif command == "SCENE_CMD_EXIT_LIST":
exitListName = stripName(args[0])
+4 -4
View File
@@ -20,8 +20,6 @@ from bpy.props import (
)
from ..constants import (
ootEnumRoomBehaviour,
ootEnumLinkIdle,
ootEnumRoomShapeType,
ootEnumHeaderMenu,
)
@@ -93,11 +91,13 @@ class OOTRoomHeaderProperty(PropertyGroup):
usePreviousHeader: BoolProperty(name="Use Previous Header", default=True)
roomIndex: IntProperty(name="Room Index", default=0, min=0)
roomBehaviour: EnumProperty(items=ootEnumRoomBehaviour, default="0x00")
roomBehaviour: EnumProperty(items=lambda self, context: game_data.z64.get_enum("room_type"), default=1)
roomBehaviourCustom: StringProperty(default="0x00")
disableWarpSongs: BoolProperty(name="Disable Warp Songs")
showInvisibleActors: BoolProperty(name="Show Invisible Actors")
linkIdleMode: EnumProperty(name="Link Idle Mode", items=ootEnumLinkIdle, default="0x00")
linkIdleMode: EnumProperty(
name="Link Idle Mode", items=lambda self, context: game_data.z64.get_enum("environment_type"), default=1
)
linkIdleModeCustom: StringProperty(name="Link Idle Mode Custom", default="0x00")
roomIsHot: BoolProperty(
name="Use Hot Room Behavior",
+9 -6
View File
@@ -10,6 +10,8 @@ from bpy.props import (
FloatVectorProperty,
)
from bpy.utils import register_class, unregister_class
from ...game_data import game_data
from ...render_settings import on_update_oot_render_settings
from ...utility import prop_split, customExportWarning
from ..cutscene.constants import ootEnumCSWriteType
@@ -21,12 +23,9 @@ from ..constants import (
ootEnumSceneID,
ootEnumGlobalObject,
ootEnumNaviHints,
ootEnumSkybox,
ootEnumCloudiness,
ootEnumSkyboxLighting,
ootEnumMapLocation,
ootEnumCameraMode,
ootEnumNightSeq,
ootEnumAudioSessionPreset,
ootEnumHeaderMenu,
ootEnumDrawConfig,
@@ -259,9 +258,11 @@ class OOTSceneHeaderProperty(PropertyGroup):
naviCup: EnumProperty(name="Navi Hints", default="0x00", items=ootEnumNaviHints)
naviCupCustom: StringProperty(name="Navi Hints Custom", default="0x00")
skyboxID: EnumProperty(name="Skybox", items=ootEnumSkybox, default="0x01")
skyboxID: EnumProperty(name="Skybox", items=lambda self, context: game_data.z64.get_enum("skybox"), default=2)
skyboxIDCustom: StringProperty(name="Skybox ID", default="0")
skyboxCloudiness: EnumProperty(name="Cloudiness", items=ootEnumCloudiness, default="0x00")
skyboxCloudiness: EnumProperty(
name="Cloudiness", items=lambda self, context: game_data.z64.get_enum("skybox_config"), default=1
)
skyboxCloudinessCustom: StringProperty(name="Cloudiness ID", default="0x00")
skyboxLighting: EnumProperty(
name="Skybox Lighting",
@@ -280,7 +281,9 @@ class OOTSceneHeaderProperty(PropertyGroup):
musicSeq: EnumProperty(name="Music Sequence", items=ootEnumMusicSeq, default="NA_BGM_FIELD_LOGIC")
musicSeqCustom: StringProperty(name="Music Sequence ID", default="0x00")
nightSeq: EnumProperty(name="Nighttime SFX", items=ootEnumNightSeq, default="0x00")
nightSeq: EnumProperty(
name="Nighttime SFX", items=lambda self, context: game_data.z64.get_enum("nature_id"), default=1
)
nightSeqCustom: StringProperty(name="Nighttime SFX ID", default="0x00")
audioSessionPreset: EnumProperty(name="Audio Session Preset", items=ootEnumAudioSessionPreset, default="0x00")
audioSessionPresetCustom: StringProperty(name="Audio Session Preset", default="0x00")