Announcement

Collapse
No announcement yet.

Copy Pose from Mesh should have an option to copy morph target curves too

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [FEATURE REQUEST] Copy Pose from Mesh should have an option to copy morph target curves too

    Copy Pose from Mesh should have an option to copy morph target curves too. Which means that if both meshes have a morph target with the same name the curve results should be copied to the mesh that's using an anim BP with Copy Pose from Mesh.

    Let's say you have a head mesh and an eyelash mesh. You want to be able to swap out the eyelashes so you have them in separate skeletal meshes. You then add an anim BP to the eyelash mesh that does Copy Pose from Mesh on the head. Now the eyelashes follow the head which is what you want. However if you have a morph target called eye_blink and make the eyes blink, the eyelashes will not do the same thing, even if they had a morph target called eye_blink made to match with the head version. This should change, making the morph targets match between different meshes automatically.

    #2
    Agreed with the request, since I had a similar need for it. This is how I solved it at the moment via c++ as an extension of the UAnimInstance class.

    if (TargetSkeletalMesh)
    {
    USkeletalMeshComponent* ownMesh = GetOwningComponent();
    ownMesh->ClearMorphTargets();

    for (const FActiveMorphTarget& morphTarget : TargetSkeletalMesh->ActiveMorphTargets)
    {
    FName curveName = morphTarget.MorphTarget->GetFName();
    float curveValue = TargetSkeletalMesh->GetAnimInstance()->GetCurveValue(curveName);
    ownMesh->SetMorphTarget(curveName, curveValue);
    }
    }
    Last edited by qdessauvage; 01-12-2018, 11:24 AM.

    Comment


      #3
      This is a very importance feature for games that have character customization as well.

      Seconded.

      Comment

      Working...
      X