| 536 | } |
| 537 | |
| 538 | void Animation::GetReferences(Array<Guid>& assets, Array<String>& files) const |
| 539 | { |
| 540 | BinaryAsset::GetReferences(assets, files); |
| 541 | |
| 542 | for (const auto& e : Events) |
| 543 | { |
| 544 | for (const auto& k : e.Second.GetKeyframes()) |
| 545 | { |
| 546 | if (k.Value.Instance) |
| 547 | { |
| 548 | // Collect refs from Anim Event data (as Json) |
| 549 | rapidjson_flax::StringBuffer buffer; |
| 550 | CompactJsonWriter writer(buffer); |
| 551 | writer.StartObject(); |
| 552 | k.Value.Instance->Serialize(writer, nullptr); |
| 553 | writer.EndObject(); |
| 554 | JsonAssetBase::GetReferences(StringAnsiView((const char*)buffer.GetString(), (int32)buffer.GetSize()), assets); |
| 555 | } |
| 556 | } |
| 557 | } |
| 558 | |
| 559 | // Add nested animations |
| 560 | for (const auto& e : NestedAnims) |
| 561 | { |
| 562 | assets.Add(e.Second.Anim.GetID()); |
| 563 | } |
| 564 | } |
| 565 | |
| 566 | #endif |
| 567 |
nothing calls this directly
no test coverage detected