Blender V5.3
userpref_panels.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2026 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include "BKE_screen.hh"
10
11#include "BLI_listbase.hh"
12#include "BLI_string.hh"
13#include "BLI_string_utf8.hh"
14
15#include "BLT_translation.hh"
16
17#include "userpref_intern.hh"
18
19namespace blender {
20
22{
23 PanelType *panel_type = MEM_new_zeroed<PanelType>(__func__);
24 /* TODO panel should be renamed to just `USERPREF_PT_asset_libraries`, it's not contained in the
25 * file paths section anymore. This is a compatibility breaking change though. */
26 STRNCPY_UTF8(panel_type->idname, "USERPREF_PT_file_paths_asset_libraries");
27 STRNCPY_UTF8(panel_type->label, N_("Asset Libraries"));
29 STRNCPY(panel_type->context, "assets");
30 panel_type->space_type = SPACE_USERPREF;
31 panel_type->region_type = RGN_TYPE_WINDOW;
33 BLI_addtail(&region_type.paneltypes, panel_type);
34}
35
36} // namespace blender
#define STRNCPY_UTF8(dst, src)
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
BMesh Iterators.
char * STRNCPY(char(&dst)[N], const char *src)
void userpref_asset_libraries_panel_draw(const bContext *C, Panel *panel)
void userpref_panels_register(ARegionType &region_type)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:118
ListBaseT< PanelType > paneltypes
char translation_context[BKE_ST_MAXNAME]
char context[BKE_ST_MAXNAME]
void(*) draw(const bContext *C, Panel *panel)
char idname[BKE_ST_MAXNAME]
char label[BKE_ST_MAXNAME]
#define N_(msgid)