Files
UnrealEngineUWP/Engine/Plugins/Experimental/PythonScriptPlugin/Source
Jamie Dale 046a164ece Exposed UserDefinedEnum types to Python
This is the first phase of allowing Blueprint types to be generated for Python, which must be accessed via unreal.get_blueprint_generated_types(...) as asset names are not guaranteed to be unique, so they're not added to the unreal module.

Once a type has been generated for Python, it will be updated if the underlying asset is changed. Should the asset be deleted then the Python type will be reset to clean state and become mostly unusable.

This change also ensures that the Unreal type pointers referenced by the Python meta-data are ARO'd correctly. This will cause a warning if you try and delete an asset with a type used by Python.

 MyEnum = unreal.get_blueprint_generated_types('/Game/MyEnum') # This can also accept multiple arguments or a list, and will return a tuple of types
 print(MyEnum.MY_ENTRY)

#jira UE-81862, UE-81859
#rb Lauren.Barnes

[CL 10227467 by Jamie Dale in Dev-Editor branch]
2019-11-14 16:52:43 -05:00
..