Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_api/spacetypes.c')
-rw-r--r--source/blender/editors/space_api/spacetypes.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c
index c1fec6cd1de..492080eda52 100644
--- a/source/blender/editors/space_api/spacetypes.c
+++ b/source/blender/editors/space_api/spacetypes.c
@@ -105,10 +105,12 @@ void ED_spacetypes_init(void)
UI_view2d_operatortypes();
UI_buttons_operatortypes();
+ /* register operators */
spacetypes = BKE_spacetypes_list();
- for(type=spacetypes->first; type; type=type->next)
- type->operatortypes();
-
+ for(type=spacetypes->first; type; type=type->next) {
+ if(type->operatortypes)
+ type->operatortypes();
+ }
/* Macros's must go last since they reference other operators
* maybe we'll need to have them go after python operators too? */
@@ -117,6 +119,14 @@ void ED_spacetypes_init(void)
ED_operatormacros_node();
ED_operatormacros_object();
ED_operatormacros_file();
+
+ /* register dropboxes (can use macros) */
+ spacetypes = BKE_spacetypes_list();
+ for(type=spacetypes->first; type; type=type->next) {
+ if(type->dropboxes)
+ type->dropboxes();
+ }
+
}
/* called in wm.c */