Skip to content

Fix: Add "preservePivots" condition when importing FBX animation#6115

Merged
kimkulling merged 3 commits intoassimp:masterfrom
Nor-s:fix-preserve-pivots
May 31, 2025
Merged

Fix: Add "preservePivots" condition when importing FBX animation#6115
kimkulling merged 3 commits intoassimp:masterfrom
Nor-s:fix-preserve-pivots

Conversation

@Nor-s
Copy link
Copy Markdown
Contributor

@Nor-s Nor-s commented Apr 18, 2025

Abstract

The animation importer part has no handling for the "preservePivots" setting.

This setting prevents dummy nodes when processing nodes in the model.

However, animations are not, so if you use this option, the animation will not work with the model.

See comments below.

needs to play nicely with GenerateTransformationNodeChain()

https://github.com/assimp/assimp/blob/ac5988422a7f1898b25c13fb5fb068c646a4c544/code/AssetLib/FBX/FBXConverter.cpp#L2957C1-L2984C73


https://github.com/assimp/assimp/blob/ac5988422a7f1898b25c13fb5fb068c646a4c544/code/AssetLib/FBX/FBXConverter.cpp#L747C49-L747C51

GenerateTransformationNodeChain

  • in this function use "preservePivots" setting

https://github.com/assimp/assimp/blob/ac5988422a7f1898b25c13fb5fb068c646a4c544/code/AssetLib/FBX/FBXConverter.cpp#L870C4-L875C1

*Note: NameTransformationChainNode creates dummy node names.

before after
issue issue_pr

@tellypresence tellypresence added FBX Bugs related to the FBX format Animation Bugs related to the animation data labels Apr 19, 2025
@unravel-dev
Copy link
Copy Markdown

This is very nice to be handled from inside assimp. Here is the same issue discussed - i have posted a workaround from outside. but it would be great if this is fixed in the library.
#4005

Copy link
Copy Markdown
Member

@kimkulling kimkulling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine.

@kimkulling kimkulling merged commit c4515f5 into assimp:master May 31, 2025
11 checks passed
@kimkulling
Copy link
Copy Markdown
Member

Merged, thanks a lot for your contibution.

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Animation Bugs related to the animation data FBX Bugs related to the FBX format

Projects

Development

Successfully merging this pull request may close these issues.

4 participants