| 
									
										
										
										
											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 | 
					
						
							| 
									
										
										
										
											2018-06-01 18:19:39 +02:00
										 |  |  |  * of the License, or (at your option) any later version. | 
					
						
							| 
									
										
										
										
											2008-12-28 00:08:34 +00:00
										 |  |  |  * | 
					
						
							|  |  |  |  * 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. | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2018-06-01 18:19:39 +02:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2008-12-28 00:08:34 +00:00
										 |  |  |  * 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"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-14 22:59:51 +00:00
										 |  |  | #include "BLI_utildefines.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-04-05 17:56:54 +00:00
										 |  |  | #include "BKE_context.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-02 23:03:16 +00:00
										 |  |  | #include "ED_node.h"  /* own include */
 | 
					
						
							| 
									
										
										
										
											2008-12-28 00:08:34 +00:00
										 |  |  | #include "ED_screen.h"
 | 
					
						
							| 
									
										
										
										
											2018-08-14 10:28:41 +10:00
										 |  |  | #include "ED_select_utils.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"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-02 23:03:16 +00:00
										 |  |  | #include "node_intern.h"  /* own include */
 | 
					
						
							| 
									
										
										
										
											2008-12-28 00:08:34 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | void node_operatortypes(void) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2009-11-11 08:12:54 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_properties); | 
					
						
							| 
									
										
										
										
											2012-12-12 12:50:39 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_toolbar); | 
					
						
							| 
									
										
										
										
											2018-06-04 09:31:30 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											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); | 
					
						
							| 
									
										
										
										
											2018-10-05 10:27:04 +10:00
										 |  |  | 	WM_operatortype_append(NODE_OT_select_box); | 
					
						
							| 
									
										
										
										
											2013-11-06 19:21:42 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_select_circle); | 
					
						
							| 
									
										
										
										
											2012-08-22 13:34:06 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_select_lasso); | 
					
						
							| 
									
										
										
										
											2014-07-04 14:17:54 +02:00
										 |  |  | 	WM_operatortype_append(NODE_OT_select_grouped); | 
					
						
							| 
									
										
										
										
											2013-03-27 18:28:25 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_select_same_type_step); | 
					
						
							| 
									
										
										
										
											2018-06-04 09:31:30 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-04-01 15:07:22 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_find_node); | 
					
						
							| 
									
										
										
										
											2018-06-04 09:31:30 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-20 06:31:49 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_view_all); | 
					
						
							| 
									
										
										
										
											2012-08-07 16:30:34 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_view_selected); | 
					
						
							| 
									
										
										
										
											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); | 
					
						
							| 
									
										
										
										
											2012-05-22 14:13:33 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_node_copy_color); | 
					
						
							| 
									
										
										
										
											2018-06-04 09:31:30 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											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); | 
					
						
							| 
									
										
										
										
											2018-06-04 09:31:30 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											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); | 
					
						
							| 
									
										
										
										
											2013-03-18 16:34:57 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_group_insert); | 
					
						
							| 
									
										
										
										
											2009-09-15 11:35:10 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_group_ungroup); | 
					
						
							| 
									
										
										
										
											2012-06-12 08:44:46 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_group_separate); | 
					
						
							| 
									
										
										
										
											2009-09-15 11:35:10 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_group_edit); | 
					
						
							| 
									
										
										
										
											2018-06-04 09:31:30 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-04-05 18:34:18 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_link_viewer); | 
					
						
							| 
									
										
										
										
											2018-06-04 09:31:30 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-08-01 17:39:48 +02:00
										 |  |  | 	WM_operatortype_append(NODE_OT_insert_offset); | 
					
						
							| 
									
										
										
										
											2018-06-04 09:31:30 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-22 10:52:39 -02:00
										 |  |  | 	WM_operatortype_append(NODE_OT_read_viewlayers); | 
					
						
							| 
									
										
										
										
											2011-02-07 16:41:57 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_render_changed); | 
					
						
							| 
									
										
										
										
											2018-06-04 09:31:30 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											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); | 
					
						
							| 
									
										
										
										
											2013-09-01 09:50:56 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_backimage_fit); | 
					
						
							| 
									
										
										
										
											2011-01-31 14:42:55 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_backimage_sample); | 
					
						
							| 
									
										
										
										
											2018-06-04 09:31:30 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-05-12 04:25:33 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_add_file); | 
					
						
							| 
									
										
										
										
											2013-07-22 19:24:39 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_add_mask); | 
					
						
							| 
									
										
										
										
											2018-06-04 09:31:30 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-05 21:01:50 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_new_node_tree); | 
					
						
							| 
									
										
										
										
											2018-06-04 09:31:30 +02: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); | 
					
						
							| 
									
										
										
										
											2018-06-04 09:31:30 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-22 14:13:33 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_parent_set); | 
					
						
							|  |  |  | 	WM_operatortype_append(NODE_OT_join); | 
					
						
							|  |  |  | 	WM_operatortype_append(NODE_OT_attach); | 
					
						
							|  |  |  | 	WM_operatortype_append(NODE_OT_detach); | 
					
						
							| 
									
										
										
										
											2018-06-04 09:31:30 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-02 09:52:37 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_clipboard_copy); | 
					
						
							|  |  |  | 	WM_operatortype_append(NODE_OT_clipboard_paste); | 
					
						
							| 
									
										
										
										
											2018-06-04 09:31:30 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-11-03 14:32:26 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_shader_script_update); | 
					
						
							| 
									
										
										
										
											2013-03-07 17:47:30 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	WM_operatortype_append(NODE_OT_viewer_border); | 
					
						
							| 
									
										
										
										
											2014-06-05 20:05:41 +06:00
										 |  |  | 	WM_operatortype_append(NODE_OT_clear_viewer_border); | 
					
						
							| 
									
										
										
										
											2013-03-18 16:34:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-04-06 10:40:12 -03:00
										 |  |  | 	WM_operatortype_append(NODE_OT_switch_view_update); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-03-18 16:34:57 +00:00
										 |  |  | 	WM_operatortype_append(NODE_OT_tree_socket_add); | 
					
						
							|  |  |  | 	WM_operatortype_append(NODE_OT_tree_socket_remove); | 
					
						
							|  |  |  | 	WM_operatortype_append(NODE_OT_tree_socket_move); | 
					
						
							| 
									
										
										
										
											2018-07-18 13:03:09 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	WM_operatortype_append(NODE_OT_cryptomatte_layer_add); | 
					
						
							|  |  |  | 	WM_operatortype_append(NODE_OT_cryptomatte_layer_remove); | 
					
						
							| 
									
										
										
										
											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; | 
					
						
							| 
									
										
										
										
											2018-06-04 09:31:30 +02: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", | 
					
						
							| 
									
										
										
										
											2012-08-04 12:54:27 +00:00
										 |  |  | 	                                  OPTYPE_UNDO | OPTYPE_REGISTER); | 
					
						
							| 
									
										
										
										
											2012-05-22 14:13:33 +00:00
										 |  |  | 	mot = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); | 
					
						
							| 
									
										
										
										
											2014-04-01 11:34:00 +11:00
										 |  |  | 	RNA_boolean_set(mot->ptr, "release_confirm", true); | 
					
						
							| 
									
										
										
										
											2012-05-22 14:13:33 +00:00
										 |  |  | 	WM_operatortype_macro_define(ot, "NODE_OT_attach"); | 
					
						
							| 
									
										
										
										
											2015-08-01 17:39:48 +02:00
										 |  |  | 	WM_operatortype_macro_define(ot, "NODE_OT_insert_offset"); | 
					
						
							| 
									
										
										
										
											2018-06-04 09:31:30 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-08-01 17:39:48 +02:00
										 |  |  | 	/* NODE_OT_translate_attach with remove_on_canel set to true */ | 
					
						
							|  |  |  | 	ot = WM_operatortype_append_macro("NODE_OT_translate_attach_remove_on_cancel", "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); | 
					
						
							|  |  |  | 	RNA_boolean_set(mot->ptr, "remove_on_cancel", true); | 
					
						
							|  |  |  | 	WM_operatortype_macro_define(ot, "NODE_OT_attach"); | 
					
						
							|  |  |  | 	WM_operatortype_macro_define(ot, "NODE_OT_insert_offset"); | 
					
						
							| 
									
										
										
										
											2012-05-22 14:13:33 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-11-05 11:35:48 +01:00
										 |  |  | 	/* Note: Currently not in a default keymap or menu due to messy keymaps
 | 
					
						
							|  |  |  | 	 * and tricky invoke functionality. | 
					
						
							|  |  |  | 	 * Kept around in case users want to make own shortcuts. | 
					
						
							|  |  |  | 	 */ | 
					
						
							| 
									
										
										
										
											2012-05-22 14:13:33 +00:00
										 |  |  | 	ot = WM_operatortype_append_macro("NODE_OT_detach_translate_attach", "Detach and Move", | 
					
						
							|  |  |  | 	                                  "Detach nodes, move and attach to frame", | 
					
						
							| 
									
										
										
										
											2012-08-04 12:54:27 +00:00
										 |  |  | 	                                  OPTYPE_UNDO | OPTYPE_REGISTER); | 
					
						
							| 
									
										
										
										
											2012-05-22 14:13:33 +00:00
										 |  |  | 	WM_operatortype_macro_define(ot, "NODE_OT_detach"); | 
					
						
							|  |  |  | 	mot = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); | 
					
						
							| 
									
										
										
										
											2014-04-01 11:34:00 +11:00
										 |  |  | 	RNA_boolean_set(mot->ptr, "release_confirm", true); | 
					
						
							| 
									
										
										
										
											2012-05-22 14:13:33 +00:00
										 |  |  | 	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-08-04 12:54:27 +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", | 
					
						
							| 
									
										
										
										
											2012-08-04 12:54:27 +00:00
										 |  |  | 	                                  OPTYPE_UNDO | OPTYPE_REGISTER); | 
					
						
							| 
									
										
										
										
											2011-07-17 18:04:28 +00:00
										 |  |  | 	mot = WM_operatortype_macro_define(ot, "NODE_OT_duplicate"); | 
					
						
							| 
									
										
										
										
											2014-04-01 11:34:00 +11: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", | 
					
						
							| 
									
										
										
										
											2012-08-04 12:54:27 +00:00
										 |  |  | 	                                  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"); | 
					
						
							| 
									
										
										
										
											2015-08-01 20:59:55 +02:00
										 |  |  | 	WM_operatortype_macro_define(ot, "NODE_OT_insert_offset"); | 
					
						
							| 
									
										
										
										
											2012-05-01 08:19:11 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											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", | 
					
						
							| 
									
										
										
										
											2012-08-04 12:54:27 +00:00
										 |  |  | 	                                  OPTYPE_UNDO | OPTYPE_REGISTER); | 
					
						
							| 
									
										
										
										
											2012-05-01 08:19:11 +00:00
										 |  |  | 	WM_operatortype_macro_define(ot, "NODE_OT_links_detach"); | 
					
						
							| 
									
										
										
										
											2012-10-01 15:27:50 +00:00
										 |  |  | 	WM_operatortype_macro_define(ot, "NODE_OT_translate_attach"); | 
					
						
							| 
									
										
										
										
											2012-05-22 14:13:33 +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
										 |  |  | 	/* Entire Editor only ----------------- */ | 
					
						
							| 
									
										
										
										
											2018-11-08 15:59:51 +11:00
										 |  |  | 	WM_keymap_ensure(keyconf, "Node Generic", SPACE_NODE, 0); | 
					
						
							| 
									
										
										
										
											2018-06-04 09:31:30 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-11-28 17:14:45 +01:00
										 |  |  | 	/* Main Region only ----------------- */ | 
					
						
							| 
									
										
										
										
											2018-11-08 15:59:51 +11:00
										 |  |  | 	WM_keymap_ensure(keyconf, "Node Editor", SPACE_NODE, 0); | 
					
						
							| 
									
										
										
										
											2008-12-28 00:08:34 +00:00
										 |  |  | } |