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 <bastien@blender.org>2020-05-18 16:54:30 +0300
committerBastien Montagne <bastien@blender.org>2020-05-18 16:54:30 +0300
commit48a5b1664a58c93719b7059bc766e97379a14db9 (patch)
tree4a0b531d676d7b518d44af6d55364b3faf8fda72 /source/blender/editors/space_outliner
parent27cac4a102b917f9045ed4a4682bd8740852458c (diff)
parent121b2c0424465800ba79c0c7a4403cc2999b261b (diff)
Merge branch 'blender-v2.83-release'
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c3
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c12
2 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index 97ce9ad549f..b3c36f688d0 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -863,7 +863,8 @@ void OUTLINER_OT_id_paste(wmOperatorType *ot)
ot->exec = outliner_id_paste_exec;
ot->poll = ED_operator_outliner_active;
- ot->flag = 0;
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/** \} */
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index 0ccf982fd29..e5c91a5b61f 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -1681,6 +1681,7 @@ static const EnumPropertyItem *outliner_id_operation_itemf(bContext *C,
static int outliner_id_operation_exec(bContext *C, wmOperator *op)
{
+ wmWindowManager *wm = CTX_wm_manager(C);
Scene *scene = CTX_data_scene(C);
SpaceOutliner *soops = CTX_wm_space_outliner(C);
int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
@@ -1806,11 +1807,16 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op)
break;
}
case OUTLINER_IDOP_COPY: {
+ wm->op_undo_depth++;
WM_operator_name_call(C, "OUTLINER_OT_id_copy", WM_OP_INVOKE_DEFAULT, NULL);
+ wm->op_undo_depth--;
+ /* No need for undo, this operation does not change anything... */
break;
}
case OUTLINER_IDOP_PASTE: {
+ wm->op_undo_depth++;
WM_operator_name_call(C, "OUTLINER_OT_id_paste", WM_OP_INVOKE_DEFAULT, NULL);
+ wm->op_undo_depth--;
ED_outliner_select_sync_from_all_tag(C);
ED_undo_push(C, "Paste");
break;
@@ -2102,7 +2108,7 @@ void OUTLINER_OT_action_set(wmOperatorType *ot)
ot->poll = ED_operator_outliner_active;
/* flags */
- ot->flag = 0;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
// TODO: this would be nicer as an ID-pointer...
@@ -2150,6 +2156,7 @@ static const EnumPropertyItem prop_animdata_op_types[] = {
static int outliner_animdata_operation_exec(bContext *C, wmOperator *op)
{
+ wmWindowManager *wm = CTX_wm_manager(C);
SpaceOutliner *soops = CTX_wm_space_outliner(C);
int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
eOutliner_AnimDataOps event;
@@ -2178,7 +2185,10 @@ static int outliner_animdata_operation_exec(bContext *C, wmOperator *op)
case OUTLINER_ANIMOP_SET_ACT:
/* delegate once again... */
+ wm->op_undo_depth++;
WM_operator_name_call(C, "OUTLINER_OT_action_set", WM_OP_INVOKE_REGION_WIN, NULL);
+ wm->op_undo_depth--;
+ ED_undo_push(C, "Set active action");
break;
case OUTLINER_ANIMOP_CLEAR_ACT: