Merge pull request #413 from SHADE-DP/SP3-22-AnimationController

Fixed RawAnimInspector changing any specific animation clip's values, causing a change in all animation clips' values
This commit is contained in:
XiaoQiDigipen 2023-03-10 16:21:59 +08:00 committed by GitHub
commit 293358c41c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -158,8 +158,11 @@ namespace SHADE
if (SHEditorUI::CollapsingHeader("Existing Animation Clips")) if (SHEditorUI::CollapsingHeader("Existing Animation Clips"))
{ {
ImGui::Indent(); ImGui::Indent();
int i = 0;
for (auto animClip : childAnimClips) for (auto animClip : childAnimClips)
{ {
ImGui::PushID(i++);
bool changed = false; bool changed = false;
std::optional<std::string> animClipName = SHResourceManager::GetAssetName<SHAnimationClip>(animClip); std::optional<std::string> animClipName = SHResourceManager::GetAssetName<SHAnimationClip>(animClip);
@ -197,6 +200,8 @@ namespace SHADE
SHAssetManager::SaveAsset(assetId.value()); SHAssetManager::SaveAsset(assetId.value());
} }
} }
ImGui::PopID();
} }
// Extra separator if there is more than one // Extra separator if there is more than one