[Bf-blender-cvs] [c1d8df47f60] master: Revert "RNA define: check and report invalid usages of ID pointers properties."

Bastien Montagne noreply at git.blender.org
Mon Nov 16 17:13:17 CET 2020


Commit: c1d8df47f60f590f0c945ca1ee61adcec226a1b0
Author: Bastien Montagne
Date:   Mon Nov 16 17:11:48 2020 +0100
Branches: master
https://developer.blender.org/rBc1d8df47f60f590f0c945ca1ee61adcec226a1b0

Revert "RNA define: check and report invalid usages of ID pointers properties."

This reverts commit f39fbb3e604611b63c69661dd22ca987fb1d8791.

Code is not valid, `DefRNA.laststruct` does not always point to the
proper struct when defined from Python, need to be done differently.

===================================================================

M	source/blender/makesrna/intern/rna_define.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index b72afe88dda..1b0a2fca0ce 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -1823,13 +1823,6 @@ 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;



More information about the Bf-blender-cvs mailing list