INNER CODE UNIT · Python
GetAnimationLibrary
mamoniem/UnrealEditorPythonScripts · Animation/SetAllAnimNotifyProperty.py:23
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)
for notifyEvent in allEventsForSelectedAsset:
notifyEvent.set_editor_property("trigger_on_dedicated_server", False)