Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] constraint unweighted bones for the skeleton reference pose #8

Open
AchimTuran opened this issue Jul 14, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@AchimTuran
Copy link
Member

As a user
, I want to constraint unweighted bones for the reference pose in the skeleton asset
, so that I can cleanly setup my characters without leaving the Unreal Engine editor.

@AchimTuran AchimTuran added the enhancement New feature or request label Jul 14, 2022
@AchimTuran
Copy link
Member Author

CSkeletonReferencePose skeletonReferencePose(skeletalMesh->GetRefSkeleton());
          const FTransform worldTransform = skeletonReferencePose.GetRefBonePose(newBone.ConstraintBone, CSkeletonReferencePose::EBonePoseSpaces::World);
          skeletonReferencePose.SetBonePose(newBone.NewBoneName, worldTransform, CSkeletonReferencePose::EBonePoseSpaces::World);
          FTransform newBoneTransform = skeletonReferencePose.GetRefBonePose(newBone.NewBoneName);
  
          FReferenceSkeletonModifier referenceSkeletonModifier(skeletalMesh->GetRefSkeleton(), Skeleton);
          referenceSkeletonModifier.UpdateRefPoseTransform(skeletalMesh->GetRefSkeleton().FindBoneIndex(newBone.NewBoneName), newBoneTransform);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant