2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2008-12-28 00:08:34 +00:00
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2008-12-28 00:08:34 +00:00
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2008 Blender Foundation.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Contributor(s): Blender Foundation, Nathan Letwory
|
|
|
|
*
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
*/
|
|
|
|
|
2011-02-27 20:29:51 +00:00
|
|
|
/** \file blender/editors/space_node/node_ops.c
|
|
|
|
* \ingroup spnode
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2008-12-28 00:08:34 +00:00
|
|
|
#include "DNA_node_types.h"
|
|
|
|
#include "DNA_scene_types.h"
|
|
|
|
|
|
|
|
#include "BKE_context.h"
|
|
|
|
|
2012-01-14 22:59:51 +00:00
|
|
|
#include "BLI_utildefines.h"
|
|
|
|
|
2011-02-14 17:55:27 +00:00
|
|
|
#include "ED_node.h"
|
2008-12-28 00:08:34 +00:00
|
|
|
#include "ED_screen.h"
|
2009-07-08 16:17:47 +00:00
|
|
|
#include "ED_transform.h"
|
2009-01-02 23:58:03 +00:00
|
|
|
|
2008-12-28 00:08:34 +00:00
|
|
|
#include "RNA_access.h"
|
|
|
|
|
|
|
|
#include "WM_api.h"
|
|
|
|
#include "WM_types.h"
|
|
|
|
|
|
|
|
#include "node_intern.h"
|
|
|
|
|
|
|
|
void node_operatortypes(void)
|
|
|
|
{
|
2009-11-11 08:12:54 +00:00
|
|
|
WM_operatortype_append(NODE_OT_properties);
|
|
|
|
|
2008-12-28 00:08:34 +00:00
|
|
|
WM_operatortype_append(NODE_OT_select);
|
2009-09-14 08:47:13 +00:00
|
|
|
WM_operatortype_append(NODE_OT_select_all);
|
|
|
|
WM_operatortype_append(NODE_OT_select_linked_to);
|
|
|
|
WM_operatortype_append(NODE_OT_select_linked_from);
|
2009-03-29 02:15:13 +00:00
|
|
|
WM_operatortype_append(NODE_OT_select_border);
|
2010-05-12 12:03:38 +00:00
|
|
|
WM_operatortype_append(NODE_OT_select_same_type);
|
2010-05-12 13:55:09 +00:00
|
|
|
WM_operatortype_append(NODE_OT_select_same_type_next);
|
|
|
|
WM_operatortype_append(NODE_OT_select_same_type_prev);
|
|
|
|
|
2009-11-20 06:31:49 +00:00
|
|
|
WM_operatortype_append(NODE_OT_view_all);
|
2011-12-18 12:51:50 +00:00
|
|
|
|
2010-06-07 20:03:40 +00:00
|
|
|
WM_operatortype_append(NODE_OT_mute_toggle);
|
|
|
|
WM_operatortype_append(NODE_OT_hide_toggle);
|
|
|
|
WM_operatortype_append(NODE_OT_preview_toggle);
|
2011-12-18 12:51:50 +00:00
|
|
|
WM_operatortype_append(NODE_OT_options_toggle);
|
2010-06-07 20:03:40 +00:00
|
|
|
WM_operatortype_append(NODE_OT_hide_socket_toggle);
|
2009-11-20 21:17:17 +00:00
|
|
|
WM_operatortype_append(NODE_OT_show_cyclic_dependencies);
|
2012-05-22 14:13:33 +00:00
|
|
|
WM_operatortype_append(NODE_OT_node_copy_color);
|
2009-11-20 06:31:49 +00:00
|
|
|
|
|
|
|
WM_operatortype_append(NODE_OT_duplicate);
|
2009-03-29 02:15:13 +00:00
|
|
|
WM_operatortype_append(NODE_OT_delete);
|
2011-07-12 18:59:54 +00:00
|
|
|
WM_operatortype_append(NODE_OT_delete_reconnect);
|
2009-04-15 15:40:31 +00:00
|
|
|
WM_operatortype_append(NODE_OT_resize);
|
2009-11-20 06:31:49 +00:00
|
|
|
|
|
|
|
WM_operatortype_append(NODE_OT_link);
|
|
|
|
WM_operatortype_append(NODE_OT_link_make);
|
2009-02-07 14:03:34 +00:00
|
|
|
WM_operatortype_append(NODE_OT_links_cut);
|
2012-02-27 17:38:16 +00:00
|
|
|
WM_operatortype_append(NODE_OT_links_detach);
|
2012-06-01 12:38:03 +00:00
|
|
|
WM_operatortype_append(NODE_OT_add_reroute);
|
2011-07-12 18:59:54 +00:00
|
|
|
|
2009-09-15 11:35:10 +00:00
|
|
|
WM_operatortype_append(NODE_OT_group_make);
|
|
|
|
WM_operatortype_append(NODE_OT_group_ungroup);
|
|
|
|
WM_operatortype_append(NODE_OT_group_edit);
|
2011-02-21 13:47:49 +00:00
|
|
|
WM_operatortype_append(NODE_OT_group_socket_add);
|
|
|
|
WM_operatortype_append(NODE_OT_group_socket_remove);
|
|
|
|
WM_operatortype_append(NODE_OT_group_socket_move_up);
|
|
|
|
WM_operatortype_append(NODE_OT_group_socket_move_down);
|
2010-04-05 18:34:18 +00:00
|
|
|
|
|
|
|
WM_operatortype_append(NODE_OT_link_viewer);
|
2010-04-06 17:47:21 +00:00
|
|
|
|
|
|
|
WM_operatortype_append(NODE_OT_read_renderlayers);
|
|
|
|
WM_operatortype_append(NODE_OT_read_fullsamplelayers);
|
2011-02-07 16:41:57 +00:00
|
|
|
WM_operatortype_append(NODE_OT_render_changed);
|
2010-04-07 17:06:22 +00:00
|
|
|
|
|
|
|
WM_operatortype_append(NODE_OT_backimage_move);
|
2010-04-08 16:36:50 +00:00
|
|
|
WM_operatortype_append(NODE_OT_backimage_zoom);
|
2011-01-31 14:42:55 +00:00
|
|
|
WM_operatortype_append(NODE_OT_backimage_sample);
|
2010-05-12 04:25:33 +00:00
|
|
|
|
|
|
|
WM_operatortype_append(NODE_OT_add_file);
|
2011-09-05 21:01:50 +00:00
|
|
|
|
|
|
|
WM_operatortype_append(NODE_OT_new_node_tree);
|
Adds a new node type for saving multiple image files from a single node.
Unlike the existing file output node this node has an arbitrary number of
possible input slots. It has a base path string that can be set to a general
base folder. Every input socket then uses its name as an extension of the base
path for file organization. This can include further subfolders on top of the
base path. Example:
Base path: '/home/user/myproject'
Input 1: 'Compo'
Input 2: 'Diffuse/'
Input 3: 'details/Normals'
would create output files
in /home/user/myproject: Compo0001.png, Compo0002.png, ...
in /home/user/myproject/Diffuse: 0001.png, 0002.png, ... (no filename base
given)
in /home/user/myproject/details: Normals0001.png, Normals0002.png, ...
Most settings for the node can be found in the sidebar (NKEY). New input sockets
can be added with the "Add Input" button. There is a list of input sockets and
below that the details for each socket can be changed, including the sub-path
and filename. Sockets can be removed here as well. By default each socket uses
the render settings file output format, but each can use its own format if
necessary.
To my knowledge this is the first node making use of such dynamic sockets in
trunk. So this is also a design test, other nodes might use this in the future.
Adding operator buttons on top of a node is a bit unwieldy atm, because all node
operators generally work on selected and/or active node(s). The operator button
would therefore either have to make sure the node is activated before the
operator is called (block callback maybe?) OR it has to store the node name
(risky, weak reference). For now it is only used in the sidebar, where only the
active node's buttons are displayed.
Also adds a new struct_type value to bNodeSocket, in order to distinguish
different socket types with the same data type (file inputs are SOCK_RGBA color
sockets). Would be nicer to use data type only for actual data evaluation, but
used in too many places, this works ok for now.
2012-02-22 12:24:04 +00:00
|
|
|
|
2012-03-01 07:56:15 +00:00
|
|
|
WM_operatortype_append(NODE_OT_output_file_add_socket);
|
|
|
|
WM_operatortype_append(NODE_OT_output_file_remove_active_socket);
|
2012-05-02 07:18:51 +00:00
|
|
|
WM_operatortype_append(NODE_OT_output_file_move_active_socket);
|
2012-05-22 14:13:33 +00:00
|
|
|
|
|
|
|
WM_operatortype_append(NODE_OT_parent_set);
|
|
|
|
WM_operatortype_append(NODE_OT_parent_clear);
|
|
|
|
WM_operatortype_append(NODE_OT_join);
|
|
|
|
WM_operatortype_append(NODE_OT_attach);
|
|
|
|
WM_operatortype_append(NODE_OT_detach);
|
2008-12-28 00:08:34 +00:00
|
|
|
}
|
|
|
|
|
2009-11-20 21:04:41 +00:00
|
|
|
void ED_operatormacros_node(void)
|
|
|
|
{
|
|
|
|
wmOperatorType *ot;
|
2011-07-17 18:04:28 +00:00
|
|
|
wmOperatorTypeMacro *mot;
|
2009-11-20 21:04:41 +00:00
|
|
|
|
2012-05-22 14:13:33 +00:00
|
|
|
ot = WM_operatortype_append_macro("NODE_OT_select_link_viewer", "Link Viewer",
|
|
|
|
"Select node and link it to a viewer node",
|
|
|
|
OPTYPE_UNDO);
|
|
|
|
WM_operatortype_macro_define(ot, "NODE_OT_select");
|
|
|
|
WM_operatortype_macro_define(ot, "NODE_OT_link_viewer");
|
|
|
|
|
|
|
|
ot = WM_operatortype_append_macro("NODE_OT_translate_attach", "Move and Attach",
|
|
|
|
"Move nodes and attach to frame",
|
|
|
|
OPTYPE_UNDO|OPTYPE_REGISTER);
|
|
|
|
mot = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
|
|
|
|
RNA_boolean_set(mot->ptr, "release_confirm", TRUE);
|
|
|
|
WM_operatortype_macro_define(ot, "NODE_OT_attach");
|
|
|
|
|
|
|
|
ot = WM_operatortype_append_macro("NODE_OT_detach_translate_attach", "Detach and Move",
|
|
|
|
"Detach nodes, move and attach to frame",
|
|
|
|
OPTYPE_UNDO|OPTYPE_REGISTER);
|
|
|
|
WM_operatortype_macro_define(ot, "NODE_OT_detach");
|
|
|
|
mot = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
|
|
|
|
RNA_boolean_set(mot->ptr, "release_confirm", TRUE);
|
|
|
|
WM_operatortype_macro_define(ot, "NODE_OT_attach");
|
|
|
|
|
|
|
|
ot = WM_operatortype_append_macro("NODE_OT_duplicate_move", "Duplicate",
|
|
|
|
"Duplicate selected nodes and move them",
|
2012-05-05 19:26:53 +00:00
|
|
|
OPTYPE_UNDO|OPTYPE_REGISTER);
|
2009-11-20 21:04:41 +00:00
|
|
|
WM_operatortype_macro_define(ot, "NODE_OT_duplicate");
|
2012-05-22 14:13:33 +00:00
|
|
|
WM_operatortype_macro_define(ot, "NODE_OT_translate_attach");
|
2010-04-05 18:34:18 +00:00
|
|
|
|
2011-07-17 18:04:28 +00:00
|
|
|
/* modified operator call for duplicating with input links */
|
2012-05-05 19:26:53 +00:00
|
|
|
ot = WM_operatortype_append_macro("NODE_OT_duplicate_move_keep_inputs", "Duplicate",
|
|
|
|
"Duplicate selected nodes keeping input links and move them",
|
|
|
|
OPTYPE_UNDO|OPTYPE_REGISTER);
|
2011-07-17 18:04:28 +00:00
|
|
|
mot = WM_operatortype_macro_define(ot, "NODE_OT_duplicate");
|
2012-01-16 16:12:03 +00:00
|
|
|
RNA_boolean_set(mot->ptr, "keep_inputs", TRUE);
|
2012-05-22 14:13:33 +00:00
|
|
|
WM_operatortype_macro_define(ot, "NODE_OT_translate_attach");
|
2012-02-27 17:38:16 +00:00
|
|
|
|
2012-05-05 19:26:53 +00:00
|
|
|
ot = WM_operatortype_append_macro("NODE_OT_move_detach_links", "Detach", "Move a node to detach links",
|
|
|
|
OPTYPE_UNDO|OPTYPE_REGISTER);
|
2012-02-27 17:38:16 +00:00
|
|
|
WM_operatortype_macro_define(ot, "NODE_OT_links_detach");
|
2012-05-01 08:19:11 +00:00
|
|
|
WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
|
|
|
|
|
2012-05-05 19:26:53 +00:00
|
|
|
ot = WM_operatortype_append_macro("NODE_OT_move_detach_links_release", "Detach", "Move a node to detach links",
|
|
|
|
OPTYPE_UNDO|OPTYPE_REGISTER);
|
2012-05-01 08:19:11 +00:00
|
|
|
WM_operatortype_macro_define(ot, "NODE_OT_links_detach");
|
2012-05-22 14:13:33 +00:00
|
|
|
mot = WM_operatortype_macro_define(ot, "NODE_OT_translate_attach");
|
|
|
|
}
|
|
|
|
|
|
|
|
/* helper function for repetitive select operator keymap */
|
|
|
|
static void node_select_keymap(wmKeyMap *keymap, int extend)
|
|
|
|
{
|
|
|
|
/* modifier combinations */
|
|
|
|
const int mod_single[] = { 0, KM_CTRL, KM_ALT, KM_CTRL|KM_ALT,
|
|
|
|
-1 /* terminator */
|
|
|
|
};
|
|
|
|
const int mod_extend[] = { KM_SHIFT, KM_SHIFT|KM_CTRL,
|
|
|
|
KM_SHIFT|KM_ALT, KM_SHIFT|KM_CTRL|KM_ALT,
|
|
|
|
-1 /* terminator */
|
|
|
|
};
|
|
|
|
const int *mod = (extend ? mod_extend : mod_single);
|
|
|
|
wmKeyMapItem *kmi;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i=0; mod[i] >= 0; ++i) {
|
|
|
|
kmi = WM_keymap_add_item(keymap, "NODE_OT_select", ACTIONMOUSE, KM_PRESS, mod[i], 0);
|
|
|
|
RNA_boolean_set(kmi->ptr, "extend", extend);
|
|
|
|
kmi = WM_keymap_add_item(keymap, "NODE_OT_select", SELECTMOUSE, KM_PRESS, mod[i], 0);
|
|
|
|
RNA_boolean_set(kmi->ptr, "extend", extend);
|
|
|
|
}
|
2011-09-22 15:35:25 +00:00
|
|
|
}
|
2009-11-20 21:04:41 +00:00
|
|
|
|
Key Configuration
Keymaps are now saveable and configurable from the user preferences, note
that editing one item in a keymap means the whole keymap is now defined by
the user and will not be updated by Blender, an option for syncing might be
added later. The outliner interface is still there, but I will probably
remove it.
There's actually 3 levels now:
* Default builtin key configuration.
* Key configuration loaded from .py file, for configs like Blender 2.4x
or other 3D applications.
* Keymaps edited by the user and saved in .B.blend. These can be saved
to .py files as well to make creating distributable configurations
easier.
Also, user preferences sections were reorganized a bit, now there is:
Interface, Editing, Input, Files and System.
Implementation notes:
* wmKeyConfig was added which represents a key configuration containing
keymaps.
* wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap.
* Modal maps are not wrapped yet.
* User preferences DNA file reading did not support newdataadr() yet,
added this now for reading keymaps.
* Key configuration related settings are now RNA wrapped.
* is_property_set and is_property_hidden python methods were added.
2009-10-08 18:40:03 +00:00
|
|
|
void node_keymap(struct wmKeyConfig *keyconf)
|
2008-12-28 00:08:34 +00:00
|
|
|
{
|
2009-11-11 08:12:54 +00:00
|
|
|
wmKeyMap *keymap;
|
2009-11-20 04:19:57 +00:00
|
|
|
wmKeyMapItem *kmi;
|
2008-12-28 00:08:34 +00:00
|
|
|
|
2009-11-11 08:12:54 +00:00
|
|
|
/* Entire Editor only ----------------- */
|
2012-03-24 02:51:46 +00:00
|
|
|
keymap = WM_keymap_find(keyconf, "Node Generic", SPACE_NODE, 0);
|
2009-11-11 08:12:54 +00:00
|
|
|
|
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_properties", NKEY, KM_PRESS, 0, 0);
|
|
|
|
|
|
|
|
/* Main Area only ----------------- */
|
2012-03-24 02:51:46 +00:00
|
|
|
keymap = WM_keymap_find(keyconf, "Node Editor", SPACE_NODE, 0);
|
2009-11-11 08:12:54 +00:00
|
|
|
|
2009-11-20 04:19:57 +00:00
|
|
|
/* mouse select in nodes used to be both keys, but perhaps this should be reduced?
|
|
|
|
* NOTE: mouse-clicks on left-mouse will fall through to allow transform-tweak, but also link/resize
|
2012-03-09 10:16:41 +00:00
|
|
|
* NOTE 2: socket select is part of the node select operator, to handle overlapping cases
|
2012-05-22 14:13:33 +00:00
|
|
|
* NOTE 3: select op is registered for various combinations of modifier key, so the specialized
|
|
|
|
* grab operators (unlink, attach, etc.) can work easily on single nodes.
|
2009-11-20 04:19:57 +00:00
|
|
|
*/
|
2012-05-22 14:13:33 +00:00
|
|
|
node_select_keymap(keymap, FALSE);
|
|
|
|
node_select_keymap(keymap, TRUE);
|
|
|
|
|
2012-01-16 16:12:03 +00:00
|
|
|
kmi = WM_keymap_add_item(keymap, "NODE_OT_select_border", EVT_TWEAK_S, KM_ANY, 0, 0);
|
|
|
|
RNA_boolean_set(kmi->ptr, "tweak", TRUE);
|
2009-07-07 17:30:39 +00:00
|
|
|
|
2009-11-20 04:19:57 +00:00
|
|
|
/* each of these falls through if not handled... */
|
2009-02-06 18:38:10 +00:00
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_link", LEFTMOUSE, KM_PRESS, 0, 0);
|
2012-05-15 12:40:43 +00:00
|
|
|
kmi = WM_keymap_add_item(keymap, "NODE_OT_link", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
|
|
|
|
RNA_boolean_set(kmi->ptr, "detach", TRUE);
|
2009-11-20 06:31:49 +00:00
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_resize", LEFTMOUSE, KM_PRESS, 0, 0);
|
2009-11-20 04:19:57 +00:00
|
|
|
|
2012-06-01 12:38:03 +00:00
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_add_reroute", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0);
|
2010-01-04 04:26:28 +00:00
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_links_cut", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
|
2010-04-05 18:34:18 +00:00
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_select_link_viewer", LEFTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
|
|
|
|
|
2010-04-07 17:06:22 +00:00
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_backimage_move", MIDDLEMOUSE, KM_PRESS, KM_ALT, 0);
|
2012-03-24 02:51:46 +00:00
|
|
|
kmi = WM_keymap_add_item(keymap, "NODE_OT_backimage_zoom", VKEY, KM_PRESS, 0, 0);
|
2010-04-08 16:36:50 +00:00
|
|
|
RNA_float_set(kmi->ptr, "factor", 0.83333f);
|
2012-03-24 02:51:46 +00:00
|
|
|
kmi = WM_keymap_add_item(keymap, "NODE_OT_backimage_zoom", VKEY, KM_PRESS, KM_ALT, 0);
|
2010-04-08 16:36:50 +00:00
|
|
|
RNA_float_set(kmi->ptr, "factor", 1.2f);
|
2011-01-31 15:18:30 +00:00
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_backimage_sample", ACTIONMOUSE, KM_PRESS, KM_ALT, 0);
|
2012-01-16 16:12:03 +00:00
|
|
|
|
|
|
|
kmi = WM_keymap_add_item(keymap, "NODE_OT_link_make", FKEY, KM_PRESS, 0, 0);
|
|
|
|
RNA_boolean_set(kmi->ptr, "replace", FALSE);
|
|
|
|
kmi = WM_keymap_add_item(keymap, "NODE_OT_link_make", FKEY, KM_PRESS, KM_CTRL, 0);
|
|
|
|
RNA_boolean_set(kmi->ptr, "replace", TRUE);
|
|
|
|
|
2009-11-20 06:31:49 +00:00
|
|
|
WM_keymap_add_menu(keymap, "NODE_MT_add", AKEY, KM_PRESS, KM_SHIFT, 0);
|
2009-11-20 21:04:41 +00:00
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_duplicate_move", DKEY, KM_PRESS, KM_SHIFT, 0);
|
2011-07-17 18:04:28 +00:00
|
|
|
/* modified operator call for duplicating with input links */
|
2011-07-17 18:17:35 +00:00
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_duplicate_move_keep_inputs", DKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
|
2009-02-06 16:34:05 +00:00
|
|
|
|
2012-05-22 14:13:33 +00:00
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_parent_set", PKEY, KM_PRESS, KM_CTRL, 0);
|
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_parent_clear", PKEY, KM_PRESS, KM_ALT, 0);
|
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_join", JKEY, KM_PRESS, KM_CTRL, 0);
|
|
|
|
|
2010-06-07 20:03:40 +00:00
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_hide_toggle", HKEY, KM_PRESS, 0, 0);
|
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_mute_toggle", MKEY, KM_PRESS, 0, 0);
|
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_preview_toggle", HKEY, KM_PRESS, KM_SHIFT, 0);
|
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_hide_socket_toggle", HKEY, KM_PRESS, KM_CTRL, 0);
|
2009-11-20 06:31:49 +00:00
|
|
|
|
2009-11-20 21:17:17 +00:00
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_show_cyclic_dependencies", CKEY, KM_PRESS, 0, 0);
|
|
|
|
|
2009-03-29 02:15:13 +00:00
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
|
2012-01-16 16:12:03 +00:00
|
|
|
|
|
|
|
kmi = WM_keymap_add_item(keymap, "NODE_OT_select_border", BKEY, KM_PRESS, 0, 0);
|
|
|
|
RNA_boolean_set(kmi->ptr, "tweak", FALSE);
|
|
|
|
|
2009-03-29 02:15:13 +00:00
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_delete", XKEY, KM_PRESS, 0, 0);
|
2009-09-15 12:45:05 +00:00
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_delete", DELKEY, KM_PRESS, 0, 0);
|
2011-07-12 18:59:54 +00:00
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_delete_reconnect", XKEY, KM_PRESS, KM_CTRL, 0);
|
2009-09-14 08:47:13 +00:00
|
|
|
|
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_select_all", AKEY, KM_PRESS, 0, 0);
|
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_select_linked_to", LKEY, KM_PRESS, KM_SHIFT, 0);
|
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_select_linked_from", LKEY, KM_PRESS, 0, 0);
|
2010-05-12 13:55:09 +00:00
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_select_same_type", GKEY, KM_PRESS, KM_SHIFT, 0);
|
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_select_same_type_next", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
|
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_select_same_type_prev", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
|
2009-09-15 11:35:10 +00:00
|
|
|
|
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_group_make", GKEY, KM_PRESS, KM_CTRL, 0);
|
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_group_ungroup", GKEY, KM_PRESS, KM_ALT, 0);
|
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_group_edit", TABKEY, KM_PRESS, 0, 0);
|
2009-01-02 23:58:03 +00:00
|
|
|
|
2011-02-02 10:26:14 +00:00
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_read_renderlayers", RKEY, KM_PRESS, KM_CTRL, 0);
|
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_read_fullsamplelayers", RKEY, KM_PRESS, KM_SHIFT, 0);
|
2011-02-07 16:41:57 +00:00
|
|
|
WM_keymap_add_item(keymap, "NODE_OT_render_changed", ZKEY, KM_PRESS, 0, 0);
|
|
|
|
|
Key Configuration
Keymaps are now saveable and configurable from the user preferences, note
that editing one item in a keymap means the whole keymap is now defined by
the user and will not be updated by Blender, an option for syncing might be
added later. The outliner interface is still there, but I will probably
remove it.
There's actually 3 levels now:
* Default builtin key configuration.
* Key configuration loaded from .py file, for configs like Blender 2.4x
or other 3D applications.
* Keymaps edited by the user and saved in .B.blend. These can be saved
to .py files as well to make creating distributable configurations
easier.
Also, user preferences sections were reorganized a bit, now there is:
Interface, Editing, Input, Files and System.
Implementation notes:
* wmKeyConfig was added which represents a key configuration containing
keymaps.
* wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap.
* Modal maps are not wrapped yet.
* User preferences DNA file reading did not support newdataadr() yet,
added this now for reading keymaps.
* Key configuration related settings are now RNA wrapped.
* is_property_set and is_property_hidden python methods were added.
2009-10-08 18:40:03 +00:00
|
|
|
transform_keymap_for_space(keyconf, keymap, SPACE_NODE);
|
2008-12-28 00:08:34 +00:00
|
|
|
}
|