f3d icon indicating copy to clipboard operation
f3d copied to clipboard

Export GetAnimationName function to libf3d

Open iommu opened this issue 3 weeks ago • 3 comments

Is your feature request related to a problem? Please describe. The primary AnimationManager class supports a method GetAnimationName -> std::string which returns the name of the currently playing animation. This is used by the f3d GUI, but is not available by using libf3d.

Describe the solution you'd like Add a method of libf3d users accessing this data. Options include :

  1. export a getAnimationName -> std::string function in the Interaction class similar to other animation controls
  2. export the name in the f3d::options data type similar to the animation indices option note : this would presumable be an immutable option which would be a bit of a bad design pattern.

Describe alternatives you've considered There is a possible alternative of manually loading the parser plugins, parsing the current file again and then getting the animation name from the plugins function e.g.

Additional context The animation handling in libf3d is possible due for an overhaul anyway. The current method of pausing/playing/setting/scrubbing animations feels a bit inconsistent jumping between the interactor and the options data and maybe a seperate f3d::engine.animator may be an options

Contribution I would be happy to contribute this code :)

iommu avatar Dec 08 '25 02:12 iommu

Hi @iommu

I agree it is missing, but it should be added not as an immutable option but as an API, eg:

interactor::getCurrentAnimationName , wdyt ?

FYI @Ni-g-3l

mwestphal avatar Dec 08 '25 07:12 mwestphal

Yes I think it's good idea :)

I'm adding it to the meta animation issue.

If your are interested in contributing you can create a PR and ping me inside (or on discord) @iommu if you are looking for help.

Ni-g-3l avatar Dec 08 '25 15:12 Ni-g-3l

Absolutely, I can make a PR for this :) @Ni-g-3l

iommu avatar Dec 09 '25 00:12 iommu