diff options
Diffstat (limited to 'source/blender/blenkernel/intern/screen.c')
-rw-r--r-- | source/blender/blenkernel/intern/screen.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index 661d0da1550..3567de5df40 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -343,3 +343,25 @@ unsigned int BKE_screen_visible_layers(bScreen *screen) return layer; } +MenuType *BKE_spacemenu_find(const char *idname, int spacetype) +{ + SpaceType *st= BKE_spacetype_from_id(spacetype); + ARegionType *art; + MenuType* mt; + + if(st==NULL) { + printf("space type %d is invalid\n", spacetype); + return NULL; + } + + if(idname==NULL) + return NULL; + + for(art= st->regiontypes.first; art; art= art->next) + for(mt=art->menutypes.first; mt; mt=mt->next) + if(strcmp(idname, mt->idname)==0) + return mt; + + return NULL; +} + |