43#include "RNA_prototypes.hh"
116 if (sbuts->
runtime !=
nullptr) {
127 if (sbuts->
runtime ==
nullptr) {
140 sbutsn->
path =
nullptr;
142 if (sfile_old->
runtime !=
nullptr) {
174 constexpr std::array<blender::StringRefNull, BCONTEXT_TOT> filter_items = {
175 "show_properties_tool",
176 "show_properties_render",
177 "show_properties_output",
178 "show_properties_view_layer",
179 "show_properties_scene",
180 "show_properties_world",
181 "show_properties_collection",
182 "show_properties_object",
183 "show_properties_modifiers",
184 "show_properties_effects",
185 "show_properties_particles",
186 "show_properties_physics",
187 "show_properties_constraints",
188 "show_properties_data",
189 "show_properties_bone",
190 "show_properties_bone_constraints",
191 "show_properties_material",
192 "show_properties_texture",
204 layout->
op(
"SCREEN_OT_region_toggle",
IFACE_(
"Hide"), ICON_NONE);
213 auto add_spacer = [&]() {
220 if (sbuts->
pathflag & (1 << tab) && (!apply_filter ||
filter & (1 << tab))) {
295 return "bone_constraint";
364 C, region, ®ion->
runtime->type->paneltypes, contexts,
nullptr);
375 int current_tab_index = 0;
376 for (
int i = 0;
i < context_tabs_array.
size();
i++) {
377 if (sbuts->
mainb == context_tabs_array[
i]) {
378 current_tab_index =
i;
384 for (
int i = current_tab_index;
i < context_tabs_array.
size();
i++) {
392 for (
int i = 0;
i < current_tab_index;
i++) {
408 ScrArea area_copy = blender::dna::shallow_copy(*area_original);
412 region_copy->
runtime->visible =
true;
417 sbuts_copy.
path =
nullptr;
425 for (
int i = 0;
i < context_tabs_array.
size();
i++) {
427 if (context_tabs_array[
i] == -1) {
432 if (context_tabs_array[
i] == sbuts->
mainb) {
468 bool current_tab_has_search_match =
false;
471 current_tab_has_search_match =
true;
476 int current_tab_index = -1;
478 if (context_tabs_array[
i] == sbuts->
mainb) {
479 current_tab_index =
i;
489 if (!current_tab_has_search_match) {
512 for (
int i = old_index;
i < tabs_array_no_filter.
size();
i += iter_step) {
521 if (found_tab_index != -1) {
522 new_tab = tabs_array[found_tab_index];
534 if (!tab_was_hidden) {
541 if (
int(new_tab) == -1) {
545 if (
int(new_tab) == -1) {
550 sbuts->
mainb = new_tab;
644 msg_sub_value_region_tag_redraw.
owner = region;
645 msg_sub_value_region_tag_redraw.
user_data = region;
697 msg_sub_value_region_tag_redraw.
owner = region;
698 msg_sub_value_region_tag_redraw.
user_data = region;
705 mbus, SpaceImageEditor, ui_mode, &msg_sub_value_region_tag_redraw);
715 if (sbuts->
mainb == buttons) {
952 for (
int i = 0;
i < path->
len;
i++) {
959 for (
int j =
i; j < path->
len; j++) {
970 for (
int j =
i; j < path->
len; j++) {
984 if (path->
len == 0 && sbuts->
path) {
986 sbuts->
path =
nullptr;
1009 if (sbuts->
pinid ==
nullptr) {
1016 sbuts->
path =
nullptr;
1038 sbuts->
path =
nullptr;
1051 if (sbuts->
pinid ==
nullptr) {
1069 std::unique_ptr<SpaceType> st = std::make_unique<SpaceType>();
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)
@ ID_REMAP_RESULT_SOURCE_REMAPPED
@ ID_REMAP_RESULT_SOURCE_UNASSIGNED
@ ID_REMAP_RESULT_SOURCE_NOT_MAPPABLE
@ ID_REMAP_RESULT_SOURCE_UNAVAILABLE
const ModifierTypeInfo * BKE_modifier_get_info(ModifierType type)
void BKE_spacetype_register(std::unique_ptr< SpaceType > st)
ARegion * BKE_area_region_new()
@ PANEL_TYPE_LAYOUT_VERT_BAR
void BKE_area_region_free(SpaceType *st, ARegion *region)
ARegion * BKE_area_region_copy(const SpaceType *st, const ARegion *region)
const ShaderFxTypeInfo * BKE_shaderfx_get_info(ShaderFxType type)
#define BLI_assert_unreachable()
#define BLI_BITMAP_NEW(_num, _alloc_string)
#define BLI_BITMAP_TEST(_bitmap, _index)
#define BLI_BITMAP_SET(_bitmap, _index, _set)
#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)
void BLI_addhead(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
char * STRNCPY(char(&dst)[N], const char *src)
#define BLO_write_struct(writer, struct_name, data_ptr)
@ RGN_FLAG_SEARCH_FILTER_UPDATE
@ RGN_FLAG_NO_USER_RESIZE
@ RGN_FLAG_SEARCH_FILTER_ACTIVE
@ eShaderFxType_Light_deprecated
@ BCONTEXT_BONE_CONSTRAINT
void ED_area_tag_redraw(ScrArea *area)
bool ED_region_property_search(const bContext *C, ARegion *region, ListBase *paneltypes, const char *contexts[], const char *category_override)
void ED_region_header(const bContext *C, ARegion *region)
void ED_region_header_init(ARegion *region)
void ED_region_panels_layout_ex(const bContext *C, ARegion *region, ListBase *paneltypes, wmOperatorCallContext op_context, const char *contexts[], const char *category_override)
void ED_region_panels_layout(const bContext *C, ARegion *region)
void ED_region_panels_init(wmWindowManager *wm, ARegion *region)
void ED_region_tag_redraw(ARegion *region)
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)
void ED_region_panels_draw(const bContext *C, ARegion *region)
void ED_view3d_buttons_region_layout_ex(const bContext *C, ARegion *region, const char *category_override)
Read Guarded memory(de)allocation.
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)
void uiLayoutSetOperatorContext(uiLayout *layout, wmOperatorCallContext opcontext)
View2D * UI_view2d_fromcontext(const bContext *C)
#define ND_RENDER_OPTIONS
#define ND_SHADING_PREVIEW
#define ND_SPACE_PROPERTIES
@ WM_OP_INVOKE_REGION_WIN
#define ND_BONE_COLLECTION
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)
int64_t first_index_of(const T &value) const
int64_t first_index_of_try(const T &value) const
constexpr int64_t size() const
void append(const T &value)
const T & last(const int64_t n=0) const
IndexRange index_range() const
IDRemapperApplyResult apply(ID **r_id_ptr, IDRemapperApplyOptions options, ID *id_self=nullptr) const
void * MEM_mallocN(size_t len, const char *str)
void * MEM_callocN(size_t len, const char *str)
void * MEM_dupallocN(const void *vmemh)
void MEM_freeN(void *vmemh)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
PointerRNA RNA_id_pointer_create(ID *id)
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
struct ButsTextureUser * user
void(* panel_register)(ARegionType *region_type)
void(* panel_register)(struct ARegionType *region_type)
BLI_bitmap * tab_search_results
char search_string[UI_MAX_NAME_STR]
struct SpaceProperties_Runtime * runtime
PointerRNA op(wmOperatorType *ot, std::optional< blender::StringRef > name, int icon, wmOperatorCallContext 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)
struct wmKeyConfig * defaultconf
wmEventHandler_Keymap * WM_event_add_keymap_handler(ListBase *handlers, wmKeyMap *keymap)
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
#define WM_msg_subscribe_rna_anon_prop(mbus, type_, prop_, value)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))