39#include "RNA_prototypes.hh"
96 if ((id->
name[2] ==
'.') && (query[0] !=
'.')) {
111 const bool use_lib_prefix = template_ui->
preview || iconid;
116 int name_prefix_offset;
118 if (!use_lib_prefix) {
151 search.
add(id->name + 2,
id);
157 for (
ID *
id : filtered_ids) {
183 search.
add(id->name + 2,
id);
191 for (
ID *
id : filtered_ids) {
209 Scene *scene =
nullptr;
213 scene = (
Scene *)id_from;
240 void (*id_search_update_fn)(
261 active_item_ptr.
data,
281 *r_ptr = template_ui->
ptr;
282 *r_prop = template_ui->
prop;
288 const int parent_level,
290 int *r_parent_level_best)
296 if (parent_level > *r_parent_level_best) {
297 *r_parent_level_best = parent_level;
298 *r_collection_parent_best = collection;
306 if (iter->collection->id.lib != collection->
id.
lib &&
ID_IS_LINKED(iter->collection)) {
310 iter->collection, parent_level + 1, r_collection_parent_best, r_parent_level_best);
315 Collection *root_collection,
ID *target_id,
const bool do_parents)
338 if (
ID_IS_LINKED(iter->collection) && iter->collection->id.lib != target_id->
lib) {
352 iter->collection, target_id,
false);
359 const char *undo_push_label;
360 if (r_undo_push_label ==
nullptr) {
361 r_undo_push_label = &undo_push_label;
372 *r_undo_push_label =
"Make Library Override Hierarchy Editable";
376 *r_undo_push_label =
"Clear Library Override Hierarchy";
394 if (object_active ==
nullptr &&
GS(owner_id->
name) ==
ID_OB) {
395 object_active = (
Object *)owner_id;
397 if (object_active !=
nullptr) {
403 object_active =
nullptr;
408 object_active =
nullptr;
413 Collection *collection_active = collection_active_context;
414 if (collection_active ==
nullptr &&
GS(owner_id->
name) ==
ID_GR) {
417 if (collection_active !=
nullptr) {
419 if (collection_active->
id.
lib != id->
lib ||
424 collection_active =
nullptr;
427 int parent_level_best = -1;
430 collection_active, 0, &collection_parent_best, &parent_level_best);
431 collection_active = collection_parent_best;
436 collection_active =
nullptr;
439 if (collection_active ==
nullptr && object_active !=
nullptr &&
445 if (
ID_IS_LINKED(collection_iter) && collection_iter->id.lib != id->
lib) {
454 int parent_level_best = -1;
457 collection_iter, 0, &collection_parent_best, &parent_level_best);
458 collection_active = collection_parent_best;
463 ID *id_override =
nullptr;
468 if (collection_active !=
nullptr &&
472 if (object_active !=
nullptr) {
480 &collection_active->
id,
485 else if (object_active !=
nullptr && !
ID_IS_LINKED(object_active) &&
501 if (collection_active !=
nullptr &&
505 if (object_active !=
nullptr) {
513 &collection_active->
id,
519 if (object_active !=
nullptr) {
523 bmain, scene, view_layer,
nullptr,
id,
nullptr,
nullptr, &id_override,
false);
541 if (object_active !=
nullptr) {
542 if (collection_active !=
nullptr &&
552 &collection_active->
id,
572 bmain, scene, view_layer,
nullptr,
id,
id,
nullptr, &id_override,
false);
591 if (id_override !=
nullptr) {
598 Object *object_hierarchy_root =
reinterpret_cast<Object *
>(hierarchy_root);
620 *r_undo_push_label =
"Make Library Override Hierarchy";
640 const char **r_undo_push_label)
642 ID *
id =
static_cast<ID *
>(idptr->
data);
646 C, bmain, owner_id,
id, r_undo_push_label);
648 if (id_override !=
nullptr) {
669 ID *
id =
static_cast<ID *
>(idptr.
data);
671 const char *undo_push_label =
nullptr;
685 RNA_warning(
"warning, id event %d shouldn't come here", event);
737 if (undo_push_label !=
nullptr) {
761 const bool do_scene_obj = ((
GS(id->
name) ==
ID_OB) &&
762 (template_ui->
ptr.
type == &RNA_LayerObjects));
788 if (undo_push_label !=
nullptr) {
799 return N_(
"Browse Scene to be linked");
801 return N_(
"Browse Object to be linked");
803 return N_(
"Browse Mesh Data to be linked");
805 return N_(
"Browse Curve Data to be linked");
807 return N_(
"Browse Metaball Data to be linked");
809 return N_(
"Browse Material to be linked");
811 return N_(
"Browse Texture to be linked");
813 return N_(
"Browse Image to be linked");
815 return N_(
"Browse Line Style Data to be linked");
817 return N_(
"Browse Lattice Data to be linked");
819 return N_(
"Browse Light Data to be linked");
821 return N_(
"Browse Camera Data to be linked");
823 return N_(
"Browse World Settings to be linked");
825 return N_(
"Choose Screen layout");
827 return N_(
"Browse Text to be linked");
829 return N_(
"Browse Speaker Data to be linked");
831 return N_(
"Browse Sound to be linked");
833 return N_(
"Browse Armature data to be linked");
835 return N_(
"Browse Action to be linked");
837 return N_(
"Browse Node Tree to be linked");
839 return N_(
"Browse Brush to be linked");
841 return N_(
"Browse Particle Settings to be linked");
843 return N_(
"Browse Grease Pencil Data to be linked");
845 return N_(
"Browse Movie Clip to be linked");
847 return N_(
"Browse Mask to be linked");
849 return N_(
"Browse Palette Data to be linked");
851 return N_(
"Browse Paint Curve Data to be linked");
853 return N_(
"Browse Cache Files to be linked");
855 return N_(
"Browse Workspace to be linked");
857 return N_(
"Browse LightProbe to be linked");
859 return N_(
"Browse Curves Data to be linked");
861 return N_(
"Browse Point Cloud Data to be linked");
863 return N_(
"Browse Volume Data to be linked");
865 return N_(
"Browse Grease Pencil Data to be linked");
876 return N_(
"Browse ID data to be linked");
893 "WORKSPACE_OT_scene_pin_toggle",
903#ifdef WITH_INTERNATIONAL
912# define template_id_context(type) 0
919 const char *
const newop,
922 const bool use_tab_but,
969 const int icon = (
id && !use_tab_but) ? ICON_DUPLICATE : ICON_ADD;
991 MEM_new<TemplateID>(__func__, template_ui),
998 block, but_type, 0, icon, button_text, 0, 0,
w, but_height,
nullptr, std::nullopt);
1001 MEM_new<TemplateID>(__func__, template_ui),
1011#ifndef WITH_INTERNATIONAL
1025 const char *unlinkop,
1026 const std::optional<StringRef> text,
1027 const bool live_icon,
1028 const bool hide_buttons)
1035 ID *
id =
static_cast<ID *
>(idptr.
data);
1049 if (text && !text->is_empty()) {
1061 MEM_new<TemplateID>(__func__, template_ui),
1073 const bool user_alert = (
id->us <= 0);
1106 but, [bmain,
id](std::string &new_name) {
ED_id_rename(*bmain, *
id, new_name); });
1109 MEM_new<TemplateID>(__func__, template_ui),
1119 if (!hide_buttons && !(idfrom &&
ID_IS_LINKED(idfrom))) {
1134 TIP_(
"Packed library data-block, click to unpack and make local"));
1140 ICON_LIBRARY_DATA_INDIRECT,
1148 TIP_(
"Indirect library data-block, cannot be made local, "
1149 "Shift + Click to create a library override hierarchy"));
1155 ICON_LIBRARY_DATA_DIRECT,
1163 TIP_(
"Direct linked library data-block, click to make local, "
1164 "Shift + Click to create a library override"));
1172 MEM_new<TemplateID>(__func__, template_ui),
1183 ICON_LIBRARY_DATA_OVERRIDE,
1191 TIP_(
"Library override of linked data-block, click to make fully local, "
1192 "Shift + Click to clear the library override and toggle if it can be edited"));
1195 MEM_new<TemplateID>(__func__, template_ui),
1220 TIP_(
"Display number of users of this data (click to make a single-user copy)"));
1225 MEM_new<TemplateID>(__func__, template_ui),
1246 "ASSET_OT_clear_single",
1250 ICON_ASSET_MANAGER - 1,
1287 "FILE_OT_unpack_item",
1294 TIP_(
"Packed File, click to unpack"));
1305 const char *button_text = (id) ?
"" :
IFACE_(
"Open");
1319 (
id) ?
"" :
IFACE_(
"Open"),
1327 MEM_new<TemplateID>(__func__, template_ui),
1337 (
id) ?
"" :
IFACE_(
"Open"),
1346 MEM_new<TemplateID>(__func__, template_ui),
1377 MEM_new<TemplateID>(__func__, template_ui),
1396 TIP_(
"Unlink data-block "
1397 "(Shift + Click to set users to zero, data will then not be saved)"));
1400 MEM_new<TemplateID>(__func__, template_ui),
1447 const bool horizontal =
1459 const int but_width = name_width +
UI_UNIT_X;
1473 sizeof(id->name) - 2,
1477 MEM_new<TemplateID>(__func__, template_id),
1492 if (active_ptr.
type) {
1493 type = active_ptr.
type;
1497 static_cast<const ID *
>(active_ptr.
data),
1515 const char *unlinkop,
1518 const std::optional<StringRef> text,
1525 const bool live_icon,
1526 const bool hide_buttons)
1538 template_ui.
prop = prop;
1541 template_ui.
scale = scale;
1559 template_ui.
idcode = idcode;
1565 if (template_ui.
idlb) {
1567 layout = &layout->
row(
true);
1571 layout = &layout->
row(
true);
1593 const char *unlinkop,
1595 const bool live_icon,
1596 const std::optional<StringRef> text)
1621 const char *unlinkop,
1622 const std::optional<StringRef> text)
1625 RNA_warning(
"Cannot show Action selector for non-animatable ID: %s", id->
name + 2);
1644 template_ui.
ptr = adt_ptr;
1645 template_ui.
prop = adt_action_prop;
1648 template_ui.
scale = 1.0f;
1662 C, row, template_ui, &RNA_Action,
flag, newop,
nullptr, unlinkop, text,
false,
false);
1671 const char *unlinkop,
1700 const char *unlinkop,
1704 const bool hide_buttons)
1748 scale < 0.5f ? 0.5f : scale,
1784 const std::optional<StringRef> text)
1796 RNA_warning(
"pointer-type property not found: %s.%s",
1798 proptypename.
c_str());
1812 if (!text->is_empty()) {
1813 row->
label(*text, ICON_NONE);
1821 row = &
split->row(
true);
1836 sub = &row->
row(
true);
bool id_can_have_animdata(const ID *id)
AnimData * BKE_animdata_from_id(const ID *id)
bool BKE_collection_has_object_recursive(Collection *collection, Object *ob)
#define FOREACH_SCENE_OBJECT_END
bool BKE_scene_collections_object_remove(Main *bmain, Scene *scene, Object *ob, bool free_us)
bool BKE_collection_child_add(Main *bmain, Collection *parent, Collection *child)
#define FOREACH_SCENE_OBJECT_BEGIN(scene, _instance)
bool BKE_collection_has_collection(const Collection *parent, const Collection *collection)
bool BKE_collection_object_add(Main *bmain, Collection *collection, Object *ob)
wmWindow * CTX_wm_window(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
Collection * CTX_data_collection(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
const char * BKE_idtype_idcode_to_translation_context(short idcode)
#define BKE_idtype_idcode_is_localizable
bool BKE_scene_has_object(Scene *scene, Object *ob)
void BKE_id_newptr_and_tag_clear(ID *id)
@ LIB_ID_MAKELOCAL_ASSET_DATA_CLEAR
bool id_single_user(bContext *C, ID *id, PointerRNA *ptr, PropertyRNA *prop)
bool BKE_id_copy_is_allowed(const ID *id)
#define MAX_ID_FULL_NAME_UI
void BKE_id_full_name_ui_prefix_get(char name[MAX_ID_FULL_NAME_UI], const ID *id, bool add_lib_hint, char separator_char, int *r_prefix_len)
blender::Vector< ID * > BKE_id_ordered_list(const ListBase *lb)
bool BKE_lib_id_make_local(Main *bmain, ID *id, int flags)
void id_fake_user_clear(ID *id)
void id_us_clear_real(ID *id)
void BKE_main_id_flag_listbase(ListBase *lb, int flag, bool value)
void BKE_lib_override_library_id_reset(Main *bmain, ID *id_root, bool do_reset_system_override)
bool BKE_lib_override_library_create(Main *bmain, Scene *scene, ViewLayer *view_layer, Library *owner_library, ID *id_root_reference, ID *id_hierarchy_root_reference, ID *id_instance_hint, ID **r_id_root_override, const bool do_fully_editable)
void BKE_lib_override_library_make_local(Main *bmain, ID *id)
IDOverrideLibrary * BKE_lib_override_library_get(Main *bmain, ID *id, ID *owner_id_hint, ID **r_owner_id)
ListBase * which_libbase(Main *bmain, short type)
void BKE_main_ensure_invariants(Main &bmain, std::optional< blender::Span< ID * > > modified_ids=std::nullopt)
bool BKE_packedfile_id_check(const ID *id)
#define LISTBASE_FOREACH(type, var, list)
#define SNPRINTF_UTF8_RLEN(dst, format,...)
#define POINTER_FROM_INT(i)
#define POINTER_AS_INT(i)
#define BLT_I18NCONTEXT_ID_FREESTYLELINESTYLE
#define BLT_I18NCONTEXT_ID_WORLD
#define BLT_I18NCONTEXT_ID_ACTION
#define BLT_I18NCONTEXT_ID_TEXT
#define BLT_I18NCONTEXT_ID_VOLUME
#define CTX_N_(context, msgid)
#define BLT_I18NCONTEXT_ID_BRUSH
#define BLT_I18NCONTEXT_ID_NODETREE
#define BLT_I18NCONTEXT_ID_CURVES
#define BLT_I18NCONTEXT_ID_IMAGE
#define BLT_I18NCONTEXT_ID_SPEAKER
#define BLT_I18NCONTEXT_ID_WORKSPACE
#define BLT_I18NCONTEXT_ID_CURVE_LEGACY
#define BLT_I18NCONTEXT_ID_LATTICE
#define BLT_I18NCONTEXT_ID_GPENCIL
#define BLT_I18NCONTEXT_ID_LIGHT
#define BLT_I18NCONTEXT_ID_POINTCLOUD
#define BLT_I18NCONTEXT_ID_METABALL
#define BLT_I18NCONTEXT_ID_SOUND
#define BLT_I18NCONTEXT_ID_PARTICLESETTINGS
#define BLT_I18NCONTEXT_ID_LIGHTPROBE
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_DEFAULT
#define BLT_I18NCONTEXT_ID_SCREEN
#define BLT_I18NCONTEXT_ID_OBJECT
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
#define BLT_I18NCONTEXT_ID_PALETTE
#define BLT_I18NCONTEXT_ID_ARMATURE
#define BLT_I18N_MSGID_MULTI_CTXT(msgid,...)
#define BLT_I18NCONTEXT_ID_PAINTCURVE
#define BLT_I18NCONTEXT_ID_SCENE
#define BLT_I18NCONTEXT_ID_MATERIAL
#define BLT_I18NCONTEXT_ID_MESH
#define BLT_I18NCONTEXT_ID_CAMERA
#define BLT_I18NCONTEXT_ID_TEXTURE
#define BLT_I18NCONTEXT_ID_MASK
void DEG_relations_tag_update(Main *bmain)
#define ID_IS_PACKED(_id)
#define ID_IS_OVERRIDE_LIBRARY_REAL(_id)
#define ID_IS_OVERRIDABLE_LIBRARY(_id)
#define ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY(_id)
#define ID_IS_LINKED(_id)
#define ID_IS_EDITABLE(_id)
#define ID_REAL_USERS(id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
@ LIBOVERRIDE_FLAG_SYSTEM_DEFINED
Object groups, one object can be in many groups at once.
#define RGN_ALIGN_ENUM_FROM_MASK(align)
@ WORKSPACE_USE_PIN_SCENE
void ED_undo_push(bContext *C, const char *str)
static void split(const char *text, const char *seps, char ***str, int *count)
short RNA_type_to_ID_code(const StructRNA *type)
#define RNA_warning(format,...)
void * but_func_argN_copy(const void *argN)
void but_func_argN_free(void *argN)
void UI_but_flag_disable(uiBut *but, int flag)
uiBut * uiDefIconTextBut(uiBlock *block, uiButTypeWithPointerType but_and_ptr_type, int retval, int icon, blender::StringRef str, int x, int y, short width, short height, void *poin, std::optional< blender::StringRef > tip)
uiBut * uiDefButR(uiBlock *block, ButType type, int retval, std::optional< blender::StringRef > str, int x, int y, short width, short height, PointerRNA *ptr, blender::StringRefNull propname, int index, float min, float max, std::optional< blender::StringRef > tip)
void UI_but_func_rename_full_set(uiBut *but, std::function< void(std::string &new_name)> rename_full_func)
PointerRNA * UI_but_extra_operator_icon_add(uiBut *but, blender::StringRefNull opname, blender::wm::OpCallContext opcontext, int icon)
uiBut * uiDefIconBut(uiBlock *block, uiButTypeWithPointerType but_and_ptr_type, int retval, int icon, int x, int y, short width, short height, void *poin, float min, float max, std::optional< blender::StringRef > tip)
const uiStyle * UI_style_get_dpi()
void UI_but_drawflag_enable(uiBut *but, int flag)
uiBut * uiDefIconButR(uiBlock *block, ButType type, int retval, int icon, int x, int y, short width, short height, PointerRNA *ptr, blender::StringRefNull propname, int index, float min, float max, std::optional< blender::StringRef > tip)
uiBut * uiDefIconTextButO(uiBlock *block, ButType type, blender::StringRefNull, blender::wm::OpCallContext opcontext, int icon, blender::StringRef str, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
uiBut * UI_context_active_but_get(const bContext *C)
uiBut * uiDefIconButO(uiBlock *block, ButType type, blender::StringRefNull opname, blender::wm::OpCallContext opcontext, int icon, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
@ UI_TEMPLATE_ID_FILTER_AVAILABLE
@ UI_TEMPLATE_ID_FILTER_ALL
uiBut * uiDefButR_prop(uiBlock *block, ButType type, int retval, std::optional< blender::StringRef > str, int x, int y, short width, short height, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, std::optional< blender::StringRef > tip)
bool UI_search_item_add(uiSearchItems *items, blender::StringRef name, void *poin, int iconid, int but_flag, uint8_t name_prefix_offset)
PointerRNA * UI_but_operator_ptr_ensure(uiBut *but)
void UI_block_align_begin(uiBlock *block)
int UI_fontstyle_string_width(const uiFontStyle *fs, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
void uiTemplateTextureShow(uiLayout *layout, const bContext *C, PointerRNA *ptr, PropertyRNA *prop)
void UI_but_drag_set_id(uiBut *but, ID *id)
ARegion * UI_tooltip_create_from_search_item_generic(bContext *C, const ARegion *searchbox_region, const rcti *item_rect, ID *id)
void UI_but_funcN_set(uiBut *but, uiButHandleNFunc funcN, void *argN, void *arg2, uiButArgNFree func_argN_free_fn=MEM_freeN, uiButArgNCopy func_argN_copy_fn=MEM_dupallocN)
uiBut * uiDefBut(uiBlock *block, uiButTypeWithPointerType but_and_ptr_type, int retval, blender::StringRef str, int x, int y, short width, short height, void *poin, float min, float max, std::optional< blender::StringRef > tip)
void UI_but_flag_enable(uiBut *but, int flag)
void UI_block_align_end(uiBlock *block)
int UI_icon_from_library(const ID *id)
uiLayout * uiItemL_respect_property_split(uiLayout *layout, blender::StringRef text, int icon)
#define ND_LIB_OVERRIDE_CHANGED
#define ND_SPACE_OUTLINER
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
constexpr const char * c_str() const
void add(const StringRef str, T *user_data, const int weight=0)
Vector< T * > query(const StringRef query) const
bool ED_id_rename(Main &bmain, ID &id, blender::StringRefNull name)
int ui_but_align_opposite_to_area_align_get(const ARegion *region)
int ui_id_icon_get(const bContext *C, ID *id, const bool big)
static void template_id_workspace_pin_extra_icon(const TemplateID &template_ui, uiBut *but)
void uiTemplateAnyID(uiLayout *layout, PointerRNA *ptr, const StringRefNull propname, const StringRefNull proptypename, const std::optional< StringRef > text)
ID * ui_template_id_liboverride_hierarchy_make(bContext *C, Main *bmain, ID *owner_id, ID *id, const char **r_undo_push_label)
void uiTemplateIDPreview(uiLayout *layout, bContext *C, PointerRNA *ptr, const StringRefNull propname, const char *newop, const char *openop, const char *unlinkop, int rows, int cols, int filter, const bool hide_buttons)
#define template_id_context(type)
static bool id_search_add(const bContext *C, TemplateID *template_ui, uiSearchItems *items, ID *id)
static void id_search_cb_tagged(const bContext *C, void *arg_template, const char *str, uiSearchItems *items)
static void ui_template_id(uiLayout *layout, const bContext *C, PointerRNA *ptr, const StringRefNull propname, const char *newop, const char *openop, const char *unlinkop, const char *menu, const std::optional< StringRef > text, int flag, int prv_rows, int prv_cols, int filter, bool use_tabs, float scale, const bool live_icon, const bool hide_buttons)
static ARegion * template_ID_search_menu_item_tooltip(bContext *C, ARegion *region, const rcti *item_rect, void *, void *active)
static uiBut * template_id_def_new_but(uiBlock *block, const ID *id, const TemplateID &template_ui, StructRNA *type, const char *const newop, const bool editable, const bool id_open, const bool use_tab_but, int but_height)
void uiTemplateAction(uiLayout *layout, const bContext *C, ID *id, const char *newop, const char *unlinkop, const std::optional< StringRef > text)
static void template_ID_tabs(const bContext *C, uiLayout *layout, TemplateID &template_id, StructRNA *type, int flag, const char *newop, const char *menu)
static void id_search_cb_objects_from_scene(const bContext *C, void *arg_template, const char *str, uiSearchItems *items, const bool)
ID * UI_context_active_but_get_tab_ID(bContext *C)
static void template_id_liboverride_hierarchy_collections_tag_recursive(Collection *root_collection, ID *target_id, const bool do_parents)
static void template_ID_set_property_exec_fn(bContext *C, void *arg_template, void *item)
static void template_ID(const bContext *C, uiLayout *layout, TemplateID &template_ui, StructRNA *type, int flag, const char *newop, const char *openop, const char *unlinkop, const std::optional< StringRef > text, const bool live_icon, const bool hide_buttons)
static StringRef template_id_browse_tip(const StructRNA *type)
static bool id_search_allows_id(TemplateID *template_ui, const int flag, ID *id, const char *query)
void uiTemplateIDTabs(uiLayout *layout, bContext *C, PointerRNA *ptr, const StringRefNull propname, const char *newop, const char *menu, int filter)
void UI_context_active_but_prop_get_templateID(const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop)
static uiBlock * id_search_menu(bContext *C, ARegion *region, void *arg_litem)
static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
void uiTemplateGpencilColorPreview(uiLayout *layout, bContext *C, PointerRNA *ptr, const StringRefNull propname, int rows, int cols, float scale, int filter)
void uiTemplateIDBrowse(uiLayout *layout, bContext *C, PointerRNA *ptr, const StringRefNull propname, const char *newop, const char *openop, const char *unlinkop, int filter, const char *text)
void uiTemplateID(uiLayout *layout, const bContext *C, PointerRNA *ptr, const StringRefNull propname, const char *newop, const char *openop, const char *unlinkop, int filter, const bool live_icon, const std::optional< StringRef > text)
static void template_id_liboverride_hierarchy_make(bContext *C, Main *bmain, TemplateID *template_ui, PointerRNA *idptr, const char **r_undo_push_label)
static void id_search_cb(const bContext *C, void *arg_template, const char *str, uiSearchItems *items, const bool)
static void template_id_liboverride_hierarchy_collection_root_find_recursive(Collection *collection, const int parent_level, Collection **r_collection_parent_best, int *r_parent_level_best)
void template_add_button_search_menu(const bContext *C, uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, uiBlockCreateFunc block_func, void *block_argN, const std::optional< blender::StringRef > tip, const bool use_previews, const bool editable, const bool live_icon, uiButArgNFree func_argN_free_fn, uiButArgNCopy func_argN_copy_fn)
int template_search_textbut_height()
int template_search_textbut_width(PointerRNA *ptr, PropertyRNA *name_prop)
uiBlock * template_common_search_menu(const bContext *C, ARegion *region, uiButSearchUpdateFn search_update_fn, void *search_arg, uiButHandleFunc search_exec_fn, void *active_item, uiButSearchTooltipFn item_tooltip_fn, const int preview_rows, const int preview_cols, float scale)
void object_single_user_make(Main *bmain, Scene *scene, Object *ob)
PropertyRNA * RNA_struct_type_find_property(StructRNA *srna, const char *identifier)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
StructRNA * RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr_value, ReportList *reports)
PropertyType RNA_property_type(PropertyRNA *prop)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
const char * RNA_struct_identifier(const StructRNA *type)
bool RNA_property_pointer_poll(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *value)
int RNA_property_flag(PropertyRNA *prop)
const char * RNA_struct_ui_description(const StructRNA *type)
bool RNA_property_editable(const PointerRNA *ptr, PropertyRNA *prop)
PointerRNA RNA_id_pointer_create(ID *id)
struct CollectionChild * next
struct CollectionParent * next
CollectionRuntimeHandle * runtime
struct ID * hierarchy_root
IDOverrideLibrary * override_library
struct Collection * instance_collection
struct Collection * master_collection
void alignment_set(blender::ui::LayoutAlign alignment)
void label(blender::StringRef name, int icon)
void context_ptr_set(blender::StringRef name, const PointerRNA *ptr)
uiLayout & row(bool align)
uiLayout & split(float percentage, bool align)
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)
void WM_global_reportf(eReportType type, const char *format,...)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
WorkSpace * WM_window_get_active_workspace(const wmWindow *win)