Skip to content

SM64 Animation Tables - No Way To Set Custom Name Through GUI #646

@SpringEThing

Description

@SpringEThing

TL;DR custom_table_name and use_custom_table_name are properties that exist in SM64_ArmatureAnimProperties with full implementation to affect exports but have no way of being modified by the user to be enabled and used through GUI as of commit 67552ca.

I am very new to Fast64, so forgive me if I'm just ignorant but, as far as I can tell, the latest on the Fast64 main branch at the time of writing this, commit 67552ca, does not have the ability through GUI to set a custom name for animation tables exported as a part of the combined exporter.
The reason this matters as I'm sure you know is that part of the process of exporting an animation that replaces one from the vanilla SM64 is making sure that the animation table name matches the one the rest of the source already expects in other files reference the animation data.
I suspect this slipped through as a part of commit 8853a48 where the animation inspector was completely reworked.
Right now, the workaround is simply to edit the animation table's name back to its original value by-hand, much easier if one has a VCS. I don't think most newbies would understand to do this, which is why I think the feature must become a part of the Fast64 GUI as it stands today.

The name of the animation table exported is determined very simply by the get_table_name method of the SM64_ArmatureAnimProperties class defined in fast64_internal\sm64\animation\properties.py:

    def get_table_name(self, actor_name: str) -> str:
        if self.use_custom_table_name:
            return self.custom_table_name
        return f"{actor_name}_anims"

Several things puzzle me about the usage and implementation of this method as someone brand new not only to Fast64 but also its source code, all of which I'm sure can be explained reasonably by someone who isn't flying blind.
For one thing, there's clearly support for custom table names as part of the above method's implementation, but as far as I can tell there's no way a user would have the ability to set the custom name through GUI as it stands right now.
For another, the SM64_ArmatureAnimProperties that this method is implemented in doesn't seem to have a physical GUI presence the way similar classes do. For example, both SM64_AnimHeaderProperties and SM64_AnimImportProperties are PointerPropertys of SM64_AnimProperties which itself is cached as the context.scene.fast64.sm64.animation object. Those classes both directly correlate to a group of options in the animation inspector, yet no such PointerProperty call exists for SM64_ArmatureAnimProperties.
Lastly, following on from my previous point, I noticed some code across the repo that suggests upgrading .blend files that used much older versions of Fast64 to be compatible with new releases. I had assumed due to SM64_ArmatureAnimProperties not having a GUI presence and the *custom_table_name properties being a part of that class meant that SM64_ArmatureAnimProperties was simply a relic kept around for the upgrade process I mentioned, but that cannot be the case as removing *custom_table_name property initializers from that class causes several runtime errors.

I made a fork of the repo to try and resolve this problem myself since it is clearly still desired behaviour that a custom_table_name can be set but the solution I tried was a flop. I tried to move the *custom_table_name properties from the SM64_ArmatureAnimProperties class to the SM64_CombinedObjectProperties class where the table name first becomes relevant to exporting, I simply was not skilled enough to figure that out in my few hours with the repo, I don't have an IDE set up for Python so I was piecing everything together via string searching in Notepad++, I might've figured out the architecture a bit better had I that at my disposal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions