From ed0413e1d2f0da769ec9ab2b6bfc0fab75d6202f Mon Sep 17 00:00:00 2001 From: Lila <87947656+Lilaa3@users.noreply.github.com> Date: Thu, 25 Apr 2024 10:25:17 +0100 Subject: [PATCH] a couple --- fast64_internal/sm64/animation/operators.py | 6 +++--- fast64_internal/sm64/animation/properties.py | 9 +-------- fast64_internal/sm64/sm64_objects.py | 1 - 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/fast64_internal/sm64/animation/operators.py b/fast64_internal/sm64/animation/operators.py index 4c6c4b7ea..5fe5d347e 100644 --- a/fast64_internal/sm64/animation/operators.py +++ b/fast64_internal/sm64/animation/operators.py @@ -62,17 +62,17 @@ def emulate_no_loop(scene: Scene): animation_props: SM64_AnimProps = scene.fast64.sm64.animation played_action: Action = animation_props.played_action - action_props: SM64_ActionProps = played_action.fast64.sm64 + if ( not played_action - or animation_props.played_header >= len(action_props.headers) + or animation_props.played_header >= len(played_action.fast64.sm64.headers) or not bpy.context.screen.is_animation_playing ): played_action = None return frame = scene.frame_current - header = action_props.headers[animation_props.played_header] + header = played_action.fast64.sm64.headers[animation_props.played_header] loop_start, loop_end = header.get_frame_range(played_action)[1:3] if header.backwards: if frame < loop_start: diff --git a/fast64_internal/sm64/animation/properties.py b/fast64_internal/sm64/animation/properties.py index 02bbe7876..9df53e357 100644 --- a/fast64_internal/sm64/animation/properties.py +++ b/fast64_internal/sm64/animation/properties.py @@ -753,15 +753,12 @@ def draw_props( return variant = self.variant - header = self.header - col.separator() - prop_box = col.box().column() prop_box.prop( self, "expand_tab", icon="TRIA_DOWN" if self.expand_tab else "TRIA_RIGHT", - text=f"{header.get_anim_name(actor_name, self.action)} Properties", + text=f"{self.header.get_anim_name(actor_name, self.action)} Properties", ) c_not_dma = export_type == "C" and not is_dma if self.expand_tab: @@ -1042,8 +1039,6 @@ def draw_props( class SM64_AnimImportProps(PropertyGroup): - """Scene SM64 animation import properties found under scene.fast64.sm64.anim_import""" - import_type: EnumProperty(items=enumAnimImportTypes, name="Type", default="C") binary_import_type: EnumProperty( @@ -1206,8 +1201,6 @@ def draw_props(self, layout: UILayout, import_rom: os.PathLike | None = None): class SM64_AnimProps(PropertyGroup): - """Scene SM64 animation properties found under scene.fast64.sm64.animation""" - played_header: IntProperty(min=0) played_action: PointerProperty(name="Action", type=Action) diff --git a/fast64_internal/sm64/sm64_objects.py b/fast64_internal/sm64/sm64_objects.py index 0b18823b6..af5c4cc01 100644 --- a/fast64_internal/sm64/sm64_objects.py +++ b/fast64_internal/sm64/sm64_objects.py @@ -1893,7 +1893,6 @@ class SM64_ObjectProperties(bpy.types.PropertyGroup): cur_version = 3 # version after property migration animation: bpy.props.PointerProperty(type=SM64_AnimProps) - geo_asm: bpy.props.PointerProperty(type=SM64_GeoASMProperties) level: bpy.props.PointerProperty(type=SM64_LevelProperties) area: bpy.props.PointerProperty(type=SM64_AreaProperties)