Blender V2.61 - r43446
|
00001 /* 00002 * ***** BEGIN GPL LICENSE BLOCK ***** 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software Foundation, 00016 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 * 00018 * The Original Code is Copyright (C) 2008 Blender Foundation. 00019 * All rights reserved. 00020 * 00021 * 00022 * Contributor(s): Blender Foundation 00023 * 00024 * ***** END GPL LICENSE BLOCK ***** 00025 */ 00026 00032 #include <stdlib.h> 00033 #include <math.h> 00034 00035 00036 #include "DNA_screen_types.h" 00037 #include "DNA_space_types.h" 00038 00039 #include "BLI_math.h" 00040 #include "BLI_blenlib.h" 00041 00042 #include "BKE_context.h" 00043 00044 #include "RNA_access.h" 00045 00046 #include "WM_api.h" 00047 #include "WM_types.h" 00048 00049 00050 #include "script_intern.h" 00051 00052 00053 /* ************************** registration **********************************/ 00054 00055 void script_operatortypes(void) 00056 { 00057 WM_operatortype_append(SCRIPT_OT_python_file_run); 00058 WM_operatortype_append(SCRIPT_OT_reload); 00059 } 00060 00061 void script_keymap(wmKeyConfig *keyconf) 00062 { 00063 wmKeyMap *keymap= WM_keymap_find(keyconf, "Script", SPACE_SCRIPT, 0); 00064 00065 /* TODO - this is just while we have no way to load a text datablock */ 00066 RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_python_file_run", PKEY, KM_PRESS, KM_CTRL|KM_SHIFT|KM_ALT, 0)->ptr, "filepath", "test.py"); 00067 } 00068