INNER CODE UNIT · Python

GetEditorAssetLibrary

mamoniem/UnrealEditorPythonScripts · Animation/SetAllAnimNotifyProperty.py:19

class GetEditorAssetLibrary(unreal.EditorAssetLibrary):
    pass

@unreal.uclass()
class GetAnimationLibrary(unreal.AnimationLibrary):
    pass

editorUtility = GetEditorUtility()
animLib = GetAnimationLibrary()

selectedAssets = editorUtility.get_selected_assets()

for selectedAsset in selectedAssets:
    allEventsForSelectedAsset = animLib.get_animation_notify_events(selectedAsset)
    if len(allEventsForSelectedAsset) != 0:
        print("For the animation [%s] found [%d] notifies" % (selectedAsset.get_name(), len(allEventsForSelectedAsset)))
		
        selectedAsset.modify(True)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…