AnimSplineTrack.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <LyShine/Animation/IUiAnimation.h>
  10. #include "2DSpline.h"
  11. #define MIN_TIME_PRECISION 0.01f
  12. #define MIN_VALUE_RANGE 1.0f // prevents fill sliders from being inoperable on the first key frame
  13. /*!
  14. Templated class that used as a base for all Tcb spline tracks.
  15. */
  16. template <class ValueType>
  17. class TUiAnimSplineTrack
  18. : public IUiAnimTrack
  19. {
  20. public:
  21. AZ_CLASS_ALLOCATOR(TUiAnimSplineTrack, AZ::SystemAllocator)
  22. AZ_RTTI((TUiAnimSplineTrack, "{A78AAC62-84D0-4E2E-958E-564F51A140D2}", ValueType), IUiAnimTrack);
  23. TUiAnimSplineTrack()
  24. : m_refCount(0)
  25. {
  26. AllocSpline();
  27. m_flags = 0;
  28. m_bCustomColorSet = false;
  29. m_fMinKeyValue = 0.0f;
  30. m_fMaxKeyValue = 0.0f;
  31. }
  32. ~TUiAnimSplineTrack()
  33. {
  34. m_spline.reset();
  35. }
  36. //////////////////////////////////////////////////////////////////////////
  37. void add_ref() override;
  38. void release() override;
  39. //////////////////////////////////////////////////////////////////////////
  40. int GetSubTrackCount() const override { return 0; };
  41. IUiAnimTrack* GetSubTrack([[maybe_unused]] int nIndex) const override { return 0; };
  42. AZStd::string GetSubTrackName([[maybe_unused]] int nIndex) const override { return AZStd::string(); };
  43. void SetSubTrackName([[maybe_unused]] int nIndex, [[maybe_unused]] const char* name) override { assert(0); }
  44. const CUiAnimParamType& GetParameterType() const override { return m_nParamType; };
  45. void SetParameterType(CUiAnimParamType type) override { m_nParamType = type; };
  46. const UiAnimParamData& GetParamData() const override { return m_componentParamData; }
  47. void SetParamData(const UiAnimParamData& param) override { m_componentParamData = param; }
  48. void GetKeyValueRange(float& fMin, float& fMax) const override { fMin = m_fMinKeyValue; fMax = m_fMaxKeyValue; };
  49. void SetKeyValueRange(float fMin, float fMax) override{ m_fMinKeyValue = fMin; m_fMaxKeyValue = fMax; };
  50. ISplineInterpolator* GetSpline() const override { return m_spline.get(); };
  51. bool IsKeySelected(int key) const override
  52. {
  53. if (GetSpline() && GetSpline()->IsKeySelectedAtAnyDimension(key))
  54. {
  55. return true;
  56. }
  57. return false;
  58. }
  59. void SelectKey(int key, bool select) override
  60. {
  61. if (GetSpline())
  62. {
  63. GetSpline()->SelectKeyAllDimensions(key, select);
  64. }
  65. }
  66. int GetNumKeys() const override
  67. {
  68. return m_spline->num_keys();
  69. }
  70. void SetNumKeys(int numKeys) override
  71. {
  72. m_spline->resize(numKeys);
  73. }
  74. bool HasKeys() const override
  75. {
  76. return GetNumKeys() != 0;
  77. }
  78. void RemoveKey(int num) override
  79. {
  80. if (m_spline && m_spline->num_keys() > num)
  81. {
  82. m_spline->erase(num);
  83. }
  84. else
  85. {
  86. assert(0);
  87. }
  88. }
  89. void GetKey(int index, IKey* key) const override
  90. {
  91. assert(index >= 0 && index < GetNumKeys());
  92. assert(key != 0);
  93. typename Spline::key_type& k = m_spline->key(index);
  94. ITcbKey* tcbkey = (ITcbKey*)key;
  95. tcbkey->time = k.time;
  96. tcbkey->flags = k.flags;
  97. tcbkey->tens = k.tens;
  98. tcbkey->cont = k.cont;
  99. tcbkey->bias = k.bias;
  100. tcbkey->easeto = k.easeto;
  101. tcbkey->easefrom = k.easefrom;
  102. tcbkey->SetValue(k.value);
  103. }
  104. void SetKey(int index, IKey* key) override
  105. {
  106. assert(index >= 0 && index < GetNumKeys());
  107. assert(key != 0);
  108. typename Spline::key_type& k = m_spline->key(index);
  109. ITcbKey* tcbkey = (ITcbKey*)key;
  110. k.time = tcbkey->time;
  111. k.flags = tcbkey->flags;
  112. k.tens = tcbkey->tens;
  113. k.cont = tcbkey->cont;
  114. k.bias = tcbkey->bias;
  115. k.easeto = tcbkey->easeto;
  116. k.easefrom = tcbkey->easefrom;
  117. tcbkey->GetValue(k.value);
  118. Invalidate();
  119. }
  120. float GetKeyTime(int index) const override
  121. {
  122. assert(index >= 0 && index < GetNumKeys());
  123. return m_spline->time(index);
  124. }
  125. void SetKeyTime(int index, float time) override
  126. {
  127. assert(index >= 0 && index < GetNumKeys());
  128. m_spline->SetKeyTime(index, time);
  129. Invalidate();
  130. }
  131. int GetKeyFlags(int index) override
  132. {
  133. assert(index >= 0 && index < GetNumKeys());
  134. return m_spline->key(index).flags;
  135. }
  136. void SetKeyFlags(int index, int flags) override
  137. {
  138. assert(index >= 0 && index < GetNumKeys());
  139. m_spline->key(index).flags = flags;
  140. }
  141. EUiAnimCurveType GetCurveType() override { assert(0); return eUiAnimCurveType_Unknown; }
  142. EUiAnimValue GetValueType() override { assert(0); return eUiAnimValue_Unknown; }
  143. void GetValue(float time, float& value) override { assert(0); }
  144. void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec3& value) override { assert(0); }
  145. void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec4& value) override { assert(0); }
  146. void GetValue([[maybe_unused]] float time, [[maybe_unused]] Quat& value) override { assert(0); }
  147. void GetValue([[maybe_unused]] float time, [[maybe_unused]] bool& value) override { assert(0); }
  148. void GetValue([[maybe_unused]] float time, [[maybe_unused]] AZ::Vector2& value) override { assert(0); }
  149. void GetValue([[maybe_unused]] float time, [[maybe_unused]] AZ::Vector3& value) override { assert(0); }
  150. void GetValue([[maybe_unused]] float time, [[maybe_unused]] AZ::Vector4& value) override { assert(0); }
  151. void GetValue([[maybe_unused]] float time, [[maybe_unused]] AZ::Color& value) override { assert(0); }
  152. void SetValue(float time, const float& value, bool bDefault = false) override { assert(0); }
  153. void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec3& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }
  154. void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec4& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }
  155. void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Quat& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }
  156. void SetValue([[maybe_unused]] float time, [[maybe_unused]] const bool& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }
  157. void SetValue([[maybe_unused]] float time, [[maybe_unused]] const AZ::Vector2& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }
  158. void SetValue([[maybe_unused]] float time, [[maybe_unused]] const AZ::Vector3& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }
  159. void SetValue([[maybe_unused]] float time, [[maybe_unused]] const AZ::Vector4& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }
  160. void SetValue([[maybe_unused]] float time, [[maybe_unused]] const AZ::Color& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }
  161. void OffsetKeyPosition([[maybe_unused]] const AZ::Vector3& value) override { AZ_Assert(0, "Not implemented"); };
  162. bool Serialize(IUiAnimationSystem* uiAnimationSystem, XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks) override;
  163. bool SerializeSelection(XmlNodeRef& xmlNode, bool bLoading, bool bCopySelected, float fTimeOffset) override;
  164. void GetKeyInfo(int key, const char*& description, float& duration) override
  165. {
  166. description = 0;
  167. duration = 0;
  168. }
  169. //! Sort keys in track (after time of keys was modified).
  170. void SortKeys() override
  171. {
  172. m_spline->sort_keys();
  173. };
  174. //! Get track flags.
  175. int GetFlags() override { return m_flags; }
  176. //! Check if track is masked by mask
  177. bool IsMasked([[maybe_unused]] const uint32 mask) const override { return false; }
  178. //! Set track flags.
  179. void SetFlags(int flags) override
  180. {
  181. m_flags = flags;
  182. if (m_flags & eUiAnimTrackFlags_Loop)
  183. {
  184. m_spline->ORT(Spline::ORT_LOOP);
  185. }
  186. else if (m_flags & eUiAnimTrackFlags_Cycle)
  187. {
  188. m_spline->ORT(Spline::ORT_CYCLE);
  189. }
  190. else
  191. {
  192. m_spline->ORT(Spline::ORT_CONSTANT);
  193. }
  194. }
  195. void Invalidate()
  196. {
  197. m_spline->flag_set(Spline::MODIFIED);
  198. };
  199. void SetTimeRange(const Range& timeRange) override
  200. {
  201. m_spline->SetRange(timeRange.start, timeRange.end);
  202. }
  203. int FindKey(float time) override
  204. {
  205. // Find key with given time.
  206. int num = m_spline->num_keys();
  207. for (int i = 0; i < num; i++)
  208. {
  209. float keyt = m_spline->key(i).time;
  210. if (fabs(keyt - time) < MIN_TIME_PRECISION)
  211. {
  212. return i;
  213. }
  214. }
  215. return -1;
  216. }
  217. //! Create key at given time, and return its index.
  218. int CreateKey(float time) override
  219. {
  220. ValueType value;
  221. int nkey = GetNumKeys();
  222. if (nkey > 0)
  223. {
  224. GetValue(time, value);
  225. }
  226. else
  227. {
  228. value = m_defaultValue;
  229. }
  230. typename Spline::ValueType tmp;
  231. m_spline->ToValueType(value, tmp);
  232. return m_spline->InsertKey(time, tmp);
  233. }
  234. int CloneKey(int srcKey) override
  235. {
  236. return CopyKey(this, srcKey);
  237. }
  238. int CopyKey(IUiAnimTrack* pFromTrack, int nFromKey) override
  239. {
  240. ITcbKey key;
  241. pFromTrack->GetKey(nFromKey, &key);
  242. int nkey = GetNumKeys();
  243. SetNumKeys(nkey + 1);
  244. SetKey(nkey, &key);
  245. return nkey;
  246. }
  247. //! Get key at given time,
  248. //! If key not exist adds key at this time.
  249. void SetKeyAtTime(float time, IKey* key)
  250. {
  251. assert(key != 0);
  252. key->time = time;
  253. bool found = false;
  254. // Find key with given time.
  255. for (int i = 0; i < m_spline->num_keys(); i++)
  256. {
  257. float keyt = m_spline->key(i).time;
  258. if (fabs(keyt - time) < MIN_TIME_PRECISION)
  259. {
  260. key->flags = m_spline->key(i).flags; // Reserve the flag value.
  261. SetKey(i, key);
  262. found = true;
  263. break;
  264. }
  265. //if (keyt > time)
  266. //break;
  267. }
  268. if (!found)
  269. {
  270. // Key with this time not found.
  271. // Create a new one.
  272. int keyIndex = CreateKey(time);
  273. // Reserve the flag value.
  274. key->flags = m_spline->key(keyIndex).flags; // Reserve the flag value.
  275. SetKey(keyIndex, key);
  276. }
  277. }
  278. virtual void SetDefaultValue(const ValueType& value)
  279. {
  280. m_defaultValue = value;
  281. }
  282. ColorB GetCustomColor() const
  283. { return m_customColor; }
  284. void SetCustomColor(ColorB color)
  285. {
  286. m_customColor = color;
  287. m_bCustomColorSet = true;
  288. }
  289. bool HasCustomColor() const
  290. { return m_bCustomColorSet; }
  291. void ClearCustomColor()
  292. { m_bCustomColorSet = false; }
  293. static void Reflect(AZ::ReflectContext*) {}
  294. protected:
  295. void UpdateTrackValueRange(float newValue)
  296. {
  297. m_fMinKeyValue = (newValue < m_fMinKeyValue) ? newValue : m_fMinKeyValue;
  298. m_fMaxKeyValue = (newValue > m_fMaxKeyValue) ? newValue : m_fMaxKeyValue;
  299. if ((m_fMaxKeyValue - m_fMinKeyValue) < MIN_VALUE_RANGE)
  300. {
  301. // prevents fill sliders from being inoperable when min and max are identical (or close to it)
  302. m_fMaxKeyValue = (m_fMinKeyValue + MIN_VALUE_RANGE);
  303. }
  304. };
  305. private:
  306. //! Spawns new instance of Tcb spline.
  307. void AllocSpline()
  308. {
  309. m_spline = aznew UiSpline::TrackSplineInterpolator<ValueType>;
  310. }
  311. int m_refCount;
  312. typedef UiSpline::TrackSplineInterpolator<ValueType> Spline;
  313. AZStd::intrusive_ptr<Spline> m_spline;
  314. ValueType m_defaultValue;
  315. //! Keys of float track.
  316. int m_flags;
  317. CUiAnimParamType m_nParamType;
  318. ColorB m_customColor;
  319. bool m_bCustomColorSet;
  320. float m_fMinKeyValue;
  321. float m_fMaxKeyValue;
  322. UiAnimParamData m_componentParamData;
  323. };
  324. //////////////////////////////////////////////////////////////////////////
  325. template <class T>
  326. inline void TUiAnimSplineTrack<T>::add_ref()
  327. {
  328. ++m_refCount;
  329. }
  330. //////////////////////////////////////////////////////////////////////////
  331. template <class T>
  332. inline void TUiAnimSplineTrack<T>::release()
  333. {
  334. if (--m_refCount <= 0)
  335. {
  336. delete this;
  337. }
  338. }
  339. template <class T>
  340. inline bool TUiAnimSplineTrack<T>::Serialize(IUiAnimationSystem* uiAnimationSystem, XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks)
  341. {
  342. if (bLoading)
  343. {
  344. int num = xmlNode->getChildCount();
  345. int flags = m_flags;
  346. xmlNode->getAttr("Flags", flags);
  347. xmlNode->getAttr("defaultValue", m_defaultValue);
  348. SetFlags(flags);
  349. xmlNode->getAttr("HasCustomColor", m_bCustomColorSet);
  350. if (m_bCustomColorSet)
  351. {
  352. unsigned int abgr;
  353. xmlNode->getAttr("CustomColor", abgr);
  354. m_customColor = ColorB(abgr);
  355. }
  356. T value;
  357. SetNumKeys(num);
  358. for (int i = 0; i < num; i++)
  359. {
  360. ITcbKey key; // Must be inside loop.
  361. XmlNodeRef keyNode = xmlNode->getChild(i);
  362. keyNode->getAttr("time", key.time);
  363. if (keyNode->getAttr("value", value))
  364. {
  365. key.SetValue(value);
  366. }
  367. keyNode->getAttr("tens", key.tens);
  368. keyNode->getAttr("cont", key.cont);
  369. keyNode->getAttr("bias", key.bias);
  370. keyNode->getAttr("easeto", key.easeto);
  371. keyNode->getAttr("easefrom", key.easefrom);
  372. keyNode->getAttr("flags", key.flags);
  373. SetKey(i, &key);
  374. // In-/Out-tangent
  375. keyNode->getAttr("ds", m_spline->key(i).ds);
  376. keyNode->getAttr("dd", m_spline->key(i).dd);
  377. }
  378. if ((!num) && (!bLoadEmptyTracks))
  379. {
  380. return false;
  381. }
  382. }
  383. else
  384. {
  385. int num = GetNumKeys();
  386. xmlNode->setAttr("Flags", GetFlags());
  387. xmlNode->setAttr("defaultValue", m_defaultValue);
  388. xmlNode->setAttr("HasCustomColor", m_bCustomColorSet);
  389. if (m_bCustomColorSet)
  390. {
  391. xmlNode->setAttr("CustomColor", m_customColor.pack_abgr8888());
  392. }
  393. ITcbKey key;
  394. T value;
  395. for (int i = 0; i < num; i++)
  396. {
  397. GetKey(i, &key);
  398. XmlNodeRef keyNode = xmlNode->newChild("Key");
  399. keyNode->setAttr("time", key.time);
  400. key.GetValue(value);
  401. keyNode->setAttr("value", value);
  402. if (key.tens != 0)
  403. {
  404. keyNode->setAttr("tens", key.tens);
  405. }
  406. if (key.cont != 0)
  407. {
  408. keyNode->setAttr("cont", key.cont);
  409. }
  410. if (key.bias != 0)
  411. {
  412. keyNode->setAttr("bias", key.bias);
  413. }
  414. if (key.easeto != 0)
  415. {
  416. keyNode->setAttr("easeto", key.easeto);
  417. }
  418. if (key.easefrom != 0)
  419. {
  420. keyNode->setAttr("easefrom", key.easefrom);
  421. }
  422. int flags = key.flags;
  423. // Just save the in/out mask part. Others are for editing convenience.
  424. flags &= (SPLINE_KEY_TANGENT_IN_MASK | SPLINE_KEY_TANGENT_OUT_MASK);
  425. if (flags != 0)
  426. {
  427. keyNode->setAttr("flags", flags);
  428. }
  429. // We also have to save in-/out-tangents, because TCB infos are not used for custom tangent keys.
  430. keyNode->setAttr("ds", m_spline->key(i).ds);
  431. keyNode->setAttr("dd", m_spline->key(i).dd);
  432. }
  433. }
  434. return true;
  435. }
  436. template <class T>
  437. inline bool TUiAnimSplineTrack<T>::SerializeSelection(XmlNodeRef& xmlNode, bool bLoading, bool bCopySelected, float fTimeOffset)
  438. {
  439. if (bLoading)
  440. {
  441. int numCur = GetNumKeys();
  442. int num = xmlNode->getChildCount();
  443. int type;
  444. xmlNode->getAttr("TrackType", type);
  445. if (type != GetCurveType())
  446. {
  447. return false;
  448. }
  449. T value;
  450. SetNumKeys(num + numCur);
  451. for (int i = 0; i < num; i++)
  452. {
  453. ITcbKey key; // Must be inside loop.
  454. XmlNodeRef keyNode = xmlNode->getChild(i);
  455. keyNode->getAttr("time", key.time);
  456. key.time += fTimeOffset;
  457. if (keyNode->getAttr("value", value))
  458. {
  459. key.SetValue(value);
  460. }
  461. keyNode->getAttr("tens", key.tens);
  462. keyNode->getAttr("cont", key.cont);
  463. keyNode->getAttr("bias", key.bias);
  464. keyNode->getAttr("easeto", key.easeto);
  465. keyNode->getAttr("easefrom", key.easefrom);
  466. keyNode->getAttr("flags", key.flags);
  467. SetKey(i + numCur, &key);
  468. if (bCopySelected)
  469. {
  470. SelectKey(i + numCur, true);
  471. }
  472. // In-/Out-tangent
  473. keyNode->getAttr("ds", m_spline->key(i + numCur).ds);
  474. keyNode->getAttr("dd", m_spline->key(i + numCur).dd);
  475. }
  476. SortKeys();
  477. }
  478. else
  479. {
  480. int num = GetNumKeys();
  481. xmlNode->setAttr("TrackType", GetCurveType());
  482. ITcbKey key;
  483. T value;
  484. for (int i = 0; i < num; i++)
  485. {
  486. GetKey(i, &key);
  487. if (!bCopySelected || IsKeySelected(i))
  488. {
  489. XmlNodeRef keyNode = xmlNode->newChild("Key");
  490. keyNode->setAttr("time", key.time);
  491. key.GetValue(value);
  492. keyNode->setAttr("value", value);
  493. if (key.tens != 0)
  494. {
  495. keyNode->setAttr("tens", key.tens);
  496. }
  497. if (key.cont != 0)
  498. {
  499. keyNode->setAttr("cont", key.cont);
  500. }
  501. if (key.bias != 0)
  502. {
  503. keyNode->setAttr("bias", key.bias);
  504. }
  505. if (key.easeto != 0)
  506. {
  507. keyNode->setAttr("easeto", key.easeto);
  508. }
  509. if (key.easefrom != 0)
  510. {
  511. keyNode->setAttr("easefrom", key.easefrom);
  512. }
  513. int flags = key.flags;
  514. // Just save the in/out mask part. Others are for editing convenience.
  515. flags &= (SPLINE_KEY_TANGENT_IN_MASK | SPLINE_KEY_TANGENT_OUT_MASK);
  516. if (flags != 0)
  517. {
  518. keyNode->setAttr("flags", flags);
  519. }
  520. // We also have to save in-/out-tangents, because TCB infos are not used for custom tangent keys.
  521. keyNode->setAttr("ds", m_spline->key(i).ds);
  522. keyNode->setAttr("dd", m_spline->key(i).dd);
  523. }
  524. }
  525. }
  526. return true;
  527. }
  528. // Specialize TUIAnimSplineTrack for Vec2
  529. template <>
  530. TUiAnimSplineTrack<Vec2>::TUiAnimSplineTrack();
  531. template <>
  532. void TUiAnimSplineTrack<Vec2>::GetValue(float time, float& value);
  533. template <>
  534. EUiAnimCurveType TUiAnimSplineTrack<Vec2>::GetCurveType();
  535. template <>
  536. EUiAnimValue TUiAnimSplineTrack<Vec2>::GetValueType();
  537. template <>
  538. void TUiAnimSplineTrack<Vec2>::SetValue(float time, const float& value, bool bDefault);
  539. template <>
  540. void TUiAnimSplineTrack<Vec2>::GetKey(int index, IKey* key) const;
  541. template <>
  542. void TUiAnimSplineTrack<Vec2>::SetKey(int index, IKey* key);
  543. //! Create key at given time, and return its index.
  544. template <>
  545. int TUiAnimSplineTrack<Vec2>::CreateKey(float time);
  546. template <>
  547. int TUiAnimSplineTrack<Vec2>::CopyKey(IUiAnimTrack* pFromTrack, int nFromKey);
  548. template <>
  549. bool TUiAnimSplineTrack<Vec2>::Serialize([[maybe_unused]] IUiAnimationSystem* uiAnimationSystem, XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks);
  550. template <>
  551. bool TUiAnimSplineTrack<Vec2>::SerializeSelection(XmlNodeRef& xmlNode, bool bLoading, bool bCopySelected, float fTimeOffset);
  552. template<>
  553. void TUiAnimSplineTrack<Vec2>::GetKeyInfo(int index, const char*& description, float& duration);
  554. template <>
  555. void TUiAnimSplineTrack<Vec2>::add_ref();
  556. template <>
  557. void TUiAnimSplineTrack<Vec2>::release();
  558. template <>
  559. void TUiAnimSplineTrack<Vec2>::Reflect(AZ::ReflectContext* context);
  560. using C2DSplineTrack = TUiAnimSplineTrack<Vec2>;