Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElia Sarti <vekoon@gmail.com>2009-11-26 02:13:47 +0300
committerElia Sarti <vekoon@gmail.com>2009-11-26 02:13:47 +0300
commitaa5227664ab419d5446466fe0b3a368b05281fbe (patch)
treef1cbbcc27978d7948fd622fefc0b56f026bd676f /source/blender/makesrna/intern/rna_ID.c
parentf6b03893945cac9bd79ed5bfe7eed12b3805c97d (diff)
After talking with Matt about this, added notifier NC_ID to handle ID changes, specifically ND_ID_RENAME for ID renaming. Done for outliner, 3d view and properties editor.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ID.c')
-rw-r--r--source/blender/makesrna/intern/rna_ID.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index cb1a1211d24..3bcdf373c43 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -31,6 +31,8 @@
#include "DNA_ID.h"
+#include "WM_types.h"
+
#include "rna_internal.h"
/* enum of ID-block types
@@ -301,6 +303,7 @@ static void rna_def_ID(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Name", "Unique datablock ID name.");
RNA_def_property_string_funcs(prop, "rna_ID_name_get", "rna_ID_name_length", "rna_ID_name_set");
RNA_def_property_string_maxlength(prop, sizeof(((ID*)NULL)->name)-2);
+ RNA_def_property_update(prop, NC_ID|ND_ID_RENAME, NULL);
RNA_def_struct_name_property(srna, prop);
prop= RNA_def_property(srna, "users", PROP_INT, PROP_UNSIGNED);