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:
authorJoshua Leung <aligorith@gmail.com>2009-06-19 16:57:31 +0400
committerJoshua Leung <aligorith@gmail.com>2009-06-19 16:57:31 +0400
commitbb9323a720483b0c02bf25ecfca9c6ccc8699519 (patch)
tree922daae074ae7bfabf6355c872f0ed734f069dc0 /source/blender/editors/space_nla/nla_edit.c
parentd525ae17829ae13640488e6f50022b317a8eba63 (diff)
NLA SoC: Minor Tweaks (Duplicate + Muted-Strip Drawing)
* Duplicate operator now inits transform once strips have been created * Muted strips now draw with a dotted outline
Diffstat (limited to 'source/blender/editors/space_nla/nla_edit.c')
-rw-r--r--source/blender/editors/space_nla/nla_edit.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index d2cf728ea58..8b7c6bb99c6 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -59,6 +59,8 @@
#include "ED_space_api.h"
#include "ED_screen.h"
+#include "BIF_transform.h"
+
#include "RNA_access.h"
#include "RNA_define.h"
@@ -506,13 +508,23 @@ static int nlaedit_duplicate_exec (bContext *C, wmOperator *op)
ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_BOTH);
WM_event_add_notifier(C, NC_SCENE, NULL);
- /* done + allow for tweaking to be invoked */
- return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH;
+ /* done */
+ return OPERATOR_FINISHED;
}
else
return OPERATOR_CANCELLED;
}
+static int nlaedit_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ nlaedit_duplicate_exec(C, op);
+
+ RNA_int_set(op->ptr, "mode", TFM_TIME_TRANSLATE); // XXX
+ WM_operator_name_call(C, "TFM_OT_transform", WM_OP_INVOKE_REGION_WIN, op->ptr);
+
+ return OPERATOR_FINISHED;
+}
+
void NLAEDIT_OT_duplicate (wmOperatorType *ot)
{
/* identifiers */
@@ -521,11 +533,15 @@ void NLAEDIT_OT_duplicate (wmOperatorType *ot)
ot->description= "Duplicate selected NLA-Strips, adding the new strips in new tracks above the originals.";
/* api callbacks */
+ ot->invoke= nlaedit_duplicate_invoke;
ot->exec= nlaedit_duplicate_exec;
ot->poll= nlaop_poll_tweakmode_off;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* to give to transform */
+ RNA_def_int(ot->srna, "mode", TFM_TRANSLATION, 0, INT_MAX, "Mode", "", 0, INT_MAX);
}
/* ******************** Delete Strips Operator ***************************** */