1 #ifndef _RIVE_BLEND_ANIMATION_DIRECT_BASE_HPP_
2 #define _RIVE_BLEND_ANIMATION_DIRECT_BASE_HPP_
3 #include "rive/animation/blend_animation.hpp"
4 #include "rive/core/field_types/core_uint_type.hpp"
6 class BlendAnimationDirectBase : public BlendAnimation {
8 typedef BlendAnimation Super;
11 static const uint16_t typeKey = 77;
13 /// Helper to quickly determine if a core object extends another without RTTI
15 bool isTypeOf(uint16_t typeKey) const override {
17 case BlendAnimationDirectBase::typeKey:
18 case BlendAnimationBase::typeKey:
25 uint16_t coreType() const override { return typeKey; }
27 static const uint16_t inputIdPropertyKey = 168;
30 uint32_t m_InputId = -1;
33 inline uint32_t inputId() const { return m_InputId; }
34 void inputId(uint32_t value) {
35 if (m_InputId == value) {
42 Core* clone() const override;
43 void copy(const BlendAnimationDirectBase& object) {
44 m_InputId = object.m_InputId;
45 BlendAnimation::copy(object);
48 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override {
49 switch (propertyKey) {
50 case inputIdPropertyKey:
51 m_InputId = CoreUintType::deserialize(reader);
54 return BlendAnimation::deserialize(propertyKey, reader);
58 virtual void inputIdChanged() {}