Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Non-Master AnimatedModel Removing Skeleton #3064

Open
SirNate0 opened this issue Aug 25, 2022 · 0 comments
Open

Non-Master AnimatedModel Removing Skeleton #3064

SirNate0 opened this issue Aug 25, 2022 · 0 comments
Labels

Comments

@SirNate0
Copy link
Contributor

The non-master AnimatedModel for a Node can remove the Skeleton in a number of cases, resulting in very broken model renders. Basically, these are edge cases where the same underlying bug of #439 has not been fixed completely.

  1. SetModel(nullptr) calls RemoveRootBone(); // Remove existing root bone if any
  2. In certain circumstances just removing the non-master model can do it as well (specifically, if the node heirarchy has been edited to insert nodes between the AnimatedModel's node and the RootBone's node). When being removed from a node, the model has SetNode(nullptr) called on it (in Node::RemoveComponent) and then the component is actually erased from the Vector<SharedPtr<Component>> components_, which calls the destructor (assuming no other references). ~AnimatedModel() then checks for a node on the root bone, and if the node's parent does not have a(nother) AnimatedModel, the skeleton is removed.

I believe either scenario can be solved by adding a check for isMaster_ in AnimatedModel::RemoveRootBone(). However, I'm not sure I am not missing any subtleties that might make this approach fail or break something else.

Are there any thoughts on the matter?

@1vanK 1vanK added the backlog label Aug 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants