[Request] A SkeletalMeshComponent::GetMorphTarget() function

Dear Friends at Epic,

I imagine there’s a reason this has not been done already, but is there any way you could make a GetMorphTarget() function to compliment SetMorphTarget?

something like

/** Obtain Current Value for Morph Target [0,1] */
UFUNCTION(BlueprintCallable, Category="Animation")
float GetMorphTarget(FName MorphTargetName);

im referring to compliment of these functions:

SkeletalMeshComponent.h

/**
	 * Set Morph Target with Name and Value(0-1)
	 */
	UFUNCTION(BlueprintCallable, Category="Animation")
	void SetMorphTarget(FName MorphTargetName, float Value);

	/**
	 * Clear all Morph Target that are set to this mesh
	 */
	UFUNCTION(BlueprintCallable, Category="Animation")
	void ClearMorphTargets();

Currently I am reduced to having to save and track the values I set through an additional data structure, which is inherently error prone and requires upkeep as change are made

Does the functionality I’m requesting already exist?

Thanks!

Rama

Hello Rama,

We’re working toward responding as soon as possible. Thanks for your patience!

Sean

hee hee okay!

:slight_smile:

Rama

The reason is because it wasn’t requested and usually people care to set the value, but not many care to get.
Also if you’re using curve in animation to set morph target, AnimInstance already has the functionality (UAnimInstance::GetCurveValue), so you can use that.

Thanks,

–Lina,

#Request

Well, can I request it?

I am requesting it :slight_smile:

I am not using Curve in animation

I am not using animations at all to set morph targets

I am setting morph targets directly in C++ and smoothly adjusting morph target via interpolation functions

For such a circumstance being able to retrieve the current value is actually quite useful

If you’re curious, I find that setting morph targets directly in code gives me more control than using animations to do it :slight_smile:

Rama

Hi, Rama,

Sorry for delay. I added TTP for you. That sounds fine.

Thank you,

–Lina,

TTP ?

Well it sounds good :slight_smile:

Thanks Lina!

Rama