Skip to content
Snippets Groups Projects
Commit 33ee4111 authored by Jonathan Ehret's avatar Jonathan Ehret
Browse files

add the modificators to the controller and apply them

parent 8fe65428
No related branches found
No related tags found
No related merge requests found
......@@ -1124,6 +1124,9 @@ bool AMCController::PreprocessRecording(float StartHaltingPoint, float EndHaltin
//---return to default pose at start and end---
TakeDefaultPose();
//---apply the specified modificators---
ApplyModificators();
AnimSaveState.NextFrame = FTimespan();
......@@ -1131,6 +1134,16 @@ bool AMCController::PreprocessRecording(float StartHaltingPoint, float EndHaltin
}
void AMCController::ApplyModificators()
{
if (UseModificators) {
for (auto& Modificator : Modificators) {
Modificator->SetAnimSaveState(&AnimSaveState);
Modificator->ApplyModification();
}
}
}
void AMCController::InputNextFrame() {
......
......@@ -79,6 +79,7 @@ protected:
void FeetPositions();
void TakeDefaultPose();
bool PreprocessRecording(float StartHaltingPoint, float EndHaltingPoint);
void ApplyModificators();
void InputNextFrame();
void SaveAnimation(float StartHaltingPoint, float EndHaltingPoint, bool skipTranslation = false);
......@@ -235,10 +236,11 @@ public:
FAdditionalOffsets AdditionalOffsets;
UPROPERTY(EditAnywhere, meta = (DisplayName = "Use Modifications", Category = "MotionCapture Modification"))
UPROPERTY(EditAnywhere, meta = (DisplayName = "Use Modificators", Category = "MotionCapture Modification"))
bool UseModificators = true;
UPROPERTY(EditAnywhere, meta = (DisplayName = "List of Modifications defined by Modifications Classes", Category = "MotionCapture Modification"))
TArray<ARecordingModificator*> Modifications;
//"List of Modifications defined by Modificator Classes that are applied in order to the data
UPROPERTY(EditAnywhere, meta = (Category = "MotionCapture Modification"))
TArray<ARecordingModificator*> Modificators;
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment