diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-31 17:21:47 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-31 17:21:47 +0300 |
commit | eb1feb9f4a62e3caca4b72964c9fdd8187df53e5 (patch) | |
tree | 2c6b18ee72db4a386bf68425cc40620f9d49c48f /source/blender/blenkernel/intern/library.c | |
parent | 0b396bc15bd4433bfe9b8c6ffbc87d312d2426c1 (diff) | |
parent | 16100f8261770e367b0892bb38c778699ed609fe (diff) |
Merge branch 'master' into blender2.8
Conflicts:
source/blender/editors/object/object_add.c
source/blender/editors/object/object_select.c
source/blender/editors/space_outliner/outliner_edit.c
Diffstat (limited to 'source/blender/blenkernel/intern/library.c')
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 3926d2055f0..917b318899c 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -1738,17 +1738,12 @@ void BKE_main_thumbnail_create(struct Main *bmain) } /* ***************** ID ************************ */ -ID *BKE_libblock_find_name_ex(struct Main *bmain, const short type, const char *name) +ID *BKE_libblock_find_name(struct Main *bmain, const short type, const char *name) { ListBase *lb = which_libbase(bmain, type); BLI_assert(lb != NULL); return BLI_findstring(lb, name, offsetof(ID, name) + 2); } -ID *BKE_libblock_find_name(const short type, const char *name) -{ - return BKE_libblock_find_name_ex(G.main, type, name); -} - void id_sort_by_name(ListBase *lb, ID *id) { @@ -2078,7 +2073,7 @@ static void library_make_local_copying_check(ID *id, GSet *loop_tags, MainIDRela /** Make linked datablocks local. * - * \param bmain Almost certainly G.main. + * \param bmain Almost certainly global main. * \param lib If not NULL, only make local datablocks from this library. * \param untagged_only If true, only make local datablocks not tagged with LIB_TAG_PRE_EXISTING. * \param set_fake If true, set fake user on all localized datablocks (except group and objects ones). @@ -2510,7 +2505,7 @@ void BKE_id_ui_prefix(char name[MAX_ID_NAME + 1], const ID *id) strcpy(name + 3, id->name + 2); } -void BKE_library_filepath_set(Library *lib, const char *filepath) +void BKE_library_filepath_set(Main *bmain, Library *lib, const char *filepath) { /* in some cases this is used to update the absolute path from the * relative */ @@ -2529,8 +2524,8 @@ void BKE_library_filepath_set(Library *lib, const char *filepath) * since making local could cause this to be directly linked - campbell */ /* Never make paths relative to parent lib - reading code (blenloader) always set *all* lib->name relative to - * current G.main, not to their parent for indirectly linked ones. */ - const char *basepath = G.main->name; + * current main, not to their parent for indirectly linked ones. */ + const char *basepath = bmain->name; BLI_path_abs(lib->filepath, basepath); } } |