Commit: 97053e034a5abd7c85a7a21ff1c63a5e524142f5
Author: Antony Riakiotakis
Date:   Thu Feb 5 12:15:23 2015 +0100
Branches: wiggly-widgets
https://developer.blender.org/rB97053e034a5abd7c85a7a21ff1c63a5e524142f5

Initialize dropboxes and widgets together before opening the homefile,
makes sure areas get their proper handlers registered

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

M       source/blender/editors/include/ED_space_api.h
M       source/blender/editors/space_api/spacetypes.c
M       source/blender/windowmanager/intern/wm_init_exit.c

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

diff --git a/source/blender/editors/include/ED_space_api.h 
b/source/blender/editors/include/ED_space_api.h
index d268c57..fc812e0 100644
--- a/source/blender/editors/include/ED_space_api.h
+++ b/source/blender/editors/include/ED_space_api.h
@@ -36,6 +36,7 @@ struct bContext;
 
 void ED_spacetypes_init(void);
 void ED_spacemacros_init(void);
+void ED_spacedropwidgets_init(void);
 
 /* the pluginnable API for export to editors */
 
diff --git a/source/blender/editors/space_api/spacetypes.c 
b/source/blender/editors/space_api/spacetypes.c
index 226be82..c606ae5 100644
--- a/source/blender/editors/space_api/spacetypes.c
+++ b/source/blender/editors/space_api/spacetypes.c
@@ -135,9 +135,6 @@ void ED_spacetypes_init(void)
 
 void ED_spacemacros_init(void)
 {
-       const ListBase *spacetypes;
-       SpaceType *type;
-
        /* Macros's must go last since they reference other operators.
         * We need to have them go after python operators too */
        ED_operatormacros_armature();
@@ -154,20 +151,24 @@ void ED_spacemacros_init(void)
        ED_operatormacros_sequencer();
        ED_operatormacros_paint();
        ED_operatormacros_gpencil();
+}
+
+void ED_spacedropwidgets_init(void)
+{
+       const ListBase *spacetypes;
+       SpaceType *type;
 
        /* register dropboxes (can use macros) */
        spacetypes = BKE_spacetypes_list();
        for (type = spacetypes->first; type; type = type->next) {
                if (type->dropboxes)
                        type->dropboxes();
-       }
-       
-       for (type = spacetypes->first; type; type = type->next) {
                if (type->widgets)
                        type->widgets();
        }
 }
 
+
 /* called in wm.c */
 /* keymap definitions are registered only once per WM initialize, usually on 
file read,
  * using the keymap the actual areas/regions add the handlers */
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c 
b/source/blender/windowmanager/intern/wm_init_exit.c
index 7ae4f57..36ef6b0 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -165,6 +165,8 @@ void WM_init(bContext *C, int argc, const char **argv)
        /* Enforce loading the UI for the initial homefile */
        G.fileflags &= ~G_FILE_NO_UI;
 
+       ED_spacedropwidgets_init();
+
        /* get the default database, plus a wm */
        wm_homefile_read(C, NULL, G.factory_startup, NULL);

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

Reply via email to