Added SpineSkeletonComponent::GetBones, closes #1082.

This commit is contained in:
badlogic 2018-06-13 15:08:14 +02:00
parent 59aa3a8780
commit 79e607a5f1
2 changed files with 12 additions and 0 deletions

View File

@ -171,6 +171,15 @@ bool USpineSkeletonComponent::GetFlipY() {
return false;
}
void USpineSkeletonComponent::GetBones(TArray<FString> &Bones) {
CheckState();
if (skeleton) {
for (size_t i = 0, n = skeleton->getBones().size(); i < n; i++) {
Bones.Add(skeleton->getBones()[i]->getData().getName().buffer());
}
}
}
void USpineSkeletonComponent::BeginPlay() {
Super::BeginPlay();
}

View File

@ -89,6 +89,9 @@ public:
UFUNCTION(BlueprintCallable, Category = "Components|Spine|Skeleton")
bool GetFlipY();
UFUNCTION(BlueprintPure, Category = "Components|Spine|Skeleton")
void GetBones(TArray<FString> &Bones);
UPROPERTY(BlueprintAssignable, Category = "Components|Spine|Skeleton")
FSpineBeforeUpdateWorldTransformDelegate BeforeUpdateWorldTransform;