From d8d92b5d93e3553150fe9f28f1efbc4c3534c395 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 14 Mar 2010 18:08:12 +0000 Subject: [PATCH] user preference to disable the splash screen --- release/scripts/ui/space_userpref.py | 4 ++++ source/blender/makesdna/DNA_userdef_types.h | 1 + source/blender/makesrna/intern/rna_userdef.c | 4 ++++ source/blender/windowmanager/intern/wm_init_exit.c | 14 ++++++++------ source/creator/creator.c | 2 +- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py index c8cb6d9dcca..61c514135bd 100644 --- a/release/scripts/ui/space_userpref.py +++ b/release/scripts/ui/space_userpref.py @@ -279,6 +279,10 @@ class USERPREF_PT_interface(bpy.types.Panel): col.label(text="Menu Open Delay:") col.prop(view, "open_toplevel_delay", text="Top Level") col.prop(view, "open_sublevel_delay", text="Sub Level") + + col.separator() + + col.prop(view, "show_splash") class USERPREF_PT_edit(bpy.types.Panel): diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 7ed30b3e876..4ebc2594c8f 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -454,6 +454,7 @@ extern UserDef U; /* from blenkernel blender.c */ #define USER_CONTINUOUS_MOUSE (1 << 24) #define USER_ZOOM_INVERT (1 << 25) #define USER_ZOOM_DOLLY_HORIZ (1 << 26) +#define USER_SPLASH_DISABLE (1 << 27) /* Auto-Keying mode */ /* AUTOKEY_ON is a bitflag */ diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 39619e42e7e..8a1b37c2ecf 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -1895,6 +1895,10 @@ static void rna_def_userdef_view(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_VIEWPORTNAME); RNA_def_property_ui_text(prop, "Show View Name", "Show the name of the view's direction in each 3D View"); RNA_def_property_update(prop, 0, "rna_userdef_update"); + + prop= RNA_def_property(srna, "show_splash", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_SPLASH_DISABLE); + RNA_def_property_ui_text(prop, "Show Splash", "Display splash screen on startup"); prop= RNA_def_property(srna, "show_playback_fps", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_FPS); diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index f825bb28547..8e3c9312edd 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -173,13 +173,15 @@ void WM_init(bContext *C, int argc, char **argv) void WM_init_splash(bContext *C) { - wmWindowManager *wm= CTX_wm_manager(C); - wmWindow *prevwin= CTX_wm_window(C); + if((U.uiflag & USER_SPLASH_DISABLE) == 0) { + wmWindowManager *wm= CTX_wm_manager(C); + wmWindow *prevwin= CTX_wm_window(C); - if(wm->windows.first) { - CTX_wm_window_set(C, wm->windows.first); - WM_operator_name_call(C, "WM_OT_splash", WM_OP_INVOKE_DEFAULT, NULL); - CTX_wm_window_set(C, prevwin); + if(wm->windows.first) { + CTX_wm_window_set(C, wm->windows.first); + WM_operator_name_call(C, "WM_OT_splash", WM_OP_INVOKE_DEFAULT, NULL); + CTX_wm_window_set(C, prevwin); + } } } diff --git a/source/creator/creator.c b/source/creator/creator.c index 91b4ed09b40..bf45a89fa5b 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -196,7 +196,7 @@ static int print_help(int argc, char **argv, void *data) printf ("Blender %d.%02d (sub %d) Build\n", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION); printf ("Usage: blender [args ...] [file] [args ...]\n"); printf ("\nRender options:\n"); - printf (" -b \tRender in background (doesn't load the user defaults .B.blend file)\n"); + printf (" -b \tLoad in background (often used for background rendering)\n"); printf (" -a render frames from start to end (inclusive), only works when used after -b\n"); printf (" -S \tSet scene \n"); printf (" -f \tRender frame and save it\n");