Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_panel_type.c
| Show All 18 Lines | |||||
| * | * | ||||
| * Panel Registry. | * Panel Registry. | ||||
| * | * | ||||
| * \note Unlike menu, and other registries, this doesn't *own* the PanelType. | * \note Unlike menu, and other registries, this doesn't *own* the PanelType. | ||||
| * | * | ||||
| * For popups/popovers only, regions handle panel types by including them in local lists. | * For popups/popovers only, regions handle panel types by including them in local lists. | ||||
| */ | */ | ||||
| #include <CLG_log.h> | |||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include "BLI_sys_types.h" | #include "BLI_sys_types.h" | ||||
| #include "DNA_windowmanager_types.h" | #include "DNA_windowmanager_types.h" | ||||
| #include "BLI_ghash.h" | #include "BLI_ghash.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BKE_screen.h" | #include "BKE_screen.h" | ||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "WM_types.h" | |||||
| static GHash *g_paneltypes_hash = NULL; | static GHash *g_paneltypes_hash = NULL; | ||||
| PanelType *WM_paneltype_find(const char *idname, bool quiet) | PanelType *WM_paneltype_find(const char *idname, bool quiet) | ||||
| { | { | ||||
| PanelType *pt; | PanelType *pt; | ||||
| if (idname[0]) { | if (idname[0]) { | ||||
| pt = BLI_ghash_lookup(g_paneltypes_hash, idname); | pt = BLI_ghash_lookup(g_paneltypes_hash, idname); | ||||
| if (pt) { | if (pt) { | ||||
| return pt; | return pt; | ||||
| } | } | ||||
| } | } | ||||
| if (!quiet) { | if (!quiet) { | ||||
| printf("search for unknown paneltype %s\n", idname); | CLOG_INFO(WM_LOG_TOOLS, "search for unknown paneltype %s", idname); | ||||
| } | } | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| bool WM_paneltype_add(PanelType *pt) | bool WM_paneltype_add(PanelType *pt) | ||||
| { | { | ||||
| BLI_ghash_insert(g_paneltypes_hash, pt->idname, pt); | BLI_ghash_insert(g_paneltypes_hash, pt->idname, pt); | ||||
| Show All 24 Lines | |||||