[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36706] trunk/blender: enable game panel even if the BGE is disabled since its settings effect the viewport .

Campbell Barton ideasman42 at gmail.com
Mon May 16 06:55:31 CEST 2011


Revision: 36706
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36706
Author:   campbellbarton
Date:     2011-05-16 04:55:31 +0000 (Mon, 16 May 2011)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/space_image.py
    trunk/blender/source/blender/windowmanager/intern/wm_operators.c
    trunk/blender/source/creator/creator.c

Modified: trunk/blender/release/scripts/startup/bl_ui/space_image.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_image.py	2011-05-16 04:04:06 UTC (rev 36705)
+++ trunk/blender/release/scripts/startup/bl_ui/space_image.py	2011-05-16 04:55:31 UTC (rev 36706)
@@ -436,7 +436,8 @@
     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

Modified: trunk/blender/source/blender/windowmanager/intern/wm_operators.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_operators.c	2011-05-16 04:04:06 UTC (rev 36705)
+++ trunk/blender/source/blender/windowmanager/intern/wm_operators.c	2011-05-16 04:55:31 UTC (rev 36706)
@@ -1328,10 +1328,20 @@
 /* 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;
 }
 

Modified: trunk/blender/source/creator/creator.c
===================================================================
--- trunk/blender/source/creator/creator.c	2011-05-16 04:04:06 UTC (rev 36705)
+++ trunk/blender/source/creator/creator.c	2011-05-16 04:55:31 UTC (rev 36706)
@@ -151,7 +151,7 @@
 
 #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 @@
 
 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;




More information about the Bf-blender-cvs mailing list