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:
-rw-r--r--source/blender/makesrna/intern/rna_define.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 1b0a2fca0ce..b72afe88dda 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -1823,6 +1823,13 @@ void RNA_def_property_struct_runtime(PropertyRNA *prop, StructRNA *type)
switch (prop->type) {
case PROP_POINTER: {
+ if ((srna->flag & STRUCT_NO_DATABLOCK_IDPROPERTIES) != 0 && (type->flag & STRUCT_ID) != 0) {
+ CLOG_ERROR(&LOG,
+ "Struct \"%s\" (probably an operator or keymap) does not allow pointer "
+ "properties to ID datablocks.",
+ srna->identifier);
+ return;
+ }
PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
pprop->type = type;