summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Authoring/Studio/Palettes/TimelineGraphicsView/KeyframeManager.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/KeyframeManager.cpp b/src/Authoring/Studio/Palettes/TimelineGraphicsView/KeyframeManager.cpp
index ab585928..335cebe4 100644
--- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/KeyframeManager.cpp
+++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/KeyframeManager.cpp
@@ -602,7 +602,24 @@ void KeyframeManager::DeselectAllKeyframes()
void KeyframeManager::SetChangedKeyframes()
{
- // Mahmoud_TODO: implement if needed
+ CDoc *theDoc = g_StudioApp.GetCore()->GetDoc();
+ qt3dsdm::Qt3DSDMInstanceHandle selectedInstance = theDoc->GetSelectedInstance();
+ if (selectedInstance.Valid()) {
+ using namespace Q3DStudio;
+ Q3DStudio::ScopedDocumentEditor editor(*theDoc, L"Set Changed Keyframes",
+ __FILE__, __LINE__);
+ CStudioSystem *theStudioSystem = theDoc->GetStudioSystem();
+ // Get all animated properties.
+ TPropertyHandleList properties;
+ theStudioSystem->GetPropertySystem()->GetAggregateInstanceProperties(selectedInstance,
+ properties);
+ for (size_t i = 0; i < properties.size(); ++i) {
+ if (theStudioSystem->GetAnimationSystem()->IsPropertyAnimated(
+ selectedInstance, properties[i])) {
+ editor->KeyframeProperty(selectedInstance, properties[i], true);
+ }
+ }
+ }
}
// Mahmoud_TODO: this Map is not used anymore, will be removed by finishing the new timeline