Skip to content

Commit

Permalink
i love breaking code over and over
Browse files Browse the repository at this point in the history
  • Loading branch information
Lilaa3 committed Apr 25, 2024
1 parent bdb4e8f commit 901472c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion fast64_internal/sm64/animation/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ def enum_list_to_c(self):
text_data.write(f"\t{anim_header.enum_reference},\n")
text_data.write("};\n")

return data.getvalue()
return text_data.getvalue()

def table_to_c(self, generate_enums: bool):
text_data = StringIO()
Expand Down
2 changes: 1 addition & 1 deletion fast64_internal/sm64/animation/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def execute_operator(self, context: Context):
update_data_file(os.path.join(anim_dir_path, "data.inc.c"), [file_name])
else:
with open(os.path.join(anim_dir_path, "data.inc.c"), "w", newline="\n") as file:
file.write(table.combined_data_and_headers_to_c(sm64_props.refresh_version))
file.write(table.data_and_headers_to_c_combined(sm64_props.refresh_version))

if header_type != "DMA":
write_anim_header(
Expand Down
9 changes: 5 additions & 4 deletions fast64_internal/sm64/animation/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ class SM64_AnimTableProps(PropertyGroup):
override_files_prop: BoolProperty(name="Override Table and Data Files")
elements: CollectionProperty(type=SM64_TableElement)

generate_enums: BoolProperty(name="Generate Enums")
generate_enums: BoolProperty(name="Generate Enums", default=True)
override_table_name: BoolProperty(name="Override Table Name")
custom_table_name: StringProperty(name="Table Name", default="mario_anims")

Expand Down Expand Up @@ -990,11 +990,12 @@ def draw_props(

if export_type == "Insertable Binary" or (export_type == "C" and not is_dma):
col.prop(self, "export_seperately")
if not self.export_seperately:
if self.export_seperately:
if export_type != "Insertable Binary":
col.prop(self, "override_files_prop")
else:
if export_type == "Insertable Binary":
prop_split(col, self, "insertable_file_name", "File Name")
else:
col.prop(self, "override_files_prop")

if self.elements:
col.operator(SM64_ExportAnimTable.bl_idname, icon="EXPORT")
Expand Down

0 comments on commit 901472c

Please sign in to comment.