39#include "RNA_prototypes.hh"
65 ListBaseT<ID> *
idlb =
nullptr;
119 if ((
id->name[2] ==
'.') && (query[0] !=
'.')) {
134 const bool use_lib_prefix = template_ui->
preview || iconid;
139 int name_prefix_offset;
141 if (!use_lib_prefix) {
166 ListBaseT<ID> *lb = template_ui->
idlb;
174 search.
add(
id.name + 2, &
id);
180 for (
ID *
id : filtered_ids) {
196 ListBaseT<ID> *lb = template_ui->
idlb;
206 search.
add(
id.name + 2, &
id);
214 for (
ID *
id : filtered_ids) {
231 ListBaseT<ID> *lb = template_ui->
idlb;
232 Scene *scene =
nullptr;
236 scene = id_cast<Scene *>(id_from);
254 ID *active_id =
static_cast<ID *
>(active);
263 void (*id_search_update_fn)(
267 template_ui = *(
static_cast<TemplateID *
>(arg_litem));
284 active_item_ptr.
data,
294 void (*id_search_update_fn)(
297 template_ui = *(
static_cast<TemplateID *
>(arg_litem));
329 if (!ptr || !prop_name) {
345 *r_ptr = std::move(ptr_copy);
351 const int parent_level,
353 int *r_parent_level_best)
359 if (parent_level > *r_parent_level_best) {
360 *r_parent_level_best = parent_level;
361 *r_collection_parent_best = collection;
367 if (iter->collection->id.lib != collection->
id.
lib &&
ID_IS_LINKED(iter->collection)) {
371 iter->collection, parent_level + 1, r_collection_parent_best, r_parent_level_best);
376 Collection *root_collection,
ID *target_id,
const bool do_parents)
396 if (
ID_IS_LINKED(iter->collection) && iter->collection->id.lib != target_id->
lib) {
410 iter->collection, target_id,
false);
417 const char *undo_push_label;
418 if (r_undo_push_label ==
nullptr) {
419 r_undo_push_label = &undo_push_label;
430 *r_undo_push_label =
"Make Library Override Hierarchy Editable";
434 *r_undo_push_label =
"Clear Library Override Hierarchy";
452 if (object_active ==
nullptr &&
GS(owner_id->
name) ==
ID_OB) {
453 object_active = id_cast<Object *>(owner_id);
455 if (object_active !=
nullptr) {
461 object_active =
nullptr;
466 object_active =
nullptr;
471 Collection *collection_active = collection_active_context;
472 if (collection_active ==
nullptr &&
GS(owner_id->
name) ==
ID_GR) {
473 collection_active = id_cast<Collection *>(owner_id);
475 if (collection_active !=
nullptr) {
477 if (collection_active->
id.
lib !=
id->lib ||
482 collection_active =
nullptr;
485 int parent_level_best = -1;
488 collection_active, 0, &collection_parent_best, &parent_level_best);
489 collection_active = collection_parent_best;
494 collection_active =
nullptr;
497 if (collection_active ==
nullptr && object_active !=
nullptr &&
512 int parent_level_best = -1;
515 &collection_iter, 0, &collection_parent_best, &parent_level_best);
516 collection_active = collection_parent_best;
521 ID *id_override =
nullptr;
524 switch (
GS(
id->name)) {
526 if (collection_active !=
nullptr &&
530 if (object_active !=
nullptr) {
538 &collection_active->
id,
543 else if (object_active !=
nullptr && !
ID_IS_LINKED(object_active) &&
559 if (collection_active !=
nullptr &&
563 if (object_active !=
nullptr) {
571 &collection_active->
id,
577 if (object_active !=
nullptr) {
581 bmain, scene, view_layer,
nullptr,
id,
nullptr,
nullptr, &id_override,
false);
599 if (object_active !=
nullptr) {
600 if (collection_active !=
nullptr &&
610 &collection_active->
id,
630 bmain, scene, view_layer,
nullptr,
id,
id,
nullptr, &id_override,
false);
649 if (id_override !=
nullptr) {
656 Object *object_hierarchy_root =
reinterpret_cast<Object *
>(hierarchy_root);
678 *r_undo_push_label =
"Make Library Override Hierarchy";
698 const char **r_undo_push_label)
700 ID *
id =
static_cast<ID *
>(idptr->
data);
704 C, bmain, owner_id,
id, r_undo_push_label);
706 if (id_override !=
nullptr) {
726 ID *
id =
static_cast<ID *
>(idptr.
data);
728 const char *undo_push_label;
751 ID *
id =
static_cast<ID *
>(idptr.
data);
753 const char *undo_push_label =
nullptr;
771 if (undo_push_label) {
782 ID *
id =
static_cast<ID *
>(idptr.
data);
784 const char *undo_push_label =
nullptr;
802 if (undo_push_label !=
nullptr) {
811 ID *
id =
static_cast<ID *
>(idptr.
data);
816 const bool do_scene_obj = ((
GS(
id->name) ==
ID_OB) && (pprop.
ptr.
type == RNA_LayerObjects));
842 return N_(
"Browse Scene to be linked");
844 return N_(
"Browse Object to be linked");
846 return N_(
"Browse Mesh Data to be linked");
848 return N_(
"Browse Curve Data to be linked");
850 return N_(
"Browse Metaball Data to be linked");
852 return N_(
"Browse Material to be linked");
854 return N_(
"Browse Texture to be linked");
856 return N_(
"Browse Image to be linked");
858 return N_(
"Browse Line Style Data to be linked");
860 return N_(
"Browse Lattice Data to be linked");
862 return N_(
"Browse Light Data to be linked");
864 return N_(
"Browse Camera Data to be linked");
866 return N_(
"Browse World Settings to be linked");
868 return N_(
"Choose Screen layout");
870 return N_(
"Browse Text to be linked");
872 return N_(
"Browse Speaker Data to be linked");
874 return N_(
"Browse Sound to be linked");
876 return N_(
"Browse Armature data to be linked");
878 return N_(
"Browse Action to be linked");
880 return N_(
"Browse Node Tree to be linked");
882 return N_(
"Browse Brush to be linked");
884 return N_(
"Browse Particle Settings to be linked");
886 return N_(
"Browse Grease Pencil Data to be linked");
888 return N_(
"Browse Movie Clip to be linked");
890 return N_(
"Browse Mask to be linked");
892 return N_(
"Browse Palette Data to be linked");
894 return N_(
"Browse Paint Curve Data to be linked");
896 return N_(
"Browse Cache Files to be linked");
898 return N_(
"Browse Workspace to be linked");
900 return N_(
"Browse Light Probe to be linked");
902 return N_(
"Browse Curves Data to be linked");
904 return N_(
"Browse Point Cloud Data to be linked");
906 return N_(
"Browse Volume Data to be linked");
908 return N_(
"Browse Grease Pencil Data to be linked");
919 return N_(
"Browse ID data to be linked");
936 "WORKSPACE_OT_scene_pin_toggle",
946#ifdef WITH_INTERNATIONAL
955# define template_id_context(type) 0
962 const char *
const newop,
965 const bool use_tab_but,
1012 const int icon = (
id && !use_tab_but) ? ICON_DUPLICATE : ICON_ADD;
1035 block, but_type, icon, button_text, 0, 0,
w, but_height,
nullptr, std::nullopt);
1042#ifndef WITH_INTERNATIONAL
1056 const char *unlinkop,
1057 const std::optional<StringRef> text,
1058 const bool live_icon,
1059 const bool hide_buttons)
1066 ID *
id =
static_cast<ID *
>(idptr.
data);
1088 if (text && !text->is_empty()) {
1100 MEM_new<TemplateID>(__func__, template_ui),
1112 const bool user_alert = (
id->us <= 0);
1156 if (!hide_buttons && !(idfrom &&
ID_IS_LINKED(idfrom))) {
1170 TIP_(
"Packed library data-block, click to unpack and make local"));
1175 ICON_LIBRARY_DATA_INDIRECT,
1183 TIP_(
"Indirect library data-block, cannot be made local, "
1184 "Shift + Click to create a library override hierarchy"));
1189 ICON_LIBRARY_DATA_DIRECT,
1197 TIP_(
"Direct linked library data-block, click to make local, "
1198 "Shift + Click to create a library override"));
1208 (
GS(idfrom->
name) ==
ID_OB) && (
object = id_cast<Object *>(idfrom)) &&
1213 (
object->matbits && (
object->matbits[
math::max(
object->actcol - 1, 0)] == 0)))
1216 N_(
"Material is assigned to the object data, which is linked/packed "
1217 "and therefore not editable. Change to link this material slot to the "
1218 "object instead, or make the object data local."));
1229 ICON_LIBRARY_DATA_OVERRIDE,
1237 TIP_(
"Library override of linked data-block, click to make fully local, "
1238 "Shift + Click to clear the library override and toggle if it can be edited"));
1261 TIP_(
"Display number of users of this data (click to make a single-user copy)"));
1283 "ASSET_OT_clear_single",
1287 ICON_ASSET_MANAGER - 1,
1323 "FILE_OT_unpack_item",
1330 TIP_(
"Packed File, click to unpack"));
1341 const char *button_text = (
id) ?
"" :
IFACE_(
"Open");
1355 (
id) ?
"" :
IFACE_(
"Open"),
1366 (
id) ?
"" :
IFACE_(
"Open"),
1382 if (
id && (flag &
UI_ID_DELETE) && (hide_buttons ==
false)) {
1412 TIP_(
"Unlink data-block "
1413 "(Shift + Click to set users to zero, data will then not be saved)"));
1459 const bool horizontal =
1471 const int but_width = name_width +
UI_UNIT_X;
1484 sizeof(
id->name) - 2,
1501 type = active_ptr.
type;
1505 static_cast<const ID *
>(active_ptr.
data),
1523 const char *unlinkop,
1526 const std::optional<StringRef> text,
1533 const bool live_icon,
1534 const bool hide_buttons)
1545 template_ui.
ptr = *ptr;
1546 template_ui.
prop = prop;
1567 template_ui.
idcode = idcode;
1573 if (template_ui.
idlb) {
1581 C, row, template_ui, type, flag, newop, openop, unlinkop, text, live_icon, hide_buttons);
1598 RNA_warning(
"idcode is not an ID type: %d.", idcode);
1603 template_ui.
ptr = *ptr;
1604 template_ui.
prop = prop;
1605 template_ui.
scale = 1.0f;
1609 template_ui.
idcode = idcode;
1610 template_ui.
idlb = lb;
1624 const int width = std::clamp(
1629 MEM_new<TemplateID>(__func__, template_ui),
1630 id ?
id->name + 2 :
nullptr,
1648 const char *unlinkop,
1650 const bool live_icon,
1651 const std::optional<StringRef> text)
1676 const char *unlinkop,
1677 const std::optional<StringRef> text)
1680 RNA_warning(
"Cannot show Action selector for non-animatable ID: %s",
id->name + 2);
1699 template_ui.
ptr = adt_ptr;
1700 template_ui.
prop = adt_action_prop;
1703 template_ui.
scale = 1.0f;
1716 template_ID(
C, row, template_ui, RNA_Action, flag, newop,
nullptr, unlinkop, text,
false,
false);
1725 const char *unlinkop,
1754 const char *unlinkop,
1758 const bool hide_buttons)
1838 const std::optional<StringRef> text)
1850 RNA_warning(
"pointer-type property not found: %s.%s",
1852 proptypename.
c_str());
1866 if (!text->is_empty()) {
1867 row->
label(*text, ICON_NONE);
1875 row = &
split.row(
true);
1890 sub = &row->
row(
true);
#define FOREACH_SCENE_OBJECT_END
#define FOREACH_SCENE_OBJECT_BEGIN(scene, _instance)
#define BKE_idtype_idcode_is_localizable
#define MAX_ID_FULL_NAME_UI
#define SNPRINTF_UTF8_RLEN(dst, format,...)
#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
#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)
Object groups, one object can be in many groups at once.
#define RGN_ALIGN_ENUM_FROM_MASK(align)
#define RNA_warning(format,...)
#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
float3x3 scale(float3x3 mat, float2 scale)
#define template_id_context(type)
#define TEMPLATE_SEARCH_TEXTBUT_MIN_WIDTH
void object_single_user_make(Main *bmain, Scene *scene, Object *ob)
void split(const std::string &s, const char delim, std::vector< std::string > &tokens)
T max(const T &a, const T &b)
void template_greasepencil_color_preview(Layout *layout, bContext *C, PointerRNA *ptr, StringRefNull propname, int rows, int cols, float scale, int filter)
Button * uiDefIconTextBut(Block *block, ButtonTypeWithPointerType but_and_ptr_type, int icon, StringRef str, int x, int y, short width, short height, void *poin, std::optional< StringRef > tip)
Button * uiDefButR(Block *block, ButtonType type, std::optional< StringRef > str, int x, int y, short width, short height, PointerRNA *ptr, StringRefNull propname, int index, float min, float max, std::optional< StringRef > tip)
Button * uiDefIconButR(Block *block, ButtonType type, int icon, int x, int y, short width, short height, PointerRNA *ptr, StringRefNull propname, int index, float min, float max, std::optional< StringRef > tip)
void template_action(Layout *layout, const bContext *C, ID *id, const char *newop, const char *unlinkop, std::optional< StringRef > text)
static void template_ui_alone(bContext &C, PropertyPointerRNA &pprop)
int template_search_textbut_width(PointerRNA *ptr, PropertyRNA *name_prop)
void template_ID_session_uid(Layout &layout, bContext *C, PointerRNA *ptr, StringRefNull propname, short idcode)
static ARegion * template_ID_search_menu_item_tooltip(bContext *C, ARegion *region, const rcti *item_rect, void *, void *active)
ID * context_active_but_get_tab_ID(bContext *C)
void button_func_set(Button *but, std::function< void(bContext &)> func)
static void template_ui_delete(bContext &C, PropertyPointerRNA &pprop)
static Button * template_id_def_new_but(Block *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)
static void template_ID_tabs(const bContext *C, Layout &layout, TemplateID &template_id, StructRNA *type, int flag, const char *newop, const char *menu)
int fontstyle_string_width(const uiFontStyle *fs, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
void text_button_func_rename_full_set(Button *but, std::function< void(StringRefNull new_name)> rename_full_func)
void template_id_preview(Layout *layout, bContext *C, PointerRNA *ptr, StringRefNull propname, const char *newop, const char *openop, const char *unlinkop, int rows, int cols, int filter=TEMPLATE_ID_FILTER_ALL, bool hide_buttons=false)
void template_add_button_search_menu(const bContext *C, Layout &layout, Block *block, PointerRNA *ptr, PropertyRNA *prop, BlockCreateFunc block_func, void *block_argN, const std::optional< StringRef > tip, const bool use_previews, const bool editable, const bool live_icon, ButtonArgNFree func_argN_free_fn, ButtonArgNCopy func_argN_copy_fn)
static void template_ID_set_int_property_session_uid_exec_fn(bContext *, void *arg_template, void *item)
PointerRNA * button_operator_ptr_ensure(Button *but)
void block_align_begin(Block *block)
static StringRef template_id_browse_tip(const StructRNA *type)
static Block * id_search_menu_session_uid(bContext *C, ARegion *region, void *arg_litem)
Block * template_common_search_menu(const bContext *C, ARegion *region, ButtonSearchUpdateFn search_update_fn, void *search_arg, ButtonHandleFunc search_exec_fn, void *active_item, ButtonSearchTooltipFn item_tooltip_fn, const int preview_rows, const int preview_cols, float scale)
int id_icon_get(const bContext *C, ID *id, const bool big)
Button * uiDefIconButO(Block *block, ButtonType type, StringRefNull opname, wm::OpCallContext opcontext, int icon, int x, int y, short width, short height, std::optional< StringRef > tip)
static void template_ui_make_local(bContext &C, PropertyPointerRNA &pprop)
const uiStyle * style_get_dpi()
void template_id(Layout *layout, const bContext *C, PointerRNA *ptr, StringRefNull propname, const char *newop, const char *openop, const char *unlinkop, int filter=TEMPLATE_ID_FILTER_ALL, bool live_icon=false, std::optional< StringRef > text=std::nullopt)
static void template_id_workspace_pin_extra_icon(const TemplateID &template_ui, Button *but)
void button_drawflag_enable(Button *but, int flag)
void template_id_browse(Layout *layout, bContext *C, PointerRNA *ptr, StringRefNull propname, const char *newop, const char *openop, const char *unlinkop, int filter=TEMPLATE_ID_FILTER_ALL, const char *text=nullptr)
ID * template_id_liboverride_hierarchy_make(bContext *C, Main *bmain, ID *owner_id, ID *id, const char **r_undo_push_label)
static void id_search_cb(const bContext *C, void *arg_template, const char *str, SearchItems *items, const bool)
void button_disable(Button *but, const char *disabled_hint)
void button_flag_enable(Button *but, int64_t flag)
Button * uiDefBut(Block *block, ButtonTypeWithPointerType but_and_ptr_type, StringRef str, int x, int y, short width, short height, void *poin, float min, float max, std::optional< StringRef > tip)
void context_active_but_prop_get_templateID(const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop)
Button * uiDefButR_prop(Block *block, ButtonType type, std::optional< StringRef > str, int x, int y, short width, short height, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, std::optional< StringRef > tip)
static bool id_search_allows_id(TemplateID *template_ui, const int flag, ID *id, const char *query)
void * but_func_argN_copy(const void *argN)
static void id_search_cb_tagged(const bContext *C, void *arg_template, const char *str, SearchItems *items)
void block_align_end(Block *block)
@ TEMPLATE_ID_FILTER_AVAILABLE
Button * uiDefIconTextButO(Block *block, ButtonType type, StringRefNull, wm::OpCallContext opcontext, int icon, StringRef str, int x, int y, short width, short height, std::optional< StringRef > tip)
bool search_item_add(SearchItems *items, StringRef name, void *poin, int iconid, int64_t but_flag, uint8_t name_prefix_offset)
static Block * id_search_menu(bContext *C, ARegion *region, void *arg_litem)
void button_flag_disable(Button *but, int64_t flag)
void template_any_id(Layout *layout, PointerRNA *ptr, StringRefNull propname, StringRefNull proptypename, std::optional< StringRef > text)
void but_func_argN_free(void *argN)
void def_but_icon(Button *but, const int icon, const int64_t flag)
Layout * uiItemL_respect_property_split(Layout *layout, StringRef text, int icon)
static void template_id_liboverride_hierarchy_collections_tag_recursive(Collection *root_collection, ID *target_id, const bool do_parents)
Button * uiDefIconBut(Block *block, ButtonTypeWithPointerType but_and_ptr_type, int icon, int x, int y, short width, short height, void *poin, float min, float max, std::optional< StringRef > tip)
PointerRNA * button_extra_operator_icon_add(Button *but, StringRefNull opname, wm::OpCallContext opcontext, int icon)
Button * context_active_but_get(const bContext *C)
static void template_ui_override(bContext &C, PropertyPointerRNA &pprop)
ARegion * tooltip_create_from_search_item_generic(bContext *C, const ARegion *searchbox_region, const rcti *item_rect, ID *id)
Button * uiDefBlockButN(Block *block, BlockCreateFunc func, void *argN, StringRef str, int x, int y, short width, short height, std::optional< StringRef > tip, ButtonArgNFree func_argN_free_fn=MEM_delete_void, ButtonArgNCopy func_argN_copy_fn=MEM_dupalloc_void)
int icon_from_library(const ID *id)
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)
static void template_ID(const bContext *C, Layout &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 void template_ID_set_property_exec_fn(bContext *C, void *arg_template, void *item)
void block_layout_set_current(Block *block, Layout *layout)
PropertySplitWrapper uiItemPropertySplitWrapperCreate(Layout *parent_layout)
void template_id_tabs(Layout *layout, bContext *C, PointerRNA *ptr, StringRefNull propname, const char *newop, const char *menu, int filter=TEMPLATE_ID_FILTER_ALL)
static bool id_search_add(const bContext *C, TemplateID *template_ui, SearchItems *items, ID *id)
int template_search_textbut_height()
int button_align_opposite_to_area_align_get(const ARegion *region)
static void id_search_cb_objects_from_scene(const bContext *C, void *arg_template, const char *str, SearchItems *items, const bool)
void button_drag_set_id(Button *but, ID *id)
void BKE_main_id_flag_listbase(ListBaseT< ID > *lb, int flag, bool value)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void WM_global_reportf(eReportType type, const char *format,...)
@ WORKSPACE_USE_PIN_SCENE
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
const PointerRNA * CTX_store_ptr_lookup(const bContextStore *store, StringRef name, const StructRNA *type=nullptr)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
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 RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr_value, ReportList *reports)
PointerRNA RNA_id_pointer_create(ID *id)
ID * BKE_libblock_find_session_uid(Main *bmain, short type, uint32_t session_uid)
const char * RNA_property_identifier(const PropertyRNA *prop)
bool BKE_packedfile_id_check(const ID *id)
StructRNA * ID_code_to_RNA_type(short idcode)
bool BKE_collection_child_add(Main *bmain, Collection *parent, Collection *child)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
std::string RNA_path_name_to_infix(const StringRefNull string)
MenuType * WM_menutype_find(const StringRef idname, bool quiet)
bool BKE_scene_collections_object_remove(Main *bmain, Scene *scene, Object *ob, bool free_us)
short RNA_type_to_ID_code(const StructRNA *type)
wmWindow * CTX_wm_window(const bContext *C)
bool id_can_have_animdata(const ID *id)
void id_us_clear_real(ID *id)
@ LIBOVERRIDE_FLAG_SYSTEM_DEFINED
ViewLayer * CTX_data_view_layer(const bContext *C)
void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
PropertyType RNA_property_type(PropertyRNA *prop)
AnimData * BKE_animdata_from_id(const ID *id)
bool BKE_scene_has_object(const Main &bmain, Scene *scene, Object *ob)
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)
StructRNA * RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
void ED_undo_push(bContext *C, const char *str, UndoEncodeHints hints=UndoEncodeHints(0))
void BKE_main_ensure_invariants(Main &bmain, std::optional< Span< ID * > > modified_ids=std::nullopt)
int RNA_property_flag(PropertyRNA *prop)
void BKE_lib_override_library_make_local(Main *bmain, ID *id)
void BKE_id_newptr_and_tag_clear(ID *id)
WorkSpace * WM_window_get_active_workspace(const wmWindow *win)
bool RNA_property_is_idprop(const PropertyRNA *prop)
bool BKE_collection_object_add(Main *bmain, Collection *collection, Object *ob)
PropertyRNA * RNA_struct_type_find_property(StructRNA *srna, const char *identifier)
bool BKE_collection_has_collection(const Collection *parent, const Collection *collection)
void BKE_lib_override_library_id_reset(Main *bmain, ID *id_root, bool do_reset_system_override)
Vector< ID * > BKE_id_ordered_list(const ListBaseT< ID > *lb)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
int RNA_struct_ui_icon(const StructRNA *type)
bool id_single_user(bContext *C, ID *id, PointerRNA *ptr, PropertyRNA *prop)
bool RNA_struct_is_ID(const StructRNA *type)
const char * RNA_struct_identifier(const StructRNA *type)
void uiTemplateTextureShow(ui::Layout *layout, const bContext *C, PointerRNA *ptr, PropertyRNA *prop)
const char * RNA_struct_ui_description(const StructRNA *type)
bool ED_id_rename(Main &bmain, ID &id, StringRefNull name)
Main * CTX_data_main(const bContext *C)
@ USER_HIDE_DOT_DATABLOCK
ID_Type GS(const char *name)
bool RNA_property_editable(const PointerRNA *ptr, PropertyRNA *prop)
std::optional< StringRefNull > CTX_store_string_lookup(const bContextStore *store, StringRef name)
bool BKE_id_copy_is_allowed(const ID *id)
void DEG_relations_tag_update(Main *bmain)
Scene * CTX_data_scene(const bContext *C)
@ LIB_ID_MAKELOCAL_ASSET_DATA_CLEAR
bool BKE_collection_has_object_recursive(Collection *collection, Object *ob)
bool BKE_lib_id_make_local(Main *bmain, ID *id, int flags)
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
Object * CTX_data_active_object(const bContext *C)
void id_fake_user_clear(ID *id)
ARegion * CTX_wm_region(const bContext *C)
bool RNA_property_pointer_poll(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *value)
const char * BKE_idtype_idcode_to_translation_context(short idcode)
const char * RNA_property_ui_name(const PropertyRNA *prop, const PointerRNA *ptr)
IDOverrideLibrary * BKE_lib_override_library_get(Main *bmain, ID *id, ID *owner_id_hint, ID **r_owner_id)
ListBaseT< ID > * which_libbase(Main *bmain, short type)
Collection * CTX_data_collection(const bContext *C)
eRegion_Alignment alignment
bke::CollectionRuntime * runtime
ListBaseT< CollectionChild > children
eID_OverrideLib_Flag flag
struct ID * hierarchy_root
IDOverrideLibrary * override_library
ListBaseT< Collection > collections
struct Collection * instance_collection
struct Collection * master_collection
ListBaseT< CollectionParent > parents
void alignment_set(LayoutAlign alignment)
bool use_property_split() const
void label(StringRef name, int icon)
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)
Layout & split(float percentage, bool align)
void context_string_set(StringRef name, StringRef value)
void context_ptr_set(StringRef name, const PointerRNA *ptr)