# How to create metadata curves for my morph targets?

**URL:** <https://forums.unrealengine.com/t/how-to-create-metadata-curves-for-my-morph-targets/2656802>\
**Category:** Editor Scripting\
**Tags:** Python, Editor-Scripting, unreal-engine, question\
**Created:** [September 15, 2025, 3:00pm UTC](https://forums.unrealengine.com/t/how-to-create-metadata-curves-for-my-morph-targets/2656802 "2025-09-15T15:00:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeffsn90](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jeffsn90](https://forums.unrealengine.com/u/jeffsn90)\
**Post date:** [September 15, 2025, 3:00pm UTC](https://forums.unrealengine.com/t/how-to-create-metadata-curves-for-my-morph-targets/2656802/1 "2025-09-15T15:00:40Z")

</div>

Hi. I’m new to this editor scripting world. I figured out how to get the list of morph targets in a selected skeletal mesh. Now I can’t find a way to create the curve metadata for them. I’m trying to get the morph target names and loop through it adding a curve with the same name for each one.  
I found some pieces of the puzzle here and there, but I can’t get it to work together.  
Like I said, listing the morph targets was easy, 3 lines of code after days of research LOL.

I think it could be a really useful script, since there’s a lot of repetion in the curve-morph target setup for animations.

edit:  
Found how to add curves trough

skeleton.find\_curve\_identifier(curve\_name, curve\_type)

The thing is, there’s no curve in my skeleton after that.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/2/9/329c3ad48da39e3b015a192e42e14e0f976a0733.png)

---

<div class="post-metadata">

**Author:** ![Soltude80](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Soltude80](https://forums.unrealengine.com/u/Soltude80)\
**Post date:** [March 25, 2026, 1:12pm UTC](https://forums.unrealengine.com/t/how-to-create-metadata-curves-for-my-morph-targets/2656802/2 "2026-03-25T13:12:46Z")

</div>

If you’re still looking, I couldn’t find any way in python or BP, but if you can do c++, the core part looks like this:

```cpp
if (UAnimCurveMetaData* AnimCurveMetaData = SkeletalMesh->GetAssetUserData<UAnimCurveMetaData>())
	{
		// Process each parsed entry
		for (const FCurveMetaDataEntry& Entry : Entries)
		{
			FName CurveFName(*Entry.CurveName);
			
			AnimCurveMetaData->AddCurveMetaData(CurveFName);
			AnimCurveMetaData->SetCurveMetaDataBoneLinks(CurveFName, Entry.LinkedBones, Entry.MaxLOD, Skeleton);
			AnimCurveMetaData->SetCurveMetaDataMaterial(CurveFName, Entry.bMaterial);
			AnimCurveMetaData->SetCurveMetaDataMorphTarget(CurveFName, Entry.bMorphTarget);

			UE_LOG(LOG_CAT(), Log, TEXT("Added curve metadata for '%s'"), *Entry.CurveName);
		}

		// ReSharper disable once CppExpressionWithoutSideEffects
		SkeletalMesh->MarkPackageDirty();
		return true;
	}
	UE_LOG(LOG_CAT(), Warning, TEXT("PasteAnimCurves: SkeletalMesh has no AnimCurveMetaData asset user data"));
	return false;
}

```

`FCurveMetaDataEntry`is a just a struct type I made, but you can use these methods to programmatically add mesh curves just by using values from whatever source you had.

You can put this in a blueprint library and call it from bp or python like here: [How To Expose C++ function to Python and Editor Utility Widgets | Knowledge base](https://dev.epicgames.com/community/learning/knowledge-base/KKjp/unreal-engine-how-to-expose-c-function-to-python-and-editor-utility-widgets)

If you’re getting into editor scripting, a lot of time you’ll find you can only do some things with c++.
