Blender V5.0
space_buttons.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 "MEM_guardedalloc.h"
12
13#include "DNA_scene_types.h"
14#include "DNA_sequence_types.h"
15#include "DNA_space_types.h"
16#include "DNA_view2d_types.h"
17
18#include "BLI_bitmap.h"
19#include "BLI_listbase.h"
20#include "BLI_span.hh"
21#include "BLI_string.h"
22#include "BLI_string_ref.hh"
23#include "BLI_string_utf8.h"
24#include "BLI_utildefines.h"
25
26#include "BKE_context.hh"
27#include "BKE_lib_query.hh"
28#include "BKE_lib_remap.hh"
29#include "BKE_modifier.hh"
30#include "BKE_screen.hh"
31#include "BKE_shader_fx.h"
32
33#include "BLT_translation.hh"
34
35#include "ED_buttons.hh"
36#include "ED_screen.hh"
37#include "ED_space_api.hh"
38#include "ED_view3d.hh" /* To draw toolbar UI. */
39
40#include "WM_api.hh"
41#include "WM_message.hh"
42#include "WM_types.hh"
43
44#include "RNA_access.hh"
45#include "RNA_prototypes.hh"
46
47#include "SEQ_modifier.hh"
48
49#include "UI_interface.hh"
50#include "UI_interface_c.hh"
52#include "UI_view2d.hh"
53
54#include "BLO_read_write.hh"
55
56#include "buttons_intern.hh" /* own include */
57
58/* -------------------------------------------------------------------- */
61
62static SpaceLink *buttons_create(const ScrArea * /*area*/, const Scene * /*scene*/)
63{
64 ARegion *region;
65 SpaceProperties *sbuts;
66
67 sbuts = MEM_callocN<SpaceProperties>("initbuts");
69 sbuts->mainb = sbuts->mainbuser = BCONTEXT_OBJECT;
70 sbuts->visible_tabs = uint(-1); /* 0xFFFFFFFF - All tabs visible by default. */
71
72 /* header */
73 region = BKE_area_region_new();
74
75 BLI_addtail(&sbuts->regionbase, region);
78
79 /* navigation bar */
80 region = BKE_area_region_new();
81
82 BLI_addtail(&sbuts->regionbase, region);
84 region->alignment = RGN_ALIGN_LEFT;
85
86#if 0
87 /* context region */
88 region = BKE_area_region_new();
89 BLI_addtail(&sbuts->regionbase, region);
91 region->alignment = RGN_ALIGN_TOP;
92#endif
93
94 /* main region */
95 region = BKE_area_region_new();
96
97 BLI_addtail(&sbuts->regionbase, region);
99
100 return (SpaceLink *)sbuts;
101}
102
103/* Doesn't free the space-link itself. */
104static void buttons_free(SpaceLink *sl)
105{
106 SpaceProperties *sbuts = (SpaceProperties *)sl;
107
108 if (sbuts->path) {
109 MEM_delete(static_cast<ButsContextPath *>(sbuts->path));
110 }
111
112 if (sbuts->texuser) {
113 ButsContextTexture *ct = static_cast<ButsContextTexture *>(sbuts->texuser);
115 MEM_delete(user);
116 }
118 MEM_freeN(ct);
119 }
120
121 if (sbuts->runtime != nullptr) {
123 MEM_freeN(sbuts->runtime);
124 }
125}
126
127/* spacetype; init callback */
128static void buttons_init(wmWindowManager * /*wm*/, ScrArea *area)
129{
131
132 if (sbuts->runtime == nullptr) {
134 sbuts->runtime->search_string[0] = '\0';
135 sbuts->runtime->tab_search_results = BLI_BITMAP_NEW(BCONTEXT_TOT * 2, __func__);
136 }
137}
138
140{
141 SpaceProperties *sfile_old = (SpaceProperties *)sl;
142 SpaceProperties *sbutsn = static_cast<SpaceProperties *>(MEM_dupallocN(sl));
143
144 /* clear or remove stuff from old */
145 sbutsn->path = nullptr;
146 sbutsn->texuser = nullptr;
147 if (sfile_old->runtime != nullptr) {
148 sbutsn->runtime = static_cast<SpaceProperties_Runtime *>(MEM_dupallocN(sfile_old->runtime));
149 sbutsn->runtime->search_string[0] = '\0';
151 }
152
153 return (SpaceLink *)sbutsn;
154}
155
156/* add handlers, stuff you only do once or on area/region changes */
158{
159 wmKeyMap *keymap;
160
161 ED_region_panels_init(wm, region);
162
164
165 keymap = WM_keymap_ensure(
166 wm->runtime->defaultconf, "Property Editor", SPACE_PROPERTIES, RGN_TYPE_WINDOW);
167 WM_event_add_keymap_handler(&region->runtime->handlers, keymap);
168}
169
171
172/* -------------------------------------------------------------------- */
175
176void ED_buttons_visible_tabs_menu(bContext *C, uiLayout *layout, void * /*arg*/)
177{
179 reinterpret_cast<ID *>(CTX_wm_screen(C)), &RNA_SpaceProperties, CTX_wm_space_properties(C));
180
181 /* These can be reordered freely. */
182 constexpr std::array<blender::StringRefNull, BCONTEXT_TOT> filter_items = {
183 "show_properties_tool", "show_properties_render",
184 "show_properties_output", "show_properties_view_layer",
185 "show_properties_scene", "show_properties_world",
186 "show_properties_collection", "show_properties_object",
187 "show_properties_modifiers", "show_properties_effects",
188 "show_properties_particles", "show_properties_physics",
189 "show_properties_constraints", "show_properties_data",
190 "show_properties_bone", "show_properties_bone_constraints",
191 "show_properties_material", "show_properties_texture",
192 "show_properties_strip", "show_properties_strip_modifier",
193 };
194
195 for (blender::StringRefNull item : filter_items) {
196 layout->prop(&ptr, item, UI_ITEM_R_TOGGLE, std::nullopt, ICON_NONE);
197 }
198}
199
200void ED_buttons_navbar_menu(bContext *C, uiLayout *layout, void * /*arg*/)
201{
202 ED_screens_region_flip_menu_create(C, layout, nullptr);
204 layout->op("SCREEN_OT_region_toggle", IFACE_("Hide"), ICON_NONE);
205}
206
208 bool apply_filter)
209{
211 const int filter = sbuts->visible_tabs;
212
213 auto add_spacer = [&]() {
214 if (!tabs.is_empty() && tabs.last() != BCONTEXT_SEPARATOR) {
216 }
217 };
218
219 auto add_tab = [&](eSpaceButtons_Context tab) {
220 if (sbuts->pathflag & (1 << tab) && (!apply_filter || filter & (1 << tab))) {
221 tabs.append(tab);
222 }
223 };
224
225 add_tab(BCONTEXT_TOOL);
226
227 add_spacer();
228
229 add_tab(BCONTEXT_RENDER);
230 add_tab(BCONTEXT_OUTPUT);
231 add_tab(BCONTEXT_VIEW_LAYER);
232 add_tab(BCONTEXT_SCENE);
233 add_tab(BCONTEXT_WORLD);
234
235 add_spacer();
236
237 add_tab(BCONTEXT_COLLECTION);
238
239 add_spacer();
240
241 add_tab(BCONTEXT_OBJECT);
242 add_tab(BCONTEXT_MODIFIER);
243 add_tab(BCONTEXT_SHADERFX);
244 add_tab(BCONTEXT_PARTICLE);
245 add_tab(BCONTEXT_PHYSICS);
246 add_tab(BCONTEXT_CONSTRAINT);
247 add_tab(BCONTEXT_DATA);
248 add_tab(BCONTEXT_BONE);
250 add_tab(BCONTEXT_MATERIAL);
251
252 add_spacer();
253
254 add_tab(BCONTEXT_TEXTURE);
255
256 add_spacer();
257
258 add_tab(BCONTEXT_STRIP);
260
261 return tabs;
262}
263
264static const char *buttons_main_region_context_string(const short mainb)
265{
266 switch (mainb) {
267 case BCONTEXT_SCENE:
268 return "scene";
269 case BCONTEXT_RENDER:
270 return "render";
271 case BCONTEXT_OUTPUT:
272 return "output";
274 return "view_layer";
275 case BCONTEXT_WORLD:
276 return "world";
278 return "collection";
279 case BCONTEXT_OBJECT:
280 return "object";
281 case BCONTEXT_DATA:
282 return "data";
284 return "material";
285 case BCONTEXT_TEXTURE:
286 return "texture";
288 return "particle";
289 case BCONTEXT_PHYSICS:
290 return "physics";
291 case BCONTEXT_BONE:
292 return "bone";
294 return "modifier";
296 return "shaderfx";
298 return "constraint";
300 return "bone_constraint";
301 case BCONTEXT_TOOL:
302 return "tool";
303 case BCONTEXT_STRIP:
304 return "strip";
306 return "strip_modifier";
307 }
308
309 /* All the cases should be handled. */
310 BLI_assert(false);
311 return "";
312}
313
315 SpaceProperties *sbuts,
316 ARegion *region)
317{
319
320 const char *contexts[2] = {buttons_main_region_context_string(sbuts->mainb), nullptr};
321
323 region,
324 &region->runtime->type->paneltypes,
326 contexts,
327 nullptr);
328}
329
331
332/* -------------------------------------------------------------------- */
335
337{
338 return (sbuts->runtime) ? sbuts->runtime->search_string : "";
339}
340
342{
343 return (sbuts->runtime) ? STRNLEN(sbuts->runtime->search_string) : 0;
344}
345
346void ED_buttons_search_string_set(SpaceProperties *sbuts, const char *value)
347{
348 if (sbuts->runtime) {
349 STRNCPY_UTF8(sbuts->runtime->search_string, value);
350 }
351}
352
354{
355 if (!sbuts->runtime) {
356 return false;
357 }
358 return BLI_BITMAP_TEST(sbuts->runtime->tab_search_results, index);
359}
360
362
363/* -------------------------------------------------------------------- */
366
368{
369 const char *contexts[2] = {buttons_main_region_context_string(sbuts->mainb), nullptr};
370
371 if (sbuts->mainb == BCONTEXT_TOOL) {
372 return false;
373 }
374
377 C, region, &region->runtime->type->paneltypes, contexts, nullptr);
378}
379
381 SpaceProperties *sbuts, blender::Span<eSpaceButtons_Context> context_tabs_array)
382{
383 /* As long as all-tab search in the tool is disabled in the tool context, don't move from it. */
384 if (sbuts->mainb == BCONTEXT_TOOL) {
385 return;
386 }
387
388 int current_tab_index = 0;
389 for (int i = 0; i < context_tabs_array.size(); i++) {
390 if (sbuts->mainb == context_tabs_array[i]) {
391 current_tab_index = i;
392 break;
393 }
394 }
395
396 /* Try the tabs after the current tab. */
397 for (int i = current_tab_index; i < context_tabs_array.size(); i++) {
399 sbuts->mainbuser = context_tabs_array[i];
400 return;
401 }
402 }
403
404 /* Try the tabs before the current tab. */
405 for (int i = 0; i < current_tab_index; i++) {
407 sbuts->mainbuser = context_tabs_array[i];
408 return;
409 }
410 }
411}
412
414 SpaceProperties *sbuts,
415 ARegion *region_original,
416 blender::Span<eSpaceButtons_Context> context_tabs_array)
417{
418 /* Use local copies of the area and duplicate the region as a mainly-paranoid protection
419 * against changing any of the space / region data while running the search. */
420 ScrArea *area_original = CTX_wm_area(C);
421 ScrArea area_copy = blender::dna::shallow_copy(*area_original);
422 ARegion *region_copy = BKE_area_region_copy(area_copy.type, region_original);
423 /* Set the region visible field. Otherwise some layout code thinks we're drawing in a popup.
424 * This likely isn't necessary, but it's nice to emulate a "real" region where possible. */
425 region_copy->runtime->visible = true;
426 CTX_wm_area_set((bContext *)C, &area_copy);
427 CTX_wm_region_set((bContext *)C, region_copy);
428
429 SpaceProperties sbuts_copy = blender::dna::shallow_copy(*sbuts);
430 sbuts_copy.path = nullptr;
431 sbuts_copy.texuser = nullptr;
432 sbuts_copy.runtime = static_cast<SpaceProperties_Runtime *>(MEM_dupallocN(sbuts->runtime));
433 sbuts_copy.runtime->tab_search_results = nullptr;
434 BLI_listbase_clear(&area_copy.spacedata);
435 BLI_addtail(&area_copy.spacedata, &sbuts_copy);
436
437 /* Loop through the tabs added to the properties editor. */
438 for (int i = 0; i < context_tabs_array.size(); i++) {
439 /* -1 corresponds to a spacer. */
440 if (context_tabs_array[i] == -1) {
441 continue;
442 }
443
444 /* Handle search for the current tab in the normal layout pass. */
445 if (context_tabs_array[i] == sbuts->mainb) {
446 continue;
447 }
448
449 sbuts_copy.mainb = sbuts_copy.mainbo = sbuts_copy.mainbuser = context_tabs_array[i];
450
451 /* Actually do the search and store the result in the bitmap. */
453 i,
454 property_search_for_context(C, region_copy, &sbuts_copy));
455
456 UI_blocklist_free(C, region_copy);
457 }
458
459 BKE_area_region_free(area_copy.type, region_copy);
460 MEM_freeN(region_copy);
461 buttons_free((SpaceLink *)&sbuts_copy);
462
463 CTX_wm_area_set((bContext *)C, area_original);
464 CTX_wm_region_set((bContext *)C, region_original);
465}
466
472 SpaceProperties *sbuts,
473 ARegion *region)
474{
475 /* Theoretical maximum of every context shown with a spacer between every tab. */
476 const blender::Vector<eSpaceButtons_Context> context_tabs_array = ED_buttons_tabs_list(sbuts);
477
478 property_search_all_tabs(C, sbuts, region, context_tabs_array);
479
480 /* Check whether the current tab has a search match. */
481 bool current_tab_has_search_match = false;
482 LISTBASE_FOREACH (Panel *, panel, &region->panels) {
484 current_tab_has_search_match = true;
485 }
486 }
487
488 /* Find which index in the list the current tab corresponds to. */
489 int current_tab_index = -1;
490 for (const int i : context_tabs_array.index_range()) {
491 if (context_tabs_array[i] == sbuts->mainb) {
492 current_tab_index = i;
493 }
494 }
495 BLI_assert(current_tab_index != -1);
496
497 /* Update the tab search match flag for the current tab. */
499 sbuts->runtime->tab_search_results, current_tab_index, current_tab_has_search_match);
500
501 /* Move to the next tab with a result */
502 if (!current_tab_has_search_match) {
503 if (region->flag & RGN_FLAG_SEARCH_FILTER_UPDATE) {
504 property_search_move_to_next_tab_with_results(sbuts, context_tabs_array);
505 }
506 }
507}
508
510
511/* -------------------------------------------------------------------- */
514
516{
517 using namespace blender;
518 const Vector<eSpaceButtons_Context> tabs_array_no_filter = ED_buttons_tabs_list(sbuts, false);
519 const Vector<eSpaceButtons_Context> tabs_array = ED_buttons_tabs_list(sbuts);
520
521 const int old_index = tabs_array_no_filter.first_index_of(eSpaceButtons_Context(sbuts->mainb));
522
523 /* Try to find next tab to switch to. */
525 for (int i = old_index; i < tabs_array_no_filter.size(); i += iter_step) {
526 const eSpaceButtons_Context candidate_tab = tabs_array_no_filter[i];
527
528 if (candidate_tab == BCONTEXT_SEPARATOR) {
529 continue;
530 }
531
532 const int found_tab_index = tabs_array.first_index_of_try(candidate_tab);
533
534 if (found_tab_index != -1) {
535 new_tab = tabs_array[found_tab_index];
536 break;
537 }
538 }
539
540 return new_tab;
541}
542
543/* Change active tab, if it was hidden. */
545{
546 const bool tab_was_hidden = ((1 << sbuts->mainb) & sbuts->visible_tabs) == 0;
547 if (!tab_was_hidden) {
548 return;
549 }
550
552
553 /* Try to find previous tab to switch to. */
554 if (int(new_tab) == -1) {
555 new_tab = find_new_properties_tab(sbuts, -1);
556 }
557
558 if (int(new_tab) == -1) {
559 new_tab = eSpaceButtons_Context(1 << BCONTEXT_TOOL);
561 }
562
563 sbuts->mainb = new_tab;
564 sbuts->mainbuser = new_tab;
565}
566
567static void buttons_main_region_layout(const bContext *C, ARegion *region)
568{
569 /* draw entirely, view changes should be handled here */
571
572 /* Needed for RNA to get the good values! */
574
575 if (ED_buttons_tabs_list(sbuts).is_empty()) {
578 return;
579 }
580
582
583 if (sbuts->mainb == BCONTEXT_TOOL) {
584 ED_view3d_buttons_region_layout_ex(C, region, "Tool");
585 }
586 else {
588 }
589
590 if (region->flag & RGN_FLAG_SEARCH_FILTER_ACTIVE) {
592 }
593
594 sbuts->mainbo = sbuts->mainb;
595}
596
598{
599 ARegion *region = params->region;
600 const wmNotifier *wmn = params->notifier;
601
602 /* context changes */
603 switch (wmn->category) {
604 case NC_SCREEN:
605 if (ELEM(wmn->data, ND_LAYER)) {
606 ED_region_tag_redraw(region);
607 }
608 break;
609 }
610}
611
621
622static void buttons_keymap(wmKeyConfig *keyconf)
623{
624 WM_keymap_ensure(keyconf, "Property Editor", SPACE_PROPERTIES, RGN_TYPE_WINDOW);
625}
626
628
629/* -------------------------------------------------------------------- */
632
633/* add handlers, stuff you only do once or on area/region changes */
635{
636 ED_region_header_init(region);
637}
638
639static void buttons_header_region_draw(const bContext *C, ARegion *region)
640{
642
643 /* Needed for RNA to get the good values! */
645
646 ED_region_header(C, region);
647}
648
650{
651 wmMsgBus *mbus = params->message_bus;
652 ScrArea *area = params->area;
653 ARegion *region = params->region;
654 SpaceProperties *sbuts = static_cast<SpaceProperties *>(area->spacedata.first);
655
656 wmMsgSubscribeValue msg_sub_value_region_tag_redraw{};
657 msg_sub_value_region_tag_redraw.owner = region;
658 msg_sub_value_region_tag_redraw.user_data = region;
659 msg_sub_value_region_tag_redraw.notify = ED_region_do_msg_notify_tag_redraw;
660
661 /* Don't check for SpaceProperties.mainb here, we may toggle between view-layers
662 * where one has no active object, so that available contexts changes. */
663 WM_msg_subscribe_rna_anon_prop(mbus, Window, view_layer, &msg_sub_value_region_tag_redraw);
664
666 WM_msg_subscribe_rna_anon_prop(mbus, ViewLayer, name, &msg_sub_value_region_tag_redraw);
667 }
668
669 if (sbuts->mainb == BCONTEXT_TOOL) {
670 WM_msg_subscribe_rna_anon_prop(mbus, WorkSpace, tools, &msg_sub_value_region_tag_redraw);
671 }
672}
673
675
676/* -------------------------------------------------------------------- */
679
687
689{
692
693 LISTBASE_FOREACH (PanelType *, pt, &region->runtime->type->paneltypes) {
694 pt->flag |= PANEL_TYPE_LAYOUT_VERT_BAR;
695 }
696
697 ED_region_panels_layout(C, region);
698 /* #ED_region_panels_layout adds vertical scroll-bars, we don't want them. */
700 ED_region_panels_draw(C, region);
701}
702
705{
706 wmMsgBus *mbus = params->message_bus;
707 ARegion *region = params->region;
708
709 wmMsgSubscribeValue msg_sub_value_region_tag_redraw{};
710 msg_sub_value_region_tag_redraw.owner = region;
711 msg_sub_value_region_tag_redraw.user_data = region;
712 msg_sub_value_region_tag_redraw.notify = ED_region_do_msg_notify_tag_redraw;
713
714 WM_msg_subscribe_rna_anon_prop(mbus, Window, view_layer, &msg_sub_value_region_tag_redraw);
715 /* Redraw when image editor mode changes, texture tab needs to be added when switching to "Paint"
716 * mode. */
718 mbus, SpaceImageEditor, ui_mode, &msg_sub_value_region_tag_redraw);
719}
720
721/* draw a certain button set only if properties area is currently
722 * showing that button set, to reduce unnecessary drawing. */
723static void buttons_area_redraw(ScrArea *area, short buttons)
724{
725 SpaceProperties *sbuts = static_cast<SpaceProperties *>(area->spacedata.first);
726
727 /* if the area's current button set is equal to the one to redraw */
728 if (sbuts->mainb == buttons) {
729 ED_area_tag_redraw(area);
730 }
731}
732
734
735/* -------------------------------------------------------------------- */
738
739/* reused! */
741{
742 ScrArea *area = params->area;
743 const wmNotifier *wmn = params->notifier;
744 SpaceProperties *sbuts = static_cast<SpaceProperties *>(area->spacedata.first);
745
746 /* context changes */
747 switch (wmn->category) {
748 case NC_SCENE:
749 switch (wmn->data) {
754 break;
755 case ND_WORLD:
757 sbuts->preview = 1;
758 break;
759 case ND_FRAME:
760 /* any buttons area can have animated properties so redraw all */
761 ED_area_tag_redraw(area);
762 sbuts->preview = 1;
763 break;
764 case ND_OB_ACTIVE:
765 ED_area_tag_redraw(area);
766 sbuts->preview = 1;
767 break;
768 case ND_KEYINGSET:
770 break;
771 case ND_RENDER_RESULT:
772 break;
773 case ND_SEQUENCER:
774 ED_area_tag_redraw(area);
775 break;
776 case ND_MODE:
777 case ND_LAYER:
778 default:
779 ED_area_tag_redraw(area);
780 break;
781 }
782 break;
783 case NC_OBJECT:
784 switch (wmn->data) {
785 case ND_TRANSFORM:
787 buttons_area_redraw(area, BCONTEXT_DATA); /* Auto-texture-space flag. */
788 break;
789 case ND_POSE:
790 case ND_BONE_ACTIVE:
791 case ND_BONE_SELECT:
796 break;
797 case ND_MODIFIER:
798 if (wmn->action == NA_RENAME) {
799 ED_area_tag_redraw(area);
800 }
801 else {
803 }
805 break;
806 case ND_CONSTRAINT:
809 break;
810 case ND_SHADERFX:
812 break;
813 case ND_PARTICLE:
814 if (wmn->action == NA_EDITED) {
816 }
817 sbuts->preview = 1;
818 break;
819 case ND_DRAW:
823 /* Needed to refresh context path when changing active particle system index. */
826 break;
827 case ND_DRAW_ANIMVIZ:
829 break;
830 default:
831 /* Not all object RNA props have a ND_ notifier (yet) */
832 ED_area_tag_redraw(area);
833 break;
834 }
835 break;
836 case NC_GEOM:
837 switch (wmn->data) {
838 case ND_SELECT:
839 case ND_DATA:
840 case ND_VERTEX_GROUP:
841 ED_area_tag_redraw(area);
842 break;
843 }
844 break;
845 case NC_MATERIAL:
846 ED_area_tag_redraw(area);
847 switch (wmn->data) {
848 case ND_SHADING:
849 case ND_SHADING_DRAW:
850 case ND_SHADING_LINKS:
852 case ND_NODES:
853 /* currently works by redraws... if preview is set, it (re)starts job */
854 sbuts->preview = 1;
855 break;
856 }
857 break;
858 case NC_WORLD:
860 sbuts->preview = 1;
861 break;
862 case NC_LAMP:
864 sbuts->preview = 1;
865 break;
866 case NC_GROUP:
868 break;
869 case NC_BRUSH:
872 sbuts->preview = 1;
873 break;
874 case NC_TEXTURE:
875 case NC_IMAGE:
876 if (wmn->action != NA_PAINTING) {
877 ED_area_tag_redraw(area);
878 sbuts->preview = 1;
879 }
880 break;
881 case NC_WORKSPACE:
883 break;
884 case NC_SPACE:
885 if (wmn->data == ND_SPACE_PROPERTIES) {
886 ED_area_tag_redraw(area);
887 }
888 else if (wmn->data == ND_SPACE_CHANGED) {
889 ED_area_tag_redraw(area);
890 sbuts->preview = 1;
891 }
892 break;
893 case NC_ID:
894 if (ELEM(wmn->action, NA_RENAME, NA_EDITED)) {
895 ED_area_tag_redraw(area);
896 }
897 break;
898 case NC_ANIMATION:
899 switch (wmn->data) {
900 case ND_KEYFRAME_PROP:
901 case ND_NLA_ACTCHANGE:
902 ED_area_tag_redraw(area);
903 break;
904 case ND_KEYFRAME:
905 if (ELEM(wmn->action, NA_EDITED, NA_ADDED, NA_REMOVED)) {
906 ED_area_tag_redraw(area);
907 }
908 break;
909 case ND_ANIMCHAN:
910 if (wmn->action == NA_SELECTED) {
911 ED_area_tag_redraw(area);
912 }
913 break;
914 }
915 break;
916 case NC_GPENCIL:
917 if (wmn->data == ND_DATA) {
919 ED_area_tag_redraw(area);
920 }
921 }
922 else if (wmn->action == NA_EDITED) {
923 ED_area_tag_redraw(area);
924 }
925 break;
926 case NC_NODE:
927 if (wmn->action == NA_SELECTED) {
928 ED_area_tag_redraw(area);
929 /* new active node, update texture preview */
930 if (sbuts->mainb == BCONTEXT_TEXTURE) {
931 sbuts->preview = 1;
932 }
933 }
934 break;
935 /* Listener for preview render, when doing an global undo. */
936 case NC_WM:
937 if (wmn->data == ND_UNDO) {
938 ED_area_tag_redraw(area);
939 sbuts->preview = 1;
940 }
941 break;
942 case NC_SCREEN:
943 if (wmn->data == ND_LAYOUTSET) {
944 ED_area_tag_redraw(area);
945 sbuts->preview = 1;
946 }
947 break;
948#ifdef WITH_FREESTYLE
949 case NC_LINESTYLE:
950 ED_area_tag_redraw(area);
951 sbuts->preview = 1;
952 break;
953#endif
954 }
955
956 if (wmn->data == ND_KEYS) {
957 ED_area_tag_redraw(area);
958 }
959}
960
961static void buttons_id_remap(ScrArea * /*area*/,
962 SpaceLink *slink,
963 const blender::bke::id::IDRemapper &mappings)
964{
965 SpaceProperties *sbuts = (SpaceProperties *)slink;
966
968 sbuts->flag &= ~SB_PIN_CONTEXT;
969 }
970
971 if (sbuts->path) {
972 ButsContextPath *path = static_cast<ButsContextPath *>(sbuts->path);
973 for (int i = 0; i < path->len; i++) {
974 switch (mappings.apply(&path->ptr[i].owner_id, ID_REMAP_APPLY_DEFAULT)) {
976 path->len = i;
977 if (i != 0) {
978 /* If the first item in the path is cleared, the whole path is cleared, so no need to
979 * clear further items here, see also at the end of this block. */
980 for (int j = i; j < path->len; j++) {
981 path->ptr[j] = {};
982 }
983 }
984 break;
985 }
987 path->ptr[i] = RNA_id_pointer_create(path->ptr[i].owner_id);
988 /* There is no easy way to check/make path downwards valid, just nullify it.
989 * Next redraw will rebuild this anyway. */
990 i++;
991 for (int j = i; j < path->len; j++) {
992 path->ptr[j] = {};
993 }
994 path->len = i;
995 break;
996 }
997
1000 /* Nothing to do. */
1001 break;
1002 }
1003 }
1004 }
1005 if (path->len == 0 && sbuts->path) {
1006 MEM_delete(static_cast<ButsContextPath *>(sbuts->path));
1007 sbuts->path = nullptr;
1008 }
1009 }
1010
1011 if (sbuts->texuser) {
1012 ButsContextTexture *ct = static_cast<ButsContextTexture *>(sbuts->texuser);
1013 mappings.apply(reinterpret_cast<ID **>(&ct->texture), ID_REMAP_APPLY_DEFAULT);
1015 MEM_delete(user);
1016 }
1018 ct->user = nullptr;
1019 }
1020}
1021
1023{
1024 SpaceProperties *sbuts = reinterpret_cast<SpaceProperties *>(space_link);
1025 const int data_flags = BKE_lib_query_foreachid_process_flags_get(data);
1026 const bool is_readonly = (data_flags & IDWALK_READONLY) != 0;
1027
1029 if (!is_readonly) {
1030 if (sbuts->pinid == nullptr) {
1031 sbuts->flag &= ~SB_PIN_CONTEXT;
1032 }
1033 /* NOTE: Restoring path pointers is complicated, if not impossible, because this contains
1034 * data pointers too, not just ID ones. See #40046. */
1035 if (sbuts->path) {
1036 MEM_delete(static_cast<ButsContextPath *>(sbuts->path));
1037 sbuts->path = nullptr;
1038 }
1039 }
1040
1041 if (sbuts->texuser) {
1042 ButsContextTexture *ct = static_cast<ButsContextTexture *>(sbuts->texuser);
1044
1045 if (!is_readonly) {
1047 MEM_delete(user);
1048 }
1050 ct->user = nullptr;
1051 }
1052 }
1053}
1054
1056{
1057 SpaceProperties *sbuts = (SpaceProperties *)sl;
1058
1059 sbuts->path = nullptr;
1060 sbuts->texuser = nullptr;
1061 sbuts->mainbo = sbuts->mainb;
1062 sbuts->mainbuser = sbuts->mainb;
1063 sbuts->runtime = nullptr;
1064}
1065
1067 ID * /*parent_id*/,
1068 SpaceLink *sl)
1069{
1070 SpaceProperties *sbuts = reinterpret_cast<SpaceProperties *>(sl);
1071
1072 if (sbuts->pinid == nullptr) {
1073 sbuts->flag &= ~SB_PIN_CONTEXT;
1074 }
1075}
1076
1078{
1079 BLO_write_struct(writer, SpaceProperties, sl);
1080}
1081
1083
1084/* -------------------------------------------------------------------- */
1087
1089{
1090 std::unique_ptr<SpaceType> st = std::make_unique<SpaceType>();
1091 ARegionType *art;
1092
1093 st->spaceid = SPACE_PROPERTIES;
1094 STRNCPY_UTF8(st->name, "Buttons");
1095
1096 st->create = buttons_create;
1097 st->free = buttons_free;
1098 st->init = buttons_init;
1099 st->duplicate = buttons_duplicate;
1100 st->operatortypes = buttons_operatortypes;
1101 st->keymap = buttons_keymap;
1102 st->listener = buttons_area_listener;
1103 st->context = buttons_context;
1104 st->id_remap = buttons_id_remap;
1105 st->foreach_id = buttons_foreach_id;
1106 st->blend_read_data = buttons_space_blend_read_data;
1107 st->blend_read_after_liblink = buttons_space_blend_read_after_liblink;
1108 st->blend_write = buttons_space_blend_write;
1109
1110 /* regions: main window */
1111 art = MEM_callocN<ARegionType>("spacetype buttons region");
1120 BLI_addhead(&st->regiontypes, art);
1121
1122 /* Register the panel types from modifiers. The actual panels are built per modifier rather
1123 * than per modifier type. */
1124 for (int i = 0; i < NUM_MODIFIER_TYPES; i++) {
1126 if (mti != nullptr && mti->panel_register != nullptr) {
1127 mti->panel_register(art);
1128 }
1129 }
1130 for (int i = 0; i < NUM_SHADER_FX_TYPES; i++) {
1132 continue;
1133 }
1135 if (fxti != nullptr && fxti->panel_register != nullptr) {
1136 fxti->panel_register(art);
1137 }
1138 }
1139 /* Register the panel types from strip modifiers. The actual panels are built per strip modifier
1140 * rather than per modifier type. */
1141 for (int i = 0; i < NUM_STRIP_MODIFIER_TYPES; i++) {
1143 if (mti != nullptr && mti->panel_register != nullptr) {
1144 mti->panel_register(art);
1145 }
1146 }
1147
1148 /* regions: header */
1149 art = MEM_callocN<ARegionType>("spacetype buttons region");
1151 art->prefsizey = HEADERY;
1153
1157 BLI_addhead(&st->regiontypes, art);
1158
1159 /* regions: navigation bar */
1160 art = MEM_callocN<ARegionType>("spacetype nav buttons region");
1162 art->prefsizex = AREAMINX;
1167 BLI_addhead(&st->regiontypes, art);
1168
1169 BKE_spacetype_register(std::move(st));
1170}
1171
bScreen * CTX_wm_screen(const bContext *C)
SpaceProperties * CTX_wm_space_properties(const bContext *C)
ScrArea * CTX_wm_area(const bContext *C)
void CTX_wm_area_set(bContext *C, ScrArea *area)
void CTX_wm_region_set(bContext *C, ARegion *region)
#define BKE_LIB_FOREACHID_PROCESS_IDSUPER(data_, id_super_, cb_flag_)
@ IDWALK_CB_DIRECT_WEAK_LINK
#define BKE_LIB_FOREACHID_PROCESS_ID(data_, id_, cb_flag_)
LibraryForeachIDFlag BKE_lib_query_foreachid_process_flags_get(const LibraryForeachIDData *data)
Definition lib_query.cc:129
@ IDWALK_READONLY
@ ID_REMAP_RESULT_SOURCE_REMAPPED
@ ID_REMAP_RESULT_SOURCE_UNASSIGNED
@ ID_REMAP_RESULT_SOURCE_NOT_MAPPABLE
@ ID_REMAP_RESULT_SOURCE_UNAVAILABLE
@ ID_REMAP_APPLY_DEFAULT
const ModifierTypeInfo * BKE_modifier_get_info(ModifierType type)
void BKE_spacetype_register(std::unique_ptr< SpaceType > st)
Definition screen.cc:282
ARegion * BKE_area_region_new()
Definition screen.cc:387
void BKE_area_region_free(SpaceType *st, ARegion *region)
Definition screen.cc:597
@ PANEL_TYPE_LAYOUT_VERT_BAR
ARegion * BKE_area_region_copy(const SpaceType *st, const ARegion *region)
Definition screen.cc:350
@ REGION_DRAW_LOCK_ALL
const ShaderFxTypeInfo * BKE_shaderfx_get_info(ShaderFxType type)
Definition shader_fx.cc:131
#define BLI_assert_unreachable()
Definition BLI_assert.h:93
#define BLI_assert(a)
Definition BLI_assert.h:46
#define BLI_BITMAP_NEW(_num, _alloc_string)
Definition BLI_bitmap.h:37
#define BLI_BITMAP_TEST(_bitmap, _index)
Definition BLI_bitmap.h:61
#define BLI_BITMAP_SET(_bitmap, _index, _set)
Definition BLI_bitmap.h:99
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(ListBase *lb)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:111
void BLI_addhead(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:91
#define STRNLEN(str)
Definition BLI_string.h:613
#define STRNCPY_UTF8(dst, src)
unsigned int uint
#define ELEM(...)
#define BLO_write_struct(writer, struct_name, data_ptr)
#define IFACE_(msgid)
@ NUM_MODIFIER_TYPES
#define HEADERY
#define AREAMINX
@ RGN_ALIGN_BOTTOM
@ RGN_ALIGN_LEFT
@ RGN_ALIGN_TOP
@ RGN_TYPE_CHANNELS
@ RGN_TYPE_WINDOW
@ RGN_TYPE_NAV_BAR
@ RGN_TYPE_HEADER
@ RGN_FLAG_SEARCH_FILTER_UPDATE
@ RGN_FLAG_NO_USER_RESIZE
@ RGN_FLAG_INDICATE_OVERFLOW
@ RGN_FLAG_SEARCH_FILTER_ACTIVE
@ NUM_STRIP_MODIFIER_TYPES
@ eShaderFxType_Light_deprecated
@ NUM_SHADER_FX_TYPES
@ SPACE_PROPERTIES
@ SB_PIN_CONTEXT
eSpaceButtons_Context
@ BCONTEXT_STRIP
@ BCONTEXT_CONSTRAINT
@ BCONTEXT_COLLECTION
@ BCONTEXT_OUTPUT
@ BCONTEXT_VIEW_LAYER
@ BCONTEXT_MATERIAL
@ BCONTEXT_TOT
@ BCONTEXT_SHADERFX
@ BCONTEXT_MODIFIER
@ BCONTEXT_BONE
@ BCONTEXT_DATA
@ BCONTEXT_OBJECT
@ BCONTEXT_BONE_CONSTRAINT
@ BCONTEXT_PHYSICS
@ BCONTEXT_SCENE
@ BCONTEXT_WORLD
@ BCONTEXT_RENDER
@ BCONTEXT_STRIP_MODIFIER
@ BCONTEXT_TEXTURE
@ BCONTEXT_TOOL
@ BCONTEXT_PARTICLE
@ BCONTEXT_SEPARATOR
@ USER_HEADER_BOTTOM
@ V2D_LOCKZOOM_X
@ V2D_LOCKZOOM_Y
@ V2D_SCROLL_VERTICAL
void ED_area_tag_redraw(ScrArea *area)
Definition area.cc:693
bool ED_region_property_search(const bContext *C, ARegion *region, ListBase *paneltypes, const char *contexts[], const char *category_override)
Definition area.cc:3723
void ED_region_header(const bContext *C, ARegion *region)
Definition area.cc:3935
void ED_region_header_init(ARegion *region)
Definition area.cc:3950
void ED_region_panels_layout(const bContext *C, ARegion *region)
Definition area.cc:3519
void ED_region_panels_init(wmWindowManager *wm, ARegion *region)
Definition area.cc:3616
void ED_region_panels_layout_ex(const bContext *C, ARegion *region, ListBase *paneltypes, blender::wm::OpCallContext op_context, const char *contexts[], const char *category_override)
Definition area.cc:3233
void ED_region_tag_redraw(ARegion *region)
Definition area.cc:618
@ ED_KEYMAP_NAVBAR
Definition ED_screen.hh:767
@ ED_KEYMAP_UI
Definition ED_screen.hh:758
@ ED_KEYMAP_HEADER
Definition ED_screen.hh:764
@ ED_KEYMAP_VIEW2D
Definition ED_screen.hh:761
@ ED_KEYMAP_FRAMES
Definition ED_screen.hh:763
void ED_screens_region_flip_menu_create(bContext *C, uiLayout *layout, void *arg)
void ED_region_do_msg_notify_tag_redraw(bContext *C, wmMsgSubscribeKey *msg_key, wmMsgSubscribeValue *msg_val)
Definition area.cc:361
void ED_region_panels_draw(const bContext *C, ARegion *region)
Definition area.cc:3529
void ED_view3d_buttons_region_layout_ex(const bContext *C, ARegion *region, const char *category_override)
#define Window
Read Guarded memory(de)allocation.
#define MEM_SAFE_FREE(v)
#define C
Definition RandGen.cpp:29
void UI_blocklist_free(const bContext *C, ARegion *region)
bool UI_panel_matches_search_filter(const Panel *panel)
bool UI_panel_is_active(const Panel *panel)
@ UI_ITEM_R_TOGGLE
View2D * UI_view2d_fromcontext(const bContext *C)
Definition view2d.cc:1855
#define ND_SEQUENCER
Definition WM_types.hh:437
#define NC_WORLD
Definition WM_types.hh:387
#define ND_SHADING
Definition WM_types.hh:477
#define ND_WORLD
Definition WM_types.hh:452
#define NC_ID
Definition WM_types.hh:395
#define NC_NODE
Definition WM_types.hh:394
#define NC_GEOM
Definition WM_types.hh:393
#define ND_NLA_ACTCHANGE
Definition WM_types.hh:498
#define ND_SPACE_CHANGED
Definition WM_types.hh:538
#define ND_DRAW
Definition WM_types.hh:461
#define NC_BRUSH
Definition WM_types.hh:385
#define ND_OB_ACTIVE
Definition WM_types.hh:440
#define ND_RENDER_RESULT
Definition WM_types.hh:446
#define NC_WM
Definition WM_types.hh:374
#define ND_DATA
Definition WM_types.hh:509
#define NC_LINESTYLE
Definition WM_types.hh:400
#define ND_RENDER_OPTIONS
Definition WM_types.hh:435
#define NC_ANIMATION
Definition WM_types.hh:388
#define ND_SHADING_PREVIEW
Definition WM_types.hh:480
#define ND_VERTEX_GROUP
Definition WM_types.hh:510
#define NC_SCREEN
Definition WM_types.hh:377
#define ND_MODE
Definition WM_types.hh:445
#define ND_SPACE_PROPERTIES
Definition WM_types.hh:529
#define ND_KEYINGSET
Definition WM_types.hh:448
#define NC_SCENE
Definition WM_types.hh:378
#define NA_ADDED
Definition WM_types.hh:586
#define NC_GROUP
Definition WM_types.hh:383
#define ND_NODES
Definition WM_types.hh:436
#define ND_MODIFIER
Definition WM_types.hh:462
#define ND_POSE
Definition WM_types.hh:458
#define NA_EDITED
Definition WM_types.hh:584
#define ND_PARTICLE
Definition WM_types.hh:465
#define ND_KEYFRAME_PROP
Definition WM_types.hh:495
#define NC_MATERIAL
Definition WM_types.hh:380
#define NC_LAMP
Definition WM_types.hh:382
#define NC_IMAGE
Definition WM_types.hh:384
#define ND_CONSTRAINT
Definition WM_types.hh:464
#define NC_WORKSPACE
Definition WM_types.hh:376
#define ND_UNDO
Definition WM_types.hh:417
#define ND_FRAME
Definition WM_types.hh:434
#define NA_REMOVED
Definition WM_types.hh:587
#define ND_SELECT
Definition WM_types.hh:508
#define NC_GPENCIL
Definition WM_types.hh:399
#define NC_TEXTURE
Definition WM_types.hh:381
#define ND_BONE_ACTIVE
Definition WM_types.hh:459
#define ND_TRANSFORM
Definition WM_types.hh:456
#define ND_LAYER
Definition WM_types.hh:450
#define ND_BONE_COLLECTION
Definition WM_types.hh:474
#define ND_KEYS
Definition WM_types.hh:463
#define NA_RENAME
Definition WM_types.hh:588
#define ND_SHADERFX
Definition WM_types.hh:471
#define NA_PAINTING
Definition WM_types.hh:591
#define ND_DRAW_ANIMVIZ
Definition WM_types.hh:473
#define ND_BONE_SELECT
Definition WM_types.hh:460
#define ND_KEYFRAME
Definition WM_types.hh:494
#define ND_LAYOUTSET
Definition WM_types.hh:426
#define NC_OBJECT
Definition WM_types.hh:379
#define ND_ANIMCHAN
Definition WM_types.hh:496
#define ND_SHADING_LINKS
Definition WM_types.hh:479
#define ND_SHADING_DRAW
Definition WM_types.hh:478
#define NC_SPACE
Definition WM_types.hh:392
#define NA_SELECTED
Definition WM_types.hh:589
#define U
BMesh const char void * data
int buttons_context(const bContext *C, const char *member, bContextDataResult *result)
void buttons_context_compute(const bContext *C, SpaceProperties *sbuts)
void buttons_context_register(ARegionType *art)
void BUTTONS_OT_toggle_pin(wmOperatorType *ot)
void BUTTONS_OT_context_menu(wmOperatorType *ot)
void BUTTONS_OT_directory_browse(wmOperatorType *ot)
void BUTTONS_OT_clear_filter(wmOperatorType *ot)
void BUTTONS_OT_file_browse(wmOperatorType *ot)
void BUTTONS_OT_start_filter(wmOperatorType *ot)
int64_t size() const
int64_t first_index_of(const T &value) const
int64_t first_index_of_try(const T &value) const
constexpr int64_t size() const
Definition BLI_span.hh:252
void append(const T &value)
const T & last(const int64_t n=0) const
bool is_empty() const
IndexRange index_range() const
IDRemapperApplyResult apply(ID **r_id_ptr, IDRemapperApplyOptions options, ID *id_self=nullptr) const
#define filter
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
void * MEM_mallocN(size_t len, const char *str)
Definition mallocn.cc:128
void * MEM_callocN(size_t len, const char *str)
Definition mallocn.cc:118
void * MEM_dupallocN(const void *vmemh)
Definition mallocn.cc:143
void MEM_freeN(void *vmemh)
Definition mallocn.cc:113
const StripModifierTypeInfo * modifier_type_info_get(int type)
const char * name
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
PointerRNA RNA_id_pointer_create(ID *id)
static void buttons_main_region_layout(const bContext *C, ARegion *region)
int ED_buttons_search_string_length(SpaceProperties *sbuts)
void ED_buttons_navbar_menu(bContext *C, uiLayout *layout, void *)
void ED_buttons_search_string_set(SpaceProperties *sbuts, const char *value)
static void buttons_space_blend_write(BlendWriter *writer, SpaceLink *sl)
static bool property_search_for_context(const bContext *C, ARegion *region, SpaceProperties *sbuts)
static void buttons_header_region_draw(const bContext *C, ARegion *region)
void ED_buttons_visible_tabs_menu(bContext *C, uiLayout *layout, void *)
static void buttons_main_region_property_search(const bContext *C, SpaceProperties *sbuts, ARegion *region)
const char * ED_buttons_search_string_get(SpaceProperties *sbuts)
static void buttons_navigation_bar_region_message_subscribe(const wmRegionMessageSubscribeParams *params)
static const char * buttons_main_region_context_string(const short mainb)
static void buttons_foreach_id(SpaceLink *space_link, LibraryForeachIDData *data)
blender::Vector< eSpaceButtons_Context > ED_buttons_tabs_list(const SpaceProperties *sbuts, bool apply_filter)
static void buttons_navigation_bar_region_draw(const bContext *C, ARegion *region)
static void buttons_init(wmWindowManager *, ScrArea *area)
static void buttons_main_region_init(wmWindowManager *wm, ARegion *region)
static void buttons_id_remap(ScrArea *, SpaceLink *slink, const blender::bke::id::IDRemapper &mappings)
static eSpaceButtons_Context find_new_properties_tab(const SpaceProperties *sbuts, int iter_step)
void ED_spacetype_buttons()
static void property_search_move_to_next_tab_with_results(SpaceProperties *sbuts, blender::Span< eSpaceButtons_Context > context_tabs_array)
static void buttons_navigation_bar_region_init(wmWindowManager *wm, ARegion *region)
static void buttons_main_region_listener(const wmRegionListenerParams *params)
static void property_search_all_tabs(const bContext *C, SpaceProperties *sbuts, ARegion *region_original, blender::Span< eSpaceButtons_Context > context_tabs_array)
static SpaceLink * buttons_create(const ScrArea *, const Scene *)
static void buttons_header_region_message_subscribe(const wmRegionMessageSubscribeParams *params)
static void buttons_main_region_layout_properties(const bContext *C, SpaceProperties *sbuts, ARegion *region)
static void buttons_area_redraw(ScrArea *area, short buttons)
static void buttons_space_blend_read_after_liblink(BlendLibReader *, ID *, SpaceLink *sl)
static void buttons_apply_filter(SpaceProperties *sbuts)
static void buttons_operatortypes()
static void buttons_header_region_init(wmWindowManager *, ARegion *region)
static void buttons_space_blend_read_data(BlendDataReader *, SpaceLink *sl)
bool ED_buttons_tab_has_search_result(SpaceProperties *sbuts, const int index)
static void buttons_free(SpaceLink *sl)
static SpaceLink * buttons_duplicate(SpaceLink *sl)
static void buttons_keymap(wmKeyConfig *keyconf)
static void buttons_area_listener(const wmSpaceTypeListenerParams *params)
void(* message_subscribe)(const wmRegionMessageSubscribeParams *params)
void(* listener)(const wmRegionListenerParams *params)
void(* draw)(const bContext *C, ARegion *region)
void(* layout)(const bContext *C, ARegion *region)
void(* init)(wmWindowManager *wm, ARegion *region)
ARegionRuntimeHandle * runtime
ListBase panels
PointerRNA ptr[8]
struct ButsTextureUser * user
Definition DNA_ID.h:414
void * first
void(* panel_register)(ARegionType *region_type)
ID * owner_id
Definition RNA_types.hh:51
ListBase spacedata
struct SpaceType * type
void(* panel_register)(struct ARegionType *region_type)
BLI_bitmap * tab_search_results
char search_string[UI_MAX_NAME_STR]
struct SpaceProperties_Runtime * runtime
short keepzoom
void(* panel_register)(ARegionType *region_type)
void operator_context_set(blender::wm::OpCallContext opcontext)
PointerRNA op(wmOperatorType *ot, std::optional< blender::StringRef > name, int icon, blender::wm::OpCallContext context, eUI_Item_Flag flag)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)
unsigned int data
Definition WM_types.hh:358
unsigned int action
Definition WM_types.hh:358
unsigned int category
Definition WM_types.hh:358
WindowManagerRuntimeHandle * runtime
i
Definition text_draw.cc:230
wmEventHandler_Keymap * WM_event_add_keymap_handler(ListBase *handlers, wmKeyMap *keymap)
PointerRNA * ptr
Definition wm_files.cc:4238
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
Definition wm_keymap.cc:895
#define WM_msg_subscribe_rna_anon_prop(mbus, type_, prop_, value)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))