diff options
-rw-r--r-- | source/blender/blenkernel/BKE_scene.h | 9 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 26 |
2 files changed, 22 insertions, 13 deletions
diff --git a/source/blender/blenkernel/BKE_scene.h b/source/blender/blenkernel/BKE_scene.h index a1a8b1b28cb..943712167c6 100644 --- a/source/blender/blenkernel/BKE_scene.h +++ b/source/blender/blenkernel/BKE_scene.h @@ -50,10 +50,11 @@ struct Scene; struct Text; struct Text; -#define SCE_COPY_EMPTY 0 -#define SCE_COPY_LINK_OB 1 -#define SCE_COPY_LINK_DATA 2 -#define SCE_COPY_FULL 3 +#define SCE_COPY_NEW 0 +#define SCE_COPY_EMPTY 1 +#define SCE_COPY_LINK_OB 2 +#define SCE_COPY_LINK_DATA 3 +#define SCE_COPY_FULL 4 #define SETLOOPER(_sce_basis, _sce_iter, _base) _sce_iter= _sce_basis, _base= _setlooper_base_step(&_sce_iter, NULL); _base; _base= _setlooper_base_step(&_sce_iter, _base) struct Base *_setlooper_base_step(struct Scene **sce_iter, struct Base *base); diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 289296fd817..afda6c5088f 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -3164,14 +3164,21 @@ static int scene_new_exec(bContext *C, wmOperator *op) Scene *newscene, *scene= CTX_data_scene(C); Main *bmain= CTX_data_main(C); int type= RNA_enum_get(op->ptr, "type"); - - newscene= copy_scene(scene, type); - - /* these can't be handled in blenkernel curently, so do them here */ - if(type == SCE_COPY_LINK_DATA) - ED_object_single_users(bmain, newscene, 0); - else if(type == SCE_COPY_FULL) - ED_object_single_users(bmain, newscene, 1); + + if(type == SCE_COPY_NEW) { + newscene= add_scene("Scene"); + } + else { /* different kinds of copying */ + newscene= copy_scene(scene, type); + + /* these can't be handled in blenkernel curently, so do them here */ + if(type == SCE_COPY_LINK_DATA) { + ED_object_single_users(bmain, newscene, 0); + } + else if(type == SCE_COPY_FULL) { + ED_object_single_users(bmain, newscene, 1); + } + } WM_event_add_notifier(C, NC_SCENE|ND_SCENEBROWSE, newscene); @@ -3181,7 +3188,8 @@ static int scene_new_exec(bContext *C, wmOperator *op) static void SCENE_OT_new(wmOperatorType *ot) { static EnumPropertyItem type_items[]= { - {SCE_COPY_EMPTY, "EMPTY", 0, "Empty", "Add empty scene"}, + {SCE_COPY_NEW, "NEW", 0, "New", "Add new scene"}, + {SCE_COPY_EMPTY, "EMPTY", 0, "Copy Settings", "Make a copy without any objects"}, {SCE_COPY_LINK_OB, "LINK_OBJECTS", 0, "Link Objects", "Link to the objects from the current scene"}, {SCE_COPY_LINK_DATA, "LINK_OBJECT_DATA", 0, "Link Object Data", "Copy objects linked to data from the current scene"}, {SCE_COPY_FULL, "FULL_COPY", 0, "Full Copy", "Make a full copy of the current scene"}, |