diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-01-08 13:05:39 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-01-08 13:13:58 +0300 |
commit | 4ef918d661510610728fe9bbebb3df1fb565eef2 (patch) | |
tree | 8b131ff6428e16763b945143c0819317eb03a050 /source/blender/blenkernel | |
parent | 5c69345edc0819f5b518ab06438cc72d4dfa86ca (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')
-rw-r--r-- | source/blender/blenkernel/BKE_blender.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/blender.c | 8 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sound.c | 1 |
3 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index aaf47b65470..f1d90c13f67 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -107,7 +107,7 @@ extern struct Main *BKE_undo_get_main(struct Scene **r_scene); void BKE_copybuffer_begin(struct Main *bmain); void BKE_copybuffer_tag_ID(struct ID *id); int BKE_copybuffer_save(const char *filename, struct ReportList *reports); -int BKE_copybuffer_paste(struct bContext *C, const char *libname, struct ReportList *reports); +int BKE_copybuffer_paste(struct bContext *C, const char *libname, const short flag, struct ReportList *reports); #ifdef __cplusplus } 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); diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 00eb129fd71..b016f8a49ed 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -562,6 +562,7 @@ void BKE_sound_set_scene_sound_pitch(void *handle, float pitch, char animated) void BKE_sound_set_scene_sound_pan(void *handle, float pan, char animated) { + printf("%s\n", __func__); AUD_SequenceEntry_setAnimationData(handle, AUD_AP_PANNING, sound_cfra, &pan, animated); } |