From ac3140fb2f439c6548e94612179581c742efe6df Mon Sep 17 00:00:00 2001 From: Roberto De Ioris Date: Thu, 6 Sep 2018 12:16:41 +0200 Subject: [PATCH] Update README.md --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 458b7b12f..c69d75e89 100644 --- a/README.md +++ b/README.md @@ -431,6 +431,27 @@ vec = self.uobject.GetActorLocation() Reflection based functions are those in camelcase (or with the first capital letter). Native functions instead follow the python style, with lower case, underscore-as-separator function names. +Note that, in editor builds, when you change the property of an archetype (included ClassDefaultObject) via __setattr__ all of the archtype instances will be updated too. + +To be more clear: + +```python +your_blueprint.GeneratedClass.get_cdo().CharacterMovement.MaxWalkSpeed = 600.0 +``` + +is a super shortcut for: + +```python +your_blueprint.GeneratedClass.get_cdo().CharacterMovement.pre_edit_change('MaxWalkSpeed') +your_blueprint.GeneratedClass.get_cdo().CharacterMovement.set_property('MaxWalkSpeed', 600.0) +your_blueprint.GeneratedClass.get_cdo().CharacterMovement.post_edit_change_property('MaxWalkSpeed') +for instance in your_blueprint.GeneratedClass.get_cdo().CharacterMovement.get_archetype_instances(): + instance.pre_edit_change('MaxWalkSpeed') + instance.set_property('MaxWalkSpeed', 600.0) + instance.post_edit_change_property('MaxWalkSpeed') +``` + + The automagic UClass, UStruct and UEnums mappers ------------------------------------------------