Cleanup in BLO API: rename 'append' funcs to 'link', since none do append, but only linking of datablocks!

This commit is contained in:
2015-10-12 13:46:58 +02:00
parent 6af043424d
commit 4bc08d09ae
6 changed files with 44 additions and 43 deletions

View File

@@ -335,7 +335,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args))
BKE_main_id_flag_all(bmain, LIB_PRE_EXISTING, true);
/* here appending/linking starts */
mainl = BLO_library_append_begin(bmain, &(self->blo_handle), self->relpath);
mainl = BLO_library_link_begin(bmain, &(self->blo_handle), self->relpath);
{
int idcode_step = 0, idcode;
@@ -358,7 +358,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args))
// printf(" %s\n", item_str);
if (item_str) {
ID *id = BLO_library_append_named_part(mainl, &(self->blo_handle), item_str, idcode);
ID *id = BLO_library_link_named_part(mainl, &(self->blo_handle), item_str, idcode);
if (id) {
#ifdef USE_RNA_DATABLOCKS
/* swap name for pointer to the id */
@@ -405,7 +405,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args))
}
else {
Library *lib = mainl->curlib; /* newly added lib, assign before append end */
BLO_library_append_end(NULL, mainl, &(self->blo_handle), 0, self->flag);
BLO_library_link_end(NULL, mainl, &(self->blo_handle), 0, self->flag);
BLO_blendhandle_close(self->blo_handle);
self->blo_handle = NULL;