Cleanup: reorganize BKE ID tagging functions.

BKE_main_id_tag_/BKE_main_id_flag_ were horrible naming now that we split those
into flags (for presistent one) and tags (for runtime ones).

Got rid of previous 'tag_' functions behavior (those who were dedicated shortcuts
to set/clear LIB_TAG_DOIT), so now '_tag_' functions affect tags, and '_flag_'
functions affect flags.
This commit is contained in:
2016-02-15 19:35:35 +01:00
parent a1495366af
commit 9a0fb589f7
21 changed files with 91 additions and 80 deletions

View File

@@ -332,7 +332,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args))
Main *mainl = NULL;
int err = 0;
BKE_main_id_flag_all(bmain, LIB_TAG_PRE_EXISTING, true);
BKE_main_id_tag_all(bmain, LIB_TAG_PRE_EXISTING, true);
/* here appending/linking starts */
mainl = BLO_library_link_begin(bmain, &(self->blo_handle), self->relpath);
@@ -400,7 +400,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args))
/* exception raised above, XXX, this leaks some memory */
BLO_blendhandle_close(self->blo_handle);
self->blo_handle = NULL;
BKE_main_id_flag_all(bmain, LIB_TAG_PRE_EXISTING, false);
BKE_main_id_tag_all(bmain, LIB_TAG_PRE_EXISTING, false);
return NULL;
}
else {
@@ -420,7 +420,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args))
}
}
BKE_main_id_flag_all(bmain, LIB_TAG_PRE_EXISTING, false);
BKE_main_id_tag_all(bmain, LIB_TAG_PRE_EXISTING, false);
/* finally swap the capsules for real bpy objects
* important since BLO_library_append_end initializes NodeTree types used by srna->refine */