13#include <fmt/format.h>
123#define INDEX_UNSET -1
124 int par1, par2, par3, par4;
175 for (
Nurb *nu = editnurb->first(); nu !=
nullptr; nu = nu->
next) {
178 for (
int nurb_index = 0; nurb_index < nu->pntsu; nurb_index++, bezt++, curr_index++) {
200 const int points_num = nu->pntsu * nu->pntsv;
201 for (
int nurb_index = 0; nurb_index < points_num; nurb_index++, bp++, curr_index++) {
229 for (
int curr_index = 0; curr_index < points_num; curr_index++, bp++) {
300 ot->
name =
"Make Vertex Parent";
301 ot->
description =
"Parent selected objects to the selected vertices";
302 ot->
idname =
"OBJECT_OT_vertex_parent_set";
323 "Completely clear the parenting relationship, including involved modifiers if any"},
325 "CLEAR_KEEP_TRANSFORM",
327 "Clear and Keep Transformation",
328 "As 'Clear Parent', but keep the current visual transformations of the object"},
332 "Clear Parent Inverse",
333 "Reset the transform corrections applied to the parenting relationship, does not remove "
335 {0,
nullptr, 0,
nullptr,
nullptr},
345 for (md = ob->
modifiers.first(); md; md = mdn) {
390 if (ob->
parent ==
nullptr) {
453 ot->
name =
"Clear Parent";
455 ot->
idname =
"OBJECT_OT_parent_clear";
502 {
PAR_CURVE,
"CURVE", 0,
"Curve Deform",
""},
508 {0,
nullptr, 0,
nullptr,
nullptr},
514 Depsgraph *depsgraph,
517 Object *
const parent_eval,
520 const bool keep_transform,
521 const int vert_par[3])
545 Curve *cu_eval = id_cast<Curve *>(parent_eval->
data);
581 if (pchan ==
nullptr || pchan_eval ==
nullptr) {
590 if (keep_transform) {
659 const ModifierType lattice_modifier_type = is_grease_pencil ?
662 md =
modifier_add(reports, bmain, scene, ob,
nullptr, lattice_modifier_type);
664 if (is_grease_pencil) {
695 if (
Bone *bone = pchan->bone_get(*par)) {
702 if (
Bone *bone = pchan->bone_get(*par)) {
709 ob->
par1 = vert_par[0];
722 const bool is_armature_parent =
ELEM(
727 float cmat[4][4], vec[3];
736 sub_v3_v3v3(vec, ob->object_to_world().location(), cmat[3]);
798 const bool keep_transform,
799 const int vert_par[3])
819 const float *co_find = child->object_to_world().location();
828 vert_par[0] = nearest[0].
index;
829 vert_par[1] = nearest[1].
index;
830 vert_par[2] = nearest[2].
index;
858 if (ob == parenting_context->
par) {
866 parenting_context->
scene,
869 parenting_context->
par,
888 int vert_par[3] = {0, 0, 0};
891 if (ob == parenting_context->
par) {
900 parenting_context->
scene,
902 parenting_context->
par,
925 BLI_assert((tree !=
nullptr) || (tree_tot == 0));
945 parenting_context.
partype = partype;
980 opptr = layout.
op(ot,
981 IFACE_(
"Object (Keep Transform)"),
989 "OBJECT_OT_parent_no_inverse_set",
IFACE_(
"Object (Without Inverse)"), ICON_NONE);
992 op_ptr = layout.
op(
"OBJECT_OT_parent_no_inverse_set",
993 IFACE_(
"Object (Keep Transform Without Inverse)"),
998 bool armature_deform, empty_groups, envelope_weights, automatic_weights, attach_surface;
999 } can_support = {
false};
1002 if (child == parent) {
1005 if (
ELEM(child->type,
1013 can_support.armature_deform =
true;
1014 can_support.envelope_weights =
true;
1017 can_support.empty_groups =
true;
1020 can_support.automatic_weights =
true;
1023 can_support.attach_surface =
true;
1030 if (can_support.armature_deform) {
1031 op_ptr = layout.
op(ot,
IFACE_(
"Armature Deform"), ICON_OUTLINER_OB_ARMATURE);
1034 if (can_support.empty_groups) {
1035 op_ptr = layout.
op(ot,
IFACE_(
" With Empty Groups"), ICON_NONE);
1038 if (can_support.envelope_weights) {
1039 op_ptr = layout.
op(ot,
IFACE_(
" With Envelope Weights"), ICON_NONE);
1042 if (can_support.automatic_weights) {
1043 op_ptr = layout.
op(ot,
IFACE_(
" With Automatic Weights"), ICON_NONE);
1046 op_ptr = layout.
op(ot,
IFACE_(
"Bone"), ICON_BONE_DATA);
1048 op_ptr = layout.
op(ot,
IFACE_(
"Bone Relative"), ICON_NONE);
1052 op_ptr = layout.
op(ot,
IFACE_(
"Curve Deform"), ICON_OUTLINER_OB_CURVE);
1054 op_ptr = layout.
op(ot,
IFACE_(
"Follow Path"), ICON_CURVE_PATH);
1056 op_ptr = layout.
op(ot,
IFACE_(
"Path Constraint"), ICON_NONE);
1060 op_ptr = layout.
op(ot,
IFACE_(
"Lattice Deform"), ICON_OUTLINER_OB_LATTICE);
1064 if (can_support.attach_surface) {
1065 layout.
op(
"CURVES_OT_surface_set",
IFACE_(
"Object (Attach Curves to Surface)"), ICON_NONE);
1071 op_ptr = layout.
op(ot,
IFACE_(
"Vertex"), ICON_VERTEXSEL);
1073 op_ptr = layout.
op(ot,
IFACE_(
"Vertex (Triangle)"), ICON_NONE);
1077 popup_menu_end(
C, pup);
1097 if (
STREQ(prop_id,
"xmirror")) {
1111 ot->
name =
"Make Parent";
1113 ot->
idname =
"OBJECT_OT_parent_set";
1130 "Apply weights symmetrically along X axis, for Envelope/Automatic vertex groups creation");
1135 "Apply transformation before parenting");
1167 if (keep_transform) {
1174 memset(ob->loc, 0,
sizeof(
float[3]));
1190 ot->
name =
"Make Parent without Inverse";
1191 ot->
description =
"Set the object's parenting without setting the inverse parent correction";
1192 ot->
idname =
"OBJECT_OT_parent_no_inverse_set";
1205 "Preserve the world transform throughout parenting");
1222 "CLEAR_KEEP_TRANSFORM",
1224 "Clear and Keep Transformation (Clear Track)",
1226 {0,
nullptr, 0,
nullptr,
nullptr},
1243 ob->track =
nullptr;
1247 for (con = ob->constraints.last(); con; con = pcon) {
1273 ot->
name =
"Clear Track";
1274 ot->
description =
"Clear tracking constraint or flag from object";
1275 ot->
idname =
"OBJECT_OT_track_clear";
1305 {0,
nullptr, 0,
nullptr,
nullptr},
1395 ot->
name =
"Make Track";
1396 ot->
description =
"Make the object track another object, using various methods/constraints";
1397 ot->
idname =
"OBJECT_OT_track_set";
1424 if (sce ==
nullptr) {
1431 for (base = FIRSTBASE; base; base = base->
next) {
1448 if (scene_to ==
nullptr) {
1499 if (
ELEM(
object.type,
1585 LinkNode *ob_collections =
nullptr;
1586 bool is_cycle =
false;
1587 bool is_lib =
false;
1597 Object *ob_dst = base_dst->object;
1599 if (ob_src != ob_dst) {
1601 obdata_id = ob_dst->
data;
1607 obdata_id = ob_src->
data;
1609 ob_dst->
data = obdata_id;
1622 for (a = 0; a < ob_src->
totcol; a++) {
1631 if (ob_dst->
data && ob_src->
data) {
1649 for (collection_node = ob_collections; collection_node;
1650 collection_node = collection_node->
next)
1654 bmain,
static_cast<Collection *
>(collection_node->
link), ob_dst);
1682 Curve *cu_src = id_cast<Curve *>(ob_src->
data);
1683 Curve *cu_dst = id_cast<Curve *>(ob_dst->
data);
1690#define CURVE_VFONT_SET(vfont_member) \
1692 if (cu_dst->vfont_member) { \
1693 id_us_min(&cu_dst->vfont_member->id); \
1695 cu_dst->vfont_member = cu_src->vfont_member; \
1696 id_us_plus((ID *)cu_dst->vfont_member); \
1705#undef CURVE_VFONT_SET
1729 if (ob_collections) {
1755 ot->
name =
"Link Objects to Scene";
1756 ot->
description =
"Link selection to another scene";
1757 ot->
idname =
"OBJECT_OT_make_links_scene";
1777 {
MAKE_LINKS_OBDATA,
"OBDATA", 0,
"Link Object Data",
"Replace assigned Object Data"},
1782 "Link Animation Data",
1783 "Replace assigned Animation Data"},
1784 {
MAKE_LINKS_GROUP,
"GROUPS", 0,
"Link Collections",
"Replace assigned Collections"},
1788 "Link Instance Collection",
1789 "Replace assigned Collection Instance"},
1790 {
MAKE_LINKS_FONTS,
"FONTS", 0,
"Link Fonts to Text",
"Replace Text object Fonts"},
1797 "Copy Grease Pencil Effects",
1798 "Replace Grease Pencil Effects"},
1802 "Copy Light Linking",
1803 "Replace assigned Light Linking collection"},
1807 "Copy Shadow Linking",
1808 "Replace assigned Shadow Linking collection"},
1809 {0,
nullptr, 0,
nullptr,
nullptr},
1813 ot->
name =
"Link/Transfer Data";
1814 ot->
description =
"Transfer data from active object to selected objects";
1815 ot->
idname =
"OBJECT_OT_make_links_data";
1846 const bool do_collection)
1848 if (do_collection) {
1865 const bool copy_collections,
1866 const bool is_master_collection)
1870 if (copy_collections && !is_master_collection) {
1874 collection = id_cast<Collection *>(
ID_NEW_SET(collection, collection_new));
1881 if ((ob->
id.
newid ==
nullptr) && ((ob->
flag & flag) == flag)) {
1896 for (; child !=
nullptr; child = child_next) {
1897 child_next = child->
next;
1899 bmain, scene, child->
collection, flag, copy_collections,
false);
1901 if (is_master_collection && copy_collections && child->
collection != collection_child_new) {
1909 if (child == orig_child_last) {
1920 Main *bmain,
Scene *scene,
View3D *v3d,
const int flag,
const bool copy_collections)
1971 static_cast<const ID *
>(ob->data),
1978 static_cast<const ID *
>(ob->data),
1985 static_cast<const ID *
>(ob->data),
1988 Camera *cam = id_cast<Camera *>(ob->data);
1996 static_cast<const ID *
>(ob->data),
2003 static_cast<const ID *
>(ob->data),
2012 static_cast<const ID *
>(ob->data),
2015 Curve *cu = id_cast<Curve *>(ob->data);
2023 static_cast<const ID *
>(ob->data),
2031 static_cast<const ID *
>(ob->data),
2039 static_cast<const ID *
>(ob->data),
2046 static_cast<const ID *
>(ob->data),
2053 static_cast<const ID *
>(ob->data),
2060 static_cast<const ID *
>(ob->data),
2067 static_cast<const ID *
>(ob->data),
2074 static_cast<const ID *
>(ob->data),
2079 printf(
"ERROR %s: cannot copy %s\n", __func__,
id->name);
2119 if (adt ==
nullptr) {
2123 ID *id_act = id_cast<ID *>(adt->
action);
2138 ID *id_obdata = ob->data;
2140 if (adt ==
nullptr) {
2144 ID *id_act = id_cast<ID *>(adt->
action);
2162 const bool is_obdata_editable = ob->data ?
BKE_id_is_editable(bmain, ob->data) :
false;
2163 for (a = 1; a <= ob->totcol; a++) {
2164 if (!ob->matbits[a - 1] && !is_obdata_editable) {
2171 man = id_cast<Material *>(
2219 ID *data_id =
object->data;
2239 ID *data_id =
object->data;
2260 bool changed =
false;
2346 "Orphan library objects added to the current scene to avoid loss");
2365 for (a = 0; a < ob->totcol; a++) {
2374 for (a = 0; a < ob->totcol; a++) {
2384 ob->data !=
nullptr)
2386 ID *ob_data = ob->data;
2395 bmain,
nullptr,
nullptr,
true,
false,
true);
2407 "SELECT_OBDATA_MATERIAL",
2409 "Selected Objects, Data and Materials",
2412 {0,
nullptr, 0,
nullptr,
nullptr},
2416 ot->
name =
"Make Local";
2417 ot->
description =
"Make library linked data-blocks local to this file";
2418 ot->
idname =
"OBJECT_OT_make_local";
2461 ID *id_root =
nullptr;
2462 bool is_override_instancing_object =
false;
2464 bool user_overrides_from_selected_objects =
false;
2472 "Collection '%s' (instantiated by the active object) is not overridable",
2478 is_override_instancing_object =
true;
2479 user_overrides_from_selected_objects =
false;
2483 const uint collection_session_uid = *(
reinterpret_cast<const uint *
>(&i));
2487 "Could not find an overridable root hierarchy for object '%s'",
2493 &collection_session_uid,
2494 sizeof(collection_session_uid),
2496 id_root = &collection->
id;
2497 user_overrides_from_selected_objects =
true;
2503 id_root = &obact->
id;
2504 user_overrides_from_selected_objects =
true;
2508 bool is_active_override =
false;
2512 is_active_override = is_active_override || (&ob_iter->id == id_root);
2522 if (is_active_override) {
2527 const bool do_fully_editable =
false;
2529 std::unique_ptr<Set<uint32_t>> user_overrides_objects_uids =
2530 do_fully_editable ?
nullptr : std::make_unique<Set<uint32_t>>();
2532 if (do_fully_editable) {
2535 else if (user_overrides_from_selected_objects) {
2538 user_overrides_objects_uids->add(ob_iter->id.session_uid);
2546 user_overrides_objects_uids->add(ob_iter->id.session_uid);
2557 if (user_overrides_objects_uids !=
nullptr) {
2563 if (user_overrides_objects_uids->contains(coll_ob_iter.
ob->
id.
session_uid)) {
2575 ID *id_root_override;
2586 if (!do_fully_editable) {
2605 if (is_override_instancing_object) {
2612 switch (
GS(id_root->
name)) {
2614 Collection *collection_root = id_cast<Collection *>(id_root);
2687 if (potential_root_collections.
is_empty()) {
2688 potential_root_collections.
add_new(&collection);
2691 bool has_parents_in_potential_roots =
false;
2692 bool is_potential_root =
false;
2693 for (
auto *collection_root_iter : potential_root_collections) {
2696 "Invalid loop in collection hierarchy");
2699 has_parents_in_potential_roots =
true;
2703 "Invalid loop in collection hierarchy");
2706 is_potential_root =
true;
2707 potential_root_collections.remove(collection_root_iter);
2712 is_potential_root =
true;
2717 if (is_potential_root && !has_parents_in_potential_roots) {
2718 potential_root_collections.add_new(&collection);
2723 if (potential_root_collections.
is_empty()) {
2727 if (potential_root_collections.
size() == 1) {
2728 Collection *collection_root = potential_root_collections.
pop();
2736 "Too many potential root collections (%d) for the override hierarchy, "
2737 "please use the Outliner instead",
2738 int(potential_root_collections.
size()));
2763 ot->
name =
"Make Library Override";
2765 "Create a local override of the selected linked objects, and their hierarchy of "
2767 ot->
idname =
"OBJECT_OT_make_override_library";
2784 "Override Collection",
2785 "Session UID of the directly linked collection containing the selected "
2786 "object, to make an override from",
2836 ot->
name =
"Reset Library Override";
2837 ot->
description =
"Reset the selected local overrides to their linked references values";
2838 ot->
idname =
"OBJECT_OT_reset_override_library";
2859 LinkNode *todo_objects =
nullptr, *todo_object_iter;
2870 for (todo_object_iter = todo_objects; todo_object_iter !=
nullptr;
2871 todo_object_iter = todo_object_iter->
next)
2873 Object *ob_iter =
static_cast<Object *
>(todo_object_iter->link);
2875 bool do_remap_active =
false;
2878 do_remap_active =
true;
2884 if (do_remap_active) {
2888 if (basact !=
nullptr) {
2889 view_layer->
basact = basact;
2911 ot->
name =
"Clear Library Override";
2913 "Delete the selected local overrides and relink their usages to the linked data-blocks if "
2914 "possible, else reset them and mark them as non editable";
2915 ot->
idname =
"OBJECT_OT_clear_override_library";
2943 const bool copy_collections =
false;
2944 bool update_deps =
false;
2992 C, op, event,
IFACE_(
"Make Selected Objects Single-User"),
IFACE_(
"Make Single"));
3000 {0,
nullptr, 0,
nullptr,
nullptr},
3004 ot->
name =
"Make Single User";
3005 ot->
description =
"Make linked data local to each object";
3006 ot->
idname =
"OBJECT_OT_make_single_user";
3023 RNA_def_boolean(ot->
srna,
"obdata",
false,
"Object Data",
"Make single user object data");
3025 ot->
srna,
"material",
false,
"Materials",
"Make materials local to each data-block");
3030 "Make object animation data local to each object");
3034 "Object Data Animation",
3035 "Make object data (mesh, curve etc.) animation data local to each object");
3048 if (ob ==
nullptr) {
3051 mat_slot =
max_ii(mat_slot, 1);
3056 return fmt::format(fmt::runtime(
TIP_(
"Drop {} on {} (slot {}, replacing {})")),
3060 prev_mat->id.name + 2);
3063 fmt::runtime(
TIP_(
"Drop {} on {} (slot {})")), name, ob->
id.
name + 2, mat_slot);
3073 mat_slot =
max_ii(mat_slot, 1);
3075 Material *ma = id_cast<Material *>(
3078 if (ob ==
nullptr || ma ==
nullptr) {
3102 ot->
name =
"Drop Named Material on Object";
3103 ot->
idname =
"OBJECT_OT_drop_named_material";
3125 if (ob ==
nullptr) {
3135 return fmt::format(fmt::runtime(
TIP_(
"Add modifier with node group \"{}\" on object \"{}\"")),
3142 tree->ensure_interface_cache();
3143 if (!tree->interface_outputs().is_empty()) {
3145 if (!first_output) {
3213 ot->
name =
"Drop Geometry Node Group on Object";
3214 ot->
idname =
"OBJECT_OT_drop_geometry_nodes";
3227 "Session UID of the geometry node group being dropped",
3232 "show_datablock_in_modifier",
3234 "Show the data-block selector in the modifier",
3251 if (pprop.
prop ==
nullptr) {
3259 Object *ob = id_cast<Object *>(
id);
3282 ot->
name =
"Unlink";
3283 ot->
idname =
"OBJECT_OT_unlink_data";
Functions and classes to work with Actions.
Functions to work with AnimData.
Blender kernel action and pose functionality.
#define FOREACH_COLLECTION_OBJECT_RECURSIVE_END
#define FOREACH_SCENE_OBJECT_END
#define FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(_collection, _object)
#define FOREACH_SCENE_OBJECT_BEGIN(scene, _instance)
#define CTX_DATA_BEGIN(C, Type, instance, member)
display list (or rather multi purpose list) stuff.
#define FOREACH_OBJECT_FLAG_BEGIN(_bmain, _scene, _view_layer, _v3d, _flag, _instance)
#define FOREACH_OBJECT_FLAG_END
#define FOREACH_SELECTED_OBJECT_BEGIN(_view_layer, _v3d, _instance)
#define FOREACH_SELECTED_OBJECT_END
#define MAIN_ID_SESSION_UID_UNSET
#define FOREACH_MAIN_ID_END
#define FOREACH_MAIN_ID_BEGIN(_bmain, _id)
General operations, lookup, etc. for materials.
General operations, lookup, etc. for blender objects.
A KD-tree for nearest neighbor search.
#define BLI_linklist_prepend_alloca(listp, ptr)
#define STRNCPY_UTF8(dst, src)
#define ID_IS_OVERRIDE_LIBRARY_REAL(_id)
#define ID_IS_OVERRIDABLE_LIBRARY(_id)
#define ID_IS_LINKED(_id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
#define ID_NEW_SET(_id, _idn)
Object groups, one object can be in many groups at once.
#define BEZT_ISSEL_ANY_HIDDENHANDLES(v3d, bezt)
Object is a sort of wrapper for general info.
#define OB_TYPE_SUPPORT_PARVERT(_type)
#define OB_TYPE_SUPPORT_MATERIAL(_type)
#define BASE_SELECTED(v3d, base)
#define ARM_GROUPS_ENVELOPE
Read Blender memory allocation and freeing.
#define RNA_ENUM_ITEM_SEPR
#define ND_LIB_OVERRIDE_CHANGED
#define SET_FLAG_FROM_TEST(value, test, flag)
#define BLI_assert_msg(a, msg)
#define BM_elem_flag_test(ele, hflag)
#define BM_ITER_MESH_INDEX(ele, iter, bm, itype, indexvar)
void add_new(const Key &key)
void * MEM_new_uninitialized(size_t len, const char *str)
bAction * id_action_ensure(Main *bmain, ID *id)
FCurve * action_fcurve_ensure_ex(Main *bmain, bAction *act, PointerRNA *ptr, const FCurveDescriptor &fcurve_descriptor)
void free(Subdiv *subdiv)
void add_armature_automatic_weights(Scene &scene, Object &object, const Object &ob_armature)
void add_armature_envelope_weights(Scene &scene, Object &object, const Object &ob_armature)
bool add_armature_vertex_groups(Object &object, const Object &ob_armature)
@ CLEAR_PARENT_KEEP_TRANSFORM
ModifierData * modifier_add(ReportList *reports, Main *bmain, Scene *scene, Object *ob, const char *name, int type)
static wmOperatorStatus object_unlink_data_exec(bContext *C, wmOperator *op)
void single_obdata_user_make(Main *bmain, Scene *scene, Object *ob)
static bool has_geometry_visibility(const Object &object)
static bool make_override_library_object_overridable_check(Main *bmain, Object *object)
static wmOperatorStatus drop_geometry_nodes_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void OBJECT_OT_make_local(wmOperatorType *ot)
static wmOperatorStatus clear_override_library_exec(bContext *C, wmOperator *)
void OBJECT_OT_clear_override_library(wmOperatorType *ot)
const EnumPropertyItem prop_clear_parent_types[]
static const EnumPropertyItem prop_clear_track_types[]
void OBJECT_OT_unlink_data(wmOperatorType *ot)
@ MAKE_SINGLE_USER_SELECTED
static bool check_geometry_node_group_sockets(wmOperator *op, const bNodeTree *tree)
static void single_mat_users(Main *bmain, Scene *scene, ViewLayer *view_layer, View3D *v3d, const int flag)
static bool parent_set_vertex_parent(bContext *C, ParentingContext *parenting_context)
static void parent_clear_data(Object *ob)
static wmOperatorStatus object_track_clear_exec(bContext *C, wmOperator *op)
static wmOperatorStatus parent_set_invoke(bContext *C, wmOperator *op, const wmEvent *)
@ CLEAR_TRACK_KEEP_TRANSFORM
void OBJECT_OT_make_links_scene(wmOperatorType *ot)
std::string drop_geometry_nodes_tooltip(bContext *C, PointerRNA *properties, const int mval[2])
void OBJECT_OT_track_clear(wmOperatorType *ot)
static void single_obdata_users(Main *bmain, Scene *scene, ViewLayer *view_layer, View3D *v3d, const int flag)
static wmOperatorStatus make_links_scene_exec(bContext *C, wmOperator *op)
void OBJECT_OT_drop_named_material(wmOperatorType *ot)
static void make_local_animdata_tag_strips(ListBaseT< NlaStrip > *strips)
const EnumPropertyItem prop_make_parent_types[]
void base_select(Base *base, eObjectSelect_Mode mode)
void OBJECT_OT_parent_no_inverse_set(wmOperatorType *ot)
static wmOperatorStatus make_single_user_exec(bContext *C, wmOperator *op)
static void object_remove_parent_deform_modifiers(Object *ob, const Object *par)
static bool single_data_needs_duplication(ID *id)
void OBJECT_OT_track_set(wmOperatorType *ot)
static const EnumPropertyItem prop_make_track_types[]
static wmOperatorStatus track_set_exec(bContext *C, wmOperator *op)
static wmOperatorStatus vertex_parent_set_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_parent_set(wmOperatorType *ot)
static void single_objectdata_action_users(Main *bmain, Scene *scene, ViewLayer *view_layer, View3D *v3d, const int flag)
static wmOperatorStatus parent_clear_exec(bContext *C, wmOperator *op)
bool parent_set(ReportList *reports, const bContext *C, Scene *scene, Object *const ob, Object *const par, int partype, bool xmirror, bool keep_transform, const int vert_par[3])
static wmOperatorStatus make_local_exec(bContext *C, wmOperator *op)
@ MAKE_LINKS_SHADOW_LINKING
@ MAKE_LINKS_LIGHT_LINKING
@ MAKE_LINKS_DUPLICOLLECTION
static wmOperatorStatus make_override_library_invoke(bContext *C, wmOperator *op, const wmEvent *)
Object * context_active_object(const bContext *C)
void OBJECT_OT_make_links_data(wmOperatorType *ot)
static wmOperatorStatus parent_noinv_set_exec(bContext *C, wmOperator *op)
static void parent_set_vert_find(KDTree< float3 > *tree, Object *child, int vert_par[3], bool is_tri)
@ MAKE_LOCAL_SELECT_OBDATA_MATERIAL
@ MAKE_LOCAL_SELECT_OBDATA
static bool allow_make_links_data(const int type, Object *ob_src, Object *ob_dst)
void parent_clear(Main *bmain, Object *ob, int type)
static wmOperatorStatus reset_override_library_exec(bContext *C, wmOperator *)
static wmOperatorStatus make_links_data_exec(bContext *C, wmOperator *op)
std::string drop_named_material_tooltip(bContext *C, StringRef name, const int mval[2])
static bool reset_clear_override_library_poll(bContext *C)
static bool make_override_library_poll(bContext *C)
void OBJECT_OT_reset_override_library(wmOperatorType *ot)
void OBJECT_OT_parent_clear(wmOperatorType *ot)
static void make_local_animdata_tag(AnimData *adt)
void base_free_and_unlink(Main *bmain, Scene *scene, Object *ob)
void OBJECT_OT_make_override_library(wmOperatorType *ot)
static bool parent_set_nonvertex_parent(bContext *C, ParentingContext *parenting_context)
void OBJECT_OT_drop_geometry_nodes(wmOperatorType *ot)
static void single_object_users(Main *bmain, Scene *scene, View3D *v3d, const int flag, const bool copy_collections)
void OBJECT_OT_make_single_user(wmOperatorType *ot)
static wmOperatorStatus parent_set_invoke_menu(bContext *C, wmOperatorType *ot)
static bool vertex_parent_set_poll(bContext *C)
static void make_local_material_tag(Material *ma)
static void libblock_relink_collection(Main *bmain, Collection *collection, const bool do_collection)
static void tag_localizable_objects(bContext *C, const int mode)
static bool parent_set_poll_property(const bContext *, wmOperator *op, const PropertyRNA *prop)
static wmOperatorStatus drop_named_material_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void OBJECT_OT_parent_set(wmOperatorType *ot)
static bool parent_set_with_depsgraph(ReportList *reports, const bContext *C, Scene *scene, Depsgraph *depsgraph, Object *const ob, Object *const par, Object *const parent_eval, int partype, const bool xmirror, const bool keep_transform, const int vert_par[3])
static wmOperatorStatus parent_set_exec(bContext *C, wmOperator *op)
static int tag_localizable_looper(LibraryIDLinkCallbackData *cb_data)
static bool make_local_all__instance_indirect_unused(Main *bmain, const Scene *scene, ViewLayer *view_layer, Collection *collection)
void object_single_user_make(Main *bmain, Scene *scene, Object *ob)
static void single_object_action_users(Main *bmain, Scene *scene, ViewLayer *view_layer, View3D *v3d, const int flag)
static Collection * single_object_users_collection(Main *bmain, Scene *scene, Collection *collection, const int flag, const bool copy_collections, const bool is_master_collection)
static wmOperatorStatus make_override_library_exec(bContext *C, wmOperator *op)
static wmOperatorStatus make_single_user_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static bool parent_set_vertex_parent_with_kdtree(bContext *C, ParentingContext *parenting_context, KDTree< float3 > *tree)
void shaderfx_link(Object *dst, Object *src)
PopupMenu * popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
void context_active_but_prop_get_templateID(const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop)
void BKE_constraints_free(ListBaseT< bConstraint > *list)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
wmOperatorStatus WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)
void BKE_scene_objects_iterator_end(BLI_Iterator *iter)
int RNA_enum_get(PointerRNA *ptr, const char *name)
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
void BKE_pose_rebuild(Main *bmain, Object *ob, bArmature *arm, bool do_id_user)
@ RPT_ERROR_INVALID_INPUT
void BKE_id_delete(Main *bmain, void *idv, const BKEIDDeleteOptions &options={}) ATTR_NONNULL()
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)
BMesh * BKE_editmesh_bmesh_get_for_write(Mesh *mesh)
void BKE_object_apply_parent_inverse(Object *ob)
void WM_operator_properties_id_lookup(wmOperatorType *ot, const bool add_name_prop)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void BKE_libblock_relink_to_newid(Main *bmain, ID *id, int remap_flag) ATTR_NONNULL()
void BLI_addhead(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
bool ED_operator_editlattice(bContext *C)
Material *** BKE_object_material_array_p(Object *ob)
@ CONSTRAINT_TYPE_FOLLOWPATH
@ CONSTRAINT_TYPE_DAMPTRACK
@ CONSTRAINT_TYPE_TRACKTO
@ CONSTRAINT_TYPE_LOCKTRACK
PointerRNA RNA_id_pointer_create(ID *id)
ID * BKE_libblock_find_session_uid(Main *bmain, short type, uint32_t session_uid)
ID * WM_operator_properties_id_lookup_from_name_or_session_uid(Main *bmain, PointerRNA *ptr, const ID_Type type)
const char * RNA_property_identifier(const PropertyRNA *prop)
Material * BKE_object_material_get(Object *ob, short act)
MINLINE void copy_v3_v3_int(int r[3], const int a[3])
bool ED_operator_object_active_objectmode(bContext *C)
Object * ED_view3d_give_material_slot_under_cursor(bContext *C, const int mval[2], int *r_material_slot)
void void BKE_libblock_remap(Main *bmain, void *old_idv, void *new_idv, int remap_flags) ATTR_NONNULL(1
bool invert_m4_m4(float inverse[4][4], const float mat[4][4])
Object * BKE_modifiers_is_deformed_by_curve(Object *ob)
@ eModifierType_GreasePencilLattice
@ eModifierType_GreasePencilArmature
Object * BKE_modifiers_is_deformed_by_armature(Object *ob)
void MOD_nodes_update_interface(Main &bmain, Object *object, NodesModifierData *nmd)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
int RNA_int_get(PointerRNA *ptr, const char *name)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
@ GEO_NODE_ASSET_HIDE_MODIFIER_MANAGE_PANEL
FModifier * add_fmodifier(ListBaseT< FModifier > *modifiers, int type, FCurve *owner_fcu)
@ ID_REMAP_SKIP_INDIRECT_USAGE
MINLINE int max_ii(int a, int b)
void BKE_object_material_assign(Main *bmain, Object *ob, Material *ma, short act, int assign_type)
struct bConstraint * BKE_constraint_add_for_object(struct Object *ob, const char *name, eBConstraint_Types type)
void BKE_collection_object_parent_clear_sort_index_reset(Main &bmain, Object &ob)
void BKE_animdata_duplicate_id_action(Main *bmain, ID *id, uint duplicate_flags)
Base * CTX_data_active_base(const bContext *C)
@ LIBOVERRIDE_FLAG_SYSTEM_DEFINED
void BKE_sculptsession_free_pbvh(Object &object)
bool BKE_object_supports_modifiers(const Object *ob)
ViewLayer * CTX_data_view_layer(const bContext *C)
void BKE_object_apply_mat4(Object *ob, const float mat[4][4], bool use_compat, bool use_parent)
bool BKE_collection_has_object(Collection *collection, const Object *ob)
bool BKE_object_parent_loop_check(const Object *parent, const Object *ob)
void BKE_light_linking_copy_receiver_collection(Main *bmain, Object &object_dst, const Object &object_src)
void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
@ FMODIFIER_TYPE_GENERATOR
bool BKE_main_collection_sync_remap(const Main *bmain)
AnimData * BKE_animdata_from_id(const ID *id)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
bool ED_operator_editmesh(bContext *C)
void BKE_object_groups_clear(Main *bmain, Scene *scene, Object *object)
void BKE_light_linking_copy_blocker_collection(Main *bmain, Object &object_dst, const Object &object_src)
void BKE_collection_object_parented_sort_index_reset(Main &bmain, Object &ob)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void DEG_id_tag_update(ID *id, unsigned int flags)
void BKE_report(ReportList *reports, eReportType type, const char *message)
BMesh const char void * data
void BKE_object_materials_sync_length(Main *bmain, Object *ob, ID *id)
void BKE_constraints_copy(ListBaseT< bConstraint > *dst, const ListBaseT< bConstraint > *src, bool do_extern)
T * DEG_get_evaluated(const Depsgraph *depsgraph, T *id)
int kdtree_find_nearest_n(const KDTree< CoordT > *tree, const CoordT &co, KDTreeNearest< CoordT > r_nearest[], uint nearest_len_capacity)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C, bool rna_write_check=false)
Object * CTX_data_edit_object(const bContext *C)
@ BKE_MAT_ASSIGN_EXISTING
@ BKE_MAT_ASSIGN_USERPREF
void BKE_modifier_free(ModifierData *md)
void BKE_scene_graph_update_tagged(Depsgraph *depsgraph, Main *bmain)
int kdtree_find_nearest(const KDTree< CoordT > *tree, const CoordT &co, KDTreeNearest< CoordT > *r_nearest)
KDTree< float3 > * BKE_object_as_kdtree(Object *ob, int *r_tot)
bool BKE_view_layer_synced_ensure(const Main &bmain, const Scene *scene, ViewLayer *view_layer)
bool BKE_animdata_copy_id(Main *bmain, ID *id_to, ID *id_from, int flag)
void BKE_editmesh_looptris_and_normals_calc(BMEditMesh *em, BMesh *bm)
bool ED_operator_editsurfcurve(bContext *C)
bool BKE_collection_child_remove(Main *bmain, Collection *parent, Collection *child)
const EnumPropertyItem * RNA_scene_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
bool BKE_collection_object_add(Main *bmain, Collection *collection, Object *ob)
void unit_m4(float m[4][4])
bool ED_operator_view3d_active(bContext *C)
bool BKE_constraint_remove_ex(ListBaseT< bConstraint > *list, struct Object *ob, struct bConstraint *con)
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)
bool ED_operator_object_active(bContext *C)
void BKE_modifier_remove_from_list(Object *ob, ModifierData *md)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
ListBaseT< Nurb > * object_editcurve_get(Object *ob)
const EnumPropertyItem rna_enum_dummy_NULL_items[]
bool ED_operator_object_active_editable(bContext *C)
bool ED_operator_objectmode_with_view3d_poll_msg(bContext *C)
void BKE_main_id_tag_all(Main *mainvar, int tag, bool value)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void EDBM_mesh_load(Main *bmain, Object *ob)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
void BKE_view_layer_base_deselect_all(const Main &bmain, const Scene *scene, ViewLayer *view_layer)
bool BKE_collection_child_add_no_sync(Main *bmain, Collection *parent, Collection *child)
wmOperatorStatus WM_operator_props_popup_confirm_ex(bContext *C, wmOperator *op, const wmEvent *, std::optional< std::string > title, std::optional< std::string > confirm_text, const bool cancel_default, std::optional< std::string > message)
void BKE_main_id_newptr_and_tag_clear(Main *bmain)
int BKE_object_scenes_users_get(Main *bmain, Object *ob)
void kdtree_free(KDTree< CoordT > *tree)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
bool ED_operator_objectmode(bContext *C)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void EDBM_mesh_make(Object *ob, int select_mode, bool add_key_index)
float4x4 BKE_object_calc_parent(Depsgraph *depsgraph, Scene *scene, Object *ob)
void BLI_linklist_free(LinkNode *list, LinkNodeFreeFP freefunc)
Main * CTX_data_main(const bContext *C)
@ NODES_MODIFIER_HIDE_DATABLOCK_SELECTOR
@ NODES_MODIFIER_HIDE_MANAGE_PANEL
bool BKE_lib_override_library_is_hierarchy_leaf(Main *bmain, ID *id)
void * BLI_listbase_bytes_find(const ListBase *listbase, const void *bytes, size_t bytes_size, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
LinkNode * BKE_object_groups(Main *bmain, Scene *scene, Object *ob)
ID_Type GS(const char *name)
Base * BKE_view_layer_base_find(ViewLayer *view_layer, Object *ob)
Object * ED_view3d_give_object_under_cursor(bContext *C, const int mval[2])
wmOperatorStatus WM_enum_search_invoke(bContext *C, wmOperator *op, const wmEvent *)
@ CONSTRAINT_OBTYPE_OBJECT
void BKE_constraint_target_matrix_get(struct Depsgraph *depsgraph, struct Scene *scene, struct bConstraint *con, int index, short ownertype, void *ownerdata, float mat[4][4], float ctime)
void DEG_relations_tag_update(Main *bmain)
bPoseChannel * BKE_pose_channel_active_if_bonecoll_visible(Object *ob) ATTR_WARN_UNUSED_RESULT
Scene * CTX_data_scene(const bContext *C)
bool BKE_collection_has_object_recursive(Collection *collection, Object *ob)
ID * BKE_id_copy_ex(Main *bmain, const ID *id, ID **new_id_p, int flag)
void BKE_displist_make_curveTypes(struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *ob, bool for_render)
@ BONE_RELATIVE_PARENTING
void ED_object_vgroup_calc_from_armature(ReportList *reports, Depsgraph *, Scene *scene, Object *ob, Object *par, const int mode, const bool mirror)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void BKE_object_link_modifiers(Object *ob_dst, const Object *ob_src)
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
bool BKE_id_is_editable(const Main *bmain, const ID *id)
void WM_cursor_wait(bool val)
Object * CTX_data_active_object(const bContext *C)
void BKE_library_foreach_ID_link(Main *bmain, ID *id, FunctionRef< LibraryIDLinkCallback > callback, void *user_data, LibraryForeachIDFlag flag)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
void BKE_view_layer_selected_objects_tag(const Main &bmain, const Scene *scene, ViewLayer *view_layer, eObject_Flag tag)
View3D * CTX_wm_view3d(const bContext *C)
void BKE_library_make_local(Main *bmain, const Library *lib, GHash *old_to_new_ids, bool untagged_only, bool set_fake, bool clear_asset_data)
bool BKE_view_layer_has_collection(const ViewLayer *view_layer, const Collection *collection)
Object * BKE_modifiers_is_deformed_by_lattice(Object *ob)
Collection * CTX_data_collection(const bContext *C)
#define CURVE_VFONT_SET(vfont_member)
ListBaseT< NlaTrack > nla_tracks
struct Collection * collection
struct CollectionChild * next
bke::CollectionRuntime * runtime
ListBaseT< CollectionChild > children
ListBaseT< CollectionObject > gobject
const float * anim_path_accum_length
ListBaseT< FModifier > modifiers
eID_OverrideLib_Flag flag
struct ID * hierarchy_root
IDOverrideLibrary * override_library
struct EditLatt * editlatt
ListBaseT< Collection > collections
ListBaseT< Object > objects
ListBaseT< Scene > scenes
struct ModifierData * next
ListBaseT< NlaStrip > strips
struct bNodeTree * node_group
ListBaseT< ModifierData > modifiers
bke::ObjectRuntime * runtime
ListBaseT< bConstraint > constraints
eObject_TransFlag transflag
struct Collection * instance_collection
struct Collection * master_collection
struct ToolSettings * toolsettings
struct bConstraint * prev
struct GeometryNodeAssetTraits * geometry_node_asset_traits
ListBaseT< CollectionParent > parents
PointerRNA op(wmOperatorType *ot, std::optional< StringRef > name, int icon, wm::OpCallContext context, eUI_Item_Flag flag)
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
bool(*) poll_property(const bContext *C, wmOperator *op, const PropertyRNA *prop) 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
struct wmOperatorType * type