I was hoping to write a simple Python function in UE 5.6 which would create a new Animation Composite with a specific name, and using a given Skeleton. I would then add a given Animation Sequence to this as a single Composite section, and set the Start (or End) Time.
However, none of these steps appear to be possible via Python ![]()
I tried creating one in the same way I’ve created other types of asset:
assetTools = unreal.AssetToolsHelpers.get_asset_tools()
name = "My_Anim_Comp"
folder = "/Game/Tests/Compositions"
assType = unreal.AnimComposite
factory = unreal.AnimCompositeFactory()
newComp = assetTools.create_asset(name, folder, assType, factory)
But this always results in None, and nothing is created or reported in the output log (yes the package folder exists).
Then I thought I could manually create one, and the function could just copy it instead and add the Animation Sequence, but there doesn’t appear to be any way to define or set Composite Sections in an Animation Composite either ![]()
Is stuff like this even possible in Python? This seems like a very rudimentary use case, but things that seem fundamental don’t even appear to be exposed to Python… ![]()