[Bf-blender-cvs] [afa5da9ce02] master: Cleanup: remove check for non-annotation properties in classes

Campbell Barton noreply at git.blender.org
Thu Feb 18 16:21:18 CET 2021


Commit: afa5da9ce02bcd46f70d250943a933afe6de1d59
Author: Campbell Barton
Date:   Thu Feb 18 15:45:08 2021 +1100
Branches: master
https://developer.blender.org/rBafa5da9ce02bcd46f70d250943a933afe6de1d59

Cleanup: remove check for non-annotation properties in classes

This was added to assist upgrading scripts to Blender 2.8x,
now 2.9x is released there is no need to keep this block.

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

M	source/blender/python/intern/bpy_rna.c

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

diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index c0f3ba30d93..4dfdba7758c 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -7977,31 +7977,6 @@ static int pyrna_deferred_register_props(StructRNA *srna, PyObject *class_dict)
     }
   }
 
-  if (ret == 0) {
-    /* This block can be removed once 2.8x is released and annotations are in use. */
-    bool has_warning = false;
-    while (PyDict_Next(class_dict, &pos, &key, &item)) {
-      if (pyrna_is_deferred_prop(item)) {
-        if (!has_warning) {
-          printf(
-              "Warning: class %.200s "
-              "contains a property which should be an annotation!\n",
-              RNA_struct_identifier(srna));
-          PyC_LineSpit();
-          has_warning = true;
-        }
-        printf("    assign as a type annotation: %.200s.%.200s\n",
-               RNA_struct_identifier(srna),
-               PyUnicode_AsUTF8(key));
-      }
-      ret = deferred_register_prop(srna, key, item);
-
-      if (ret != 0) {
-        break;
-      }
-    }
-  }
-
   return ret;
 }



More information about the Bf-blender-cvs mailing list