diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_property.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_property.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_property.c b/source/blender/makesrna/intern/rna_property.c index c6b8e89c282..a2c19e55056 100644 --- a/source/blender/makesrna/intern/rna_property.c +++ b/source/blender/makesrna/intern/rna_property.c @@ -28,6 +28,11 @@ #include <stdlib.h> #include "DNA_property_types.h" +#include "DNA_object_types.h" + +#include "BLI_path_util.h" + +#include "BLF_translation.h" #include "RNA_define.h" #include "RNA_enum_types.h" @@ -97,9 +102,11 @@ static void rna_GameProperty_type_set(PointerRNA *ptr, int value) static void rna_GameProperty_name_set(PointerRNA *ptr, const char *value) { - bProperty *prop = (bProperty *)(ptr->data); + Object *ob = ptr->id.data; + bProperty *prop = ptr->data; BLI_strncpy_utf8(prop->name, value, sizeof(prop->name)); - BKE_bproperty_unique(NULL, prop, 1); + + BLI_uniquename(&ob->prop, prop, DATA_("Property"), '.', offsetof(bProperty, name), sizeof(prop->name)); } |