13#include <fmt/format.h>
120#define INDEX_UNSET -1
121 int par1, par2, par3, par4;
134 BMEditMesh *em = mesh->runtime->edit_mesh.get();
171 for (
Nurb *nu =
static_cast<Nurb *
>(editnurb->
first); nu !=
nullptr; nu = nu->next) {
174 for (
int nurb_index = 0; nurb_index < nu->pntsu; nurb_index++, bezt++, curr_index++) {
196 const int points_num = nu->pntsu * nu->pntsv;
197 for (
int nurb_index = 0; nurb_index < points_num; nurb_index++, bp++, curr_index++) {
225 for (
int curr_index = 0; curr_index < points_num; curr_index++, bp++) {
295 ot->
name =
"Make Vertex Parent";
296 ot->
description =
"Parent selected objects to the selected vertices";
297 ot->
idname =
"OBJECT_OT_vertex_parent_set";
318 "Completely clear the parenting relationship, including involved modifiers if any"},
320 "CLEAR_KEEP_TRANSFORM",
322 "Clear and Keep Transformation",
323 "As 'Clear Parent', but keep the current visual transformations of the object"},
327 "Clear Parent Inverse",
328 "Reset the transform corrections applied to the parenting relationship, does not remove "
330 {0,
nullptr, 0,
nullptr,
nullptr},
376 if (ob->
parent ==
nullptr) {
399 flags &= ~ID_RECALC_ANIMATION;
438 ot->
name =
"Clear Parent";
440 ot->
idname =
"OBJECT_OT_parent_clear";
489 {
PAR_CURVE,
"CURVE", 0,
"Curve Deform",
""},
495 {0,
nullptr, 0,
nullptr,
nullptr},
505 const bool keep_transform,
506 const int vert_par[3])
550 bmain, act,
nullptr, &id_ptr, {
"eval_time", 0});
569 if (pchan ==
nullptr || pchan_eval ==
nullptr) {
578 if (keep_transform) {
636 if (par->
runtime->curve_cache &&
637 par->
runtime->curve_cache->anim_path_accum_length ==
nullptr)
674 pchan->
bone->
flag &= ~BONE_RELATIVE_PARENTING;
675 pchan_eval->
bone->
flag &= ~BONE_RELATIVE_PARENTING;
687 ob->
par1 = vert_par[0];
700 const bool is_armature_parent =
ELEM(
705 float cmat[4][4], vec[3];
714 sub_v3_v3v3(vec, ob->object_to_world().location(), cmat[3]);
765 const float *co_find = child->object_to_world().location();
767 KDTreeNearest_3d nearest[3];
770 tot = BLI_kdtree_3d_find_nearest_n(
tree, co_find, nearest, 3);
774 vert_par[0] = nearest[0].index;
775 vert_par[1] = nearest[1].index;
776 vert_par[2] = nearest[2].index;
781 vert_par[0] = BLI_kdtree_3d_find_nearest(
tree, co_find,
nullptr);
801 if (ob == parenting_context->
par) {
809 parenting_context->
scene,
811 parenting_context->
par,
829 int vert_par[3] = {0, 0, 0};
832 if (ob == parenting_context->
par) {
841 parenting_context->
scene,
843 parenting_context->
par,
858 KDTree_3d *
tree =
nullptr;
869 BLI_kdtree_3d_free(
tree);
874 BLI_kdtree_3d_free(
tree);
885 parenting_context.partype = partype;
926 IFACE_(
"Object (Keep Transform)"),
937 IFACE_(
"Object (Without Inverse)"),
939 "OBJECT_OT_parent_no_inverse_set",
944 IFACE_(
"Object (Keep Transform Without Inverse)"),
946 "OBJECT_OT_parent_no_inverse_set",
951 bool mesh, gpencil, curves;
952 } has_children_of_type = {
false};
955 if (child == parent) {
959 has_children_of_type.mesh =
true;
962 has_children_of_type.gpencil =
true;
965 has_children_of_type.curves =
true;
974 if (has_children_of_type.mesh || has_children_of_type.gpencil) {
989 if (has_children_of_type.curves) {
990 uiItemO(layout,
"Object (Attach Curves to Surface)", ICON_NONE,
"CURVES_OT_surface_set");
1020 if (
STREQ(prop_id,
"xmirror")) {
1034 ot->
name =
"Make Parent";
1036 ot->
idname =
"OBJECT_OT_parent_set";
1053 "Apply weights symmetrically along X axis, for Envelope/Automatic vertex groups creation");
1058 "Apply transformation before parenting");
1090 if (keep_transform) {
1097 memset(ob->loc, 0,
sizeof(
float[3]));
1113 ot->
name =
"Make Parent without Inverse";
1114 ot->
description =
"Set the object's parenting without setting the inverse parent correction";
1115 ot->
idname =
"OBJECT_OT_parent_no_inverse_set";
1128 "Preserve the world transform throughout parenting");
1145 "CLEAR_KEEP_TRANSFORM",
1147 "Clear and Keep Transformation (Clear Track)",
1149 {0,
nullptr, 0,
nullptr,
nullptr},
1166 ob->track =
nullptr;
1170 for (con =
static_cast<bConstraint *
>(ob->constraints.last); con; con = pcon) {
1196 ot->
name =
"Clear Track";
1197 ot->
description =
"Clear tracking constraint or flag from object";
1198 ot->
idname =
"OBJECT_OT_track_clear";
1228 {0,
nullptr, 0,
nullptr,
nullptr},
1277 data->reserved2 =
UP_Y;
1319 ot->
description =
"Make the object track another object, using various methods/constraints";
1320 ot->
idname =
"OBJECT_OT_track_set";
1347 if (sce ==
nullptr) {
1354 for (base = FIRSTBASE; base; base = base->
next) {
1371 if (scene_to ==
nullptr) {
1472 LinkNode *ob_collections =
nullptr;
1473 bool is_cycle =
false;
1474 bool is_lib =
false;
1484 Object *ob_dst = base_dst->object;
1486 if (ob_src != ob_dst) {
1488 obdata_id =
static_cast<ID *
>(ob_dst->
data);
1494 obdata_id =
static_cast<ID *
>(ob_src->
data);
1496 ob_dst->
data = obdata_id;
1508 for (a = 0; a < ob_src->
totcol; a++) {
1517 if (ob_dst->data && ob_src->data) {
1535 for (collection_node = ob_collections; collection_node;
1536 collection_node = collection_node->
next)
1538 if (ob_dst->instance_collection != collection_node->
link) {
1540 bmain,
static_cast<Collection *
>(collection_node->
link), ob_dst);
1549 ob_dst->instance_collection = ob_src->instance_collection;
1550 if (ob_dst->instance_collection) {
1551 id_us_plus(&ob_dst->instance_collection->id);
1562 Curve *cu_src =
static_cast<Curve *
>(ob_src->data);
1563 Curve *cu_dst =
static_cast<Curve *
>(ob_dst->data);
1570 if (cu_dst->
vfont) {
1607 if (ob_collections) {
1633 ot->
name =
"Link Objects to Scene";
1635 ot->
idname =
"OBJECT_OT_make_links_scene";
1655 {
MAKE_LINKS_OBDATA,
"OBDATA", 0,
"Link Object Data",
"Replace assigned Object Data"},
1660 "Link Animation Data",
1661 "Replace assigned Animation Data"},
1662 {
MAKE_LINKS_GROUP,
"GROUPS", 0,
"Link Collections",
"Replace assigned Collections"},
1666 "Link Instance Collection",
1667 "Replace assigned Collection Instance"},
1668 {
MAKE_LINKS_FONTS,
"FONTS", 0,
"Link Fonts to Text",
"Replace Text object Fonts"},
1674 "Copy Grease Pencil Effects",
1675 "Replace Grease Pencil Effects"},
1676 {0,
nullptr, 0,
nullptr,
nullptr},
1680 ot->
name =
"Link/Transfer Data";
1681 ot->
description =
"Transfer data from active object to selected objects";
1682 ot->
idname =
"OBJECT_OT_make_links_data";
1706 return (
id !=
nullptr && (id->us > 1 ||
ID_IS_LINKED(
id)));
1711 const bool do_collection)
1713 if (do_collection) {
1733 const bool copy_collections,
1734 const bool is_master_collection)
1738 if (copy_collections && !is_master_collection) {
1764 for (; child !=
nullptr; child = child_next) {
1765 child_next = child->
next;
1769 if (is_master_collection && copy_collections && child->
collection != collection_child_new) {
1777 if (child == orig_child_last) {
1791 Collection *master_collection = scene->master_collection;
1813 ob_iter->flag &= ~OB_DONE;
1836 id =
static_cast<ID *
>(ob->data);
1844 static_cast<const ID *
>(ob->data),
1849 ob->data = la =
static_cast<Light *
>(
1852 static_cast<const ID *
>(ob->data),
1857 ob->data = cam =
static_cast<Camera *
>(
1860 static_cast<const ID *
>(ob->data),
1867 ob->data = mesh =
static_cast<Mesh *
>(
1870 static_cast<const ID *
>(ob->data),
1877 static_cast<const ID *
>(ob->data),
1884 ob->data = cu =
static_cast<Curve *
>(
1887 static_cast<const ID *
>(ob->data),
1894 ob->data = lat =
static_cast<Lattice *
>(
1897 static_cast<const ID *
>(ob->data),
1905 static_cast<const ID *
>(ob->data),
1913 static_cast<const ID *
>(ob->data),
1920 static_cast<const ID *
>(ob->data),
1927 static_cast<const ID *
>(ob->data),
1934 static_cast<const ID *
>(ob->data),
1941 static_cast<const ID *
>(ob->data),
1948 static_cast<const ID *
>(ob->data),
1955 static_cast<const ID *
>(ob->data),
1960 printf(
"ERROR %s: can't copy %s\n", __func__, id->name);
1977 mesh =
static_cast<Mesh *
>(mesh->id.next);
1984 ob_iter->
flag &= ~OB_DONE;
2000 if (adt ==
nullptr) {
2019 ID *id_obdata = (
ID *)ob->data;
2021 if (adt ==
nullptr) {
2043 for (a = 1; a <= ob->totcol; a++) {
2074 (*id_pointer)->
tag &= ~ID_TAG_DOIT;
2094 ID *data_id = (
ID *)object->data;
2107 object =
static_cast<Object *
>(
object->id.next))
2114 ID *data_id = (
ID *)object->data;
2135 bool changed =
false;
2162 strip->act->id.tag &= ~ID_TAG_PRE_EXISTING;
2194 ma->
id.
tag &= ~ID_TAG_PRE_EXISTING;
2223 "Orphan library objects added to the current scene to avoid loss");
2235 ob->id.tag &= ~ID_TAG_PRE_EXISTING;
2238 psys->part->id.tag &= ~ID_TAG_PRE_EXISTING;
2242 for (a = 0; a < ob->totcol; a++) {
2251 for (a = 0; a < ob->totcol; a++) {
2261 ob->data !=
nullptr)
2263 ID *ob_data =
static_cast<ID *
>(ob->data);
2264 ob_data->
tag &= ~ID_TAG_PRE_EXISTING;
2272 bmain,
nullptr,
nullptr,
true,
false,
true);
2284 "SELECT_OBDATA_MATERIAL",
2286 "Selected Objects, Data and Materials",
2289 {0,
nullptr, 0,
nullptr,
nullptr},
2294 ot->
description =
"Make library linked data-blocks local to this file";
2295 ot->
idname =
"OBJECT_OT_make_local";
2338 ID *id_root =
nullptr;
2339 bool is_override_instancing_object =
false;
2341 bool user_overrides_from_selected_objects =
false;
2349 "Collection '%s' (instantiated by the active object) is not overridable",
2355 is_override_instancing_object =
true;
2356 user_overrides_from_selected_objects =
false;
2360 const uint collection_session_uid = *((
const uint *)&i);
2364 "Could not find an overridable root hierarchy for object '%s'",
2370 &collection_session_uid,
2371 sizeof(collection_session_uid),
2373 id_root = &collection->id;
2374 user_overrides_from_selected_objects =
true;
2380 id_root = &obact->
id;
2381 user_overrides_from_selected_objects =
true;
2385 bool is_active_override =
false;
2389 is_active_override = is_active_override || (&ob_iter->id == id_root);
2399 if (is_active_override) {
2404 const bool do_fully_editable =
false;
2406 GSet *user_overrides_objects_uids = do_fully_editable ? nullptr :
2411 if (do_fully_editable) {
2414 else if (user_overrides_from_selected_objects) {
2436 if (user_overrides_objects_uids !=
nullptr) {
2456 ID *id_root_override;
2467 if (!do_fully_editable) {
2489 if (is_override_instancing_object) {
2496 switch (
GS(id_root->
name)) {
2569 if (potential_root_collections.
is_empty()) {
2570 potential_root_collections.
add_new(collection);
2573 bool has_parents_in_potential_roots =
false;
2574 bool is_potential_root =
false;
2575 for (
auto collection_root_iter : potential_root_collections) {
2578 "Invalid loop in collection hierarchy");
2581 has_parents_in_potential_roots =
true;
2585 "Invalid loop in collection hierarchy");
2588 is_potential_root =
true;
2589 potential_root_collections.
remove(collection_root_iter);
2594 is_potential_root =
true;
2599 if (is_potential_root && !has_parents_in_potential_roots) {
2600 potential_root_collections.
add_new(collection);
2605 if (potential_root_collections.
is_empty()) {
2609 if (potential_root_collections.
size() == 1) {
2610 Collection *collection_root = potential_root_collections.
pop();
2617 "Too many potential root collections (%d) for the override hierarchy, "
2618 "please use the Outliner instead",
2619 int(potential_root_collections.
size()));
2644 ot->
name =
"Make Library Override";
2646 "Create a local override of the selected linked objects, and their hierarchy of "
2648 ot->
idname =
"OBJECT_OT_make_override_library";
2665 "Override Collection",
2666 "Session UID of the directly linked collection containing the selected "
2667 "object, to make an override from",
2717 ot->
name =
"Reset Library Override";
2718 ot->
description =
"Reset the selected local overrides to their linked references values";
2719 ot->
idname =
"OBJECT_OT_reset_override_library";
2740 LinkNode *todo_objects =
nullptr, *todo_object_iter;
2751 for (todo_object_iter = todo_objects; todo_object_iter !=
nullptr;
2752 todo_object_iter = todo_object_iter->
next)
2754 Object *ob_iter =
static_cast<Object *
>(todo_object_iter->link);
2756 bool do_remap_active =
false;
2759 do_remap_active =
true;
2765 if (do_remap_active) {
2769 if (basact !=
nullptr) {
2770 view_layer->
basact = basact;
2792 ot->
name =
"Clear Library Override";
2794 "Delete the selected local overrides and relink their usages to the linked data-blocks if "
2795 "possible, else reset them and mark them as non editable";
2796 ot->
idname =
"OBJECT_OT_clear_override_library";
2824 const bool copy_collections =
false;
2825 bool update_deps =
false;
2873 C, op, event,
IFACE_(
"Make Selected Objects Single-User"),
IFACE_(
"Make Single"));
2881 {0,
nullptr, 0,
nullptr,
nullptr},
2885 ot->
name =
"Make Single User";
2887 ot->
idname =
"OBJECT_OT_make_single_user";
2906 ot->
srna,
"material",
false,
"Materials",
"Make materials local to each data-block");
2911 "Make object animation data local to each object");
2915 "Object Data Animation",
2916 "Make object data (mesh, curve etc.) animation data local to each object");
2929 if (ob ==
nullptr) {
2932 mat_slot =
max_ii(mat_slot, 1);
2937 return fmt::format(
TIP_(
"Drop {} on {} (slot {}, replacing {})"),
2943 return fmt::format(
TIP_(
"Drop {} on {} (slot {})"), name, ob->
id.
name + 2, mat_slot);
2951 mat_slot =
max_ii(mat_slot, 1);
2956 if (ob ==
nullptr || ma ==
nullptr) {
2974 ot->
name =
"Drop Named Material on Object";
2975 ot->
idname =
"OBJECT_OT_drop_named_material";
2997 if (ob ==
nullptr) {
3008 TIP_(
"Add modifier with node group \"{}\" on object \"{}\""), id->name, ob->
id.
name);
3013 tree->ensure_interface_cache();
3014 if (!
tree->interface_outputs().is_empty()) {
3016 if (!first_output) {
3077 ot->
name =
"Drop Geometry Node Group on Object";
3078 ot->
idname =
"OBJECT_OT_drop_geometry_nodes";
3091 "Session UID of the geometry node group being dropped",
3096 "show_datablock_in_modifier",
3098 "Show the datablock selector in the modifier",
3115 if (pprop.
prop ==
nullptr) {
3125 ID *id_data =
static_cast<ID *
>(ob->
data);
3147 ot->
idname =
"OBJECT_OT_unlink_data";
Functions and classes to work with Actions.
Functions to work with AnimData.
Blender kernel action and pose functionality.
bPoseChannel * BKE_pose_channel_active_if_bonecoll_visible(Object *ob) ATTR_WARN_UNUSED_RESULT
bool BKE_animdata_copy_id(Main *bmain, ID *id_to, ID *id_from, int flag)
AnimData * BKE_animdata_from_id(const ID *id)
void BKE_animdata_duplicate_id_action(Main *bmain, ID *id, uint duplicate_flags)
void BKE_pose_rebuild(Main *bmain, Object *ob, bArmature *arm, bool do_id_user)
bool BKE_collection_has_object_recursive(Collection *collection, Object *ob)
#define FOREACH_COLLECTION_OBJECT_RECURSIVE_END
#define FOREACH_SCENE_OBJECT_END
bool BKE_collection_child_remove(Main *bmain, Collection *parent, Collection *child)
bool BKE_collection_has_object(Collection *collection, const Object *ob)
void BKE_scene_objects_iterator_end(BLI_Iterator *iter)
bool BKE_collection_child_add_no_sync(Main *bmain, Collection *parent, Collection *child)
#define FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(_collection, _object)
#define FOREACH_SCENE_OBJECT_BEGIN(scene, _instance)
bool BKE_collection_has_collection(const Collection *parent, const Collection *collection)
bool BKE_collection_object_add(Main *bmain, Collection *collection, Object *ob)
bool BKE_constraint_remove(ListBase *list, struct bConstraint *con)
struct bConstraint * BKE_constraint_add_for_object(struct Object *ob, const char *name, short type)
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)
#define CTX_DATA_BEGIN(C, Type, instance, member)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Object * CTX_data_edit_object(const bContext *C)
Base * CTX_data_active_base(const bContext *C)
Main * CTX_data_main(const bContext *C)
Collection * CTX_data_collection(const bContext *C)
View3D * CTX_wm_view3d(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
display list (or rather multi purpose list) stuff.
void BKE_displist_make_curveTypes(struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *ob, bool for_render)
void BKE_editmesh_looptris_and_normals_calc(BMEditMesh *em)
FModifier * add_fmodifier(ListBase *modifiers, int type, FCurve *owner_fcu)
bool BKE_view_layer_has_collection(const ViewLayer *view_layer, const Collection *collection)
void BKE_view_layer_selected_objects_tag(const Scene *scene, ViewLayer *view_layer, int tag)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
#define FOREACH_OBJECT_FLAG_END
#define FOREACH_SELECTED_OBJECT_BEGIN(_view_layer, _v3d, _instance)
void BKE_view_layer_base_deselect_all(const Scene *scene, ViewLayer *view_layer)
void BKE_main_collection_sync_remap(const Main *bmain)
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
Base * BKE_view_layer_base_find(ViewLayer *view_layer, Object *ob)
#define FOREACH_OBJECT_FLAG_BEGIN(_scene, _view_layer, _v3d, _flag, _instance)
#define FOREACH_SELECTED_OBJECT_END
ID * BKE_libblock_find_session_uid(Main *bmain, short type, uint32_t session_uid)
void BKE_id_delete(Main *bmain, void *idv) ATTR_NONNULL()
bool BKE_id_is_editable(const Main *bmain, const ID *id)
#define MAIN_ID_SESSION_UID_UNSET
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)
void BKE_main_id_newptr_and_tag_clear(Main *bmain)
ID * BKE_id_copy_ex(Main *bmain, const ID *id, ID **new_id_p, int flag)
void BKE_main_id_tag_all(Main *mainvar, int tag, bool value)
void BKE_lib_override_library_id_reset(Main *bmain, ID *id_root, bool do_reset_system_override)
bool BKE_lib_override_library_create(Main *bmain, Scene *scene, ViewLayer *view_layer, Library *owner_library, ID *id_root_reference, ID *id_hierarchy_root_reference, ID *id_instance_hint, ID **r_id_root_override, const bool do_fully_editable)
bool BKE_lib_override_library_is_hierarchy_leaf(Main *bmain, ID *id)
void BKE_library_foreach_ID_link(Main *bmain, ID *id, blender::FunctionRef< LibraryIDLinkCallback > callback, void *user_data, int flag)
@ ID_REMAP_SKIP_INDIRECT_USAGE
void BKE_libblock_relink_to_newid(Main *bmain, ID *id, int remap_flag) ATTR_NONNULL()
void void BKE_libblock_remap(Main *bmain, void *old_idv, void *new_idv, int remap_flags) ATTR_NONNULL(1
#define FOREACH_MAIN_ID_END
#define FOREACH_MAIN_ID_BEGIN(_bmain, _id)
General operations, lookup, etc. for materials.
struct Material * BKE_object_material_get(struct Object *ob, short act)
void BKE_object_materials_test(struct Main *bmain, struct Object *ob, struct ID *id)
void BKE_object_material_assign(struct Main *bmain, struct Object *ob, struct Material *ma, short act, int assign_type)
struct Material *** BKE_object_material_array_p(struct Object *ob)
@ BKE_MAT_ASSIGN_USERPREF
Object * BKE_modifiers_is_deformed_by_curve(Object *ob)
Object * BKE_modifiers_is_deformed_by_lattice(Object *ob)
void BKE_modifier_free(ModifierData *md)
void BKE_modifier_remove_from_list(Object *ob, ModifierData *md)
Object * BKE_modifiers_is_deformed_by_armature(Object *ob)
General operations, lookup, etc. for blender objects.
blender::float4x4 BKE_object_calc_parent(Depsgraph *depsgraph, Scene *scene, Object *ob)
KDTree_3d * BKE_object_as_kdtree(Object *ob, int *r_tot)
void BKE_object_groups_clear(Main *bmain, Scene *scene, Object *object)
void BKE_object_apply_mat4(Object *ob, const float mat[4][4], bool use_compat, bool use_parent)
int BKE_object_scenes_users_get(Main *bmain, Object *ob)
bool BKE_object_parent_loop_check(const Object *parent, const Object *ob)
void BKE_object_link_modifiers(Object *ob_dst, const Object *ob_src)
void BKE_object_apply_parent_inverse(Object *ob)
LinkNode * BKE_object_groups(Main *bmain, Scene *scene, Object *ob)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
void BKE_scene_graph_update_tagged(Depsgraph *depsgraph, Main *bmain)
#define BLI_assert_msg(a, msg)
bool BLI_gset_haskey(const GSet *gs, const void *key) ATTR_WARN_UNUSED_RESULT
GSet * BLI_gset_new(GSetHashFP hashfp, GSetCmpFP cmpfp, const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
bool BLI_ghashutil_intcmp(const void *a, const void *b)
unsigned int BLI_ghashutil_inthash_p(const void *ptr)
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
bool BLI_gset_add(GSet *gs, void *key)
A KD-tree for nearest neighbor search.
void BLI_kdtree_nd_ free(KDTree *tree)
void BLI_linklist_free(LinkNode *list, LinkNodeFreeFP freefunc)
#define BLI_linklist_prepend_alloca(listp, ptr)
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void * BLI_listbase_bytes_find(const ListBase *listbase, const void *bytes, size_t bytes_size, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
MINLINE int max_ii(int a, int b)
MINLINE int min_iii(int a, int b, int c)
void unit_m4(float m[4][4])
bool invert_m4_m4(float inverse[4][4], const float mat[4][4])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void copy_v3_v3_int(int r[3], const int a[3])
#define STRNCPY(dst, src)
#define POINTER_FROM_UINT(i)
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
Object * DEG_get_evaluated_object(const Depsgraph *depsgraph, Object *object)
#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)
@ FMODIFIER_TYPE_GENERATOR
@ BONE_RELATIVE_PARENTING
Object groups, one object can be in many groups at once.
@ CONSTRAINT_TYPE_TRACKTO
@ CONSTRAINT_TYPE_LOCKTRACK
@ CONSTRAINT_TYPE_FOLLOWPATH
@ CONSTRAINT_TYPE_DAMPTRACK
@ CONSTRAINT_OBTYPE_OBJECT
#define BEZT_ISSEL_ANY_HIDDENHANDLES(v3d, bezt)
@ NODES_MODIFIER_HIDE_DATABLOCK_SELECTOR
@ eModifierType_GreasePencilArmature
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)
@ RPT_ERROR_INVALID_INPUT
#define ARM_GROUPS_ENVELOPE
void EDBM_mesh_make(Object *ob, int select_mode, bool add_key_index)
void EDBM_mesh_load(Main *bmain, Object *ob)
bool ED_operator_object_active(bContext *C)
bool ED_operator_editsurfcurve(bContext *C)
bool ED_operator_objectmode(bContext *C)
bool ED_operator_objectmode_with_view3d_poll_msg(bContext *C)
bool ED_operator_view3d_active(bContext *C)
bool ED_operator_object_active_editable(bContext *C)
bool ED_operator_editlattice(bContext *C)
bool ED_operator_editmesh(bContext *C)
Object * ED_view3d_give_material_slot_under_cursor(bContext *C, const int mval[2], int *r_material_slot)
Object * ED_view3d_give_object_under_cursor(bContext *C, const int mval[2])
Read Guarded memory(de)allocation.
void MOD_nodes_update_interface(Object *object, NodesModifierData *nmd)
const EnumPropertyItem * RNA_scene_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
#define RNA_ENUM_ITEM_SEPR
void uiItemBooleanO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value)
void UI_popup_menu_end(bContext *C, uiPopupMenu *pup)
void uiItemFullO_ptr(uiLayout *layout, wmOperatorType *ot, const char *name, int icon, IDProperty *properties, wmOperatorCallContext context, eUI_Item_Flag flag, PointerRNA *r_opptr)
uiPopupMenu * UI_popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname)
void UI_context_active_but_prop_get_templateID(const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop)
void uiItemEnumO_ptr(uiLayout *layout, wmOperatorType *ot, const char *name, int icon, const char *propname, int value)
#define ND_LIB_OVERRIDE_CHANGED
void ED_object_vgroup_calc_from_armature(ReportList *reports, Depsgraph *depsgraph, Scene *scene, Object *ob, Object *par, const int mode, const bool mirror)
#define BM_elem_flag_test(ele, hflag)
#define BM_ITER_MESH_INDEX(ele, iter, bm, itype, indexvar)
void add_new(const Key &key)
bool remove(const Key &key)
const Depsgraph * depsgraph
ListBase * object_editcurve_get(Object *ob)
void *(* MEM_mallocN)(size_t len, const char *str)
void MEM_freeN(void *vmemh)
bAction * id_action_ensure(Main *bmain, ID *id)
FCurve * action_fcurve_ensure(Main *bmain, bAction *act, const char group[], PointerRNA *ptr, FCurveDescriptor fcurve_descriptor)
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
@ MAKE_SINGLE_USER_SELECTED
ModifierData * modifier_add(ReportList *reports, Main *bmain, Scene *scene, Object *ob, const char *name, int type)
static int vertex_parent_set_exec(bContext *C, wmOperator *op)
void single_obdata_user_make(Main *bmain, Scene *scene, Object *ob)
static int reset_override_library_exec(bContext *C, wmOperator *)
static bool make_override_library_object_overridable_check(Main *bmain, Object *object)
static int object_unlink_data_exec(bContext *C, wmOperator *op)
void OBJECT_OT_make_local(wmOperatorType *ot)
void OBJECT_OT_clear_override_library(wmOperatorType *ot)
@ MAKE_LINKS_DUPLICOLLECTION
const EnumPropertyItem prop_clear_parent_types[]
@ CLEAR_TRACK_KEEP_TRANSFORM
static const EnumPropertyItem prop_clear_track_types[]
static bool parent_set_vertex_parent_with_kdtree(bContext *C, ParentingContext *parenting_context, KDTree_3d *tree)
void OBJECT_OT_unlink_data(wmOperatorType *ot)
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 make_local_animdata_tag_strips(ListBase *strips)
static int make_override_library_exec(bContext *C, wmOperator *op)
std::string drop_named_material_tooltip(bContext *C, const char *name, const int mval[2])
static int drop_geometry_nodes_invoke(bContext *C, wmOperator *op, const wmEvent *event)
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 int make_single_user_exec(bContext *C, wmOperator *op)
static void single_obdata_users(Main *bmain, Scene *scene, ViewLayer *view_layer, View3D *v3d, const int flag)
void OBJECT_OT_drop_named_material(wmOperatorType *ot)
const EnumPropertyItem prop_make_parent_types[]
static int parent_noinv_set_exec(bContext *C, wmOperator *op)
void base_select(Base *base, eObjectSelect_Mode mode)
void parent_clear(Object *ob, int type)
void OBJECT_OT_parent_no_inverse_set(wmOperatorType *ot)
static void object_remove_parent_deform_modifiers(Object *ob, const Object *par)
static int make_local_exec(bContext *C, wmOperator *op)
static int parent_clear_exec(bContext *C, wmOperator *op)
static bool single_data_needs_duplication(ID *id)
static void parent_set_vert_find(KDTree_3d *tree, Object *child, int vert_par[3], bool is_tri)
void OBJECT_OT_track_set(wmOperatorType *ot)
static int make_single_user_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static const EnumPropertyItem prop_make_track_types[]
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)
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])
Object * context_active_object(const bContext *C)
static int parent_set_exec(bContext *C, wmOperator *op)
static int clear_override_library_exec(bContext *C, wmOperator *)
void OBJECT_OT_make_links_data(wmOperatorType *ot)
static bool allow_make_links_data(const int type, Object *ob_src, Object *ob_dst)
static int make_override_library_invoke(bContext *C, wmOperator *op, const wmEvent *)
static int parent_set_invoke(bContext *C, wmOperator *op, const wmEvent *)
static bool reset_clear_override_library_poll(bContext *C)
static bool make_override_library_poll(bContext *C)
static int drop_named_material_invoke(bContext *C, wmOperator *op, const wmEvent *event)
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 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 int track_set_exec(bContext *C, wmOperator *op)
static void tag_localizable_objects(bContext *C, const int mode)
static bool parent_set_poll_property(const bContext *, wmOperator *op, const PropertyRNA *prop)
@ MAKE_LOCAL_SELECT_OBDATA_MATERIAL
@ MAKE_LOCAL_SELECT_OBDATA
static int object_track_clear_exec(bContext *C, wmOperator *op)
void OBJECT_OT_parent_set(wmOperatorType *ot)
static int make_links_data_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 int parent_set_invoke_menu(bContext *C, wmOperatorType *ot)
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 int make_links_scene_exec(bContext *C, wmOperator *op)
void shaderfx_link(Object *dst, Object *src)
void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
int RNA_int_get(PointerRNA *ptr, const char *name)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
int RNA_enum_get(PointerRNA *ptr, const char *name)
const char * RNA_property_identifier(const PropertyRNA *prop)
PointerRNA RNA_id_pointer_create(ID *id)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
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)
const EnumPropertyItem rna_enum_dummy_NULL_items[]
struct Object * focus_object
struct CameraDOFSettings dof
struct Collection * collection
struct CollectionChild * next
Collection_Runtime runtime
struct ID * hierarchy_root
IDOverrideLibrary * override_library
struct EditLatt * editlatt
struct ModifierData * next
struct bNodeTree * node_group
struct Collection * instance_collection
ObjectRuntimeHandle * runtime
struct Collection * master_collection
struct bConstraint * prev
bool(* poll_property)(const bContext *C, wmOperator *op, const PropertyRNA *prop) ATTR_WARN_UNUSED_RESULT
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
struct wmOperatorType * type
void WM_cursor_wait(bool val)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
ID * WM_operator_properties_id_lookup_from_name_or_session_uid(Main *bmain, PointerRNA *ptr, const ID_Type type)
void WM_operator_properties_id_lookup(wmOperatorType *ot, const bool add_name_prop)
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)
int 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)
int WM_enum_search_invoke(bContext *C, wmOperator *op, const wmEvent *)