Set bone rotations for Poseable mesh in local space

@DarKMoonone
Thanks a lot for the hint!!!
I really wonder why this feature is not implemented in the stock component of Unreal Engine … it took me 1-2h to figure out what is going wrong when I tried to read bone transforms directly from a UAnimSequence.

This is how we solved the issue in our framework:

#pragma once

#include "CoreMinimal.h"
#include "Components/PoseableMeshComponent.h"
#include "TMPoseableMeshComponent.generated.h"

UCLASS(meta = (BlueprintSpawnableComponent))
class TTMOTION_API UTMPoseableMeshComponent : public UPoseableMeshComponent
{
	GENERATED_BODY()
public:
	UFUNCTION(BlueprintCallable, Category = "Components|PoseableMesh")
	void SetBoneLocalTransformByName(FName BoneName, const FTransform& InTransform);	
};
#include "TMotion/Components/TMPoseableMeshComponent.h"

void UTMPoseableMeshComponent::SetBoneLocalTransformByName(FName BoneName, const FTransform& InTransform)
{
  if (!SkeletalMesh || !RequiredBones.IsValid())
  {
    return;
  }

  int32 boneIndex = GetBoneIndex(BoneName);
  if (boneIndex >= 0 && boneIndex < BoneSpaceTransforms.Num())
  {
    BoneSpaceTransforms[boneIndex] = InTransform;
    MarkRefreshTransformDirty();
  }
}