45#include "RNA_prototypes.hh"
69 sbuts = MEM_new<SpaceProperties>(
"initbuts");
71 sbuts->
runtime = MEM_new<SpaceProperties_Runtime>(__func__);
107 return reinterpret_cast<SpaceLink *
>(sbuts);
124 ct->
users.clear_no_delete();
141 sbutsn->
path =
nullptr;
143 sbutsn->
runtime = MEM_new<SpaceProperties_Runtime>(__func__, *sfile_old->
runtime);
147 return reinterpret_cast<SpaceLink *
>(sbutsn);
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",
209 layout->
op(
"SCREEN_OT_region_toggle",
IFACE_(
"Hide"), ICON_NONE);
217 auto add_spacer = [&]() {
224 if (sbuts->
pathflag & (1 << tab) && (!apply_filter ||
filter & (1 << tab))) {
305 return "bone_constraint";
311 return "strip_modifier";
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;
399 for (
int i = current_tab_index; i < context_tabs_array.
size(); i++) {
401 sbuts->
mainbuser = context_tabs_array[i];
407 for (
int i = 0; i < current_tab_index; i++) {
409 sbuts->
mainbuser = context_tabs_array[i];
432 sbuts_copy.
path =
nullptr;
434 sbuts_copy.
runtime = MEM_new<SpaceProperties_Runtime>(__func__, *sbuts->
runtime);
440 for (
int i = 0; i < context_tabs_array.
size(); i++) {
442 if (context_tabs_array[i] == -1) {
447 if (context_tabs_array[i] == sbuts->
mainb) {
462 MEM_delete(region_copy);
483 bool current_tab_has_search_match =
false;
486 current_tab_has_search_match =
true;
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;
504 if (!current_tab_has_search_match) {
526 for (
int i = old_index; i < tabs_array_no_filter.
size(); i += iter_step) {
535 if (found_tab_index != -1) {
536 new_tab = tabs_array[found_tab_index];
548 if (!tab_was_hidden) {
555 if (
int(new_tab) == -1) {
559 if (
int(new_tab) == -1) {
564 sbuts->
mainb = new_tab;
658 msg_sub_value_region_tag_redraw.
owner = region;
659 msg_sub_value_region_tag_redraw.user_data = region;
711 msg_sub_value_region_tag_redraw.
owner = region;
712 msg_sub_value_region_tag_redraw.
user_data = region;
719 mbus, SpaceImageEditor, ui_mode, &msg_sub_value_region_tag_redraw);
729 if (sbuts->
mainb == buttons) {
981 for (
int i = 0; i < path->
len; i++) {
988 for (
int j = i; j < path->
len; j++) {
999 for (
int j = i; j < path->
len; j++) {
1013 if (path->
len == 0 && sbuts->
path) {
1015 sbuts->
path =
nullptr;
1025 ct->
users.clear_no_delete();
1038 if (sbuts->
pinid ==
nullptr) {
1045 sbuts->
path =
nullptr;
1057 ct->
users.clear_no_delete();
1066 sbuts->
runtime = MEM_new<SpaceProperties_Runtime>(__func__);
1070 sbuts->
path =
nullptr;
1082 if (sbuts->
pinid ==
nullptr) {
1092 shallow_sbuts.
path =
nullptr;
1093 shallow_sbuts.
texuser =
nullptr;
1094 shallow_sbuts.
runtime =
nullptr;
1106 std::unique_ptr<SpaceType> st = std::make_unique<SpaceType>();
#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)
#define BLI_BITMAP_TEST(_bitmap, _index)
#define BLI_BITMAP_SET(_bitmap, _index, _set)
#define STRNCPY_UTF8(dst, src)
Read Blender memory allocation and freeing.
#define ND_RENDER_OPTIONS
#define ND_SHADING_PREVIEW
#define ND_SPACE_PROPERTIES
#define ND_BONE_COLLECTION
#define BLI_assert_unreachable()
constexpr int64_t size() const
void append(const T &value)
const T & last(const int64_t n=0) 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)
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)
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
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)
int buttons_context(const bContext *C, const char *member, bContextDataResult *result)
void BLI_addhead(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
const char * ED_buttons_search_string_get(SpaceProperties *sbuts)
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)
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)
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)
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)
ARegion * BKE_area_region_copy(const SpaceType *st, const ARegion *region)
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)
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()
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)
@ eShaderFxType_Light_deprecated
static void property_search_all_tabs(const bContext *C, SpaceProperties *sbuts, ARegion *region_original, Span< eSpaceButtons_Context > context_tabs_array)
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)
@ PANEL_TYPE_LAYOUT_VERT_BAR
static void buttons_operatortypes()
void BKE_spacetype_register(std::unique_ptr< SpaceType > st)
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)
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)
@ RGN_FLAG_INDICATE_OVERFLOW
@ RGN_FLAG_NO_USER_RESIZE
@ RGN_FLAG_SEARCH_FILTER_ACTIVE
@ RGN_FLAG_SEARCH_FILTER_UPDATE
@ IDWALK_CB_DIRECT_WEAK_LINK
void ED_region_do_msg_notify_tag_redraw(bContext *C, wmMsgSubscribeKey *msg_key, wmMsgSubscribeValue *msg_val)
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)
@ NUM_STRIP_MODIFIER_TYPES
void ED_region_panels_draw(const bContext *C, ARegion *region)
const ModifierTypeInfo * BKE_modifier_get_info(ModifierType type)
void ED_region_panels_init(wmWindowManager *wm, ARegion *region)
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)
const ShaderFxTypeInfo * BKE_shaderfx_get_info(ShaderFxType type)
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
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
void(*) panel_register(ARegionType *region_type)
char search_string[UI_MAX_NAME_STR]
BLI_bitmap * tab_search_results
struct SpaceProperties_Runtime * runtime
ListBaseT< ARegion > regionbase
eSpaceButtons_Context mainbo
eSpaceButtons_Context mainb
eSpaceButtons_Context mainbuser
eView2D_KeepZoom keepzoom
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)
const wmNotifier * notifier
const wmNotifier * notifier
#define WM_msg_subscribe_rna_anon_prop(mbus, type_, prop_, value)