# Getting the animations list from persona?

**URL:** <https://forums.unrealengine.com/t/getting-the-animations-list-from-persona/326422>\
**Category:** Character & Animation\
**Tags:** list, unreal-engine, question\
**Created:** [July 24, 2015, 9:00pm UTC](https://forums.unrealengine.com/t/getting-the-animations-list-from-persona/326422 "2015-07-24T21:00:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![uced](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@uced](https://forums.unrealengine.com/u/uced)\
**Post date:** [July 24, 2015, 9:00pm UTC](https://forums.unrealengine.com/t/getting-the-animations-list-from-persona/326422/1 "2015-07-24T21:00:23Z")

</div>

Hey all,

I need to propose my player to choose from a list of animations and hence I’d like to get the list of animations available for a skeleton or skeletal mesh, like the one in the asset browser in persona:

![51383-animlist.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/e/e/0ee5693e3618d0f1deff38e0c674a2f161b38d53.jpeg)

I searched the uskeleton, uskeletalmesh, uskeletalmeshcomponent, etc. but found nothing returning an array of animations assets/sequences.

Any help ?

Thanks

Cedric

---

<div class="post-metadata">

**Author:** ![uced](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@uced](https://forums.unrealengine.com/u/uced)\
**Post date:** [August 24, 2015, 3:07pm UTC](https://forums.unrealengine.com/t/getting-the-animations-list-from-persona/326422/2 "2015-08-24T15:07:23Z")

</div>

Still no answer, but just in case any one reads this and is interested, as a workaround i did put each skeleton’s set of animations in a specific directory and merely list the content of each dir to get my anims per skeleton.

Not elegant but it works. If anyone has a real solution, i’m all ears 🙂

Cheers

Cedric

---

<div class="post-metadata">

**Author:** ![Mhousse1247](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mhousse1247](https://forums.unrealengine.com/u/Mhousse1247)\
**Post date:** [August 24, 2015, 9:20pm UTC](https://forums.unrealengine.com/t/getting-the-animations-list-from-persona/326422/3 "2015-08-24T21:20:24Z")

</div>

Hi I think this is what you need

```
.h
UFUNCTION()
TArray<UAnimationAsset*> GetAllAnimationOfSkeleton(USkeleton* Skeleton);

.cpp
TArray<UAnimationAsset*> ATestActor::GetAllAnimationOfSkeleton(USkeleton* Skeleton)
{
	TArray<UAnimationAsset*> AnimsArray;

	if (Skeleton == NULL){ return AnimsArray; }

	for (TObjectIterator<UAnimationAsset> Itr; Itr; ++Itr)
	{
		if (Skeleton->GetWorld() != (*Itr)->GetWorld()){ continue; }

		if (Skeleton == (*Itr)->GetSkeleton())
		{
			AnimsArray.Add(*Itr);
		}
	}
	return AnimsArray;
}
```

---

<div class="post-metadata">

**Author:** ![uced](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@uced](https://forums.unrealengine.com/u/uced)\
**Post date:** [August 25, 2015, 2:39pm UTC](https://forums.unrealengine.com/t/getting-the-animations-list-from-persona/326422/4 "2015-08-25T14:39:12Z")

</div>

Hi Mhoussel,

Thank you very much, i will test this asap and report here.

Cheers

Cedric

---

<div class="post-metadata">

**Author:** ![uced](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@uced](https://forums.unrealengine.com/u/uced)\
**Post date:** [August 29, 2015, 8:56am UTC](https://forums.unrealengine.com/t/getting-the-animations-list-from-persona/326422/5 "2015-08-29T08:56:32Z")

</div>

Hi Mhousse1247,

Ok, i took the time to understand and test the function, it is exactly what i needed.

Thanks a ton,

Cheers

Cedric
