Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2016-01-08 13:05:39 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-01-08 13:13:58 +0300
commit4ef918d661510610728fe9bbebb3df1fb565eef2 (patch)
tree8b131ff6428e16763b945143c0819317eb03a050 /source/blender/blenkernel/intern/blender.c
parent5c69345edc0819f5b518ab06438cc72d4dfa86ca (diff)
Koro request: add 'active layer' and 'selected' options to view3D' paste operator.
Those two are ON by default, since I think it's most common expected behavior (as with append/link ops).
Diffstat (limited to 'source/blender/blenkernel/intern/blender.c')
-rw-r--r--source/blender/blenkernel/intern/blender.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index ef9cce349ca..743fd58f829 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -52,6 +52,7 @@
#include "DNA_userdef_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
+#include "DNA_view3d_types.h"
#include "DNA_windowmanager_types.h"
#include "BLI_blenlib.h"
@@ -1044,10 +1045,11 @@ int BKE_copybuffer_save(const char *filename, ReportList *reports)
}
/* return success (1) */
-int BKE_copybuffer_paste(bContext *C, const char *libname, ReportList *reports)
+int BKE_copybuffer_paste(bContext *C, const char *libname, const short flag, ReportList *reports)
{
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
+ View3D *v3d = CTX_wm_view3d(C);
Main *mainl = NULL;
Library *lib;
BlendHandle *bh;
@@ -1070,9 +1072,9 @@ int BKE_copybuffer_paste(bContext *C, const char *libname, ReportList *reports)
/* here appending/linking starts */
mainl = BLO_library_link_begin(bmain, &bh, libname);
- BLO_library_link_all(mainl, bh);
+ BLO_library_link_all(mainl, bh, flag, scene, v3d);
- BLO_library_link_end(mainl, &bh, 0, scene, CTX_wm_view3d(C));
+ BLO_library_link_end(mainl, &bh, flag, scene, v3d);
/* mark all library linked objects to be updated */
BKE_main_lib_objects_recalc_all(bmain);