diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-10-12 16:07:07 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-10-12 16:07:07 +0300 |
commit | 2e8fcac15db50713ae3552e535be91ba331ad4bc (patch) | |
tree | f67ee95800317f02d719e41d8559df4cfa32c3ab /source/blender/windowmanager/intern/wm_operators.c | |
parent | d24bafa0d5b0f1f833145524b7073a513a272b17 (diff) |
Cleanup & rework of BLO_linking code.
This commits does mostly two things:
* Get rid of bContext parameter: I can see no real good reason to pass such a high-level data
to such low-level code... It also makes it more difficult to call when you do not have
a context available.
* Cleanup the instantiating part.
Last point is the most risky - previous code was sometimes quite confusing and hard to follow,
from tests nothing behaves differently in new code, but some hidden corner case may show up.
Anyway, no change in behavior is expected from this commit, if it happens please file a bugreport!
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operators.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 70d7fdbdfd9..aed147344e0 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -2656,7 +2656,7 @@ static void wm_link_append_do_libgroup( } if (name) { - BLO_library_link_named_part_ex(C, mainl, &bh, name, idcode, flag); + BLO_library_link_named_part_ex(mainl, &bh, name, idcode, flag, CTX_data_scene(C), CTX_wm_view3d(C)); } else { if (is_first_run) { @@ -2680,7 +2680,7 @@ static void wm_link_append_do_libgroup( curr_idcode = BKE_idcode_from_name(group); if ((idcode == curr_idcode) && (BLI_path_cmp(curr_libname, libname) == 0)) { - BLO_library_link_named_part_ex(C, mainl, &bh, name, idcode, flag); + BLO_library_link_named_part_ex(mainl, &bh, name, idcode, flag, CTX_data_scene(C), CTX_wm_view3d(C)); } else if (is_first_run) { BLI_join_dirfile(path, sizeof(path), curr_libname, group); @@ -2692,7 +2692,7 @@ static void wm_link_append_do_libgroup( } RNA_END; } - BLO_library_link_end(C, mainl, &bh, idcode, flag); + BLO_library_link_end(mainl, &bh, flag, CTX_data_scene(C), CTX_wm_view3d(C)); BLO_blendhandle_close(bh); |