Merge pull request #5911 from tjmgd/bug-motion-set-removal-h
Bug motion set removal h
This commit is contained in:
+12
-6
@@ -1138,6 +1138,12 @@ namespace EMStudio
|
||||
for (size_t motionSetId = 0; motionSetId < numMotionSets; motionSetId++)
|
||||
{
|
||||
EMotionFX::MotionSet* motionSet2 = EMotionFX::GetMotionManager().GetMotionSet(motionSetId);
|
||||
|
||||
if (motionSet2->GetIsOwnedByRuntime())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (motionSet2->FindMotionEntryById(motionEntry->GetId()))
|
||||
{
|
||||
numMotionSetContainsMotion++;
|
||||
@@ -1148,12 +1154,6 @@ namespace EMStudio
|
||||
}
|
||||
}
|
||||
|
||||
// If motion exists in multiple motion sets, then it should not be removed from motions window.
|
||||
if (removeMotion && numMotionSetContainsMotion > 1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// check the reference counter if only one reference registered
|
||||
// two is needed because the remove motion command has to be called to have the undo/redo possible
|
||||
// without it the motion list is also not updated because the remove motion callback is not called
|
||||
@@ -1170,6 +1170,12 @@ namespace EMStudio
|
||||
}
|
||||
motionIdsToRemoveString += motionEntry->GetId();
|
||||
|
||||
// If motion exists in multiple motion sets, then it should not be removed from motions window.
|
||||
if (removeMotion && numMotionSetContainsMotion > 1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check if the motion is not valid, that means the motion is not loaded.
|
||||
if (removeMotion && motionEntry->GetMotion())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user