Skip to content

Commit

Permalink
a couple
Browse files Browse the repository at this point in the history
  • Loading branch information
Lilaa3 committed Apr 25, 2024
1 parent 1e35238 commit ed0413e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
6 changes: 3 additions & 3 deletions fast64_internal/sm64/animation/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 1 addition & 8 deletions fast64_internal/sm64/animation/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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)

Expand Down
1 change: 0 additions & 1 deletion fast64_internal/sm64/sm64_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ed0413e

Please sign in to comment.