Blender V5.3
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.hh"
19#include "BLI_listbase.hh"
20#include "BLI_span.hh"
21#include "BLI_string.hh"
22#include "BLI_string_ref.hh"
23#include "BLI_string_utf8.hh"
24#include "BLI_utildefines.hh"
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.hh"
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
58namespace blender {
59
60/* -------------------------------------------------------------------- */
63
64static SpaceLink *buttons_create(const ScrArea * /*area*/, const Scene * /*scene*/)
65{
66 ARegion *region;
67 SpaceProperties *sbuts;
68
69 sbuts = MEM_new<SpaceProperties>("initbuts");
70
71 sbuts->runtime = MEM_new<SpaceProperties_Runtime>(__func__);
72 sbuts->runtime->search_string[0] = '\0';
74
76 sbuts->mainb = sbuts->mainbuser = BCONTEXT_OBJECT;
77 sbuts->visible_tabs = uint(-1); /* 0xFFFFFFFF - All tabs visible by default. */
78
79 /* header */
80 region = BKE_area_region_new();
81
82 BLI_addtail(&sbuts->regionbase, region);
85
86 /* navigation bar */
87 region = BKE_area_region_new();
88
89 BLI_addtail(&sbuts->regionbase, region);
91 region->alignment = RGN_ALIGN_LEFT;
92
93#if 0
94 /* context region */
95 region = BKE_area_region_new();
96 BLI_addtail(&sbuts->regionbase, region);
98 region->alignment = RGN_ALIGN_TOP;
99#endif
100
101 /* main region */
102 region = BKE_area_region_new();
103
104 BLI_addtail(&sbuts->regionbase, region);
105 region->regiontype = RGN_TYPE_WINDOW;
106
107 return reinterpret_cast<SpaceLink *>(sbuts);
108}
109
110/* Doesn't free the space-link itself. */
111static void buttons_free(SpaceLink *sl)
112{
113 SpaceProperties *sbuts = reinterpret_cast<SpaceProperties *>(sl);
114
115 if (sbuts->path) {
116 MEM_delete(static_cast<ButsContextPath *>(sbuts->path));
117 }
118
119 if (sbuts->texuser) {
120 ButsContextTexture *ct = static_cast<ButsContextTexture *>(sbuts->texuser);
121 for (ButsTextureUser &user : ct->users.items_mutable()) {
122 MEM_delete(&user);
123 }
124 ct->users.clear_no_delete();
125 MEM_delete(ct);
126 }
127
128 MEM_SAFE_DELETE(sbuts->runtime->tab_search_results);
129 MEM_delete(sbuts->runtime);
130}
131
132/* spacetype; init callback */
133static void buttons_init(wmWindowManager * /*wm*/, ScrArea * /*area*/) {}
134
136{
137 SpaceProperties *sfile_old = reinterpret_cast<SpaceProperties *>(sl);
138 SpaceProperties *sbutsn = MEM_dupalloc(reinterpret_cast<SpaceProperties *>(sl));
139
140 /* clear or remove stuff from old */
141 sbutsn->path = nullptr;
142 sbutsn->texuser = nullptr;
143 sbutsn->runtime = MEM_new<SpaceProperties_Runtime>(__func__, *sfile_old->runtime);
144 sbutsn->runtime->search_string[0] = '\0';
146
147 return reinterpret_cast<SpaceLink *>(sbutsn);
148}
149
150/* add handlers, stuff you only do once or on area/region changes */
152{
153 wmKeyMap *keymap;
154
155 ED_region_panels_init(wm, region);
156
158
159 keymap = WM_keymap_ensure(
160 wm->runtime->defaultconf, "Property Editor", SPACE_PROPERTIES, RGN_TYPE_WINDOW);
162}
163
165
166/* -------------------------------------------------------------------- */
169
170void ED_buttons_visible_tabs_menu(bContext *C, ui::Layout *layout, void * /*arg*/)
171{
173 reinterpret_cast<ID *>(CTX_wm_screen(C)), RNA_SpaceProperties, CTX_wm_space_properties(C));
174
175 /* These can be reordered freely. */
176 constexpr std::array<StringRefNull, BCONTEXT_TOT> filter_items = {
177 "show_properties_tool",
178 "show_properties_render",
179 "show_properties_output",
180 "show_properties_scene",
181 "show_properties_view_layer",
182 "show_properties_compositor",
183 "show_properties_world",
184 "show_properties_collection",
185 "show_properties_object",
186 "show_properties_modifiers",
187 "show_properties_effects",
188 "show_properties_particles",
189 "show_properties_physics",
190 "show_properties_constraints",
191 "show_properties_data",
192 "show_properties_bone",
193 "show_properties_bone_constraints",
194 "show_properties_material",
195 "show_properties_texture",
196 "show_properties_strip",
197 "show_properties_strip_modifier",
198 };
199
200 for (StringRefNull item : filter_items) {
201 layout->prop(&ptr, item, ui::ITEM_R_TOGGLE, std::nullopt, ICON_NONE);
202 }
203}
204
205void ED_buttons_navbar_menu(bContext *C, ui::Layout *layout, void * /*arg*/)
206{
207 ED_screens_region_flip_menu_create(C, layout, nullptr);
209 layout->op("SCREEN_OT_region_toggle", IFACE_("Hide"), ICON_NONE);
210}
211
213{
215 const int filter = sbuts->visible_tabs;
216
217 auto add_spacer = [&]() {
218 if (!tabs.is_empty() && tabs.last() != BCONTEXT_SEPARATOR) {
220 }
221 };
222
223 auto add_tab = [&](eSpaceButtons_Context tab) {
224 if (sbuts->pathflag & (1 << tab) && (!apply_filter || filter & (1 << tab))) {
225 tabs.append(tab);
226 }
227 };
228
229 add_tab(BCONTEXT_TOOL);
230
231 add_spacer();
232
233 add_tab(BCONTEXT_RENDER);
234 add_tab(BCONTEXT_OUTPUT);
235 add_tab(BCONTEXT_SCENE);
236 add_tab(BCONTEXT_VIEW_LAYER);
237 add_tab(BCONTEXT_COMPOSITOR);
238 add_tab(BCONTEXT_WORLD);
239
240 add_spacer();
241
242 add_tab(BCONTEXT_COLLECTION);
243
244 add_spacer();
245
246 add_tab(BCONTEXT_OBJECT);
247 add_tab(BCONTEXT_MODIFIER);
248 add_tab(BCONTEXT_SHADERFX);
249 add_tab(BCONTEXT_PARTICLE);
250 add_tab(BCONTEXT_PHYSICS);
251 add_tab(BCONTEXT_CONSTRAINT);
252 add_tab(BCONTEXT_DATA);
253 add_tab(BCONTEXT_BONE);
255 add_tab(BCONTEXT_MATERIAL);
256
257 add_spacer();
258
259 add_tab(BCONTEXT_TEXTURE);
260
261 add_spacer();
262
263 add_tab(BCONTEXT_STRIP);
265
266 return tabs;
267}
268
269static const char *buttons_main_region_context_string(const short mainb)
270{
271 switch (mainb) {
272 case BCONTEXT_SCENE:
273 return "scene";
274 case BCONTEXT_RENDER:
275 return "render";
276 case BCONTEXT_OUTPUT:
277 return "output";
279 return "view_layer";
280 case BCONTEXT_WORLD:
281 return "world";
283 return "collection";
284 case BCONTEXT_OBJECT:
285 return "object";
286 case BCONTEXT_DATA:
287 return "data";
289 return "material";
290 case BCONTEXT_TEXTURE:
291 return "texture";
293 return "particle";
294 case BCONTEXT_PHYSICS:
295 return "physics";
296 case BCONTEXT_BONE:
297 return "bone";
299 return "modifier";
301 return "shaderfx";
303 return "constraint";
305 return "bone_constraint";
306 case BCONTEXT_TOOL:
307 return "tool";
308 case BCONTEXT_STRIP:
309 return "strip";
311 return "strip_modifier";
313 return "compositor";
314 }
315
316 /* All the cases should be handled. */
317 BLI_assert(false);
318 return "";
319}
320
322 SpaceProperties *sbuts,
323 ARegion *region)
324{
326
327 const char *contexts[2] = {buttons_main_region_context_string(sbuts->mainb), nullptr};
328
330 region,
331 &region->runtime->type->paneltypes,
333 contexts,
334 nullptr);
335}
336
338
339/* -------------------------------------------------------------------- */
342
344{
345 return (sbuts->runtime) ? sbuts->runtime->search_string : "";
346}
347
349{
350 return (sbuts->runtime) ? STRNLEN(sbuts->runtime->search_string) : 0;
351}
352
353void ED_buttons_search_string_set(SpaceProperties *sbuts, const char *value)
354{
355 STRNCPY_UTF8(sbuts->runtime->search_string, value);
356}
357
362
364
365/* -------------------------------------------------------------------- */
368
370{
371 const char *contexts[2] = {buttons_main_region_context_string(sbuts->mainb), nullptr};
372
373 if (sbuts->mainb == BCONTEXT_TOOL) {
374 return false;
375 }
376
379 C, region, &region->runtime->type->paneltypes, contexts, nullptr);
380}
381
383 SpaceProperties *sbuts, Span<eSpaceButtons_Context> context_tabs_array)
384{
385 /* As long as all-tab search in the tool is disabled in the tool context, don't move from it. */
386 if (sbuts->mainb == BCONTEXT_TOOL) {
387 return;
388 }
389
390 int current_tab_index = 0;
391 for (int i = 0; i < context_tabs_array.size(); i++) {
392 if (sbuts->mainb == context_tabs_array[i]) {
393 current_tab_index = i;
394 break;
395 }
396 }
397
398 /* Try the tabs after the current tab. */
399 for (int i = current_tab_index; i < context_tabs_array.size(); i++) {
401 sbuts->mainbuser = context_tabs_array[i];
402 return;
403 }
404 }
405
406 /* Try the tabs before the current tab. */
407 for (int i = 0; i < current_tab_index; i++) {
409 sbuts->mainbuser = context_tabs_array[i];
410 return;
411 }
412 }
413}
414
416 SpaceProperties *sbuts,
417 ARegion *region_original,
418 Span<eSpaceButtons_Context> context_tabs_array)
419{
420 /* Use local copies of the area and duplicate the region as a mainly-paranoid protection
421 * against changing any of the space / region data while running the search. */
422 ScrArea *area_original = CTX_wm_area(C);
423 ScrArea area_copy = dna::shallow_copy(*area_original);
424 ARegion *region_copy = BKE_area_region_copy(area_copy.type, region_original);
425 /* Set the region visible field. Otherwise some layout code thinks we're drawing in a popup.
426 * This likely isn't necessary, but it's nice to emulate a "real" region where possible. */
427 region_copy->runtime->visible = true;
428 CTX_wm_area_set(const_cast<bContext *>(C), &area_copy);
429 CTX_wm_region_set(const_cast<bContext *>(C), region_copy);
430
431 SpaceProperties sbuts_copy = dna::shallow_copy(*sbuts);
432 sbuts_copy.path = nullptr;
433 sbuts_copy.texuser = nullptr;
434 sbuts_copy.runtime = MEM_new<SpaceProperties_Runtime>(__func__, *sbuts->runtime);
435 sbuts_copy.runtime->tab_search_results = nullptr;
436 area_copy.spacedata.clear_no_delete();
437 BLI_addtail(&area_copy.spacedata, &sbuts_copy);
438
439 /* Loop through the tabs added to the properties editor. */
440 for (int i = 0; i < context_tabs_array.size(); i++) {
441 /* -1 corresponds to a spacer. */
442 if (context_tabs_array[i] == -1) {
443 continue;
444 }
445
446 /* Handle search for the current tab in the normal layout pass. */
447 if (context_tabs_array[i] == sbuts->mainb) {
448 continue;
449 }
450
451 sbuts_copy.mainb = sbuts_copy.mainbo = sbuts_copy.mainbuser = context_tabs_array[i];
452
453 /* Actually do the search and store the result in the bitmap. */
455 i,
456 property_search_for_context(C, region_copy, &sbuts_copy));
457
458 ui::blocklist_free(C, region_copy);
459 }
460
461 BKE_area_region_free(area_copy.type, region_copy);
462 MEM_delete(region_copy);
463 buttons_free(reinterpret_cast<SpaceLink *>(&sbuts_copy));
464
465 CTX_wm_area_set(const_cast<bContext *>(C), area_original);
466 CTX_wm_region_set(const_cast<bContext *>(C), region_original);
467}
468
474 SpaceProperties *sbuts,
475 ARegion *region)
476{
477 /* Theoretical maximum of every context shown with a spacer between every tab. */
478 const Vector<eSpaceButtons_Context> context_tabs_array = ED_buttons_tabs_list(sbuts);
479
480 property_search_all_tabs(C, sbuts, region, context_tabs_array);
481
482 /* Check whether the current tab has a search match. */
483 bool current_tab_has_search_match = false;
484 for (Panel &panel : region->panels) {
486 current_tab_has_search_match = true;
487 }
488 }
489
490 /* Find which index in the list the current tab corresponds to. */
491 int current_tab_index = -1;
492 for (const int i : context_tabs_array.index_range()) {
493 if (context_tabs_array[i] == sbuts->mainb) {
494 current_tab_index = i;
495 }
496 }
497 BLI_assert(current_tab_index != -1);
498
499 /* Update the tab search match flag for the current tab. */
501 sbuts->runtime->tab_search_results, current_tab_index, current_tab_has_search_match);
502
503 /* Move to the next tab with a result */
504 if (!current_tab_has_search_match) {
505 if (region->flag & RGN_FLAG_SEARCH_FILTER_UPDATE) {
506 property_search_move_to_next_tab_with_results(sbuts, context_tabs_array);
507 }
508 }
509}
510
512
513/* -------------------------------------------------------------------- */
516
518{
519 const Vector<eSpaceButtons_Context> tabs_array_no_filter = ED_buttons_tabs_list(sbuts, false);
520 const Vector<eSpaceButtons_Context> tabs_array = ED_buttons_tabs_list(sbuts);
521
522 const int old_index = tabs_array_no_filter.first_index_of(eSpaceButtons_Context(sbuts->mainb));
523
524 /* Try to find next tab to switch to. */
526 for (int i = old_index; i < tabs_array_no_filter.size(); i += iter_step) {
527 const eSpaceButtons_Context candidate_tab = tabs_array_no_filter[i];
528
529 if (candidate_tab == BCONTEXT_SEPARATOR) {
530 continue;
531 }
532
533 const int found_tab_index = tabs_array.first_index_of_try(candidate_tab);
534
535 if (found_tab_index != -1) {
536 new_tab = tabs_array[found_tab_index];
537 break;
538 }
539 }
540
541 return new_tab;
542}
543
544/* Change active tab, if it was hidden. */
546{
547 const bool tab_was_hidden = ((1 << sbuts->mainb) & sbuts->visible_tabs) == 0;
548 if (!tab_was_hidden) {
549 return;
550 }
551
553
554 /* Try to find previous tab to switch to. */
555 if (int(new_tab) == -1) {
556 new_tab = find_new_properties_tab(sbuts, -1);
557 }
558
559 if (int(new_tab) == -1) {
560 new_tab = eSpaceButtons_Context(1 << BCONTEXT_TOOL);
562 }
563
564 sbuts->mainb = new_tab;
565 sbuts->mainbuser = new_tab;
566}
567
568static void buttons_main_region_layout(const bContext *C, ARegion *region)
569{
570 /* draw entirely, view changes should be handled here */
572
573 /* Needed for RNA to get the good values! */
575
576 if (ED_buttons_tabs_list(sbuts).is_empty()) {
579 return;
580 }
581
583
584 if (sbuts->mainb == BCONTEXT_TOOL) {
585 ED_view3d_buttons_region_layout_ex(C, region, "Tool");
586 }
587 else {
589 }
590
591 if (region->flag & RGN_FLAG_SEARCH_FILTER_ACTIVE) {
593 }
594
595 sbuts->mainbo = sbuts->mainb;
596}
597
599{
600 ARegion *region = params->region;
601 const wmNotifier *wmn = params->notifier;
602
603 /* context changes */
604 switch (wmn->category) {
605 case NC_SCREEN:
606 if (ELEM(wmn->data, ND_LAYER)) {
607 ED_region_tag_redraw(region);
608 }
609 break;
610 }
611}
612
622
623static void buttons_keymap(wmKeyConfig *keyconf)
624{
625 WM_keymap_ensure(keyconf, "Property Editor", SPACE_PROPERTIES, RGN_TYPE_WINDOW);
626}
627
629
630/* -------------------------------------------------------------------- */
633
634/* add handlers, stuff you only do once or on area/region changes */
636{
637 ED_region_header_init(region);
638}
639
640static void buttons_header_region_draw(const bContext *C, ARegion *region)
641{
643
644 /* Needed for RNA to get the good values! */
646
647 ED_region_header(C, region);
648}
649
651{
652 wmMsgBus *mbus = params->message_bus;
653 ScrArea *area = params->area;
654 ARegion *region = params->region;
655 SpaceProperties *sbuts = area->spacedata.first_as<SpaceProperties>();
656
657 wmMsgSubscribeValue msg_sub_value_region_tag_redraw{};
658 msg_sub_value_region_tag_redraw.owner = region;
659 msg_sub_value_region_tag_redraw.user_data = region;
660 msg_sub_value_region_tag_redraw.notify = ED_region_do_msg_notify_tag_redraw;
661
662 /* Don't check for SpaceProperties.mainb here, we may toggle between view-layers
663 * where one has no active object, so that available contexts changes. */
664 WM_msg_subscribe_rna_anon_prop(mbus, Window, view_layer, &msg_sub_value_region_tag_redraw);
665
667 WM_msg_subscribe_rna_anon_prop(mbus, ViewLayer, name, &msg_sub_value_region_tag_redraw);
668 }
669
670 if (sbuts->mainb == BCONTEXT_TOOL) {
671 WM_msg_subscribe_rna_anon_prop(mbus, WorkSpace, tools, &msg_sub_value_region_tag_redraw);
672 }
673}
674
676
677/* -------------------------------------------------------------------- */
680
688
690{
693
694 for (PanelType &pt : region->runtime->type->paneltypes) {
696 }
697
698 ED_region_panels_layout(C, region);
699 /* #ED_region_panels_layout adds vertical scroll-bars, we don't want them. */
701 ED_region_panels_draw(C, region);
702}
703
705 const wmRegionMessageSubscribeParams *params)
706{
707 wmMsgBus *mbus = params->message_bus;
708 ARegion *region = params->region;
709
710 wmMsgSubscribeValue msg_sub_value_region_tag_redraw{};
711 msg_sub_value_region_tag_redraw.owner = region;
712 msg_sub_value_region_tag_redraw.user_data = region;
713 msg_sub_value_region_tag_redraw.notify = ED_region_do_msg_notify_tag_redraw;
714
715 WM_msg_subscribe_rna_anon_prop(mbus, Window, view_layer, &msg_sub_value_region_tag_redraw);
716 /* Redraw when image editor mode changes, texture tab needs to be added when switching to "Paint"
717 * mode. */
719 mbus, SpaceImageEditor, ui_mode, &msg_sub_value_region_tag_redraw);
720}
721
722/* draw a certain button set only if properties area is currently
723 * showing that button set, to reduce unnecessary drawing. */
724static void buttons_area_redraw(ScrArea *area, short buttons)
725{
726 SpaceProperties *sbuts = area->spacedata.first_as<SpaceProperties>();
727
728 /* if the area's current button set is equal to the one to redraw */
729 if (sbuts->mainb == buttons) {
730 ED_area_tag_redraw(area);
731 }
732}
733
735
736/* -------------------------------------------------------------------- */
739
740/* reused! */
742{
743 ScrArea *area = params->area;
744 const wmNotifier *wmn = params->notifier;
745 SpaceProperties *sbuts = area->spacedata.first_as<SpaceProperties>();
746
747 /* context changes */
748 switch (wmn->category) {
749 case NC_SCENE:
750 switch (wmn->data) {
755 break;
756 case ND_WORLD:
758 sbuts->preview = 1;
759 break;
760 case ND_FRAME:
761 /* any buttons area can have animated properties so redraw all */
762 ED_area_tag_redraw(area);
763 sbuts->preview = 1;
764 break;
765 case ND_OB_ACTIVE:
766 ED_area_tag_redraw(area);
767 sbuts->preview = 1;
768 break;
769 case ND_KEYINGSET:
771 break;
772 case ND_RENDER_RESULT:
773 break;
774 case ND_NODES:
775 /* For the compositor strip modifier interface. */
777 break;
778 case ND_SEQUENCER:
779 ED_area_tag_redraw(area);
780 break;
781 case ND_COMPO_RESULT:
783 break;
784 case ND_MODE:
785 case ND_LAYER:
786 default:
787 ED_area_tag_redraw(area);
788 break;
789 }
790 break;
791 case NC_OBJECT:
792 switch (wmn->data) {
793 case ND_TRANSFORM:
795 buttons_area_redraw(area, BCONTEXT_DATA); /* Auto-texture-space flag. */
796 break;
797 case ND_POSE:
798 case ND_BONE_ACTIVE:
799 case ND_BONE_SELECT:
804 break;
805 case ND_MODIFIER:
806 if (wmn->action == NA_RENAME) {
807 ED_area_tag_redraw(area);
808 }
809 else {
811 }
813 break;
814 case ND_CONSTRAINT:
817 break;
818 case ND_SHADERFX:
820 break;
821 case ND_PARTICLE:
822 if (wmn->action == NA_EDITED) {
824 }
825 sbuts->preview = 1;
826 break;
827 case ND_DRAW:
831 /* Needed to refresh context path when changing active particle system index. */
834 break;
835 case ND_DRAW_ANIMVIZ:
838 break;
839 default:
840 /* Not all object RNA props have a ND_ notifier (yet) */
841 ED_area_tag_redraw(area);
842 break;
843 }
844 break;
845 case NC_GEOM:
846 switch (wmn->data) {
847 case ND_SELECT:
848 case ND_DATA:
849 case ND_VERTEX_GROUP:
850 ED_area_tag_redraw(area);
851 break;
852 }
853 break;
854 case NC_MATERIAL:
855 ED_area_tag_redraw(area);
856 switch (wmn->data) {
857 case ND_SHADING:
858 case ND_SHADING_DRAW:
859 case ND_SHADING_LINKS:
861 case ND_NODES:
862 /* currently works by redraws... if preview is set, it (re)starts job */
863 sbuts->preview = 1;
864 break;
865 }
866 break;
867 case NC_WORLD:
869 sbuts->preview = 1;
870 break;
871 case NC_LAMP:
873 sbuts->preview = 1;
874 break;
875 case NC_GROUP:
877 break;
878 case NC_BRUSH:
881 break;
882 case NC_TEXTURE:
883 case NC_IMAGE:
884 if (wmn->action != NA_PAINTING) {
885 ED_area_tag_redraw(area);
886 sbuts->preview = 1;
887 }
888 break;
889 case NC_WORKSPACE:
891 break;
892 case NC_SPACE:
893 if (wmn->data == ND_SPACE_PROPERTIES) {
894 ED_area_tag_redraw(area);
895 }
896 else if (wmn->data == ND_SPACE_CHANGED) {
897 ED_area_tag_redraw(area);
898 sbuts->preview = 1;
899 }
900 break;
901 case NC_ID:
902 if (ELEM(wmn->action, NA_RENAME, NA_EDITED)) {
903 ED_area_tag_redraw(area);
904 }
905 break;
906 case NC_ANIMATION:
907 switch (wmn->data) {
908 case ND_KEYFRAME_PROP:
909 case ND_NLA_ACTCHANGE:
910 ED_area_tag_redraw(area);
911 break;
912 case ND_KEYFRAME:
913 if (ELEM(wmn->action, NA_EDITED, NA_ADDED, NA_REMOVED)) {
914 ED_area_tag_redraw(area);
915 }
916 break;
917 case ND_ANIMCHAN:
918 if (wmn->action == NA_SELECTED) {
919 ED_area_tag_redraw(area);
920 }
921 break;
922 }
923 break;
924 case NC_GPENCIL:
925 if (wmn->data == ND_DATA) {
927 ED_area_tag_redraw(area);
928 }
929 }
930 else if (wmn->action == NA_EDITED) {
931 ED_area_tag_redraw(area);
932 }
933 break;
934 case NC_NODE:
935 if (wmn->action == NA_SELECTED) {
936 ED_area_tag_redraw(area);
937 /* new active node, update texture preview */
938 if (sbuts->mainb == BCONTEXT_TEXTURE) {
939 sbuts->preview = 1;
940 }
941 }
942 break;
943 /* Listener for preview render, when doing an global undo. */
944 case NC_WM:
945 if (wmn->data == ND_UNDO) {
946 ED_area_tag_redraw(area);
947 sbuts->preview = 1;
948 }
949 break;
950 case NC_SCREEN:
951 if (wmn->data == ND_LAYOUTSET) {
952 ED_area_tag_redraw(area);
953 sbuts->preview = 1;
954 }
955 break;
956#ifdef WITH_FREESTYLE
957 case NC_LINESTYLE:
958 ED_area_tag_redraw(area);
959 sbuts->preview = 1;
960 break;
961#endif
962 }
963
964 if (wmn->data == ND_KEYS) {
965 ED_area_tag_redraw(area);
966 }
967}
968
969static void buttons_id_remap(ScrArea * /*area*/,
970 SpaceLink *slink,
971 const bke::id::IDRemapper &mappings)
972{
973 SpaceProperties *sbuts = reinterpret_cast<SpaceProperties *>(slink);
974
976 sbuts->flag &= ~SB_PIN_CONTEXT;
977 }
978
979 if (sbuts->path) {
980 ButsContextPath *path = static_cast<ButsContextPath *>(sbuts->path);
981 for (int i = 0; i < path->len; i++) {
982 switch (mappings.apply(&path->ptr[i].owner_id, ID_REMAP_APPLY_DEFAULT)) {
984 path->len = i;
985 if (i != 0) {
986 /* If the first item in the path is cleared, the whole path is cleared, so no need to
987 * clear further items here, see also at the end of this block. */
988 for (int j = i; j < path->len; j++) {
989 path->ptr[j] = {};
990 }
991 }
992 break;
993 }
995 path->ptr[i] = RNA_id_pointer_create(path->ptr[i].owner_id);
996 /* There is no easy way to check/make path downwards valid, just nullify it.
997 * Next redraw will rebuild this anyway. */
998 i++;
999 for (int j = i; j < path->len; j++) {
1000 path->ptr[j] = {};
1001 }
1002 path->len = i;
1003 break;
1004 }
1005
1008 /* Nothing to do. */
1009 break;
1010 }
1011 }
1012 }
1013 if (path->len == 0 && sbuts->path) {
1014 MEM_delete(static_cast<ButsContextPath *>(sbuts->path));
1015 sbuts->path = nullptr;
1016 }
1017 }
1018
1019 if (sbuts->texuser) {
1020 ButsContextTexture *ct = static_cast<ButsContextTexture *>(sbuts->texuser);
1021 mappings.apply(reinterpret_cast<ID **>(&ct->texture), ID_REMAP_APPLY_DEFAULT);
1022 for (ButsTextureUser &user : ct->users.items_mutable()) {
1023 MEM_delete(&user);
1024 }
1025 ct->users.clear_no_delete();
1026 ct->user = nullptr;
1027 }
1028}
1029
1031{
1032 SpaceProperties *sbuts = reinterpret_cast<SpaceProperties *>(space_link);
1033 const int data_flags = BKE_lib_query_foreachid_process_flags_get(data);
1034 const bool is_readonly = (data_flags & IDWALK_READONLY) != 0;
1035
1037 if (!is_readonly) {
1038 if (sbuts->pinid == nullptr) {
1039 sbuts->flag &= ~SB_PIN_CONTEXT;
1040 }
1041 /* NOTE: Restoring path pointers is complicated, if not impossible, because this contains
1042 * data pointers too, not just ID ones. See #40046. */
1043 if (sbuts->path) {
1044 MEM_delete(static_cast<ButsContextPath *>(sbuts->path));
1045 sbuts->path = nullptr;
1046 }
1047 }
1048
1049 if (sbuts->texuser) {
1050 ButsContextTexture *ct = static_cast<ButsContextTexture *>(sbuts->texuser);
1052
1053 if (!is_readonly) {
1054 for (ButsTextureUser &user : ct->users.items_mutable()) {
1055 MEM_delete(&user);
1056 }
1057 ct->users.clear_no_delete();
1058 ct->user = nullptr;
1059 }
1060 }
1061}
1062
1064{
1065 SpaceProperties *sbuts = reinterpret_cast<SpaceProperties *>(sl);
1066 sbuts->runtime = MEM_new<SpaceProperties_Runtime>(__func__);
1067 sbuts->runtime->search_string[0] = '\0';
1068 sbuts->runtime->tab_search_results = BLI_BITMAP_NEW(BCONTEXT_TOT * 2, __func__);
1069
1070 sbuts->path = nullptr;
1071 sbuts->texuser = nullptr;
1072 sbuts->mainbo = sbuts->mainb;
1073 sbuts->mainbuser = sbuts->mainb;
1074}
1075
1077 ID * /*parent_id*/,
1078 SpaceLink *sl)
1079{
1080 SpaceProperties *sbuts = reinterpret_cast<SpaceProperties *>(sl);
1081
1082 if (sbuts->pinid == nullptr) {
1083 sbuts->flag &= ~SB_PIN_CONTEXT;
1084 }
1085}
1086
1088{
1090 sl, [](BlendStructWriter<SpaceProperties> &struct_writer) {
1091 SpaceProperties &shallow_sbuts = struct_writer.shallow_data;
1092 shallow_sbuts.path = nullptr;
1093 shallow_sbuts.texuser = nullptr;
1094 shallow_sbuts.runtime = nullptr;
1095 });
1096}
1097
1099
1100/* -------------------------------------------------------------------- */
1103
1105{
1106 std::unique_ptr<SpaceType> st = std::make_unique<SpaceType>();
1107 ARegionType *art;
1108
1109 st->spaceid = SPACE_PROPERTIES;
1110 STRNCPY_UTF8(st->name, "Buttons");
1111 st->struct_size = sizeof(SpaceProperties);
1112
1113 st->create = buttons_create;
1114 st->free = buttons_free;
1115 st->init = buttons_init;
1116 st->duplicate = buttons_duplicate;
1117 st->operatortypes = buttons_operatortypes;
1118 st->keymap = buttons_keymap;
1119 st->listener = buttons_area_listener;
1120 st->context = buttons_context;
1121 st->id_remap = buttons_id_remap;
1122 st->foreach_id = buttons_foreach_id;
1123 st->blend_read_data = buttons_space_blend_read_data;
1124 st->blend_read_after_liblink = buttons_space_blend_read_after_liblink;
1125 st->blend_write = buttons_space_blend_write;
1126
1127 /* regions: main window */
1128 art = MEM_new_zeroed<ARegionType>("spacetype buttons region");
1137 BLI_addhead(&st->regiontypes, art);
1138
1139 /* Register the panel types from modifiers. The actual panels are built per modifier rather
1140 * than per modifier type. */
1141 for (int i = 0; i < NUM_MODIFIER_TYPES; i++) {
1143 if (mti != nullptr && mti->panel_register != nullptr) {
1144 mti->panel_register(art);
1145 }
1146 }
1147 for (int i = 0; i < NUM_SHADER_FX_TYPES; i++) {
1149 continue;
1150 }
1152 if (fxti != nullptr && fxti->panel_register != nullptr) {
1153 fxti->panel_register(art);
1154 }
1155 }
1156 /* Register the panel types from strip modifiers. The actual panels are built per strip modifier
1157 * rather than per modifier type. */
1158 for (int i = 0; i < NUM_STRIP_MODIFIER_TYPES; i++) {
1160 if (mti != nullptr && mti->panel_register != nullptr) {
1161 mti->panel_register(art);
1162 }
1163 }
1164
1166
1167 /* regions: header */
1168 art = MEM_new_zeroed<ARegionType>("spacetype buttons region");
1170 art->prefsizey = HEADERY;
1172
1176 BLI_addhead(&st->regiontypes, art);
1177
1178 /* regions: navigation bar */
1179 art = MEM_new_zeroed<ARegionType>("spacetype nav buttons region");
1181 art->prefsizex = AREAMINX;
1186 BLI_addhead(&st->regiontypes, art);
1187
1188 BKE_spacetype_register(std::move(st));
1189}
1190
1192
1193} // namespace blender
#define BKE_LIB_FOREACHID_PROCESS_IDSUPER(data_, id_super_, cb_flag_)
#define BKE_LIB_FOREACHID_PROCESS_ID(data_, id_, cb_flag_)
#define BLI_BITMAP_NEW(_num, _alloc_string)
Definition BLI_bitmap.hh:39
#define BLI_BITMAP_TEST(_bitmap, _index)
Definition BLI_bitmap.hh:63
#define BLI_BITMAP_SET(_bitmap, _index, _set)
#define STRNLEN(str)
#define STRNCPY_UTF8(dst, src)
#define IFACE_(msgid)
#define HEADERY
#define AREAMINX
#define Window
Read Blender memory allocation and freeing.
#define C
Definition RandGen.cpp:29
#define ND_SEQUENCER
Definition WM_types.hh:456
#define NC_WORLD
Definition WM_types.hh:400
#define ND_SHADING
Definition WM_types.hh:520
#define ND_WORLD
Definition WM_types.hh:471
#define NC_ID
Definition WM_types.hh:408
#define NC_NODE
Definition WM_types.hh:407
#define NC_GEOM
Definition WM_types.hh:406
#define ND_NLA_ACTCHANGE
Definition WM_types.hh:541
#define ND_SPACE_CHANGED
Definition WM_types.hh:581
#define ND_DRAW
Definition WM_types.hh:502
#define NC_BRUSH
Definition WM_types.hh:398
#define ND_OB_ACTIVE
Definition WM_types.hh:459
#define ND_RENDER_RESULT
Definition WM_types.hh:465
#define NC_WM
Definition WM_types.hh:387
#define ND_DATA
Definition WM_types.hh:552
#define NC_LINESTYLE
Definition WM_types.hh:413
#define ND_RENDER_OPTIONS
Definition WM_types.hh:454
#define NC_ANIMATION
Definition WM_types.hh:401
#define ND_SHADING_PREVIEW
Definition WM_types.hh:523
#define ND_VERTEX_GROUP
Definition WM_types.hh:553
#define ND_COMPO_RESULT
Definition WM_types.hh:466
#define NC_SCREEN
Definition WM_types.hh:390
#define ND_MODE
Definition WM_types.hh:464
#define ND_SPACE_PROPERTIES
Definition WM_types.hh:572
#define ND_KEYINGSET
Definition WM_types.hh:467
#define NC_SCENE
Definition WM_types.hh:391
#define NA_ADDED
Definition WM_types.hh:636
#define NC_GROUP
Definition WM_types.hh:396
#define ND_NODES
Definition WM_types.hh:455
#define ND_MODIFIER
Definition WM_types.hh:503
#define ND_POSE
Definition WM_types.hh:482
#define NA_EDITED
Definition WM_types.hh:634
#define ND_PARTICLE
Definition WM_types.hh:506
#define ND_KEYFRAME_PROP
Definition WM_types.hh:538
#define NC_MATERIAL
Definition WM_types.hh:393
#define NC_LAMP
Definition WM_types.hh:395
#define NC_IMAGE
Definition WM_types.hh:397
#define ND_CONSTRAINT
Definition WM_types.hh:505
#define NC_WORKSPACE
Definition WM_types.hh:389
#define ND_UNDO
Definition WM_types.hh:433
#define ND_FRAME
Definition WM_types.hh:453
#define NA_REMOVED
Definition WM_types.hh:637
#define ND_SELECT
Definition WM_types.hh:551
#define NC_GPENCIL
Definition WM_types.hh:412
#define NC_TEXTURE
Definition WM_types.hh:394
#define ND_BONE_ACTIVE
Definition WM_types.hh:483
#define ND_TRANSFORM
Definition WM_types.hh:475
#define ND_LAYER
Definition WM_types.hh:469
#define ND_BONE_COLLECTION
Definition WM_types.hh:515
#define ND_KEYS
Definition WM_types.hh:504
#define NA_RENAME
Definition WM_types.hh:638
#define ND_SHADERFX
Definition WM_types.hh:512
#define NA_PAINTING
Definition WM_types.hh:641
#define ND_DRAW_ANIMVIZ
Definition WM_types.hh:514
#define ND_BONE_SELECT
Definition WM_types.hh:491
#define ND_KEYFRAME
Definition WM_types.hh:537
#define ND_LAYOUTSET
Definition WM_types.hh:443
#define NC_OBJECT
Definition WM_types.hh:392
#define ND_ANIMCHAN
Definition WM_types.hh:539
#define ND_SHADING_LINKS
Definition WM_types.hh:522
#define ND_SHADING_DRAW
Definition WM_types.hh:521
#define NC_SPACE
Definition WM_types.hh:405
#define NA_SELECTED
Definition WM_types.hh:639
#define BLI_assert_unreachable()
#define ELEM(...)
constexpr int64_t size() const
Definition BLI_span.hh:256
int64_t size() const
void append(const T &value)
const T & last(const int64_t n=0) const
bool is_empty() const
IndexRange index_range() const
int64_t first_index_of(const T &value) const
int64_t first_index_of_try(const T &value) const
IDRemapperApplyResult apply(ID **r_id_ptr, IDRemapperApplyOptions options, ID *id_self=nullptr) const
internal::ShallowDataConstRef< T > shallow_copy(const T &other)
Definition DNA_defs.h:147
const StripModifierTypeInfo * modifier_type_info_get(eStripModifierType type)
void blocklist_free(const bContext *C, ARegion *region)
void register_scene_compositor_effects_panel(ARegionType *region_type)
bool panel_matches_search_filter(const Panel *panel)
bool panel_is_active(const Panel *panel)
View2D * view2d_fromcontext(const bContext *C)
Definition view2d.cc:1836
BMesh Iterators.
static const char * buttons_main_region_context_string(const short mainb)
@ ID_REMAP_RESULT_SOURCE_UNASSIGNED
@ ID_REMAP_RESULT_SOURCE_UNAVAILABLE
@ ID_REMAP_RESULT_SOURCE_REMAPPED
@ ID_REMAP_RESULT_SOURCE_NOT_MAPPABLE
UserDef U
Definition blender.cc:58
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))
static void buttons_apply_filter(SpaceProperties *sbuts)
static void buttons_header_region_draw(const bContext *C, ARegion *region)
ScrArea * CTX_wm_area(const bContext *C)
static void buttons_main_region_layout(const bContext *C, ARegion *region)
unsigned int uint
Definition BKE_text.h:55
int buttons_context(const bContext *C, const char *member, bContextDataResult *result)
void BLI_addhead(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:98
const char * ED_buttons_search_string_get(SpaceProperties *sbuts)
@ REGION_DRAW_LOCK_ALL
PointerRNA RNA_id_pointer_create(ID *id)
void buttons_context_register(ARegionType *art)
static void buttons_keymap(wmKeyConfig *keyconf)
void BKE_area_region_free(SpaceType *st, ARegion *region)
Definition screen.cc:736
static void buttons_header_region_init(wmWindowManager *, ARegion *region)
void BUTTONS_OT_file_browse(wmOperatorType *ot)
bool ED_region_property_search(const bContext *C, ARegion *region, ListBaseT< PanelType > *paneltypes, const char *contexts[], const char *category_override)
Definition area.cc:4173
static void buttons_area_listener(const wmSpaceTypeListenerParams *params)
static void buttons_space_blend_read_after_liblink(BlendLibReader *, ID *, SpaceLink *sl)
void ED_buttons_navbar_menu(bContext *C, ui::Layout *layout, void *)
static void buttons_header_region_message_subscribe(const wmRegionMessageSubscribeParams *params)
Vector< eSpaceButtons_Context > ED_buttons_tabs_list(const SpaceProperties *sbuts, bool apply_filter=true)
void BUTTONS_OT_start_filter(wmOperatorType *ot)
void ED_region_tag_redraw(ARegion *region)
Definition area.cc:681
static void buttons_main_region_property_search(const bContext *C, SpaceProperties *sbuts, ARegion *region)
LibraryForeachIDFlag BKE_lib_query_foreachid_process_flags_get(const LibraryForeachIDData *data)
Definition lib_query.cc:133
ARegion * BKE_area_region_copy(const SpaceType *st, const ARegion *region)
Definition screen.cc:479
static eSpaceButtons_Context find_new_properties_tab(const SpaceProperties *sbuts, int iter_step)
static void buttons_foreach_id(SpaceLink *space_link, LibraryForeachIDData *data)
static void buttons_space_blend_write(BlendWriter *writer, SpaceLink *sl)
static void buttons_init(wmWindowManager *, ScrArea *)
static SpaceLink * buttons_create(const ScrArea *, const Scene *)
void buttons_context_compute(const bContext *C, SpaceProperties *sbuts)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
void BUTTONS_OT_toggle_pin(wmOperatorType *ot)
static void buttons_main_region_init(wmWindowManager *wm, ARegion *region)
int ED_buttons_search_string_length(SpaceProperties *sbuts)
BMesh const char void * data
static void buttons_main_region_listener(const wmRegionListenerParams *params)
void ED_spacetype_buttons()
@ BCONTEXT_STRIP_MODIFIER
@ BCONTEXT_BONE_CONSTRAINT
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
Definition wm_keymap.cc:935
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
static void buttons_navigation_bar_region_message_subscribe(const wmRegionMessageSubscribeParams *params)
static bool property_search_for_context(const bContext *C, ARegion *region, SpaceProperties *sbuts)
wmEventHandler_Keymap * WM_event_add_keymap_handler(ListBaseT< wmEventHandler > *handlers, wmKeyMap *keymap)
ARegion * BKE_area_region_new()
Definition screen.cc:522
static void buttons_navigation_bar_region_init(wmWindowManager *wm, ARegion *region)
bool ED_buttons_tab_has_search_result(SpaceProperties *sbuts, int index)
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
@ eShaderFxType_Light_deprecated
static void property_search_all_tabs(const bContext *C, SpaceProperties *sbuts, ARegion *region_original, Span< eSpaceButtons_Context > context_tabs_array)
@ 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
@ ED_KEYMAP_FRAMES
Definition ED_screen.hh:857
void ED_view3d_buttons_region_layout_ex(const bContext *C, ARegion *region, const char *category_override)
static void buttons_navigation_bar_region_draw(const bContext *C, ARegion *region)
static SpaceLink * buttons_duplicate(SpaceLink *sl)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:118
@ PANEL_TYPE_LAYOUT_VERT_BAR
static void buttons_operatortypes()
void BKE_spacetype_register(std::unique_ptr< SpaceType > st)
Definition screen.cc:379
static void buttons_id_remap(ScrArea *, SpaceLink *slink, const bke::id::IDRemapper &mappings)
static void buttons_space_blend_read_data(BlendDataReader *, SpaceLink *sl)
void BUTTONS_OT_context_menu(wmOperatorType *ot)
void ED_region_header_init(ARegion *region)
Definition area.cc:4406
void BUTTONS_OT_directory_browse(wmOperatorType *ot)
static void buttons_free(SpaceLink *sl)
bScreen * CTX_wm_screen(const bContext *C)
void CTX_wm_region_set(bContext *C, ARegion *region)
void ED_screens_region_flip_menu_create(bContext *C, ui::Layout *layout, void *arg)
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
@ ID_REMAP_APPLY_DEFAULT
@ IDWALK_CB_DIRECT_WEAK_LINK
void ED_region_do_msg_notify_tag_redraw(bContext *C, wmMsgSubscribeKey *msg_key, wmMsgSubscribeValue *msg_val)
Definition area.cc:394
void ED_buttons_visible_tabs_menu(bContext *C, ui::Layout *layout, void *)
void BUTTONS_OT_clear_filter(wmOperatorType *ot)
SpaceProperties * CTX_wm_space_properties(const bContext *C)
void ED_region_header(const bContext *C, ARegion *region)
Definition area.cc:4391
void ED_region_panels_draw(const bContext *C, ARegion *region)
Definition area.cc:3916
const ModifierTypeInfo * BKE_modifier_get_info(ModifierType type)
void ED_region_panels_init(wmWindowManager *wm, ARegion *region)
Definition area.cc:4006
static void buttons_main_region_layout_properties(const bContext *C, SpaceProperties *sbuts, ARegion *region)
static void buttons_area_redraw(ScrArea *area, short buttons)
void ED_buttons_search_string_set(SpaceProperties *sbuts, const char *value)
static void property_search_move_to_next_tab_with_results(SpaceProperties *sbuts, Span< eSpaceButtons_Context > context_tabs_array)
void ED_area_tag_redraw(ScrArea *area)
Definition area.cc:784
const ShaderFxTypeInfo * BKE_shaderfx_get_info(ShaderFxType type)
Definition shader_fx.cc:134
void CTX_wm_area_set(bContext *C, ScrArea *area)
void(*) message_subscribe(const wmRegionMessageSubscribeParams *params)
void(*) draw(const bContext *C, ARegion *region)
void(*) listener(const wmRegionListenerParams *params)
void(*) layout(const bContext *C, ARegion *region)
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< ButsTextureUser > users
struct ButsTextureUser * user
void(*) panel_register(ARegionType *region_type)
ListBaseT< SpaceLink > spacedata
struct SpaceType * type
void(*) panel_register(ARegionType *region_type)
char search_string[UI_MAX_NAME_STR]
struct SpaceProperties_Runtime * runtime
ListBaseT< ARegion > regionbase
eSpaceButtons_Context mainbo
eSpaceButtons_Flag flag
eSpaceButtons_Context mainb
eSpaceButtons_Context mainbuser
eView2D_KeepZoom keepzoom
eView2D_Scroll scroll
ListBaseT< wmEventHandler > handlers
struct ARegionType * type
void(*) panel_register(ARegionType *region_type)
void operator_context_set(wm::OpCallContext opcontext)
PointerRNA op(wmOperatorType *ot, std::optional< StringRef > name, int icon, wm::OpCallContext context, eUI_Item_Flag flag)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)
unsigned int action
Definition WM_types.hh:371
unsigned int category
Definition WM_types.hh:371
unsigned int data
Definition WM_types.hh:371
#define WM_msg_subscribe_rna_anon_prop(mbus, type_, prop_, value)