diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-11 23:18:09 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-11 23:18:09 +0300 |
commit | 09aa799e5331a9da666f8a6325b038a866b1f35d (patch) | |
tree | ccff0086f70ea7929554a7e4c90bd1182f125ba6 /source/blender/python/intern/bpy_intern_string.c | |
parent | e3c85aaca74fc7bd2a9da43a0396a886363bc93d (diff) |
PyAPI: Use annotations for RNA definitions
- Logical use of fields since they define type information.
- Avoids using ordered-dict metaclass.
Properties using regular assignments will print a warning and load,
however the order is undefined.
Diffstat (limited to 'source/blender/python/intern/bpy_intern_string.c')
-rw-r--r-- | source/blender/python/intern/bpy_intern_string.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_intern_string.c b/source/blender/python/intern/bpy_intern_string.c index 6911e985e93..41276963fc9 100644 --- a/source/blender/python/intern/bpy_intern_string.c +++ b/source/blender/python/intern/bpy_intern_string.c @@ -36,6 +36,7 @@ static PyObject *bpy_intern_str_arr[16]; +PyObject *bpy_intern_str___annotations__; PyObject *bpy_intern_str___doc__; PyObject *bpy_intern_str___main__; PyObject *bpy_intern_str___module__; @@ -47,7 +48,6 @@ PyObject *bpy_intern_str_bl_rna; PyObject *bpy_intern_str_bl_target_properties; PyObject *bpy_intern_str_bpy_types; PyObject *bpy_intern_str_frame; -PyObject *bpy_intern_str_order; PyObject *bpy_intern_str_properties; PyObject *bpy_intern_str_register; PyObject *bpy_intern_str_self; @@ -60,6 +60,7 @@ void bpy_intern_string_init(void) #define BPY_INTERN_STR(var, str) \ { var = bpy_intern_str_arr[i++] = PyUnicode_FromString(str); } (void)0 + BPY_INTERN_STR(bpy_intern_str___annotations__, "__annotations__"); BPY_INTERN_STR(bpy_intern_str___doc__, "__doc__"); BPY_INTERN_STR(bpy_intern_str___main__, "__main__"); BPY_INTERN_STR(bpy_intern_str___module__, "__module__"); @@ -71,7 +72,6 @@ void bpy_intern_string_init(void) BPY_INTERN_STR(bpy_intern_str_bl_target_properties, "bl_target_properties"); BPY_INTERN_STR(bpy_intern_str_bpy_types, "bpy.types"); BPY_INTERN_STR(bpy_intern_str_frame, "frame"); - BPY_INTERN_STR(bpy_intern_str_order, "order"); BPY_INTERN_STR(bpy_intern_str_properties, "properties"); BPY_INTERN_STR(bpy_intern_str_register, "register"); BPY_INTERN_STR(bpy_intern_str_self, "self"); |