x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Getting the animations list from persona ?

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:

alt text

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

Any help ?

Thanks

Cedric

Product Version: UE 4.8
Tags:
animlist.jpg (29.0 kB)
more ▼

asked Jul 24 '15 at 09:00 PM in C++ Programming

avatar image

uced
850 75 91 360

avatar image uced Aug 24 '15 at 03:07 PM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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;
 }
more ▼

answered Aug 24 '15 at 09:20 PM

avatar image

Mhousse1247
3.5k 152 29 318

avatar image uced Aug 25 '15 at 02:39 PM

Hi Mhoussel,

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

Cheers

Cedric

avatar image uced Aug 29 '15 at 08:56 AM

Hi Mhousse1247,

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

Thanks a ton,

Cheers

Cedric

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question