Cleanup: BLO_read: linking API arg order and name.

linking API funcs would use 'name, idcode', when all other code here uses
(more sensible) 'idcode, name'.

Also, use 'name' arg name when we expect a bare name, without the prepended ID code, and
'idname' arg name when we expect a complete ID name.

And here too, idcode shall be short, not int!
This commit is contained in:
2015-10-15 16:04:04 +02:00
parent 25f79d97de
commit fa3dd5d9f4
5 changed files with 20 additions and 19 deletions

View File

@@ -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_link_named_part(mainl, &(self->blo_handle), item_str, idcode);
ID *id = BLO_library_link_named_part(mainl, &(self->blo_handle), idcode, item_str);
if (id) {
#ifdef USE_RNA_DATABLOCKS
/* swap name for pointer to the id */