From 63b7ff9f4e5f5b0ff5d6bdb726fcd4e1d118e141 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 4 Mar 2021 18:39:07 +0100 Subject: Cleanup: Main `foreach ID` code: Remove `MAX_LIBARRAY` and improve comments. The `MAX_LIBARRAY` define was an annoying doublon to the `INDEX_ID_MAX` enum value now defined in `DNA_ID.h`, and it is no more useful. And comments were somewhat outdated. Also added an explanation about chosen order for the `INDEX_ID_` order. --- source/blender/python/intern/bpy_library_load.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/python') diff --git a/source/blender/python/intern/bpy_library_load.c b/source/blender/python/intern/bpy_library_load.c index 24eb9a61512..03771a8c294 100644 --- a/source/blender/python/intern/bpy_library_load.c +++ b/source/blender/python/intern/bpy_library_load.c @@ -217,7 +217,7 @@ static PyObject *bpy_lib_load(BPy_PropertyRNA *self, PyObject *args, PyObject *k ret->flag = ((is_link ? FILE_LINK : 0) | (is_rel ? FILE_RELPATH : 0) | (use_assets_only ? FILE_ASSETS_ONLY : 0)); - ret->dict = _PyDict_NewPresized(MAX_LIBARRAY); + ret->dict = _PyDict_NewPresized(INDEX_ID_MAX); return (PyObject *)ret; } @@ -248,7 +248,7 @@ static PyObject *bpy_lib_enter(BPy_Library *self) { PyObject *ret; BPy_Library *self_from; - PyObject *from_dict = _PyDict_NewPresized(MAX_LIBARRAY); + PyObject *from_dict = _PyDict_NewPresized(INDEX_ID_MAX); ReportList reports; BKE_reports_init(&reports, RPT_STORE); -- cgit v1.2.3