MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetReferences

Method GetReferences

Source/Engine/Content/Assets/Animation.cpp:538–564  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

536}
537
538void 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

Callers

nothing calls this directly

Calls 10

GetIDMethod · 0.80
GetReferencesFunction · 0.70
StringAnsiViewClass · 0.50
GetKeyframesMethod · 0.45
StartObjectMethod · 0.45
SerializeMethod · 0.45
EndObjectMethod · 0.45
GetStringMethod · 0.45
GetSizeMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected