115 const TreeElement *te,
int *scenelevel,
int *objectlevel,
int *idlevel,
int *datalevel)
117 *scenelevel = *objectlevel = *idlevel = *datalevel = 0;
126 *datalevel = tselem->
type;
129 const ID_Type idcode = tselem->
id->id_type();
130 bool is_standard_id =
false;
174 is_standard_id =
true;
186 is_standard_id =
true;
189 if (is_standard_id) {
195 BLI_assert(((*scenelevel != 0) && (*objectlevel == 0) && (*idlevel == 0) && (*datalevel == 0)) ||
196 ((*scenelevel == 0) && (*objectlevel != 0) && (*idlevel == 0) && (*datalevel == 0)) ||
197 ((*scenelevel == 0) && (*objectlevel == 0) && (*idlevel != 0) && (*datalevel == 0)) ||
198 ((*scenelevel == 0) && (*objectlevel == 0) && (*idlevel == 0) && (*datalevel != 0)) ||
200 ((*scenelevel == 0) && (*objectlevel == 0) && (*idlevel == 0) && (*datalevel == 0)));
236 "Cannot unlink action '%s'. It's not clear which object or object-data it "
237 "should be unlinked from, there's no object or object-data as parent in the "
256 if (!te_is_material) {
267 "Cannot unlink material '%s'. It's not clear which object or object-data it "
268 "should be unlinked from, there's no object or object-data as parent in the "
277 "Cannot unlink the material '%s' from linked object data",
285 switch (tsep->
id->id_type()) {
287 Object *ob = id_cast<Object *>(tsep->
id);
294 totcol =
mesh->totcol;
299 Curve *cu = id_cast<Curve *>(tsep->
id);
323 Volume *volume = id_cast<Volume *>(tsep->
id);
332 if (matar !=
nullptr) [[likely]] {
333 for (a = 0; a < totcol; a++) {
334 if (a == te->
index && matar[a]) {
354 "Cannot unlink texture '%s'. It's not clear which Freestyle line style it should "
355 "be unlinked from, there's no Freestyle line style as parent in the Outliner tree",
360 MTex **mtex =
nullptr;
363 if (tsep->
id->id_type() ==
ID_LS) {
372 if (a == te->
index && mtex[a]) {
375 mtex[a]->
tex =
nullptr;
389 Collection *collection = id_cast<Collection *>(tselem->
id);
396 "Cannot unlink collection '%s'. It's not clear which scene, collection or "
397 "instance empties it should be unlinked from, there's no scene, collection or "
398 "instance empties as parent in the Outliner tree",
406 "Cannot unlink collection '%s' parented to another linked collection '%s'",
413 if (tsep->
id->id_type() ==
ID_OB) {
414 Object *ob = id_cast<Object *>(tsep->
id);
419 else if (tsep->
id->id_type() ==
ID_GR) {
426 else if (tsep->
id->id_type() ==
ID_SCE) {
427 Scene *scene = id_cast<Scene *>(tsep->
id);
447 "Cannot unlink object '%s'. It's not clear which collection or scene it should be "
448 "unlinked from, there's no collection or scene as parent in the Outliner tree",
454 Object *ob = id_cast<Object *>(tselem->
id);
458 if (tsep->
id->id_type() ==
ID_OB) {
461 while (tsep && tsep->
id->id_type() ==
ID_OB) {
465 "Cannot unlink object '%s' parented to another linked object '%s'",
470 te_parent = te_parent->
parent;
471 tsep = te_parent ?
TREESTORE(te_parent) :
nullptr;
475 if (tsep && tsep->
id) {
479 "Cannot unlink object '%s' from linked collection or scene '%s'",
484 switch (tsep->
id->id_type()) {
540 "Cannot unlink world '%s'. It's not clear which scene it should be unlinked from, "
541 "there's no scene as parent in the Outliner tree",
546 Scene *parscene = id_cast<Scene *>(tsep->
id);
547 World *wo = id_cast<World *>(tselem->
id);
551 parscene->
world =
nullptr;
567 operation_fn(
C, reports, scene, te, tsep, tselem);
587 "Apply the operation over selected data-blocks only"},
592 "Apply the operation over content of the selected items only (the data-blocks in their "
595 "SELECTED_AND_CONTENT",
597 "Selected & Content",
598 "Apply the operation over selected data-blocks and all their dependencies"},
599 {0,
nullptr, 0,
nullptr,
nullptr},
608 const bool has_parent_selected,
612 const bool do_selected =
ELEM(selection_set,
615 const bool do_content =
ELEM(selection_set,
620 if ((is_selected && do_selected) || (has_parent_selected && do_content)) {
625 operation_fn(
C, reports, scene,
element, tsep, tselem);
635 ListBaseT<TreeElement> &subtree,
636 const bool has_parent_selected,
643 ListBaseT<TreeElement> subtree =
element.subtree;
646 C, reports, scene, &
element, tselem, has_parent_selected, operation_fn, selection_set);
655 is_selected || has_parent_selected,
667 const bool do_active_element_first)
669 if (do_active_element_first) {
671 if (active_element !=
nullptr) {
673 ListBaseT<TreeElement> subtree = active_element->
subtree;
676 C, reports, scene, active_element, tselem,
false, operation_fn, selection_set);
681 C, reports, scene, space_outliner, subtree, is_selected, operation_fn, selection_set);
707 {0,
nullptr, 0,
nullptr,
nullptr},
716 bool success =
false;
722 if (operation_fn(
C, event, te, tselem)) {
737 Scene *scene = id_cast<Scene *>(tselem->
id);
775 ot->
name =
"Outliner Scene Operation";
776 ot->
idname =
"OUTLINER_OT_scene_operation";
777 ot->
description =
"Context menu for scene operations";
825 iconid = int(ICON_COLLECTION_COLOR_01) + int(collection.
color_tag);
830 if (search_items_find_index(items, name) == -1) {
831 if (!search_item_add(items, name, &te, iconid, 0, 0)) {
875 static char search[64] =
"";
887 but = uiDefSearchBut(
888 block, search, ICON_VIEWZOOM,
sizeof(search), 0, 0, menu_width,
UI_UNIT_Y,
"");
889 button_func_search_set(but,
914 const int offset[2] = {-(menu_width / 2), 0};
941 Object *ob = id_cast<Object *>(tselem->
id);
980 Object *ob = id_cast<Object *>(tselem->
id);
995 reports,
RPT_WARNING,
"Cannot delete indirectly linked object '%s'", ob->
id.
name + 2);
1003 "Cannot delete object '%s' from scene '%s', indirectly used objects need at "
1033 if (tselem->
id->id_type() ==
ID_GP) {
1089 ID *id_root_reference,
1090 ID *id_instance_hint,
1091 const bool is_override_instancing_object)
1100 id_hierarchy_root_reference);
1101 value.
append(id_root_data);
1112 id_hierarchy_root_reference);
1114 value.
append(id_root_data);
1130 const bool do_hierarchy =
data->do_hierarchy;
1131 ID *id_root_reference = tselem->
id;
1157 "Could not create library override from data-block '%s', as it is not overridable",
1158 id_root_reference->
name);
1174 data->selected_id_uid.add(object_iter->id.session_uid);
1180 ID *id_instance_hint =
nullptr;
1181 bool is_override_instancing_object =
false;
1190 id_instance_hint = tsep->
id;
1191 is_override_instancing_object =
true;
1205 ID *id_hierarchy_root_reference = id_root_reference;
1206 while ((te = te->
parent) !=
nullptr) {
1216 if (id_current_hierarchy_root->
lib != id_root_reference->
lib) {
1229 id_hierarchy_root_reference =
1241 "Invalid anchor ('%s') found, needed to create library override from "
1243 id_current_hierarchy_root->
name,
1244 id_root_reference->
name);
1260 "Could not create library override from data-block '%s', one of its parents "
1261 "is not overridable ('%s')",
1262 id_root_reference->
name,
1263 id_current_hierarchy_root->
name);
1267 id_hierarchy_root_reference = id_current_hierarchy_root;
1273 if (!((id_hierarchy_root_reference->
lib == id_root_reference->
lib) ||
1277 id_root_reference->
lib)))
1282 "Invalid hierarchy root ('%s') found, needed to create library override from "
1284 id_hierarchy_root_reference->
name,
1285 id_root_reference->
name);
1296 if (!is_selected &&
data->id_hierarchy_roots.contains(id_hierarchy_root_reference)) {
1300 data->id_root_add(id_hierarchy_root_reference,
1303 is_override_instancing_object);
1307 id_root_reference, id_root_reference, id_instance_hint, is_override_instancing_object);
1316 ID *id_hierarchy_root_reference,
1318 bool &r_aggregated_success)
1323 const bool do_hierarchy =
data.do_hierarchy;
1342 bool success =
false;
1344 ID *id_root_override =
nullptr;
1349 data_idroot.id_root_reference,
1350 id_hierarchy_root_reference,
1351 data_idroot.id_instance_hint,
1353 data.do_fully_editable);
1364 id_hierarchy_root_reference);
1368 id_hierarchy_root_reference = id_hierarchy_root_override;
1371 BLI_assert(id_hierarchy_root_override == id_hierarchy_root_reference);
1373 data_idroot.id_hierarchy_root_override = id_hierarchy_root_override;
1374 data.id_hierarchy_roots_uid.add(id_hierarchy_root_override->
session_uid);
1379 &bmain, data_idroot.id_root_reference,
true);
1381 success = id_root_override !=
nullptr;
1396 if (success && data_idroot.is_override_instancing_object) {
1399 &bmain, scene,
reinterpret_cast<Object *
>(data_idroot.id_instance_hint));
1402 r_aggregated_success = r_aggregated_success && success;
1415 const bool do_hierarchy =
data.do_hierarchy;
1417 bool success =
true;
1418 for (
auto &&[id_hierarchy_root_reference, data_idroots] :
data.id_hierarchy_roots.items()) {
1420 *bmain, scene, view_layer,
data, id_hierarchy_root_reference, data_idroots, success);
1426 "Could not create library override from one or more of the selected data-blocks");
1429 if (!do_hierarchy) {
1439 !
data.id_hierarchy_roots_uid.contains(
1458 ID *id_root = tselem->
id;
1459 const bool do_hierarchy =
data->do_hierarchy;
1462 CLOG_WARN(&
LOG,
"Could not reset library override of data block '%s'", id_root->
name);
1489 bool do_process_leaves =
true;
1490 while (!
data.id_hierarchy_roots.is_empty()) {
1491 bool has_found_leaves =
false;
1493 for (
auto &&
id :
data.id_hierarchy_roots.keys()) {
1494 if (do_process_leaves) {
1499 bool do_remap_active =
false;
1503 do_remap_active =
true;
1507 if (do_remap_active) {
1509 Object *ref_object =
reinterpret_cast<Object *
>(
id->override_library->reference);
1511 if (basact !=
nullptr) {
1512 view_layer->
basact = basact;
1518 data.id_hierarchy_roots.remove(
id);
1519 has_found_leaves =
true;
1525 data.id_hierarchy_roots.remove(
id);
1529 do_process_leaves = has_found_leaves;
1539 ID *
id = tselem->
id;
1547 "Cannot clear embedded library override '%s', only overrides of real data-blocks "
1548 "can be directly cleared",
1556 "Cannot clear linked library override '%s', only local overrides can be directly cleared",
1561 data->id_root_set(
id);
1567 ID *id_root = tselem->
id;
1570 CLOG_WARN(&
LOG,
"Could not resync library override of data block '%s'", id_root->
name);
1578 data->id_root_set(id_root);
1588 const bool do_hierarchy_enforce =
data.do_resync_hierarchy_enforce;
1605 for (
auto &&id_hierarchy_root :
data.id_hierarchy_roots.keys()) {
1611 do_hierarchy_enforce,
1622 ID *id_root = tselem->
id;
1625 CLOG_WARN(&
LOG,
"Could not delete library override of data block '%s'", id_root->
name);
1633 data->id_root_set(id_root);
1643 for (
auto &&id_hierarchy_root :
data.id_hierarchy_roots.keys()) {
1655 ID *
id = tselem->
id;
1660 "Cannot set fake user on a linked datablock, consider referencing it through a "
1675 ID *
id = tselem->
id;
1692 ID *
id = tselem->
id;
1710 ID *
id = tselem->
id;
1730 ID *
id = tselem->
id;
1734 Scene *parscene = id_cast<Scene *>(tsep->
id);
1748 ListBaseT<TreeElement> *lb,
1750 bool recurse_selected)
1754 bool select_handled =
false;
1759 if (scene_owner && scene_act != scene_owner) {
1765 operation_fn(
C, reports, scene_owner ? scene_owner : scene_act, &te,
nullptr, tselem);
1766 select_handled =
true;
1770 if ((select_handled ==
false) || recurse_selected) {
1772 C, reports, scene_act, space_outliner, &te.subtree, operation_fn, recurse_selected);
1782 ListBaseT<TreeElement> *lb,
1862 "OVERRIDE_LIBRARY_CREATE_HIERARCHY",
1865 "Create a local override of the selected linked data-blocks, and their hierarchy of "
1868 "OVERRIDE_LIBRARY_RESET",
1871 "Reset the selected local overrides to their linked references values"},
1873 "OVERRIDE_LIBRARY_CLEAR_SINGLE",
1876 "Delete the selected local overrides and relink their usages to the linked data-blocks if "
1877 "possible, else reset them and mark them as non editable"},
1878 {0,
nullptr, 0,
nullptr,
nullptr},
1883 "OVERRIDE_LIBRARY_RESYNC_HIERARCHY",
1886 "Rebuild the selected local overrides from their linked references, as well as their "
1887 "hierarchies of dependencies"},
1889 "OVERRIDE_LIBRARY_RESYNC_HIERARCHY_ENFORCE",
1892 "Rebuild the selected local overrides from their linked references, as well as their "
1893 "hierarchies of dependencies, enforcing these hierarchies to match the linked data (i.e. "
1894 "ignoring existing overrides on data-blocks pointer properties)"},
1897 "OVERRIDE_LIBRARY_DELETE_HIERARCHY",
1900 "Delete the selected local overrides (including their hierarchies of override dependencies) "
1901 "and relink their usages to the linked data-blocks"},
1902 {0,
nullptr, 0,
nullptr,
nullptr},
1919 if (space_outliner ==
nullptr) {
1944 id_override_library_create_hierarchy_pre_process(
1945 C, &override_data, reports, te, tsep, tselem);
1967 TreeStoreElem *tselem) { id_override_library_reset(C, &override_data, tselem); },
1989 id_override_library_clear_single(&override_data, reports, tselem);
2013 TreeStoreElem *tselem) { id_override_library_resync(&override_data, tselem); },
2036 TreeStoreElem *tselem) { id_override_library_resync(&override_data, tselem); },
2042 ED_undo_push(
C,
"Resync Overridden Data Hierarchy Enforce");
2059 id_override_library_delete_hierarchy(&override_data, tselem);
2084 ot->
name =
"Outliner Library Override Operation";
2085 ot->
idname =
"OUTLINER_OT_liboverride_operation";
2086 ot->
description =
"Create, reset or clear library override hierarchies";
2101 "Over which part of the tree items to apply the operation");
2107 ot->
name =
"Outliner Library Override Troubleshoot Operation";
2108 ot->
idname =
"OUTLINER_OT_liboverride_troubleshoot_operation";
2109 ot->
description =
"Advanced operations over library override to help fix broken hierarchies";
2122 "Library Override Troubleshoot Operation",
2129 "Over which part of the tree items to apply the operation");
2135 ListBaseT<TreeElement> &subtree,
2136 const bool has_parent_selected,
2142 ListBaseT<TreeElement> subtree =
element.subtree;
2144 const bool is_selected = (tselem->
flag &
TSE_SELECTED) || has_parent_selected;
2148 operation_fn(
C, reports, scene, &
element, tsep, tselem);
2155 C, reports, scene, subtree, is_selected, operation_fn);
2176template<
typename TreeElementOverr
idesT>
2180 TreeElementOverridesT &override_elem,
2183 ID *current_id = tselem.
id;
2189 if (!liboverride_property) {
2192 "Failed to find a matching Library Override property for ID '%s' (Library "
2198 override_elem.rna_path.c_str());
2203 if constexpr (std::is_same_v<TreeElementOverridesT, const TreeElementOverridesPropertyOperation>)
2206 override_elem.get_operation_type());
2210 "Cannot remove 'Insert' type of library override operations for ID '%s' "
2211 "(library '%s'), RNA path '%s'. Please delete the added data directly",
2214 override_elem.rna_path.c_str());
2218 liboverride_property_operation = override_elem.get_override_operation_from_id(
2219 *current_id, *liboverride_property);
2220 if (!liboverride_property_operation) {
2223 "Failed to find a matching Library Override property operation for ID '%s' "
2224 "(Library '%s'), path '%s'",
2229 override_elem.rna_path.c_str());
2239 &id_refptr, liboverride_property->
rna_path, &reference_rna_ptr, &reference_rna_prop))
2243 "Failed to create matching reference (linked data) RNA pointer for ID '%s' "
2244 "(Library '%s'), path '%s'",
2254 const_cast<PointerRNA *
>(&override_elem.override_rna_ptr),
2256 &override_elem.override_rna_prop,
2257 liboverride_property_operation ?
2260 liboverride_property,
2261 liboverride_property_operation);
2262 if (liboverride_property_operation) {
2264 liboverride_property_operation);
2275 const_cast<PointerRNA *
>(&override_elem.override_rna_ptr),
2276 &override_elem.override_rna_prop);
2288 if (space_outliner ==
nullptr) {
2292 bool has_changes =
false;
2293 auto property_remove_cb = [bmain, &has_changes](
bContext *
C,
2299 switch (tselem->type) {
2306 C, *bmain, *tselem, *override_op_elem, reports))
2317 C, *bmain, *tselem, *override_op_elem, reports))
2346 ot->
name =
"Outliner Library Override Property Remove";
2347 ot->
idname =
"OUTLINER_OT_liboverride_property_remove";
2349 "Remove the selected library override properties, and reset the relevant data to the linked "
2447 Scene *scene =
static_cast<Scene *
>(scene_ptr);
2500 node.set_selected(
true);
2503 node.set_selected(
false);
2506 node.set_visible(
false);
2509 node.set_visible(
true);
2519 if (!te_rna_struct) {
2527 ID *
id =
static_cast<ID *
>(ptr.
data);
2552 ListBaseT<bConstraint> *lb =
nullptr;
2624 if (tselem->
type == type) {
2625 operation_fn(event, te, tselem, arg);
2638 reports,
RPT_WARNING,
"Cannot delete indirectly linked object '%s'",
object->id.name + 2);
2648 "Cannot delete object '%s' from scene '%s', indirectly used objects need at least "
2669 base_iter !=
nullptr;
2670 base_iter = base_iter->next)
2673 for (parent_ob_iter = base_iter->object->
parent;
2674 (parent_ob_iter !=
nullptr && parent_ob_iter !=
object &&
2676 parent_ob_iter = parent_ob_iter->
parent)
2680 if (parent_ob_iter !=
nullptr) {
2687 for (parent_ob_iter = base_iter->object;
2688 (parent_ob_iter !=
nullptr && parent_ob_iter !=
object &&
2690 parent_ob_iter = parent_ob_iter->
parent)
2720 if (base ==
nullptr) {
2725 for (; obedit && (obedit != base->
object); obedit = obedit->
parent) {
2728 if (obedit == base->
object) {
2748 if (ob_iter.
id.
us != 0) {
2772 {
OL_OP_SELECT,
"SELECT", ICON_RESTRICT_SELECT_OFF,
"Select",
""},
2779 "Make all users of selected data-blocks to use instead a new chosen one"},
2781 {0,
nullptr, 0,
nullptr,
nullptr},
2791 const char *
str =
nullptr;
2792 bool selection_changed =
false;
2795 if (space_outliner ==
nullptr) {
2813 selection_changed =
true;
2831 selection_changed =
true;
2842 selection_changed =
true;
2863 if (selection_changed) {
2869 if (
str !=
nullptr) {
2879 ot->
name =
"Outliner Object Operation";
2880 ot->
idname =
"OUTLINER_OT_object_operation";
2912 for (
Object *ob : objects_to_delete) {
2913 delete_fn(
C, reports, scene, ob);
2935 ID *id_parent = tselem_parent->
id;
2945 ID *
id = tselem->
id;
2949 if (!(
data->is_liboverride_hierarchy_root_allowed ||
data->is_liboverride_allowed)) {
2954 if (!
data->is_liboverride_allowed) {
2960 data->objects_set.add(
reinterpret_cast<Object *
>(
id));
2987 &object_delete_data);
2989 if (delete_hierarchy) {
3040 ot->
name =
"Delete";
3041 ot->
idname =
"OUTLINER_OT_delete";
3042 ot->
description =
"Delete selected objects and collections";
3053 ot->
srna,
"hierarchy",
false,
"Hierarchy",
"Delete child objects and collections");
3066 ID *
id =
static_cast<ID *
>(idptr.data);
3086 ot->
name =
"Pack ID Data";
3087 ot->
idname =
"OUTLINER_OT_pack_data";
3088 ot->
description =
"Embed selected data-blocks into the .blend file";
3132 "Make all users of selected data-blocks to use instead current (clicked) one"},
3141 "Ensure data-block gets saved even if it isn't in use (e.g. for motion and material "
3146 {
OUTLINER_IDOP_PACK,
"PACK", ICON_PACKAGE,
"Pack",
"Embed data-blocks into the .blend file"},
3147 {0,
nullptr, 0,
nullptr,
nullptr},
3153 const int enum_value)
3166 switch (enum_value) {
3217 int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
3220 if (space_outliner ==
nullptr) {
3319 if (idlevel > 0 || objectlevel) {
3331 wm->op_undo_depth++;
3334 wm->op_undo_depth--;
3339 wm->op_undo_depth++;
3342 wm->op_undo_depth--;
3376 if (idlevel ==
ID_IM) {
3399 ot->
name =
"Outliner ID Data Operation";
3400 ot->
idname =
"OUTLINER_OT_id_operation";
3401 ot->
description =
"General data-block management operations";
3429 {
OL_LIB_DELETE,
"DELETE", ICON_X,
"Delete",
"Delete this library and all its items"},
3434 "Select a new path for this library, and reload all its data"},
3435 {
OL_LIB_RELOAD,
"RELOAD", ICON_FILE_REFRESH,
"Reload",
"Reload all data from this library"},
3436 {0,
nullptr, 0,
nullptr,
nullptr},
3446 if (space_outliner ==
nullptr) {
3490 ot->
name =
"Outliner Library Operation";
3491 ot->
idname =
"OUTLINER_OT_lib_operation";
3517 if (tselem->
type == type) {
3519 operation_fn(te, tselem, tsep, newid);
3530 bAction *act = id_cast<bAction *>(actId);
3550 int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
3559 if (act ==
nullptr) {
3568 else if (idlevel ==
ID_AC) {
3589 ot->
name =
"Outliner Set Action";
3590 ot->
idname =
"OUTLINER_OT_action_set";
3591 ot->
description =
"Change the active action used";
3631 "Clear Animation Data",
3632 "Remove this animation data container"},
3637 {0,
nullptr, 0,
nullptr,
nullptr},
3644 int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
3665 wm->op_undo_depth++;
3668 wm->op_undo_depth--;
3709 ot->
name =
"Outliner Animation Data Operation";
3710 ot->
idname =
"OUTLINER_OT_animdata_operation";
3732 {0,
nullptr, 0,
nullptr,
nullptr},
3754 ot->
name =
"Outliner Constraint Operation";
3755 ot->
idname =
"OUTLINER_OT_constraint_operation";
3780 {0,
nullptr, 0,
nullptr,
nullptr},
3806 ot->
name =
"Outliner Modifier Operation";
3807 ot->
idname =
"OUTLINER_OT_modifier_operation";
3833 if (te ==
nullptr) {
3837 int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
3846 int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
3851 switch (datalevel) {
3921 if (space_outliner ==
nullptr) {
3926 if (te ==
nullptr) {
3937 {0,
nullptr, 0,
nullptr,
nullptr}};
3941 {0,
nullptr, 0,
nullptr,
nullptr}};
3944 return optype_sel_linked;
3947 return optype_sel_and_hide;
3953 ot->
name =
"Outliner Data Operation";
3954 ot->
idname =
"OUTLINER_OT_data_operation";
3978 ui::Layout &layout = *popup_menu_layout(pup);
3991 popup_menu_end(
C, pup);
4001 int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
4039 else if (datalevel) {
4081 button_tooltip_timer_remove(
C, but);
4085 ®ion->
v2d, event->
mval[0], event->
mval[1], &view_mval[0], &view_mval[1]);
4088 space_outliner, &space_outliner->
runtime->
tree, view_mval[1]);
4099 ot->
name =
"Context Menu";
4100 ot->
idname =
"OUTLINER_OT_operation";
4101 ot->
description =
"Context menu for item operations";
Functions for backward compatibility with the legacy Action API.
Functions to deal with Armatures.
#define FOREACH_COLLECTION_OBJECT_RECURSIVE_END
#define FOREACH_SCENE_COLLECTION_END
#define FOREACH_SCENE_COLLECTION_BEGIN(scene, _instance)
#define FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(_collection, _object)
Low-level operations for grease pencil.
#define FOREACH_MAIN_ID_END
#define FOREACH_MAIN_ID_BEGIN(_bmain, _id)
General operations, lookup, etc. for blender objects.
external readfile function prototypes.
#define CTX_N_(context, msgid)
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
#define CLOG_WARN(clg_ref,...)
#define ID_IS_OVERRIDE_LIBRARY_VIRTUAL(_id)
#define ID_EXTRA_USERS(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)
#define ID_IS_OVERRIDE_LIBRARY_HIERARCHY_ROOT(_id)
Object groups, one object can be in many groups at once.
Object is a sort of wrapper for general info.
#define TSE_IS_REAL_ID(_tse)
Read Blender memory allocation and freeing.
#define RNA_ENUM_ITEM_SEPR
#define UI_SEARCHBOX_BOUNDS
#define ND_LIB_OVERRIDE_CHANGED
#define ND_SPACE_OUTLINER
#define BLI_assert_unreachable()
#define UNUSED_VARS_NDEBUG(...)
btSequentialImpulseConstraintSolverMt int btPersistentManifold int btTypedConstraint ** constraints
Value & lookup_or_add_default(const Key &key)
void append(const T &value)
const PointerRNA & get_pointer_rna() const
Strip & get_strip() const
void bone_deselect(bPoseChannel *pchan)
void bone_select(bPoseChannel *pchan)
bool modifier_apply(Main *bmain, ReportList *reports, Depsgraph *depsgraph, Scene *scene, Object *ob, ModifierData *md, int mode, bool keep_modifier, bool do_all_keyframes)
void constraint_update(Main *bmain, Object *ob)
void base_select(Base *base, eObjectSelect_Mode mode)
bool editmode_exit(bContext *C, int flag)
void select_linked_by_id(bContext *C, ID *id)
void base_free_and_unlink(Main *bmain, Scene *scene, Object *ob)
bool editmode_exit_ex(Main *bmain, Scene *scene, Object *obedit, int flag)
bool modifier_remove(ReportList *reports, Main *bmain, Scene *scene, Object *ob, ModifierData *md)
void all_open(const SpaceOutliner &space_outliner, const ConstVisitorFn visitor)
@ OUTLINER_IDOP_FAKE_CLEAR
@ OUTLINER_IDOP_SELECT_LINKED
static bool outliner_liboverride_operation_poll(bContext *C)
void OUTLINER_OT_delete(wmOperatorType *ot)
static void unlink_texture_fn(bContext *, ReportList *reports, Scene *, TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem)
static void ebone_fn(int event, TreeElement *te, TreeStoreElem *, void *)
static const EnumPropertyItem outliner_lib_op_type_items[]
static void object_deselect_fn(bContext *C, ReportList *, Scene *, TreeElement *, TreeStoreElem *, TreeStoreElem *tselem)
TreeElement * outliner_find_item_at_y(const SpaceOutliner *space_outliner, const ListBaseT< TreeElement > *tree, float view_co_y)
static bool outliner_do_libdata_operation_selection_set_element(bContext *C, ReportList *reports, Scene *scene, TreeElement *element, TreeStoreElem *tselem, const bool has_parent_selected, outliner_operation_fn operation_fn, eOutlinerLibOpSelectionSet selection_set)
static void id_override_library_create_hierarchy_process(bContext *C, ReportList *reports, OutlinerLibOverrideData &data)
static wmOperatorStatus outliner_scene_operation_exec(bContext *C, wmOperator *op)
void OUTLINER_OT_scene_operation(wmOperatorType *ot)
void OUTLINER_OT_pack_data(wmOperatorType *ot)
static const EnumPropertyItem * outliner_data_op_sets_enum_item_fn(bContext *C, PointerRNA *, PropertyRNA *, bool *)
static void object_select_hierarchy_fn(bContext *C, ReportList *, Scene *, TreeElement *te, TreeStoreElem *, TreeStoreElem *)
static void unlink_action_fn(bContext *C, ReportList *reports, Scene *, TreeElement *, TreeStoreElem *tsep, TreeStoreElem *tselem)
static void unlink_object_fn(bContext *C, ReportList *reports, Scene *, TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem)
static TreeTraversalAction outliner_collect_objects_to_delete(TreeElement *te, void *customdata)
static bool scene_fn(bContext *C, eOutliner_PropSceneOps event, TreeElement *, TreeStoreElem *tselem)
static wmOperatorStatus outliner_animdata_operation_exec(bContext *C, wmOperator *op)
bool outliner_tree_traverse(const SpaceOutliner *space_outliner, ListBaseT< TreeElement > *tree, int filter_te_flag, int filter_tselem_flag, TreeTraversalFunc func, void *customdata)
bool outliner_is_collection_tree_element(const TreeElement *te)
static void get_element_operation_type(const TreeElement *te, int *scenelevel, int *objectlevel, int *idlevel, int *datalevel)
static void clear_animdata_fn(int, TreeElement *, TreeStoreElem *tselem, void *)
void OUTLINER_OT_data_operation(wmOperatorType *ot)
static bool outliner_liboverride_property_remove_do(bContext *C, Main &bmain, TreeStoreElem &tselem, TreeElementOverridesT &override_elem, ReportList *reports)
void OUTLINER_OT_lib_operation(wmOperatorType *ot)
void OUTLINER_OT_constraint_operation(wmOperatorType *ot)
static const EnumPropertyItem prop_constraint_op_types[]
static const EnumPropertyItem prop_lib_op_selection_set[]
static void modifier_fn(int event, TreeElement *te, TreeStoreElem *, void *arg)
static void object_select_fn(bContext *C, ReportList *, Scene *, TreeElement *, TreeStoreElem *, TreeStoreElem *tselem)
static void id_override_library_clear_single_process(bContext *C, ReportList *, OutlinerLibOverrideData &data)
static void outliner_batch_delete_object_hierarchy(Main *bmain, Scene *scene)
static void refreshdrivers_animdata_fn(int, TreeElement *, TreeStoreElem *tselem, void *)
static wmOperatorStatus outliner_object_operation_exec(bContext *C, wmOperator *op)
void id_delete_tag_fn(bContext *C, ReportList *reports, Scene *, TreeElement *te, TreeStoreElem *, TreeStoreElem *tselem)
static void id_override_library_reset(bContext *C, OutlinerLibOverrideData *data, TreeStoreElem *tselem)
static wmOperatorStatus outliner_constraint_operation_exec(bContext *C, wmOperator *op)
static const EnumPropertyItem prop_scene_op_types[]
static void pchan_fn(int event, TreeElement *te, TreeStoreElem *, void *)
static void merged_element_search_update_fn(const bContext *, void *data, const char *str, ui::SearchItems *items, const bool)
FunctionRef< void(bContext *C, ReportList *reports, Scene *scene, TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem)> outliner_operation_fn
static wmOperatorStatus outliner_id_operation_exec(bContext *C, wmOperator *op)
static void outliner_batch_delete_object_hierarchy_tag(ReportList *reports, Main *bmain, ViewLayer *view_layer, Scene *scene, Base *base)
void OUTLINER_OT_modifier_operation(wmOperatorType *ot)
static void unlinkact_animdata_fn(int, TreeElement *, TreeStoreElem *tselem, void *)
void outliner_collection_delete(bContext *C, Main *bmain, Scene *scene, ReportList *reports, bool do_hierarchy)
TreeElementIcon tree_element_get_icon(TreeStoreElem *tselem, TreeElement *te)
static void merged_element_search_fn_recursive(const ListBaseT< TreeElement > *tree, short tselem_type, short type, const char *str, ui::SearchItems *items)
static void object_batch_delete_hierarchy_tag_fn(bContext *C, ReportList *reports, Scene *scene, Object *ob)
static void outliner_object_delete_fn(bContext *C, ReportList *reports, Scene *scene, Object *ob)
static wmOperatorStatus outliner_pack_data_exec(bContext *C, wmOperator *op)
@ OUTLINER_ANIMOP_CLEAR_DRV
@ OUTLINER_ANIMOP_INVALID
@ OUTLINER_ANIMOP_SET_ACT
@ OUTLINER_ANIMOP_CLEAR_ACT
@ OUTLINER_ANIMOP_REFRESH_DRV
@ OUTLINER_ANIMOP_CLEAR_ADT
static const EnumPropertyItem prop_animdata_op_types[]
static void data_select_linked_fn(int event, TreeElement *te, TreeStoreElem *, void *C_v)
static void merged_element_search_exec_fn(bContext *C, void *, void *element)
eOutliner_PropModifierOps
static bool outliner_data_operation_poll(bContext *C)
static void id_override_library_resync(OutlinerLibOverrideData *data, TreeStoreElem *tselem)
static void id_fake_user_clear_fn(bContext *, ReportList *reports, Scene *, TreeElement *, TreeStoreElem *, TreeStoreElem *tselem)
static void singleuser_action_fn(bContext *C, ReportList *, Scene *, TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem)
void OUTLINER_OT_object_operation(wmOperatorType *ot)
void outliner_do_object_operation_ex(bContext *C, ReportList *reports, Scene *scene, SpaceOutliner *space_outliner, ListBaseT< TreeElement > *lb, outliner_operation_fn operation_fn, bool recurse_selected)
static void id_select_linked_fn(bContext *C, ReportList *, Scene *, TreeElement *, TreeStoreElem *, TreeStoreElem *tselem)
static void id_local_fn(bContext *C, ReportList *, Scene *, TreeElement *, TreeStoreElem *, TreeStoreElem *tselem)
static void outliner_do_libdata_operation_selection_set(bContext *C, ReportList *reports, Scene *scene, SpaceOutliner *space_outliner, ListBaseT< TreeElement > &subtree, const bool has_parent_selected, outliner_operation_fn operation_fn, eOutlinerLibOpSelectionSet selection_set)
static void bone_fn(int event, TreeElement *te, TreeStoreElem *, void *)
Collection * outliner_collection_from_tree_element(const TreeElement *te)
static void outliner_do_liboverride_property_selection_set(bContext *C, ReportList *reports, Scene *scene, ListBaseT< TreeElement > &subtree, const bool has_parent_selected, outliner_operation_fn operation_fn)
void OUTLINER_OT_animdata_operation(wmOperatorType *ot)
static void unlink_world_fn(bContext *, ReportList *reports, Scene *, TreeElement *, TreeStoreElem *tsep, TreeStoreElem *tselem)
void lib_relocate_fn(bContext *C, ReportList *, Scene *, TreeElement *te, TreeStoreElem *, TreeStoreElem *tselem)
int tree_element_id_type_to_index(TreeElement *te)
static void id_override_library_clear_single(OutlinerLibOverrideData *data, ReportList *reports, TreeStoreElem *tselem)
static void id_override_library_create_hierarchy(Main &bmain, Scene *scene, ViewLayer *view_layer, OutlinerLibOverrideData &data, ID *id_hierarchy_root_reference, Vector< OutlinerLiboverrideDataIDRoot > &data_idroots, bool &r_aggregated_success)
static void unlink_collection_fn(bContext *C, ReportList *reports, Scene *, TreeElement *, TreeStoreElem *tsep, TreeStoreElem *tselem)
static wmOperatorStatus outliner_lib_operation_exec(bContext *C, wmOperator *op)
static void outliner_do_data_operation(SpaceOutliner *space_outliner, int type, int event, void(*operation_fn)(int, TreeElement *, TreeStoreElem *, void *), void *arg)
static const EnumPropertyItem prop_liboverride_op_types[]
static void id_override_library_delete_hierarchy(OutlinerLibOverrideData *data, TreeStoreElem *tselem)
void OUTLINER_OT_action_set(wmOperatorType *ot)
static bool outliner_id_operation_item_poll(bContext *C, PointerRNA *, PropertyRNA *, const int enum_value)
static const EnumPropertyItem prop_id_op_types[]
static void id_override_library_resync_hierarchy_process(bContext *C, ReportList *reports, OutlinerLibOverrideData &data)
static wmOperatorStatus outliner_data_operation_exec(bContext *C, wmOperator *op)
void id_remap_fn(bContext *C, TreeStoreElem *tselem)
TreeElementT * tree_element_cast(const TreeElement *te)
ID * outliner_search_back(TreeElement *te, short idcode)
static void cleardrivers_animdata_fn(int, TreeElement *, TreeStoreElem *tselem, void *)
static wmOperatorStatus outliner_operator_menu(bContext *C, const char *opname)
void merged_element_search_menu_invoke(bContext *C, TreeElement *parent_te, TreeElement *activate_te)
static wmOperatorStatus outliner_liboverride_property_remove_exec(bContext *C, wmOperator *op)
static TreeElement * get_target_element(const SpaceOutliner *space_outliner)
static void unlink_material_fn(bContext *, ReportList *reports, Scene *, TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem)
static void constraint_fn(int event, TreeElement *te, TreeStoreElem *, void *C_v)
static void actionset_id_fn(TreeElement *, TreeStoreElem *tselem, TreeStoreElem *tsep, ID *actId)
eOutlinerLibOpSelectionSet
@ OUTLINER_LIB_LIB_SELECTIONSET_SELECTED_AND_CONTENT
@ OUTLINER_LIB_LIB_SELECTIONSET_CONTENT
@ OUTLINER_LIB_SELECTIONSET_SELECTED
static void outliner_batch_delete_object_tag(ReportList *reports, Main *bmain, Scene *scene, Object *object)
static void id_fake_user_set_fn(bContext *, ReportList *reports, Scene *, TreeElement *, TreeStoreElem *, TreeStoreElem *tselem)
void lib_reload_fn(bContext *C, ReportList *, Scene *, TreeElement *te, TreeStoreElem *, TreeStoreElem *tselem)
void outliner_cleanup_tree(SpaceOutliner *space_outliner)
void OUTLINER_OT_liboverride_property_remove(wmOperatorType *ot)
static void singleuser_world_fn(bContext *C, ReportList *, Scene *, TreeElement *, TreeStoreElem *tsep, TreeStoreElem *tselem)
static ui::Block * merged_element_search_menu(bContext *C, ARegion *region, void *data)
static wmOperatorStatus outliner_operation_invoke(bContext *C, wmOperator *, const wmEvent *event)
static void outliner_do_libdata_operation(bContext *C, ReportList *reports, Scene *scene, SpaceOutliner *space_outliner, outliner_operation_fn operation_fn)
static wmOperatorStatus outliner_delete_exec(bContext *C, wmOperator *op)
void OUTLINER_OT_liboverride_troubleshoot_operation(wmOperatorType *ot)
eOutlinerLibOverrideOpTypes
@ OUTLINER_LIBOVERRIDE_OP_RESYNC_HIERARCHY_ENFORCE
@ OUTLINER_LIBOVERRIDE_OP_INVALID
@ OUTLINER_LIBOVERRIDE_OP_CLEAR_SINGLE
@ OUTLINER_LIBOVERRIDE_OP_DELETE_HIERARCHY
@ OUTLINER_LIBOVERRIDE_OP_CREATE_HIERARCHY
@ OUTLINER_LIBOVERRIDE_OP_RESYNC_HIERARCHY
@ OUTLINER_LIBOVERRIDE_OP_RESET
static wmOperatorStatus outliner_liboverride_operation_exec(bContext *C, wmOperator *op)
static wmOperatorStatus outliner_modifier_operation_exec(bContext *C, wmOperator *op)
void OUTLINER_OT_operation(wmOperatorType *ot)
static bool outliner_liboverride_property_remove_poll(bContext *C)
static const EnumPropertyItem * outliner_id_operation_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
static const EnumPropertyItem prop_modifier_op_types[]
void item_rename_fn(bContext *C, ReportList *reports, Scene *, TreeElement *te, TreeStoreElem *, TreeStoreElem *tselem)
static bool outliner_do_scene_operation(bContext *C, SpaceOutliner *space_outliner, eOutliner_PropSceneOps event, bool(*operation_fn)(bContext *, eOutliner_PropSceneOps, TreeElement *, TreeStoreElem *))
static void sequence_fn(int event, TreeElement *te, TreeStoreElem *, void *scene_ptr)
static void outliner_do_id_set_operation(SpaceOutliner *space_outliner, int type, ID *newid, void(*operation_fn)(TreeElement *, TreeStoreElem *, TreeStoreElem *, ID *))
static void gpencil_layer_fn(int event, TreeElement *te, TreeStoreElem *, void *)
static wmOperatorStatus do_outliner_operation_event(bContext *C, ARegion *region, SpaceOutliner *space_outliner, TreeElement *te)
void(*)(bContext *C, ReportList *reports, Scene *scene, Object *ob) OutlinerDeleteFn
static const EnumPropertyItem prop_liboverride_troubleshoot_op_types[]
static wmOperatorStatus outliner_action_set_exec(bContext *C, wmOperator *op)
eOutliner_PropConstraintOps
@ OL_CONSTRAINTOP_DISABLE
void outliner_do_object_operation(bContext *C, ReportList *reports, Scene *scene, SpaceOutliner *space_outliner, ListBaseT< TreeElement > *lb, outliner_operation_fn operation_fn)
void OUTLINER_OT_id_operation(wmOperatorType *ot)
void OUTLINER_OT_liboverride_operation(wmOperatorType *ot)
static void id_override_library_delete_hierarchy_process(bContext *C, ReportList *, OutlinerLibOverrideData &data)
void outliner_item_select(bContext *C, SpaceOutliner *space_outliner, TreeElement *te, short select_flag)
static void id_override_library_create_hierarchy_pre_process(bContext *C, OutlinerLibOverrideData *data, ReportList *reports, TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem)
static void outliner_do_object_delete(bContext *C, ReportList *reports, Scene *scene, const Set< Object * > &objects_to_delete, OutlinerDeleteFn delete_fn)
static const EnumPropertyItem prop_object_op_types[]
TreeElement * outliner_find_element_with_flag(const ListBaseT< TreeElement > *lb, short flag)
static void grease_pencil_node_fn(int event, TreeElement *te, TreeStoreElem *, void *)
static bool outliner_operation_tree_element_poll(bContext *C)
void select_strip_single(Scene *scene, Strip *strip, bool deselect_all)
void relations_invalidate_cache(Scene *scene, Strip *strip)
Editing * editing_get(const Scene *scene)
@ BLOCK_THEME_STYLE_POPUP
PopupMenu * popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
void view2d_region_to_view(const View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
Button * context_active_but_get(const bContext *C)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
void WM_window_set_active_scene(Main *bmain, bContext *C, wmWindow *win, Scene *scene)
wmOperatorStatus WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
char * STRNCPY(char(&dst)[N], const char *src)
int RNA_enum_get(PointerRNA *ptr, const char *name)
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
Scene * CTX_data_sequencer_scene(const bContext *C)
void BKE_id_delete(Main *bmain, void *idv, const BKEIDDeleteOptions &options={}) ATTR_NONNULL()
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)
std::string WM_operatortype_name(wmOperatorType *ot, PointerRNA *properties)
SpaceOutliner * CTX_wm_space_outliner(const bContext *C)
PointerRNA RNA_id_pointer_create(ID *id)
void BKE_fcurves_free(ListBaseT< FCurve > *list)
const char * RNA_property_identifier(const PropertyRNA *prop)
void ED_outliner_select_sync_from_outliner(bContext *C, SpaceOutliner *space_outliner)
bool BKE_idtype_idcode_is_linkable(short idcode)
void void BKE_libblock_remap(Main *bmain, void *old_idv, void *new_idv, int remap_flags) ATTR_NONNULL(1
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
bool BKE_scene_collections_object_remove(Main *bmain, Scene *scene, Object *ob, bool free_us)
void ED_outliner_select_sync_from_all_tag(bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
bool ED_operator_outliner_active(bContext *C)
Base * BKE_view_layer_active_base_get(ViewLayer *view_layer)
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
ID * BKE_lib_override_library_create_from_id(Main *bmain, ID *reference_id, bool do_tagged_remap)
@ ID_REMAP_SKIP_INDIRECT_USAGE
bool BKE_lib_override_library_resync(Main *bmain, Scene *scene, ViewLayer *view_layer, ID *id_root, Collection *override_resync_residual_storage, bool do_hierarchy_enforce, BlendFileReadReport *reports)
void id_fake_user_set(ID *id)
@ LIBOVERRIDE_OP_INSERT_AFTER
@ LIBOVERRIDE_OP_INSERT_BEFORE
int char * BLI_strcasestr(const char *s, const char *find) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
void MEM_delete_void(void *vmemh)
@ LIBOVERRIDE_FLAG_SYSTEM_DEFINED
@ TSE_LIBRARY_OVERRIDE_BASE
@ TSE_VIEW_COLLECTION_BASE
@ TSE_SCENE_COLLECTION_BASE
@ TSE_LIBRARY_OVERRIDE_OPERATION
ViewLayer * CTX_data_view_layer(const bContext *C)
void ED_outliner_select_sync_from_object_tag(bContext *C)
Vector< PointerRNA > ED_operator_get_ids_from_context_as_vec(const bContext *C)
const EnumPropertyItem * RNA_action_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
bool BKE_collection_has_object(Collection *collection, const Object *ob)
bool BKE_animdata_set_action(ReportList *reports, ID *id, bAction *act)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void DEG_id_tag_update_ex(Main *bmain, ID *id, unsigned int flags)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
void BKE_lib_override_library_delete(Main *bmain, ID *id_root)
void DEG_id_tag_update(ID *id, unsigned int flags)
void BKE_lib_override_library_main_hierarchy_root_ensure(Main *bmain, LibOverride_HierarchyRoot_ValidateOptions options={}, ReportList *reports=nullptr)
void BKE_report(ReportList *reports, eReportType type, const char *message)
BMesh const char void * data
void BKE_animdata_free(ID *id, bool do_id_user)
wmWindowManager * CTX_wm_manager(const bContext *C)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C, bool rna_write_check=false)
Object * CTX_data_edit_object(const bContext *C)
void ED_undo_push(bContext *C, const char *str, UndoEncodeHints hints=UndoEncodeHints(0))
bool ED_scene_delete(bContext *C, Main *bmain, Scene *scene) ATTR_NONNULL()
void BKE_main_ensure_invariants(Main &bmain, std::optional< Span< ID * > > modified_ids=std::nullopt)
void WM_menu_name_call(bContext *C, const char *menu_name, wm::OpCallContext context)
void BKE_lib_override_library_make_local(Main *bmain, ID *id)
size_t BKE_id_multi_tagged_delete(Main *bmain, const BKEIDDeleteOptions &options={}) ATTR_NONNULL()
void BKE_id_newptr_and_tag_clear(ID *id)
bool BKE_view_layer_synced_ensure(const Main &bmain, const Scene *scene, ViewLayer *view_layer)
bool BKE_collection_child_remove(Main *bmain, Collection *parent, Collection *child)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
bool BKE_constraint_remove_ex(ListBaseT< bConstraint > *list, struct Object *ob, struct bConstraint *con)
void BKE_lib_override_library_property_operation_delete(IDOverrideLibraryProperty *liboverride_property, IDOverrideLibraryPropertyOperation *liboverride_property_operation)
void BKE_lib_override_library_id_reset(Main *bmain, ID *id_root, bool do_reset_system_override)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
const EnumPropertyItem rna_enum_dummy_DEFAULT_items[]
wmOperatorStatus WM_operator_name_call(bContext *C, const char *opstring, wm::OpCallContext context, PointerRNA *properties, const wmEvent *event)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
const EnumPropertyItem rna_enum_dummy_NULL_items[]
void BKE_main_id_tag_all(Main *mainvar, int tag, bool value)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmMsgBus * CTX_wm_message_bus(const bContext *C)
bool id_single_user(bContext *C, ID *id, PointerRNA *ptr, PropertyRNA *prop)
bool RNA_struct_is_ID(const StructRNA *type)
bool BKE_object_is_in_editmode(const Object *ob)
void BKE_image_packfile_ensure(Main *bmain, Image *image, ReportList *reports, const char *data, int data_len)
void BKE_main_id_newptr_and_tag_clear(Main *bmain)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
bool BKE_collection_object_remove(Main *bmain, Collection *collection, Object *ob, bool free_us)
Main * CTX_data_main(const bContext *C)
bool BKE_lib_override_library_is_hierarchy_leaf(Main *bmain, ID *id)
ID_Type GS(const char *name)
void BKE_constraints_active_set(ListBaseT< bConstraint > *list, struct bConstraint *con)
Base * BKE_view_layer_base_find(ViewLayer *view_layer, Object *ob)
wmOperatorStatus WM_enum_search_invoke(bContext *C, wmOperator *op, const wmEvent *)
void DEG_relations_tag_update(Main *bmain)
Scene * CTX_data_scene(const bContext *C)
@ ID_FLAG_EMBEDDED_DATA_LIB_OVERRIDE
@ LIB_ID_MAKELOCAL_ASSET_DATA_CLEAR
bool BKE_library_ID_is_indirectly_used(Main *bmain, void *idv)
bool BKE_image_has_packedfile(const Image *image)
ATTR_WARN_UNUSED_RESULT const void * element
bool BKE_lib_id_make_local(Main *bmain, ID *id, int flags)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
ReportList * CTX_wm_reports(const bContext *C)
bool ED_operator_region_outliner_active(bContext *C)
void BKE_lib_override_library_property_delete(IDOverrideLibrary *liboverride, IDOverrideLibraryProperty *liboverride_property)
bool WM_operator_poll(bContext *C, wmOperatorType *ot)
bool RNA_path_resolve_property(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop)
void BKE_lib_override_library_id_hierarchy_reset(Main *bmain, ID *id_root, bool do_reset_system_override)
void id_fake_user_clear(ID *id)
ARegion * CTX_wm_region(const bContext *C)
void ED_region_tag_redraw_no_rebuild(ARegion *region)
ListBaseT< Base > * BKE_view_layer_object_bases_get(ViewLayer *view_layer)
bool RNA_property_copy(Main *bmain, PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop, int index, IDOverrideLibraryProperty *removed_oprop, IDOverrideLibraryPropertyOperation *removed_opop)
#define TSELEM_OPEN(telm, sv)
ListBaseT< FCurve > drivers
CollectionColorTag color_tag
int subitem_reference_index
ListBaseT< IDOverrideLibraryPropertyOperation > operations
eID_OverrideLib_Flag flag
struct ID * hierarchy_root
IDOverrideLibrary * override_library
bke::library::LibraryRuntime * runtime
ListBaseT< Object > objects
ListBaseT< bAction > actions
ListBaseT< bConstraint > constraints
struct Collection * instance_collection
struct Collection * master_collection
eSpaceOutliner_Mode outlinevis
ed::outliner::SpaceOutliner_Runtime * runtime
TreeElement * parent_element
TreeElement * select_element
Set< Object * > objects_set
bool is_liboverride_hierarchy_root_allowed
bool is_liboverride_allowed
Set< uint > selected_id_uid
Map< ID *, Vector< OutlinerLiboverrideDataIDRoot > > id_hierarchy_roots
bool do_resync_hierarchy_enforce
Set< uint > id_hierarchy_roots_uid
void id_root_add(ID *id_hierarchy_root_reference, ID *id_root_reference, ID *id_instance_hint, const bool is_override_instancing_object)
void id_root_set(ID *id_hierarchy_root_reference)
bool is_override_instancing_object
ID * id_hierarchy_root_override
ListBaseT< ed::outliner::TreeElement > tree
TreeStoreElem * store_elem
ListBaseT< TreeElement > subtree
void operator_context_set(wm::OpCallContext opcontext)
void menu_contents(StringRef menuname)
void op_enum(StringRefNull opname, StringRefNull propname, IDProperty *properties, wm::OpCallContext context, eUI_Item_Flag flag, const int active=-1)
void separator(float factor=1.0f, LayoutSeparatorType type=LayoutSeparatorType::Auto)
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
#define WM_msg_publish_rna_prop(mbus, id_, data_, type_, prop_)