ultimate-research / ssbh_lib

Reading and writing SSBH file formats in Rust
MIT License
8 stars 3 forks source link

preserve scale inheritance on export #101

Closed ScanMountGoat closed 2 years ago

ScanMountGoat commented 2 years ago

Compressed transform animation tracks have a scale type that can enable or disable scale inheritance at the track level. It's unclear if an equivalent exists for uncompressed transforms. This is necessary for correctly previewing animations in applications such as Blender since there's currently no way to correctly determine if scale should be inherited or not.

ScanMountGoat commented 2 years ago

It may be necessary to always force compressed transforms or force compression for transforms when scale inheritance is enabled/disabled.

Another option is to compute equivalent scale values based on the existing settings, but this is undesirable since it doesn't reflect the actual data in a buffer. This approach may cause issues with other animation types such as cameras and lights.

ScanMountGoat commented 2 years ago

From initial testing, it appears that uncompressed (ConstTransform) tracks inherit scale. This can probably be assumed to be the default value for now.

ScanMountGoat commented 2 years ago

This is handled by returning an error when saving as uncompressed with scale inheritance disabled. It may be worth investigating alternatives in the future.