Blender V5.3
space_userpref.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2008 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include <cstring>
10
11#include "AS_remote_library.hh"
12
13#include "BLT_translation.hh"
14
15#include "DNA_space_types.h"
16#include "DNA_userdef_types.h"
17#include "MEM_guardedalloc.h"
18
19#include "BLI_listbase.hh"
20#include "BLI_path_utils.hh"
21#include "BLI_string.hh"
22#include "BLI_string_utf8.hh"
23
24#include "BKE_context.hh"
25#include "BKE_preferences.h"
26#include "BKE_screen.hh"
27
28#include "ED_asset.hh"
29#include "ED_screen.hh"
30#include "ED_space_api.hh"
31#include "ED_userpref.hh"
32
33#include "RNA_access.hh"
34#include "RNA_enum_types.hh"
35
36#include "WM_api.hh"
37#include "WM_types.hh"
38
39#include "UI_interface.hh"
40
41#include "BLO_read_write.hh"
42
43#include "userpref_intern.hh"
44
45namespace blender {
46
50 "REMOTE",
51 ICON_INTERNET,
52 "Add Remote Asset Library",
53 "Add an asset library referencing a remote repository "
54 "with support for listing and updating asset libraries"},
56 "LOCAL",
57 ICON_DISK_DRIVE,
58 "Add Local Asset Library",
59 "Add an asset library managed via the file system without referencing an external "
60 "repository"},
61 {0, nullptr, 0, nullptr, nullptr},
62};
63
64/* -------------------------------------------------------------------- */
67
68static SpaceLink *userpref_create(const ScrArea *area, const Scene * /*scene*/)
69{
70 ARegion *region;
71 SpaceUserPref *spref;
72
73 spref = MEM_new<SpaceUserPref>("inituserpref");
74 spref->runtime = MEM_new<SpaceUserPref_Runtime>(__func__);
76
77 /* header */
78 region = BKE_area_region_new();
79
80 BLI_addtail(&spref->regionbase, region);
82 /* Ignore user preference "USER_HEADER_BOTTOM" here (always show bottom for new types). */
84
85 /* navigation region */
86 region = BKE_area_region_new();
87
88 BLI_addtail(&spref->regionbase, region);
89 region->regiontype = RGN_TYPE_UI;
90 region->alignment = RGN_ALIGN_LEFT;
91 region->flag &= ~RGN_FLAG_HIDDEN;
92
93 /* Use smaller size when opened in area like properties editor. */
94 if (area->winx && area->winx < 3.0f * UI_NAVIGATION_REGION_WIDTH * UI_SCALE_FAC) {
96 }
97
98 /* execution region */
99 region = BKE_area_region_new();
100
101 BLI_addtail(&spref->regionbase, region);
105
106 /* main region */
107 region = BKE_area_region_new();
108
109 BLI_addtail(&spref->regionbase, region);
110 region->regiontype = RGN_TYPE_WINDOW;
111
112 return reinterpret_cast<SpaceLink *>(spref);
113}
114
115/* Doesn't free the space-link itself. */
116static void userpref_free(SpaceLink *sl)
117{
118 SpaceUserPref *spref = (SpaceUserPref *)sl;
119 MEM_delete(spref->runtime);
120}
121
122/* spacetype; init callback */
123static void userpref_init(wmWindowManager * /*wm*/, ScrArea * /*area*/) {}
124
126{
127 SpaceUserPref *sprefn_old = (SpaceUserPref *)sl;
128 SpaceUserPref *sprefn = static_cast<SpaceUserPref *>(MEM_dupalloc(sprefn_old));
129
130 sprefn->runtime = MEM_new<SpaceUserPref_Runtime>(__func__);
131
132 return reinterpret_cast<SpaceLink *>(sprefn);
133}
134
135/* add handlers, stuff you only do once or on area/region changes */
137{
138 /* do not use here, the properties changed in user-preferences do a system-wide refresh,
139 * then scroller jumps back */
140 // region->v2d.flag &= ~V2D_IS_INIT;
141
143
144 wmKeyMap *keymap = WM_keymap_ensure(
145 wm->runtime->defaultconf, "Preferences", SPACE_USERPREF, RGN_TYPE_WINDOW);
147
148 ED_region_panels_init(wm, region);
149}
150
152
153/* -------------------------------------------------------------------- */
156
158{
159 return spref->runtime->search_string.c_str();
160}
161
163{
164 return spref->runtime->search_string.size();
165}
166
167void ED_userpref_search_string_set(SpaceUserPref *spref, const char *value)
168{
169 spref->runtime->search_string = value ? value : "";
170}
171
173{
174 return spref->runtime->tab_search_results[index];
175}
176
178
180{
181 bool free = false;
183
185 for (const EnumPropertyItem *it = item; it->identifier != nullptr; it++) {
186 if (it->name) {
187 result.append(eUserPref_Section(it->value));
188 }
189 else {
190 result.append(-1);
191 }
192 }
193 if (free) {
194 MEM_delete(item);
195 }
196 return result;
197}
198
200 const char *name,
201 const char *dirpath,
202 bUserAssetLibraryAddType library_type,
203 bool is_project_defined,
204 std::optional<UUID> uuid,
205 std::optional<char *> auth_token)
206{
207 bUserAssetLibrary *new_library;
208
209 char final_name[FILE_MAX];
210 STRNCPY(final_name, name);
211
212 switch (library_type) {
214 char final_dirpath[FILE_MAX];
215 STRNCPY(final_dirpath, dirpath);
216 BLI_path_slash_rstrip(final_dirpath);
217 /* Default to directory name, except when directory is a project root template
218 * without any subdirectory. */
219 if (!final_name[0] && !STREQ(final_dirpath, "{project_root}")) {
220 BLI_path_split_file_part(final_dirpath, final_name, sizeof(final_name));
221 }
222 if (!final_name[0]) {
223 STRNCPY(final_name, DATA_("Local Asset Library"));
224 }
225
226 if (is_project_defined) {
228 &U, final_name, final_dirpath, uuid);
229 }
230 else {
231 new_library = BKE_preferences_asset_library_add(&U, final_name, final_dirpath);
232 }
233 break;
234 }
236 if (!final_name[0]) {
237 BKE_preferences_remote_to_name(dirpath, final_name);
238 }
239 if (!final_name[0]) {
240 STRNCPY(final_name, DATA_("Remote Asset Library"));
241 }
242
243 if (is_project_defined) {
245 &U, final_name, dirpath, auth_token.value_or(nullptr));
246 }
247 else {
249 &U, final_name, dirpath, auth_token.value_or(nullptr));
250 }
251 break;
252 }
253 }
254
255 if (!is_project_defined) {
256 /* Make sure that the asset list is sorted so that the new user preference library is put
257 * before the first project defined library. */
258 bUserAssetLibrary *first_project_library = nullptr;
259 for (bUserAssetLibrary &library : U.asset_libraries) {
261 first_project_library = &library;
262 break;
263 }
264 }
265
266 if (first_project_library) {
267 /* reinsert library into new position */
268 BLI_remlink(&U.asset_libraries, new_library);
269 BLI_insertlinkbefore(&U.asset_libraries, first_project_library, new_library);
270 }
271 }
272
273 /* Activate new library in the UI for further setup. */
275
276 if (new_library->flag & ASSET_LIBRARY_USE_REMOTE_URL) {
278 }
279
280 /* There's no dedicated notifier for the Preferences. */
283
284 return new_library;
285}
286
288{
289 const bool use_remote_libraries = USER_EXPERIMENTAL_TEST(&U, use_remote_asset_libraries);
290 const bool is_remote_library = asset_library->flag & ASSET_LIBRARY_USE_REMOTE_URL;
291
292 if (is_remote_library && !use_remote_libraries) {
293 /* This is a corner case, where the active library is a remote one, but remote libraries are
294 * not shown. This only happens right after disabling the experimental flag, which doesn't
295 * update the active library index, or when somebody set the active index via Python. Just
296 * pretend the deletion happened (because actually deleting hidden things is bad), and let the
297 * code below activate a non-remote (and so visible) library. */
298 }
299 else {
301 }
302
303 /* Update active library index to be in range. */
304 const int count_remaining = userpref_ui_asset_libraries_count();
305 CLAMP(U.active_asset_library, 0, count_remaining - 1);
306
307 /* Trigger refresh for the Asset Browser. */
310}
311
312/* -------------------------------------------------------------------- */
315
316static bool property_search_for_context(const bContext *C, ARegion *region, short section)
317{
318 char lower[64] = {0};
319 const char *name = nullptr;
321 STRNCPY(lower, name);
322 BLI_str_tolower_ascii(lower, sizeof(lower));
323 const char *contexts[2] = {lower, nullptr};
325 C, region, &region->runtime->type->paneltypes, contexts, nullptr);
326}
327
329 const Span<int> context_tabs_array)
330{
331 int current_tab_index = 0;
332 for (const int i : context_tabs_array.index_range()) {
333 if (U.space_data.section_active == context_tabs_array[i]) {
334 current_tab_index = i;
335 break;
336 }
337 }
338 /* Try the tabs after the current tab. */
339 for (int i = current_tab_index + 1; i < context_tabs_array.size(); i++) {
340 if (sbuts->runtime->tab_search_results[i]) {
341 U.space_data.section_active = eUserPref_Section(context_tabs_array[i]);
342 return;
343 }
344 }
345 /* Try the tabs before the current tab. */
346 for (int i = 0; i < current_tab_index; i++) {
347 if (sbuts->runtime->tab_search_results[i]) {
348 U.space_data.section_active = eUserPref_Section(context_tabs_array[i]);
349 return;
350 }
351 }
352}
353
355 SpaceUserPref *sprefs,
356 ARegion *region_original,
357 const Span<int> context_tabs_array)
358{
359 /* Use local copies of the area and duplicate the region as a mainly-paranoid protection
360 * against changing any of the space / region data while running the search. */
361 ScrArea *area_original = CTX_wm_area(C);
362 ScrArea area_copy = dna::shallow_copy(*area_original);
363 ARegion *region_copy = BKE_area_region_copy(area_copy.type, region_original);
364 /* Set the region visible field. Otherwise some layout code thinks we're drawing in a popup.
365 * This likely isn't necessary, but it's nice to emulate a "real" region where possible. */
366 region_copy->runtime->visible = true;
367 CTX_wm_area_set(const_cast<bContext *>(C), &area_copy);
368 CTX_wm_region_set(const_cast<bContext *>(C), region_copy);
369 SpaceUserPref sprefs_copy = dna::shallow_copy(*sprefs);
370 sprefs_copy.runtime = MEM_new<SpaceUserPref_Runtime>(__func__, *sprefs->runtime);
371 sprefs_copy.runtime->tab_search_results.fill(false);
372 area_copy.spacedata.clear_no_delete();
373 BLI_addtail(&area_copy.spacedata, &sprefs_copy);
374 /* Loop through the tabs. */
375 for (const int i : context_tabs_array.index_range()) {
376 /* -1 corresponds to a spacer. */
377 if (context_tabs_array[i] == -1) {
378 continue;
379 }
380 if (ELEM(context_tabs_array[i], USER_SECTION_EXTENSIONS, USER_SECTION_ADDONS)) {
381 continue;
382 }
383 /* Handle search for the current tab in the normal layout pass. */
384 if (context_tabs_array[i] == U.space_data.section_active) {
385 continue;
386 }
387 /* Actually do the search and store the result in the bitmap. */
388 const bool found = property_search_for_context(C, region_copy, context_tabs_array[i]);
389 sprefs->runtime->tab_search_results[i] = found;
390 ui::blocklist_free(C, region_copy);
391 }
392 BKE_area_region_free(area_copy.type, region_copy);
393 MEM_delete(region_copy);
394 userpref_free(reinterpret_cast<SpaceLink *>(&sprefs_copy));
395 CTX_wm_area_set(const_cast<bContext *>(C), area_original);
396 CTX_wm_region_set(const_cast<bContext *>(C), region_original);
397}
398
404 SpaceUserPref *sprefs,
405 ARegion *region)
406{
407 Vector<int> tabs = ED_userpref_tabs_list(sprefs);
408 userpref_search_all_tabs(C, sprefs, region, tabs);
409 /* Check whether the current tab has a search match. */
410 bool current_tab_has_search_match = false;
411 for (Panel &panel : region->panels) {
413 current_tab_has_search_match = true;
414 }
415 }
416 /* Find which index in the list the current tab corresponds to. */
417 int current_tab_index = -1;
418 for (const int i : tabs.index_range()) {
419 if (tabs[i] == U.space_data.section_active) {
420 current_tab_index = i;
421 }
422 }
423 BLI_assert(current_tab_index != -1);
424 /* Update the tab search match flag for the current tab. */
425 sprefs->runtime->tab_search_results[current_tab_index] = current_tab_has_search_match;
426 /* Move to the next tab with a result */
427 if (!current_tab_has_search_match) {
428 if (region->flag & RGN_FLAG_SEARCH_FILTER_UPDATE) {
430 }
431 }
432}
433
435
436static void userpref_main_region_layout(const bContext *C, ARegion *region)
437{
438 char id_lower[64];
439 const char *contexts[2] = {id_lower, nullptr};
441
443
444 /* Avoid duplicating identifiers, use existing RNA enum. */
445 {
447 int i = RNA_enum_from_value(items, U.space_data.section_active);
448 /* File is from the future. */
449 if (i == -1) {
450 i = 0;
451 }
452 const char *id = items[i].identifier;
453 BLI_assert(strlen(id) < sizeof(id_lower));
454 const size_t id_lower_len = STRNCPY_UTF8_RLEN(id_lower, id);
455 BLI_str_tolower_ascii(id_lower, id_lower_len);
456 }
457
459 region,
460 &region->runtime->type->paneltypes,
462 contexts,
463 nullptr);
464
465 if (region->flag & RGN_FLAG_SEARCH_FILTER_ACTIVE) {
467 }
468}
469
471
472static void userpref_keymap(wmKeyConfig *keyconf)
473{
474 WM_keymap_ensure(keyconf, "Preferences", SPACE_USERPREF, RGN_TYPE_WINDOW);
475}
476
477/* add handlers, stuff you only do once or on area/region changes */
479{
480 ED_region_header_init(region);
481}
482
483static void userpref_header_region_draw(const bContext *C, ARegion *region)
484{
485 ED_region_header(C, region);
486}
487
488/* add handlers, stuff you only do once or on area/region changes */
490{
493
494 wmKeyMap *keymap = WM_keymap_ensure(
495 wm->runtime->defaultconf, "Preferences_nav", SPACE_USERPREF, RGN_TYPE_UI);
497
498 ED_region_panels_init(wm, region);
499}
500
502{
503 ED_region_panels(C, region);
504}
505
507{
508 const ARegion *region_header = BKE_area_find_region_type(params->area, RGN_TYPE_HEADER);
509 return !region_header->runtime->visible;
510}
511
512/* add handlers, stuff you only do once or on area/region changes */
518
520
521static void userpref_header_listener(const wmRegionListenerParams * /*params*/) {}
522
524
526
528{
529 SpaceUserPref *spref = reinterpret_cast<SpaceUserPref *>(sl);
530 spref->runtime = MEM_new<SpaceUserPref_Runtime>(__func__);
531}
532
534{
536 [](BlendStructWriter<SpaceUserPref> &struct_writer) {
537 struct_writer.shallow_data.runtime = nullptr;
538 });
539}
540
542{
543 std::unique_ptr<SpaceType> st = std::make_unique<SpaceType>();
544 ARegionType *art;
545
546 st->spaceid = SPACE_USERPREF;
547 STRNCPY_UTF8(st->name, "Userpref");
548 st->struct_size = sizeof(SpaceUserPref);
549
550 st->create = userpref_create;
551 st->free = userpref_free;
552 st->init = userpref_init;
553 st->duplicate = userpref_duplicate;
554 st->operatortypes = userpref_operatortypes;
555 st->keymap = userpref_keymap;
556 st->blend_read_data = userpref_blend_read_data;
557 st->blend_write = userpref_space_blend_write;
558
559 /* regions: main window */
560 art = MEM_new_zeroed<ARegionType>("spacetype userpref region");
568
569 BLI_addhead(&st->regiontypes, art);
570
571 /* regions: header */
572 art = MEM_new_zeroed<ARegionType>("spacetype userpref region");
574 art->prefsizey = HEADERY;
579
580 BLI_addhead(&st->regiontypes, art);
581
582 /* regions: navigation window */
583 art = MEM_new_zeroed<ARegionType>("spacetype userpref region");
584 art->regionid = RGN_TYPE_UI;
591
592 BLI_addhead(&st->regiontypes, art);
593
594 /* regions: execution window */
595 art = MEM_new_zeroed<ARegionType>("spacetype userpref region");
597 art->prefsizey = HEADERY;
604
605 BLI_addhead(&st->regiontypes, art);
606
607 BKE_spacetype_register(std::move(st));
608}
609
610} // namespace blender
#define FILE_MAX
#define STRNCPY_UTF8_RLEN(dst, src)
#define STRNCPY_UTF8(dst, src)
#define DATA_(msgid)
#define HEADERY
#define UI_SCALE_FAC
#define USER_EXPERIMENTAL_TEST(userdef, member)
Read Blender memory allocation and freeing.
#define C
Definition RandGen.cpp:29
#define UI_NAVIGATION_REGION_WIDTH
#define UI_NARROW_NAVIGATION_REGION_WIDTH
#define NC_WINDOW
Definition WM_types.hh:388
#define ND_SPACE_ASSET_PARAMS
Definition WM_types.hh:568
#define NC_SPACE
Definition WM_types.hh:405
#define CLAMP(a, b, c)
#define ELEM(...)
#define STREQ(a, b)
constexpr int64_t size() const
Definition BLI_span.hh:256
constexpr IndexRange index_range() const
Definition BLI_span.hh:405
IndexRange index_range() const
void remote_library_request_download(const RemoteLibraryDefinitionRef &library_definition)
void free(Subdiv *subdiv)
Definition subdiv.cc:192
internal::ShallowDataConstRef< T > shallow_copy(const T &other)
Definition DNA_defs.h:147
void clear_all_library(const bContext *C)
void blocklist_free(const bContext *C, ARegion *region)
bool panel_matches_search_filter(const Panel *panel)
bool panel_is_active(const Panel *panel)
BMesh Iterators.
void WM_main_add_notifier(uint type, void *reference)
UserDef U
Definition blender.cc:58
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
bUserAssetLibraryAddType
const EnumPropertyItem custom_library_type_items[]
static void userpref_operatortypes()
ScrArea * CTX_wm_area(const bContext *C)
static void userpref_header_listener(const wmRegionListenerParams *)
char * STRNCPY(char(&dst)[N], const char *src)
void BLI_addhead(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:98
static void userpref_navigation_region_draw(const bContext *C, ARegion *region)
const EnumPropertyItem * BKE_preferences_active_section_itemf(const UserDef *userdef, bool *r_free)
@ ASSET_LIBRARY_PROJECT_DEFINED
@ ASSET_LIBRARY_USE_REMOTE_URL
void userpref_panels_register(ARegionType &region_type)
struct bUserAssetLibrary * BKE_preferences_asset_library_add(struct UserDef *userdef, const char *name, const char *dirpath) ATTR_NONNULL(1)
void BKE_area_region_free(SpaceType *st, ARegion *region)
Definition screen.cc:736
SpaceUserPref * CTX_wm_space_userpref(const bContext *C)
struct bUserAssetLibrary * BKE_preferences_remote_asset_library_add(struct UserDef *userdef, const char *name, const char *remote_url, const char *auth_token) ATTR_NONNULL(1
bool ED_region_property_search(const bContext *C, ARegion *region, ListBaseT< PanelType > *paneltypes, const char *contexts[], const char *category_override)
Definition area.cc:4173
void BKE_preferences_asset_library_remove(struct UserDef *userdef, struct bUserAssetLibrary *library) ATTR_NONNULL()
static void userpref_free(SpaceLink *sl)
static void userpref_main_region_layout(const bContext *C, ARegion *region)
static void userpref_header_region_draw(const bContext *C, ARegion *region)
bool ED_userpref_tab_has_search_result(SpaceUserPref *sprefs, int index)
int RNA_enum_from_value(const EnumPropertyItem *item, const int value)
ARegion * BKE_area_region_copy(const SpaceType *st, const ARegion *region)
Definition screen.cc:479
static SpaceLink * userpref_duplicate(SpaceLink *sl)
static void userpref_search_all_tabs(const bContext *C, SpaceUserPref *sprefs, ARegion *region_original, const Span< int > context_tabs_array)
static SpaceLink * userpref_create(const ScrArea *area, const Scene *)
struct bUserAssetLibrary * BKE_preferences_project_asset_library_add(struct UserDef *userdef, const char *name, const char *dirpath, std::optional< UUID > uuid=std::nullopt) ATTR_NONNULL(1)
void BKE_preferences_remote_to_name(const char *remote_url, char name[64])
void BLI_path_slash_rstrip(char *path) ATTR_NONNULL(1)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:138
static void userpref_main_region_listener(const wmRegionListenerParams *)
void ED_userpref_asset_library_remove(bContext *C, struct bUserAssetLibrary *asset_library)
struct bUserAssetLibrary * ED_userpref_asset_library_new(const struct bContext *C, const char *name, const char *dirpath, bUserAssetLibraryAddType library_type, bool is_project_defined, std::optional< UUID > uuid, std::optional< char * > auth_token)
static void userpref_blend_read_data(BlendDataReader *, SpaceLink *sl)
void ED_region_panels(const bContext *C, ARegion *region)
Definition area.cc:3999
struct bUserAssetLibrary bUserAssetLibrary * BKE_preferences_project_remote_asset_library_add(UserDef *userdef, const char *name, const char *remote_url, const char *auth_token) ATTR_NONNULL(1
static void userpref_main_region_init(wmWindowManager *wm, ARegion *region)
Vector< int > ED_userpref_tabs_list(SpaceUserPref *prefs)
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
Definition wm_keymap.cc:935
static void userpref_init(wmWindowManager *, ScrArea *)
static bool property_search_for_context(const bContext *C, ARegion *region, SpaceProperties *sbuts)
static void userpref_main_region_property_search(const bContext *C, SpaceUserPref *sprefs, ARegion *region)
wmEventHandler_Keymap * WM_event_add_keymap_handler(ListBaseT< wmEventHandler > *handlers, wmKeyMap *keymap)
bool RNA_enum_id_from_value(const EnumPropertyItem *item, int value, const char **r_identifier)
ARegion * BKE_area_region_new()
Definition screen.cc:522
const char * ED_userpref_search_string_get(SpaceUserPref *sprefs)
void ED_region_panels_layout_ex(const bContext *C, ARegion *region, ListBaseT< PanelType > *paneltypes, wm::OpCallContext op_context, const char *contexts[], const char *category_override)
Definition area.cc:3524
void BLI_insertlinkbefore(ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
Definition listbase.cc:378
void BLI_str_tolower_ascii(char *str, size_t len) ATTR_NONNULL(1)
@ ED_KEYMAP_UI
Definition ED_screen.hh:852
@ ED_KEYMAP_NAVBAR
Definition ED_screen.hh:861
@ ED_KEYMAP_HEADER
Definition ED_screen.hh:858
@ ED_KEYMAP_VIEW2D
Definition ED_screen.hh:855
int ED_userpref_search_string_length(SpaceUserPref *sprefs)
void ED_userpref_search_string_set(SpaceUserPref *sprefs, const char *value)
ARegion * BKE_area_find_region_type(const ScrArea *area, int region_type)
Definition screen.cc:1024
@ V2D_SCROLL_VERTICAL_HIDE
const EnumPropertyItem rna_enum_preference_section_items[]
void void void BLI_path_split_file_part(const char *filepath, char *file, size_t file_maxncpy) ATTR_NONNULL(1
void ED_spacetype_userpref()
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:118
static void userpref_keymap(wmKeyConfig *keyconf)
static void userpref_execute_region_init(wmWindowManager *wm, ARegion *region)
void BKE_spacetype_register(std::unique_ptr< SpaceType > st)
Definition screen.cc:379
static void userpref_navigation_region_listener(const wmRegionListenerParams *)
static bool userpref_execute_region_poll(const RegionPollParams *params)
void ED_region_header_init(ARegion *region)
Definition area.cc:4406
static void userpref_header_region_init(wmWindowManager *, ARegion *region)
void CTX_wm_region_set(bContext *C, ARegion *region)
void ED_region_panels_layout(const bContext *C, ARegion *region)
Definition area.cc:3835
@ RGN_FLAG_INDICATE_OVERFLOW
@ RGN_FLAG_NO_USER_RESIZE
@ RGN_FLAG_SEARCH_FILTER_ACTIVE
@ RGN_FLAG_SEARCH_FILTER_UPDATE
void ED_userpref_asset_library_active_set(const struct bUserAssetLibrary &asset_library)
void ED_region_header(const bContext *C, ARegion *region)
Definition area.cc:4391
static void userpref_search_move_to_next_tab_with_results(SpaceUserPref *sbuts, const Span< int > context_tabs_array)
void ED_region_panels_draw(const bContext *C, ARegion *region)
Definition area.cc:3916
void ED_region_panels_init(wmWindowManager *wm, ARegion *region)
Definition area.cc:4006
static void userpref_execute_region_listener(const wmRegionListenerParams *)
static void userpref_space_blend_write(BlendWriter *writer, SpaceLink *sl)
static void userpref_navigation_region_init(wmWindowManager *wm, ARegion *region)
void CTX_wm_area_set(bContext *C, ScrArea *area)
ARegionTypeFlag flag
void(*) draw(const bContext *C, ARegion *region)
void(*) listener(const wmRegionListenerParams *params)
void(*) layout(const bContext *C, ARegion *region)
bool(*) poll(const RegionPollParams *params)
ListBaseT< PanelType > paneltypes
void(*) init(wmWindowManager *wm, ARegion *region)
ListBaseT< Panel > panels
bke::ARegionRuntime * runtime
eRegion_Alignment alignment
eRegion_Type regiontype
void write_struct_cast(const void *data, BlendStructWriterTypedFn< T > fn=nullptr)
ListBaseT< SpaceLink > spacedata
struct SpaceType * type
std::array< bool, USER_SECTION_DEVELOPER_TOOLS *2 > tab_search_results
SpaceUserPref_Runtime * runtime
ListBaseT< ARegion > regionbase
eView2D_KeepZoom keepzoom
eView2D_Scroll scroll
ListBaseT< wmEventHandler > handlers
struct ARegionType * type