diff options
author | Bastien Montagne <b.mont29@gmail.com> | 2020-03-19 21:37:00 +0300 |
---|---|---|
committer | Bastien Montagne <b.mont29@gmail.com> | 2020-03-19 21:39:23 +0300 |
commit | 12b621059a6f1337e8ae8fdd9533e7808225e71e (patch) | |
tree | d04a2fddc28152235191e2d93884f4d143410d85 /source/blender/python/intern/bpy_library_load.c | |
parent | 0b7854323d41f3a1a55a40ddf76a90e2017a0784 (diff) |
Cleanup/refactor: remove BKE_idcode, in favour of BKE_idtype.
Mpving utils from idcode to idtype proved to be somewhat painful for
some reasons, but now all looks good.
Had to add a fake/empty shell for the special snowflake too,
`ID_LINK_PLACEHOLDER/INDEX_ID_NULL`...
Diffstat (limited to 'source/blender/python/intern/bpy_library_load.c')
-rw-r--r-- | source/blender/python/intern/bpy_library_load.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/python/intern/bpy_library_load.c b/source/blender/python/intern/bpy_library_load.c index 14a4482f570..989b7931444 100644 --- a/source/blender/python/intern/bpy_library_load.c +++ b/source/blender/python/intern/bpy_library_load.c @@ -35,7 +35,7 @@ #include "BLI_utildefines.h" #include "BKE_context.h" -#include "BKE_idcode.h" +#include "BKE_idtype.h" #include "BKE_lib_id.h" #include "BKE_main.h" #include "BKE_report.h" @@ -246,9 +246,9 @@ static PyObject *bpy_lib_enter(BPy_Library *self) } else { int i = 0, code; - while ((code = BKE_idcode_iter_step(&i))) { - if (BKE_idcode_is_linkable(code)) { - const char *name_plural = BKE_idcode_to_name_plural(code); + while ((code = BKE_idtype_idcode_iter_step(&i))) { + if (BKE_idtype_idcode_is_linkable(code)) { + const char *name_plural = BKE_idtype_idcode_to_name_plural(code); PyObject *str = PyUnicode_FromString(name_plural); PyObject *item; @@ -332,9 +332,9 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args)) { int idcode_step = 0, idcode; - while ((idcode = BKE_idcode_iter_step(&idcode_step))) { - if (BKE_idcode_is_linkable(idcode) && (idcode != ID_WS || do_append)) { - const char *name_plural = BKE_idcode_to_name_plural(idcode); + while ((idcode = BKE_idtype_idcode_iter_step(&idcode_step))) { + if (BKE_idtype_idcode_is_linkable(idcode) && (idcode != ID_WS || do_append)) { + const char *name_plural = BKE_idtype_idcode_to_name_plural(idcode); PyObject *ls = PyDict_GetItemString(self->dict, name_plural); // printf("lib: %s\n", name_plural); if (ls && PyList_Check(ls)) { @@ -419,9 +419,9 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args)) #ifdef USE_RNA_DATABLOCKS { int idcode_step = 0, idcode; - while ((idcode = BKE_idcode_iter_step(&idcode_step))) { - if (BKE_idcode_is_linkable(idcode) && (idcode != ID_WS || do_append)) { - const char *name_plural = BKE_idcode_to_name_plural(idcode); + while ((idcode = BKE_idtype_idcode_iter_step(&idcode_step))) { + if (BKE_idtype_idcode_is_linkable(idcode) && (idcode != ID_WS || do_append)) { + const char *name_plural = BKE_idtype_idcode_to_name_plural(idcode); PyObject *ls = PyDict_GetItemString(self->dict, name_plural); if (ls && PyList_Check(ls)) { Py_ssize_t size = PyList_GET_SIZE(ls); |