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-11-21 00:04:41 +0300
committerJoshua Leung <aligorith@gmail.com>2009-11-21 00:04:41 +0300
commit03cfcc60078032f61ccf7906b401e374aa19a898 (patch)
tree803cf6f2ab7c93de9e2ebac9d7455dbe1240e082 /source/blender/editors/space_node/node_ops.c
parentacf0fbbf705219c2654b087270a076f410531a09 (diff)
Node Editor - More Cleanups (Reshuffling):
- removing duplicate chunks of code -> hide unused sockets now works - moving some functions to the files that they get called from -> view all/home - made duplicate a macro operator like the other places that work like this, eliminating the unnecessary transform-related property there still - removed a few chunks of unused code
Diffstat (limited to 'source/blender/editors/space_node/node_ops.c')
-rw-r--r--source/blender/editors/space_node/node_ops.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_ops.c b/source/blender/editors/space_node/node_ops.c
index bf34ce9e049..cd92e2c0d78 100644
--- a/source/blender/editors/space_node/node_ops.c
+++ b/source/blender/editors/space_node/node_ops.c
@@ -75,6 +75,17 @@ void node_operatortypes(void)
WM_operatortype_append(NODE_OT_group_edit);
}
+void ED_operatormacros_node(void)
+{
+ wmOperatorType *ot;
+ wmOperatorTypeMacro *otmacro;
+
+ ot= WM_operatortype_append_macro("NODE_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
+ WM_operatortype_macro_define(ot, "NODE_OT_duplicate");
+ otmacro= WM_operatortype_macro_define(ot, "TFM_OT_translate");
+ RNA_enum_set(otmacro->ptr, "proportional", 0);
+}
+
void node_keymap(struct wmKeyConfig *keyconf)
{
wmKeyMap *keymap;
@@ -107,7 +118,7 @@ void node_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "NODE_OT_link_make", FKEY, KM_PRESS, 0, 0);
WM_keymap_add_menu(keymap, "NODE_MT_add", AKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "NODE_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "NODE_OT_duplicate_move", DKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "NODE_OT_hide", HKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "NODE_OT_mute", MKEY, KM_PRESS, 0, 0);