Initial commit

This commit is contained in:
2025-12-17 16:47:48 +00:00
commit 13813f3363
4964 changed files with 1079753 additions and 0 deletions

View File

@@ -0,0 +1,65 @@
#include "DataModel/Animation.hpp"
#include "DataModel/KeyframeSequenceProvider.hpp"
#include "DataModel/AnimationTrackState.hpp"
#include "DataModel/PartInstance.hpp"
#include "DataModel/JointInstance.hpp"
namespace Aya
{
const char* const sAnimation = "Animation";
const Reflection::PropDescriptor<Animation, AnimationId> prop_AnimationId(
"AnimationId", category_Data, &Animation::getAssetId, &Animation::setAssetId);
// const Reflection::PropDescriptor<Animation, bool> prop_Loop("Loop", category_Data, &Animation::getLoop, &Animation::setLoop);
// const Reflection::EnumPropDescriptor<Animation, Animation::Priority> prop_Priority("Priority", category_Data, &Animation::getPriority,
// &Animation::setPriority);
////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// FRONTEND AND BACKEND
Animation::Animation()
: DescribedCreatable<Animation, Instance, sAnimation>()
{
setName(sAnimation);
}
bool Animation::isEmbeddedAsset() const
{
return !assetId.isHttp() && !assetId.isAsset();
}
shared_ptr<const KeyframeSequence> Animation::getKeyframeSequence() const
{
return getKeyframeSequence(this);
}
shared_ptr<const KeyframeSequence> Animation::getKeyframeSequence(const Instance* context) const
{
if (assetId.isNull())
{
return shared_ptr<KeyframeSequence>();
}
if (KeyframeSequenceProvider* keyframeSequenceProvider = ServiceProvider::create<KeyframeSequenceProvider>(context))
{
return keyframeSequenceProvider->getKeyframeSequence(assetId, this);
}
return shared_ptr<KeyframeSequence>();
}
void Animation::setAssetId(AnimationId value)
{
if (assetId != value)
{
assetId = value;
raisePropertyChanged(prop_AnimationId);
}
}
} // namespace Aya