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.
This commit is contained in:
Campbell Barton 2011-05-16 04:55:31 +00:00
parent 0460a68ae7
commit 80c2582f0e
3 changed files with 17 additions and 18 deletions

@ -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

@ -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;
}

@ -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;