Commit: dc312609dd346e40f106976fe1ac5d9ad99e8c20
Author: Campbell Barton
Date:   Fri Nov 30 13:24:17 2018 +1100
Branches: blender2.8
https://developer.blender.org/rBdc312609dd346e40f106976fe1ac5d9ad99e8c20

Merge branch 'master' into blender2.8

===================================================================



===================================================================

diff --cc source/blender/windowmanager/intern/wm_files.c
index 1e714f1dfb4,effd1c89077..8c263461af6
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@@ -984,12 -908,19 +984,10 @@@ void wm_homefile_read
  
        bmain->name[0] = '\0';
  
 -      if (use_userdef) {
 -              /* When loading factory settings, the reset solid OpenGL lights 
need to be applied. */
 -              if (!G.background) {
 -                      GPU_default_lights();
 -              }
 -      }
 -
        /* start with save preference untitled.blend */
        G.save_over = 0;
 -      /* disable auto-play in startup.blend... */
 -      G.fileflags &= ~G_FILE_AUTOPLAY;
  
 -      wm_file_read_post(C, true, use_userdef);
 +      wm_file_read_post(C, true, reset_app_template);
- 
-       return true;
  }
  
  /** \name WM History File API
@@@ -1743,33 -1670,13 +1741,29 @@@ static int wm_homefile_read_exec(bConte
                app_template = WM_init_state_app_template_get();
        }
  
-       if (wm_homefile_read(C, op->reports, use_factory_settings, 
use_empty_data, use_userdef, filepath, app_template)) {
-               if (use_splash) {
-                       WM_init_splash(C);
-               }
-               return OPERATOR_FINISHED;
-       }
-       else {
-               return OPERATOR_CANCELLED;
+       wm_homefile_read(C, op->reports, use_factory_settings, use_empty_data, 
use_userdef, filepath, app_template);
+       if (use_splash) {
+               WM_init_splash(C);
        }
+       return OPERATOR_FINISHED;
  }
  
 +static int wm_homefile_read_invoke(bContext *C, wmOperator *UNUSED(op), const 
wmEvent *UNUSED(event))
 +{
 +      /* Draw menu which includes default startup and application templates. 
*/
 +      uiPopupMenu *pup = UI_popup_menu_begin(C, IFACE_("New File"), 
ICON_FILE_NEW);
 +      uiLayout *layout = UI_popup_menu_layout(pup);
 +
 +      MenuType *mt = WM_menutype_find("TOPBAR_MT_file_new", false);
 +      if (mt) {
 +              UI_menutype_draw(C, mt, layout);
 +      }
 +
 +      UI_popup_menu_end(C, pup);
 +
 +      return OPERATOR_INTERFACE;
 +}
 +
  void WM_OT_read_homefile(wmOperatorType *ot)
  {
        PropertyRNA *prop;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to