# Automating AnimMontage Asset Creation

**URL:** <https://forums.unrealengine.com/t/automating-animmontage-asset-creation/662622>\
**Category:** Editor Scripting\
**Tags:** Python, unreal-engine, UE5-0, question\
**Created:** [October 5, 2022, 2:30am UTC](https://forums.unrealengine.com/t/automating-animmontage-asset-creation/662622 "2022-10-05T02:30:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tech\_Andrew](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tech_andrew/32/577823_2.png) [@Tech\_Andrew](https://forums.unrealengine.com/u/Tech_Andrew)\
**Post date:** [October 5, 2022, 2:30am UTC](https://forums.unrealengine.com/t/automating-animmontage-asset-creation/662622/1 "2022-10-05T02:30:54Z")

</div>

Hello,  
I am supporting a request from our animators to make a tool for generating AnimMontage assets for their newly imported AnimSequences. When I call create\_asset for a new AnimMontage nothing is created. I believe the problem is the factory is missing a SourceAnimation or TargetSkeleton asset to build from but I can’t set these protected variables from Python. Any help on how I need to go about creating a brand new AnimMontage would be greatly appreciated.

# Current test

unreal.AssetToolsHelpers.get\_asset\_tools().create\_asset(asset\_name=‘test’, package\_path=‘/Game/’, asset\_class=unreal.AnimMontage, factory=unreal.AnimMontageFactory())

---

<div class="post-metadata">

**Author:** ![L1z4rD89](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/l1z4rd89/32/1194537_2.png) [@L1z4rD89](https://forums.unrealengine.com/u/L1z4rD89)\
**Post date:** [October 5, 2022, 6:50am UTC](https://forums.unrealengine.com/t/automating-animmontage-asset-creation/662622/2 "2022-10-05T06:50:47Z")

</div>

```auto
unreal.AssetTools.create_asset_with_dialog(unreal.AssetToolsHelpers.get_asset_tools(), asset_name = "test", package_path = "/Game/", asset_class = unreal.AnimMontage,factory=unreal.AnimMontageFactory())

```

---

<div class="post-metadata">

**Author:** ![Tech\_Andrew](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tech_andrew/32/577823_2.png) [@Tech\_Andrew](https://forums.unrealengine.com/u/Tech_Andrew)\
**Post date:** [October 5, 2022, 4:35pm UTC](https://forums.unrealengine.com/t/automating-animmontage-asset-creation/662622/3 "2022-10-05T16:35:52Z")

</div>

Thanks for help L1z. I want to create the asset without prompting the user with a dialog. To do that I learned I need to edit the AnimMontageFactory.h and tag the TargetSkeleton and SourceANimation with BlueprintReadWrite flag to allow python to set it.

`UPROPERTY(BlueprintReadWrite)`

---

<div class="post-metadata">

**Author:** ![MoBolton](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MoBolton](https://forums.unrealengine.com/u/MoBolton)\
**Post date:** [October 6, 2024, 1:48am UTC](https://forums.unrealengine.com/t/automating-animmontage-asset-creation/662622/4 "2024-10-06T01:48:57Z")

</div>

This was useful for me thanks. Did you ever find a way to set the slot for the track?
