Bad values here can cause the unreal.py file to fail to parse, so we now validate that user-defined values are valid for Python when generating the glue and report an error for any that are invalid.
This also re-adds the type prefixes to any class, struct, or enum types that would start with a number without their prefix. Once again, this is needed to avoid invalid symbol names in the unreal.py file.
#jira UE-85176
#rb none
[CL 10479002 by Jamie Dale in Dev-Editor branch]
This allows people to create a Blueprint node that can define a blob of literal Python script, along with wildcard inputs and outputs to be used by the script itself.
The node takes care of marshalling data in and out of the Python script, and allows people to invoke custom Python from Blueprints without relying on Python generated BPFL types.
#jira UE-84932
#rb Dan.OConnor
[CL 10421545 by Jamie Dale in Dev-Editor branch]
This will attempt to notify the nearest object in the Python owner context stack, and is otherwise identical to the implementation for wrapped objects (see 10265342).
#rb Lauren.Barnes
#rnx
[CL 10343893 by Jamie Dale in Dev-Editor branch]
This may be needed if you've edited data on an instance indirectly (eg, modifying an array reference on the object), and need to force a change notification to update some dependent data.
In Python, this can be done by passing unreal.PropertyAccessChangeNotifyMode.ALWAYS as the notify_mode argument to set_editor_property.
In Editor Utilities, there is a new advanced pin available for setting the "Change Notify Mode".
In both cases the default method is to notify only when the value actually changes.
This change also significantly simplifies UK2Node_GetEditorProperty and UK2Node_SetEditorProperty by having them derive from UK2Node_CallFunction, rather than being a proxy node that expands to a UK2Node_CallFunction node.
#jira UE-80285
#rb Lauren.Barnes
[CL 10337069 by Jamie Dale in Dev-Editor branch]
This avoids the caller needing to have called unreal.get_blueprint_generated_types(...) for the type before trying to access it.
#rb Lauren.Barnes
[CL 10319031 by Jamie Dale in Dev-Editor branch]
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]
The existing Python code has been ported to use this, and this can also be used by Blueprints (or other C++ setting properties) to allow property changes that emit change notifications.
#jira UE-77388
#rb Chris.Gagnon
[CL 9706346 by Jamie Dale in Dev-Editor branch]