After talking with Matt about this, added notifier NC_ID to handle ID changes, specif...
[blender.git] / source / blender / makesrna / intern / rna_ID.c
index cb1a1211d24cfa27173bd27ce05dfc1150dff110..3bcdf373c432c34c61b1c7d56d653f1d58db71b2 100644 (file)
@@ -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);