diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-16 08:55:31 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-16 08:55:31 +0400 |
commit | 80c2582f0eee9f9ad9c262df0826298c0d7137c7 (patch) | |
tree | 60a931965c8217fd9cb71f01098fe63ae9a152b7 | |
parent | 0460a68ae7d2ef7f771c407dd5b9f9c86d2c8d49 (diff) |
enable game panel even if the BGE is disabled since its settings effect the viewport.
also remove unused function in creator.c and minor edit to search menu poll function.
-rw-r--r-- | release/scripts/startup/bl_ui/space_image.py | 3 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 18 | ||||
-rw-r--r-- | source/creator/creator.c | 14 |
3 files changed, 17 insertions, 18 deletions
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 77583b80824..44a1c814e28 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -436,7 +436,8 @@ class IMAGE_PT_game_properties(bpy.types.Panel): def poll(cls, context): rd = context.scene.render sima = context.space_data - return (sima and sima.image) and (rd.engine == 'BLENDER_GAME') + # display even when not in game mode because these settings effect the 3d view + return (sima and sima.image) # and (rd.engine == 'BLENDER_GAME') def draw(self, context): layout = self.layout diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index e624768c86e..745ae0ae47e 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1328,10 +1328,20 @@ static int wm_search_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(ev /* op->poll */ static int wm_search_menu_poll(bContext *C) { - if(CTX_wm_window(C)==NULL) return 0; - if(CTX_wm_area(C) && CTX_wm_area(C)->spacetype==SPACE_CONSOLE) return 0; // XXX - so we can use the shortcut in the console - if(CTX_wm_area(C) && CTX_wm_area(C)->spacetype==SPACE_TEXT) return 0; // XXX - so we can use the spacebar in the text editor - if(CTX_data_edit_object(C) && CTX_data_edit_object(C)->type==OB_FONT) return 0; // XXX - so we can use the spacebar for entering text + if(CTX_wm_window(C)==NULL) { + return 0; + } + else { + ScrArea *sa= CTX_wm_area(C); + if(sa) { + if(sa->spacetype==SPACE_CONSOLE) return 0; // XXX - so we can use the shortcut in the console + if(sa->spacetype==SPACE_TEXT) return 0; // XXX - so we can use the spacebar in the text editor + } + else { + Object *editob= CTX_data_edit_object(C); + if(editob && editob->type==OB_FONT) return 0; // XXX - so we can use the spacebar for entering text + } + } return 1; } diff --git a/source/creator/creator.c b/source/creator/creator.c index 2b146822194..29ddd2ab1b0 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -151,7 +151,7 @@ char btempdir[FILE_MAX]; #define BLEND_VERSION_STRING_FMT "Blender %d.%02d (sub %d)\n", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION -/* Initialise callbacks for the modules that need them */ +/* Initialize callbacks for the modules that need them */ static void setCallbacks(void); /* set breakpoints here when running in debug mode, useful to catch floating point errors */ @@ -338,18 +338,6 @@ static int print_help(int UNUSED(argc), const char **UNUSED(argv), void *data) double PIL_check_seconds_timer(void); -/* XXX This was here to fix a crash when running python scripts - * with -P that used the screen. - * - * static void main_init_screen( void ) -{ - setscreen(G.curscreen); - - if(G.main->scene.first==0) { - set_scene( add_scene("1") ); - } -}*/ - static int end_arguments(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data)) { return -1; |