10#define DNA_DEPRECATED_ALLOW
144#include "RNA_prototypes.hh"
165#define VPARENT_THREADING_HACK
167#ifdef VPARENT_THREADING_HACK
184 ob->
runtime = MEM_new<blender::bke::ObjectRuntime>(__func__);
191 std::optional<Library *> ,
199 ob_dst->
runtime = MEM_new<blender::bke::ObjectRuntime>(__func__, *ob_src->
runtime);
210 else if (ob_dst->
mat !=
nullptr || ob_dst->
matbits !=
nullptr) {
213 0,
"Object copy: non-nullptr material pointers with zero counter, should not happen.");
214 ob_dst->
mat =
nullptr;
257 ob_dst->
avs = ob_src->
avs;
322 if (ob->
runtime->curve_cache) {
324 if (ob->
runtime->curve_cache->anim_path_accum_length) {
328 ob->
runtime->curve_cache =
nullptr;
414 for (
int i = 0;
i <
object->totcol;
i++) {
429 BKE_lib_query_idpropertiesForeachIDLink_callback(prop, data);
435 BKE_lib_query_idpropertiesForeachIDLink_callback(prop, data);
507 if (paf && paf->
group) {
568 if (ob->
soft !=
nullptr) {
584 if (info->foreach_cache) {
585 info->foreach_cache(ob, md, [&](
const IDCacheKey &cache_key,
void **cache_p,
uint flags) {
586 function_callback(
id, &cache_key, cache_p, flags, user_data);
695 ob->
runtime = MEM_new<blender::bke::ObjectRuntime>(__func__);
701 ob->proxy_from =
nullptr;
737 paf = (
PartEff *)ob->effect.first;
802 for (
int a = 0; a < sb->
totkey; a++) {
813 if (sb->
shared ==
nullptr) {
844 while (ob->hooks.first) {
930 RPT_(
"Cannot find object data of %s lib %s"),
970 paf = (
PartEff *)ob->effect.first;
1006 pid_dst = pid_dst->
next, pid_src = (pid_src !=
nullptr) ? pid_src->
next :
nullptr)
1009 if (pid_src ==
nullptr) {
1022 PointCache *point_cache_dst, *point_cache_src;
1025 point_cache_dst !=
nullptr;
1026 point_cache_dst = point_cache_dst->
next,
1027 point_cache_src = (point_cache_src !=
nullptr) ? point_cache_src->
next :
nullptr)
1031 if (point_cache_src ==
nullptr || !
STREQ(point_cache_dst->
name, point_cache_src->
name)) {
1108 *workob = blender::dna::shallow_zero_initialize();
1129 if (ob->
runtime->curve_cache) {
1132 if (ob->
runtime->curve_cache->anim_path_accum_length) {
1137 ob->
runtime->curve_cache =
nullptr;
1176 float imat[4][4], mat[4][4];
1187 hmd->
object->object_to_world().ptr());
1189 hmd->
parentinv, hmd->
object->world_to_object().ptr(), ob->object_to_world().ptr());
1196 if (hmd->
object ==
nullptr) {
1203 float imat[4][4], mat[4][4];
1214 hmd->
object->object_to_world().ptr());
1225 if (md !=
nullptr) {
1235 int active_count = 0;
1326 if (psys->part == psys_src->
part) {
1333 if (psys_dst ==
nullptr) {
1364 switch (md_src->
type) {
1375 if (fmd->
flow !=
nullptr && fmd->
flow->
psys !=
nullptr) {
1412 switch (md_dst->
type) {
1414 if (psys_dst !=
nullptr) {
1422 if (psys_dst !=
nullptr) {
1453 const bool do_copy_all,
1454 const int flag_subdata)
1461 "Trying to copy a modifier stack into an object having a non-empty modifier stack.");
1505 const int num_elements = mesh_source->
corners_num;
1528 if (!
object->runtime->is_data_eval_owned) {
1534 if (mesh_eval ==
nullptr) {
1538 if (subdiv_ccg ==
nullptr) {
1545 const int tot_level = mesh_eval->
runtime->subdiv_ccg_tot_level;
1602 object_eval->
runtime->data_eval = data_eval;
1603 object_eval->
runtime->is_data_eval_owned = is_owned;
1611 object_eval->
data = data_eval;
1616 object_eval->
runtime->geometry_set_eval =
nullptr;
1621 ob->
runtime->bounds_eval.reset();
1625 if (ob->
runtime->editmesh_eval_cage &&
1630 ob->
runtime->editmesh_eval_cage =
nullptr;
1632 if (ob->
runtime->data_eval !=
nullptr) {
1633 if (ob->
runtime->is_data_eval_owned) {
1644 ob->
runtime->data_eval =
nullptr;
1646 if (ob->
runtime->mesh_deform_eval !=
nullptr) {
1647 Mesh *mesh_deform_eval = ob->
runtime->mesh_deform_eval;
1649 ob->
runtime->mesh_deform_eval =
nullptr;
1654 if (ob->
runtime->data_orig !=
nullptr) {
1665 if (ob->
runtime->geometry_set_eval !=
nullptr) {
1666 delete ob->
runtime->geometry_set_eval;
1667 ob->
runtime->geometry_set_eval =
nullptr;
1673 short update_flag = 0;
1676 if (
object->particlesystem.first) {
1713 if (update_flag != 0) {
1720 if (ob->
data ==
nullptr) {
1726 return ((
Mesh *)ob->
data)->runtime->edit_mesh !=
nullptr;
1730 return ((
Curve *)ob->
data)->editfont !=
nullptr;
1734 return ((
Lattice *)ob->
data)->editlatt !=
nullptr;
1737 return ((
Curve *)ob->
data)->editnurb !=
nullptr;
1754 const short type =
GS(
id->name);
1758 return ((
const Mesh *)
id)->runtime->edit_mesh !=
nullptr;
1760 return ((((
const Curve *)
id)->editnurb !=
nullptr) ||
1761 (((
const Curve *)
id)->editfont !=
nullptr));
1763 return ((
const MetaBall *)
id)->editelems !=
nullptr;
1765 return ((
const Lattice *)
id)->editlatt !=
nullptr;
1767 return ((
const bArmature *)
id)->edbo !=
nullptr;
1783 const short type =
GS(
id->name);
1787 return &em->needs_flush_to_id;
1794 if (ef !=
nullptr) {
1866 if (ob->
pose !=
nullptr) {
1875 return ((ob->
mode == object_mode) || (ob->
mode & object_mode) != 0);
1918 if (obtest ==
nullptr) {
1937 return DATA_(
"Mesh");
1939 return DATA_(
"Curve");
1941 return DATA_(
"Surf");
1943 return DATA_(
"Text");
1945 return DATA_(
"Mball");
1947 return DATA_(
"Camera");
1951 return DATA_(
"Lattice");
1953 return DATA_(
"Armature");
1955 return DATA_(
"Speaker");
1957 return DATA_(
"Curves");
1959 return DATA_(
"PointCloud");
1965 return DATA_(
"LightProbe");
1967 return DATA_(
"GreasePencil");
2002 if (
name ==
nullptr) {
2048 switch (
GS(
id->name)) {
2052 return reinterpret_cast<const Curve *
>(
id)->ob_type;
2122 if (base !=
nullptr) {
2177 if (sb ==
nullptr) {
2178 ob_dst->
soft =
nullptr;
2210 sbn->
keys =
nullptr;
2244 psysn->
edit =
nullptr;
2245 psysn->
pdd =
nullptr;
2247 psysn->
tree =
nullptr;
2295 if (psmd->
psys == psys) {
2326 obn->
pose =
nullptr;
2336 ListBase targets = {
nullptr,
nullptr};
2340 if (ct->tar == ob) {
2362 if (ob ==
nullptr) {
2428 if (ob_pose == ob_active) {
2435 if (ob_pose !=
nullptr) {
2460 Base *base_pose =
nullptr;
2463 if (ob_pose == base_active->
object) {
2464 base_pose = base_active;
2471 if (base_active && (base_pose == base_active)) {
2478 if (base_pose !=
nullptr) {
2511 uint duplicate_options)
2517 if (!is_subprocess) {
2555 ID *id_new =
nullptr;
2556 const bool need_to_duplicate_obdata = (id_old !=
nullptr) && (id_old->
newid ==
nullptr);
2558 switch (obn->
type) {
2637 if (need_to_duplicate_obdata && !
ELEM(id_new,
nullptr, id_old)) {
2648 if (!is_subprocess) {
2680 if (obn->
data !=
nullptr) {
2753 float rmat[3][3], dmat[3][3];
2842#define TFMCPY(_v) (obtfm->_v = ob->_v)
2843#define TFMCPY3D(_v) copy_v3_v3(obtfm->_v, ob->_v)
2844#define TFMCPY4D(_v) copy_v4_v4(obtfm->_v, ob->_v)
2866 const short protectflag)
2870 for (
i = 0;
i < 3;
i++) {
2904#define TFMCPY(_v) (object_dst->_v = object_src->_v)
2905#define TFMCPY3D(_v) copy_v3_v3(object_dst->_v, object_src->_v)
2906#define TFMCPY4D(_v) copy_v4_v4(object_dst->_v, object_src->_v)
2953 float par_imat[4][4];
2957 mul_m4_m4m4(r_mat, par_imat, ob->object_to_world().ptr());
2960 copy_m4_m4(r_mat, ob->object_to_world().ptr());
2970 float vec[4], quat[4], radius, ctime;
2980 if (par->
runtime->curve_cache ==
nullptr) {
2983 if (par->
runtime->curve_cache->anim_path_accum_length ==
nullptr) {
3000 CLAMP(ctime, 0.0f, 1.0f);
3007 par, ctime, vec,
nullptr, (cu->
flag &
CU_FOLLOW) ? quat :
nullptr, &radius,
nullptr))
3011 quat, std::clamp<short>(ob->
trackflag, 0, 5), std::clamp<short>(ob->
upflag, 0, 2));
3016 float tmat[4][4], rmat[4][4];
3038 if (!pchan || !pchan->
bone) {
3040 &
LOG,
"Parent Bone: '%s' for Object: '%s' doesn't exist", ob->
parsubstr, ob->
id.
name + 2);
3072 const Span<float3> positions = mesh_eval->vert_positions();
3079#ifdef VPARENT_THREADING_HACK
3089 if (nr < numVerts) {
3090 if (mesh_eval && mesh_eval->
runtime->edit_data &&
3091 !mesh_eval->
runtime->edit_data->vert_positions.is_empty())
3106 for (
int i = 0;
i < numVerts;
i++) {
3107 if (index[
i] == nr) {
3114 if (nr < numVerts) {
3123 else if (
count > 0) {
3135 "Evaluated mesh is needed to solve parenting, "
3136 "object position can be wrong now");
3144 if (par->
runtime->curve_cache && par->
runtime->curve_cache->deformed_nurbs.first !=
nullptr) {
3145 nurb = &par->
runtime->curve_cache->deformed_nurbs;
3186 float cmat[3][3], v1[3],
v2[3], v3[3], q[4];
3219 mul_m4_m4m4(r_parentmat, par->object_to_world().ptr(), tmat);
3222 copy_m4_m4(r_parentmat, par->object_to_world().ptr());
3229 mul_m4_m4m4(r_parentmat, par->object_to_world().ptr(), tmat);
3235 mul_v3_m4v3(r_parentmat[3], par->object_to_world().ptr(), vec);
3240 mul_m4_m4m4(r_parentmat, par->object_to_world().ptr(), tmat);
3244 copy_m4_m4(r_parentmat, par->object_to_world().ptr());
3261 const bool set_origin,
3262 float r_obmat[4][4],
3263 float r_originmat[3][3])
3285 copy_v3_v3(ob->
runtime->parent_display_origin, par->object_to_world().location());
3298 float r_originmat[3][3])
3371 workob.
runtime = &workob_runtime;
3399 return workob.object_to_world();
3403 const float mat[4][4],
3405 const float parentinv[4][4],
3406 const bool use_compat)
3412 if (parent !=
nullptr) {
3413 float rmat[4][4], diff_mat[4][4], imat[4][4], parent_mat[4][4];
3432 if (ob->
dscale[0] != 0.0f) {
3435 if (ob->
dscale[1] != 0.0f) {
3438 if (ob->
dscale[2] != 0.0f) {
3446 const float mat[4][4],
3447 const bool use_compat,
3448 const bool use_parent)
3476 float par_locrot[4][4], par_imat[4][4];
3492 float ob_local[4][4];
3512 return static_cast<const Mesh *
>(ob->
data)->bounds_min_max();
3526 return static_cast<const PointCloud *
>(ob->
data)->bounds_min_max();
3532 return std::nullopt;
3537 if (ob->
runtime->bounds_eval) {
3538 return *ob->
runtime->bounds_eval;
3547 const bool use_subdiv =
true;
3548 return geometry->compute_boundbox_without_instances(use_radius, use_subdiv);
3551 float3 min(std::numeric_limits<float>::max());
3552 float3 max(std::numeric_limits<float>::lowest());
3556 return std::nullopt;
3588 const float value[3],
3590 const float ob_scale_orig[3],
3591 const float ob_obmat_orig[4][4])
3596 for (
int i = 0;
i < 3;
i++) {
3597 if (((1 <<
i) & axis_mask) == 0) {
3599 if (ob_scale_orig !=
nullptr) {
3600 const float scale_delta =
len_v3(ob_obmat_orig[
i]) / ob_scale_orig[
i];
3601 if (isfinite(scale_delta)) {
3602 len[
i] *= scale_delta;
3607 if (isfinite(scale)) {
3623 const float4x4 &object_to_world = ob->object_to_world();
3681 dot =
dot_v3v3(ob->object_to_world().ptr()[2], view_dir);
3705 if (proj_length_sq > 1e-5f) {
3736 max[0] =
max[2] = radius;
3737 min[0] =
min[2] = -radius;
3748 max =
float3(radius, radius * 2.0f, radius);
3753 const float *ofs = ob->
ima_ofs;
3756 min[0] = ofs[0] * radius;
3757 min[1] = ofs[1] * radius;
3758 max[0] = radius + (ofs[0] * radius);
3759 max[1] = radius + (ofs[1] * radius);
3762 for (
int i = 0;
i < 2;
i++) {
3783 const bool use_hidden)
3794 if (((use_hidden ==
false) && (dob.no_draw != 0)) || dob.ob_data ==
nullptr) {
3798 Object temp_ob = blender::dna::shallow_copy(*dob.ob);
3803 temp_ob.
runtime->bounds_eval.reset();
3818 const float obmat[4][4],
3819 void (*func_cb)(
const float[3],
void *),
3826 if (mesh_eval !=
nullptr) {
3830 func_cb(co, user_data);
3836 for (
const Layer *layer : grease_pencil.layers()) {
3837 if (!layer->is_visible()) {
3840 const float4x4 layer_to_world = layer->to_world_space(*ob);
3841 if (
const Drawing *drawing = grease_pencil.get_drawing_at(*layer,
3842 grease_pencil.
runtime->eval_frame))
3848 for (const int i : range) {
3849 func_cb(blender::math::transform_point(layer_to_world, positions[i]), user_data);
3855 else if (ob->
runtime->curve_cache && ob->
runtime->curve_cache->disp.first) {
3857 const float *v3 = dl->verts;
3858 int totvert = dl->nr;
3861 for (
i = 0;
i < totvert;
i++, v3 += 3) {
3863 func_cb(co, user_data);
3870 void (*func_cb)(
const float[3],
void *),
3927 return (
void *)obtfm;
3960 ob->
loc[0] = location[0];
3963 ob->
loc[1] = location[1];
3966 ob->
loc[2] = location[2];
3973 ob->
scale[0] = scale[0];
3976 ob->
scale[1] = scale[1];
3979 ob->
scale[2] = scale[2];
3986 ob->
quat[0] = quat[0];
3989 ob->
quat[1] = quat[1];
3992 ob->
quat[2] = quat[2];
3995 ob->
quat[3] = quat[3];
4002 ob->
rot[0] = euler[0];
4005 ob->
rot[1] = euler[1];
4008 ob->
rot[2] = euler[2];
4013 const float axis[3],
4041 const ID *object_data = (
ID *)ob->
data;
4043 const bool recalc_data = (object_data !=
nullptr) ?
4046 if (!recalc_object && !recalc_data) {
4050 if (ob->
pose !=
nullptr) {
4071 if (recalc_object || recalc_data) {
4091 ob->
sculpt = MEM_new<SculptSession>(__func__);
4096 char **r_texspace_flag,
4097 float **r_texspace_location,
4098 float **r_texspace_size)
4100 if (ob->
data ==
nullptr) {
4104 switch (
GS(((
ID *)ob->
data)->name)) {
4107 (
Mesh *)ob->
data, r_texspace_flag, r_texspace_location, r_texspace_size);
4113 if (r_texspace_flag) {
4116 if (r_texspace_location) {
4119 if (r_texspace_size) {
4126 if (r_texspace_flag) {
4129 if (r_texspace_location) {
4132 if (r_texspace_size) {
4148 if (geometry_set_eval) {
4162 ID *data_eval =
object->
runtime->data_eval;
4164 return reinterpret_cast<Mesh *
>(data_eval);
4198 if (
const ID *data_orig =
object->runtime->data_orig) {
4204 if (
GS(data_orig->name) !=
ID_ME) {
4207 return reinterpret_cast<const Mesh *
>(data_orig);
4210 return static_cast<const Mesh *
>(
object->data);
4216 if (
object->id.orig_id ==
nullptr) {
4234 const Mesh *
mesh =
static_cast<const Mesh *
>(
object->data);
4235 if (
mesh->runtime->edit_mesh ==
nullptr) {
4241 return reinterpret_cast<Mesh *
>(
object->runtime->data_eval);
4249 return object->runtime->editmesh_eval_cage;
4256 return object->runtime->mesh_deform_eval;
4276 ID *data_eval =
object->
runtime->data_eval;
4278 if (data_eval ==
nullptr ||
GS(data_eval->
name) !=
ID_LT) {
4337 if (listbase ==
nullptr) {
4375 if (key ==
nullptr) {
4381 if (newkey || from_mix ==
false) {
4407 if (key ==
nullptr) {
4413 if (newkey || from_mix ==
false) {
4446 if (key ==
nullptr) {
4452 if (newkey || from_mix ==
false) {
4487 const bool from_mix)
4507 if (key !=
nullptr) {
4521 if (
ELEM(
nullptr, key_p, *key_p)) {
4538 if (key ==
nullptr) {
4548 if (rkb->relative == kb_index) {
4552 else if (rkb->relative >= kb_index) {
4612 if (par ==
nullptr) {
4635 for (ob_child = ob_child->
parent; ob_child; ob_child = ob_child->
parent) {
4636 if (ob_child == ob_parent) {
4688 if (recurse_parent &&
object->parent !=
nullptr) {
4756 if (ob->
adt !=
nullptr) {
4758 if (adt->
action !=
nullptr) {
4760 if (fcu->rna_path && strstr(fcu->rna_path,
"modifiers[")) {
4766 if (fcu->rna_path && strstr(fcu->rna_path,
"modifiers[")) {
4855 clip = solver->
clip;
4887 *
object->runtime = {};
4924 Object *ob_arm =
nullptr;
4968 Object *ob = base->object;
4975 Object *ob = base->object;
5005 Object *child = local_base->object;
5034 LinkNode *collection_linknode =
nullptr;
5040 return collection_linknode;
5060 KDTree_3d *
tree =
nullptr;
5080 tree = BLI_kdtree_3d_new(positions.
size());
5083 for (
i = 0;
i < positions.
size();
i++) {
5086 mul_v3_m4v3(co, ob->object_to_world().ptr(), positions[
i]);
5087 BLI_kdtree_3d_insert(
tree, index[
i], co);
5095 tot = positions.
size();
5096 tree = BLI_kdtree_3d_new(tot);
5098 for (
i = 0;
i < tot;
i++) {
5100 mul_v3_m4v3(co, ob->object_to_world().ptr(), positions[
i]);
5101 BLI_kdtree_3d_insert(
tree,
i, co);
5105 BLI_kdtree_3d_balance(
tree);
5117 tree = BLI_kdtree_3d_new(tot);
5130 BLI_kdtree_3d_insert(
tree,
i++, co);
5142 BLI_kdtree_3d_insert(
tree,
i++, co);
5149 BLI_kdtree_3d_balance(
tree);
5159 tree = BLI_kdtree_3d_new(tot);
5162 for (bp = lt->
def;
i < tot; bp++) {
5165 BLI_kdtree_3d_insert(
tree,
i++, co);
5168 BLI_kdtree_3d_balance(
tree);
5222 const bool update_mesh,
5223 const int parent_recursion_limit)
5243 if (pmd && pmd->
canvas) {
5256 if (parent_recursion_limit) {
5257 const int recursion = parent_recursion_limit - 1;
5258 bool no_update =
false;
5270 ListBase targets = {
nullptr,
nullptr};
5291 const bool update_mesh,
5292 const int parent_recursion_limit,
5293 const int modifier_type,
5306 const bool update_mesh,
5307 const int parent_recursion_limit,
5309 const int modifier_type)
5313 auto update_or_tag_fn = [
depsgraph, scene, frame, flush_to_original](
Object *ob,
5314 const bool update_mesh) {
5352 ob, update_mesh, parent_recursion_limit, modifier_type, update_or_tag_fn);
5360 ob->
runtime->select_id = select_id++;
5376 object->runtime->object_as_temp_mesh =
mesh;
5382 if (
object->runtime->object_as_temp_mesh ==
nullptr) {
5386 object->runtime->object_as_temp_mesh =
nullptr;
5394 object->runtime->object_as_temp_curve = curve;
5400 if (
object->runtime->object_as_temp_curve ==
nullptr) {
5404 object->runtime->object_as_temp_curve =
nullptr;
5430 ob->
data = (
void *)new_data;
5431 ob->
runtime->geometry_set_eval =
nullptr;
5432 ob->
runtime->data_eval = new_data;
5433 ob->
runtime->bounds_eval.reset();
5441 return this->
runtime->object_to_world;
5445 return this->
runtime->world_to_object;
Functions for backward compatibility with the legacy Action API.
Blender kernel action and pose functionality.
void void void void BKE_pose_blend_read_after_liblink(BlendLibReader *reader, Object *ob, bPose *pose) ATTR_NONNULL(1
void BKE_pose_tag_recalc(Main *bmain, bPose *pose) ATTR_NONNULL(1
void void void BKE_pose_blend_read_data(BlendDataReader *reader, ID *id_owner, bPose *pose) ATTR_NONNULL(1
void void BKE_pose_blend_write(BlendWriter *writer, bPose *pose) ATTR_NONNULL(1
void BKE_pose_free_ex(bPose *pose, bool do_id_user)
void BKE_pose_update_constraint_flags(bPose *pose) ATTR_NONNULL(1)
void BKE_pose_channels_hash_ensure(bPose *pose) ATTR_NONNULL(1)
bPoseChannel * BKE_pose_channel_find_name(const bPose *pose, const char *name)
void BKE_pose_copy_data_ex(bPose **dst, const bPose *src, int flag, bool copy_constraints)
void BKE_pose_check_uids_unique_and_report(const bPose *pose)
bool BKE_animdata_id_is_animated(const ID *id)
bool BKE_where_on_path(const struct Object *ob, float ctime, float r_vec[4], float r_dir[3], float r_quat[4], float *r_radius, float *r_weight)
void animviz_free_motionpath(struct bMotionPath *mpath)
void animviz_motionpath_blend_write(struct BlendWriter *writer, struct bMotionPath *mpath)
void animviz_motionpath_blend_read_data(struct BlendDataReader *reader, struct bMotionPath *mpath)
void animviz_settings_init(struct bAnimVizSettings *avs)
struct bMotionPath * animviz_copy_motionpath(const struct bMotionPath *mpath_src)
AnimationEvalContext BKE_animsys_eval_context_construct(struct Depsgraph *depsgraph, float eval_time) ATTR_WARN_UNUSED_RESULT
void BKE_animsys_evaluate_animdata(struct ID *id, struct AnimData *adt, const struct AnimationEvalContext *anim_eval_context, eAnimData_Recalc recalc, bool flush_to_original)
bool BKE_animdata_drivers_remove_for_rna_struct(struct ID &owner_id, struct StructRNA &type, void *data)
void BKE_pose_rebuild(Main *bmain, Object *ob, bArmature *arm, bool do_id_user)
void BKE_pose_where_is(Depsgraph *depsgraph, Scene *scene, Object *ob)
std::optional< blender::Bounds< blender::float3 > > BKE_armature_min_max(const Object *ob)
bArmature * BKE_armature_add(Main *bmain, const char *name)
void BKE_asset_metadata_idprop_ensure(AssetMetaData *asset_data, IDProperty *prop)
bool BKE_bpath_foreach_path_fixed_process(BPathForeachPathData *bpath_data, char *path, size_t path_maxncpy)
Camera data-block and utility functions.
struct Camera * BKE_camera_add(struct Main *bmain, const char *name)
bool BKE_collection_object_remove(Main *bmain, Collection *collection, Object *ob, bool free_us)
bool BKE_collection_has_object_recursive(Collection *collection, Object *ob)
bool BKE_collection_viewlayer_object_add(Main *bmain, const ViewLayer *view_layer, Collection *collection, Object *ob)
Collection * BKE_collection_object_find(Main *bmain, Scene *scene, Collection *collection, Object *ob)
void BKE_collection_object_add_from(Main *bmain, Scene *scene, Object *ob_src, Object *ob_dst)
bool BKE_collection_object_add(Main *bmain, Collection *collection, Object *ob)
void BKE_constraints_free_ex(struct ListBase *list, bool do_id_user)
void BKE_constraints_solve(struct Depsgraph *depsgraph, struct ListBase *conlist, struct bConstraintOb *cob, float ctime)
void BKE_constraint_targets_flush(struct bConstraint *con, struct ListBase *targets, bool no_copy)
void BKE_constraint_blend_write(struct BlendWriter *writer, struct ListBase *conlist)
int BKE_constraint_targets_get(struct bConstraint *con, struct ListBase *r_targets)
void BKE_constraint_blend_read_data(struct BlendDataReader *reader, struct ID *id_owner, struct ListBase *lb)
void BKE_constraints_copy_ex(struct ListBase *dst, const struct ListBase *src, int flag, bool do_extern)
void BKE_constraints_clear_evalob(struct bConstraintOb *cob)
void BKE_constraints_id_loop(struct ListBase *list, ConstraintIDFunc func, const int flag, void *userdata)
struct bConstraintOb * BKE_constraints_make_evalob(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, void *subdata, short datatype)
void BKE_crazyspace_api_eval_clear(Object *object)
void BKE_curve_texspace_ensure(Curve *cu)
void BKE_curve_bevelList_free(ListBase *bev)
ListBase * BKE_curve_nurbs_get(Curve *cu)
Curve * BKE_curve_new_from_object(Object *object, Depsgraph *depsgraph, bool apply_modifiers)
std::optional< blender::Bounds< blender::float3 > > BKE_curve_minmax(const Curve *cu, bool use_radius)
void BKE_nurbList_free(ListBase *lb)
Curve * BKE_curve_add(Main *bmain, const char *name, int type)
int BKE_nurbList_verts_count_without_handles(const ListBase *nurb)
bool BKE_nurbList_index_get_co(ListBase *nurb, int index, float r_co[3])
void BKE_curve_type_test(Object *ob, bool dimension_update)
struct Curves * BKE_curves_add(struct Main *bmain, const char *name)
Low-level operations for curves.
const void * CustomData_get_layer(const CustomData *data, eCustomDataType type)
bool CustomData_free_layer(CustomData *data, eCustomDataType type, int index)
int CustomData_get_layer_index(const CustomData *data, eCustomDataType type)
void CustomData_copy_layer_type_data(const CustomData *source, CustomData *destination, eCustomDataType type, int source_index, int destination_index, int count)
bool CustomData_has_layer(const CustomData *data, eCustomDataType type)
void * CustomData_add_layer(CustomData *data, eCustomDataType type, eCDAllocType alloctype, int totelem)
display list (or rather multi purpose list) stuff.
void BKE_displist_free(struct ListBase *lb)
DispList * BKE_displist_find(struct ListBase *lb, int type)
void BKE_displist_minmax(const struct ListBase *dispbase, float min[3], float max[3])
blender::VectorList< DupliObject > DupliList
void object_duplilist(Depsgraph *depsgraph, Scene *sce, Object *ob, blender::Set< const Object * > *include_objects, DupliList &r_duplilist)
void BKE_partdeflect_free(struct PartDeflect *pd)
struct EffectorWeights * BKE_effector_add_weights(struct Collection *collection)
void BKE_gpencil_modifier_blend_read_data(struct BlendDataReader *reader, struct ListBase *lb, struct Object *ob)
void BKE_gpencil_modifiers_foreach_ID_link(struct Object *ob, GreasePencilIDWalkFunc walk, void *user_data)
void BKE_gpencil_modifier_free_ex(struct GpencilModifierData *md, int flag)
Low-level operations for grease pencil.
GreasePencil * BKE_grease_pencil_add(Main *bmain, const char *name)
void IDP_foreach_property(IDProperty *id_property_root, int type_filter, blender::FunctionRef< void(IDProperty *id_property)> callback)
void(*)(ID *id, const IDCacheKey *cache_key, void **cache_p, uint flags, void *user_data) IDTypeForeachCacheFunctionCallback
void BKE_keyblock_convert_to_lattice(const KeyBlock *kb, Lattice *lt)
Key * BKE_key_add(Main *bmain, ID *id)
void BKE_keyblock_convert_to_mesh(const KeyBlock *kb, blender::MutableSpan< blender::float3 > vert_positions)
void BKE_keyblock_convert_from_mesh(const Mesh *mesh, const Key *key, KeyBlock *kb)
void BKE_keyblock_convert_from_curve(const Curve *cu, KeyBlock *kb, const ListBase *nurb)
KeyBlock * BKE_keyblock_add_ctime(Key *key, const char *name, bool do_force)
void BKE_keyblock_convert_from_lattice(const Lattice *lt, KeyBlock *kb)
float * BKE_key_evaluate_object(Object *ob, int *r_totelem)
void BKE_keyblock_convert_to_curve(KeyBlock *kb, Curve *cu, ListBase *nurb)
Key ** BKE_key_from_object_p(Object *ob)
Key * BKE_key_from_object(Object *ob)
void BKE_lattice_transform(Lattice *lt, const float mat[4][4], bool do_keys)
std::optional< blender::Bounds< blender::float3 > > BKE_lattice_minmax(const Lattice *lt)
Lattice * BKE_lattice_add(Main *bmain, const char *name)
LayerCollection * BKE_layer_collection_get_active(ViewLayer *view_layer)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
void BKE_view_layer_base_deselect_all(const Scene *scene, ViewLayer *view_layer)
blender::Vector< Object * > BKE_view_layer_array_from_objects_in_mode_params(const Scene *scene, ViewLayer *view_layer, const View3D *v3d, const ObjectsInModeParams *params)
Base * BKE_view_layer_active_base_get(ViewLayer *view_layer)
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
Base * BKE_view_layer_base_find(ViewLayer *view_layer, Object *ob)
ListBase * BKE_view_layer_object_bases_get(ViewLayer *view_layer)
void BKE_view_layer_base_select_and_set_active(ViewLayer *view_layer, Base *selbase)
blender::Vector< Base * > BKE_view_layer_array_from_bases_in_mode_params(const Scene *scene, ViewLayer *view_layer, const View3D *v3d, const ObjectsInModeParams *params)
ID * BKE_id_copy_for_duplicate(Main *bmain, ID *id, eDupli_ID_Flags duplicate_flags, int copy_flags)
void BKE_id_free_us(Main *bmain, void *idv) ATTR_NONNULL()
void BKE_libblock_free_datablock(ID *id, int flag) ATTR_NONNULL()
void * BKE_libblock_alloc(Main *bmain, short type, const char *name, int flag) ATTR_WARN_UNUSED_RESULT
void BKE_id_free(Main *bmain, void *idv)
void BKE_libblock_free_data(ID *id, bool do_id_user) ATTR_NONNULL()
void BKE_main_id_newptr_and_tag_clear(Main *bmain)
@ LIB_ID_COPY_SET_COPIED_ON_WRITE
@ LIB_ID_CREATE_NO_USER_REFCOUNT
@ LIB_ID_COPY_RIGID_BODY_NO_COLLECTION_HANDLING
@ LIB_ID_DUPLICATE_IS_ROOT_ID
@ LIB_ID_DUPLICATE_IS_SUBPROCESS
void BKE_id_blend_write(BlendWriter *writer, ID *id)
#define BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL(data_, func_call_)
void BKE_lib_query_foreachid_process(LibraryForeachIDData *data, ID **id_pp, LibraryForeachIDCallbackFlag cb_flag)
#define BKE_LIB_FOREACHID_PROCESS_IDSUPER(data_, id_super_, cb_flag_)
LibraryForeachIDCallbackFlag
@ IDWALK_CB_OVERRIDE_LIBRARY_HIERARCHY_DEFAULT
#define BKE_LIB_FOREACHID_PROCESS_ID(data_, id_, cb_flag_)
LibraryForeachIDFlag BKE_lib_query_foreachid_process_flags_get(const LibraryForeachIDData *data)
@ IDWALK_DO_DEPRECATED_POINTERS
void BKE_libblock_relink_to_newid(Main *bmain, ID *id, int remap_flag) ATTR_NONNULL()
@ ID_REMAP_SKIP_USER_CLEAR
@ ID_REMAP_FORCE_OBDATA_IN_EDITMODE
General operations, lookup, etc. for blender lights.
Light * BKE_light_add(Main *bmain, const char *name) ATTR_WARN_UNUSED_RESULT
void BKE_light_linking_copy(struct Object *object_dst, const struct Object *object_src, const int copy_flags)
void BKE_light_linking_delete(struct Object *object, const int delete_flags)
General operations for probes.
void BKE_lightprobe_cache_free(struct Object *object)
void BKE_lightprobe_cache_blend_read(struct BlendDataReader *reader, struct LightProbeObjectCache *cache)
void BKE_lightprobe_cache_blend_write(struct BlendWriter *writer, struct LightProbeObjectCache *cache)
struct LightProbe * BKE_lightprobe_add(struct Main *bmain, const char *name)
LightProbeObjectCache * BKE_lightprobe_cache_copy(LightProbeObjectCache *src_cache)
Blender kernel freestyle line style functionality.
#define FOREACH_MAIN_ID_END
#define FOREACH_MAIN_ID_BEGIN(_bmain, _id)
General operations, lookup, etc. for materials.
void BKE_object_materials_sync_length(Main *bmain, Object *ob, ID *id)
Material *** BKE_object_material_array_p(Object *ob)
MetaBall * BKE_mball_add(Main *bmain, const char *name)
void BKE_mesh_ensure_skin_customdata(Mesh *mesh)
Mesh * BKE_mesh_add(Main *bmain, const char *name)
Mesh * BKE_mesh_new_from_object(Depsgraph *depsgraph, Object *object, bool preserve_all_data_layers, bool preserve_origindex, bool ensure_subdivision)
void BKE_mesh_texspace_get_reference(Mesh *mesh, char **r_texspace_flag, float **r_texspace_location, float **r_texspace_size)
blender::Span< blender::float3 > BKE_mesh_wrapper_vert_coords(const Mesh *mesh)
Mesh * BKE_mesh_wrapper_ensure_subdivision(Mesh *mesh)
void BKE_modifier_blend_write(BlendWriter *writer, const ID *id_owner, ListBase *modbase)
bool BKE_modifier_is_enabled(const Scene *scene, ModifierData *md, int required_mode)
void BKE_modifier_copydata_ex(const ModifierData *md, ModifierData *target, int flag)
ModifierData * BKE_modifiers_findby_type(const Object *ob, ModifierType type)
const ModifierTypeInfo * BKE_modifier_get_info(ModifierType type)
void BKE_modifiers_persistent_uid_init(const Object &object, ModifierData &md)
@ eModifierTypeFlag_Single
@ eModifierTypeFlag_AcceptsCVs
@ eModifierTypeFlag_AcceptsGreasePencil
@ eModifierTypeFlag_AcceptsVertexCosOnly
@ eModifierTypeFlag_AcceptsMesh
void BKE_modifier_blend_read_data(BlendDataReader *reader, ListBase *lb, Object *ob)
void void void BKE_modifiers_foreach_ID_link(Object *ob, IDWalkFunc walk, void *user_data)
ModifierData * BKE_modifier_copy_ex(const ModifierData *md, int flag)
void BKE_modifier_unique_name(ListBase *modifiers, ModifierData *md)
bool BKE_modifiers_persistent_uids_are_valid(const Object &object)
void BKE_modifier_free_ex(ModifierData *md, int flag)
ModifierData * BKE_modifiers_get_virtual_modifierlist(const Object *ob, VirtualModifierData *data)
ModifierData * BKE_modifier_new(int type)
Object * BKE_modifiers_is_deformed_by_armature(Object *ob)
void BKE_modifier_copydata(const ModifierData *md, ModifierData *target)
void multiresModifier_sync_levels_ex(Object *ob_dst, const MultiresModifierData *mmd_src, MultiresModifierData *mmd_dst)
bool multiresModifier_reshapeFromCCG(int tot_level, Mesh *coarse_mesh, SubdivCCG *subdiv_ccg)
General operations, lookup, etc. for blender objects.
@ OB_REL_CHILDREN_RECURSIVE
@ OB_REL_PARENT_RECURSIVE
bool BKE_object_is_in_editmode(const Object *ob)
void BKE_object_handle_data_update(Depsgraph *depsgraph, Scene *scene, Object *ob)
void BKE_sculptsession_free(Object *ob)
void BKE_particle_system_blend_read_data(struct BlendDataReader *reader, struct ListBase *particles)
void BKE_particle_system_blend_read_after_liblink(struct BlendLibReader *reader, struct Object *ob, struct ID *id, struct ListBase *particles)
void psys_free_path_cache(struct ParticleSystem *psys, struct PTCacheEdit *edit)
void BKE_particle_partdeflect_blend_read_data(struct BlendDataReader *reader, struct PartDeflect *pd)
void BKE_particle_system_blend_write(struct BlendWriter *writer, struct ListBase *particles)
void psys_free(struct Object *ob, struct ParticleSystem *psys)
struct ModifierData * object_copy_particle_system(struct Main *bmain, const struct Scene *scene, struct Object *ob, const struct ParticleSystem *psys_orig)
void BKE_particlesystem_id_loop(struct ParticleSystem *psys, ParticleSystemIDFunc func, void *userdata)
void psys_copy_particles(struct ParticleSystem *psys_dst, struct ParticleSystem *psys_src)
void BKE_ptcache_ids_from_object(struct ListBase *lb, struct Object *ob, struct Scene *scene, int duplis)
struct PointCache * BKE_ptcache_copy_list(struct ListBase *ptcaches_new, const struct ListBase *ptcaches_old, int flag)
void BKE_ptcache_blend_read_data(struct BlendDataReader *reader, struct ListBase *ptcaches, struct PointCache **ocache, int force_disk)
void BKE_ptcache_blend_write(struct BlendWriter *writer, struct ListBase *ptcaches)
General operations for point clouds.
PointCloud * BKE_pointcloud_add(Main *bmain, const char *name)
void BKE_pose_backup_clear(struct Object *ob)
void BKE_previewimg_blend_write(BlendWriter *writer, const PreviewImage *prv)
void BKE_previewimg_free(PreviewImage **prv)
void BKE_previewimg_blend_read(BlendDataReader *reader, PreviewImage *prv)
void BKE_previewimg_id_copy(ID *new_id, const ID *old_id)
API for Blender-side Rigid Body stuff.
void BKE_rigidbody_free_constraint(struct Object *ob)
void BKE_rigidbody_free_object(struct Object *ob, struct RigidBodyWorld *rbw)
void BKE_rigidbody_object_copy(struct Main *bmain, struct Object *ob_dst, const struct Object *ob_src, int flag)
void BKE_rigidbody_sync_transforms(struct RigidBodyWorld *rbw, struct Object *ob, float ctime)
void BKE_shaderfx_foreach_ID_link(struct Object *ob, ShaderFxIDWalkFunc walk, void *user_data)
void BKE_shaderfx_free_ex(struct ShaderFxData *fx, int flag)
void BKE_shaderfx_blend_write(struct BlendWriter *writer, struct ListBase *fxbase)
struct ShaderFxData * BKE_shaderfx_new(int type)
void BKE_shaderfx_blend_read_data(struct BlendDataReader *reader, struct ListBase *lb, struct Object *ob)
void BKE_shaderfx_copydata_ex(struct ShaderFxData *fx, struct ShaderFxData *target, int flag)
const ShaderFxTypeInfo * BKE_shaderfx_get_info(ShaderFxType type)
void sbFree(struct Object *ob)
General operations for speakers.
struct Speaker * BKE_speaker_add(struct Main *bmain, const char *name)
Volume * BKE_volume_add(Main *bmain, const char *name)
std::optional< blender::Bounds< blender::float3 > > BKE_volume_min_max(const Volume *volume)
#define BLI_assert_unreachable()
#define BLI_assert_msg(a, msg)
A KD-tree for nearest neighbor search.
void void BLI_linklist_prepend(LinkNode **listp, void *ptr) ATTR_NONNULL(1)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(ListBase *lb)
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
void BLI_freelinkN(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH_BACKWARD(type, var, list)
void void BLI_freelistN(ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_addhead(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void void BLI_listbase_sort(ListBase *listbase, int(*cmp)(const void *, const void *)) ATTR_NONNULL(1
void void void void void void BLI_duplicatelist(ListBase *dst, const ListBase *src) ATTR_NONNULL(1
void * BLI_pophead(ListBase *listbase) ATTR_NONNULL(1)
void BLI_insertlinkbefore(ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
#define BLI_ASSERT_UNIT_M3(m)
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void size_to_mat3(float R[3][3], const float size[3])
void copy_m3_m3(float m1[3][3], const float m2[3][3])
void copy_m3_m4(float m1[3][3], const float m2[4][4])
void copy_m4_m3(float m1[4][4], const float m2[3][3])
void mat4_to_loc_rot_size(float loc[3], float rot[3][3], float size[3], const float wmat[4][4])
void orthogonalize_m4_stable(float R[4][4], int axis, bool normalize)
void scale_m4_fl(float R[4][4], float scale)
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void mul_v3_m4v3(float r[3], const float mat[4][4], const float vec[3])
bool is_negative_m4(const float mat[4][4])
bool invert_m4_m4(float inverse[4][4], const float mat[4][4])
bool invert_m4(float mat[4][4])
void mul_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3])
void mul_m4_m4_post(float R[4][4], const float B[4][4])
void unit_m4(float m[4][4])
void quat_to_compatible_eulO(float eul[3], const float oldrot[3], short order, const float quat[4])
float tri_to_quat(float q[4], const float a[3], const float b[3], const float c[3])
void invert_qt_normalized(float q[4])
void axis_angle_to_quat(float r[4], const float axis[3], float angle)
void quat_to_mat3(float m[3][3], const float q[4])
void quat_to_eulO(float e[3], short order, const float q[4])
float normalize_qt(float q[4])
void quat_to_mat4(float m[4][4], const float q[4])
void eulO_to_quat(float q[4], const float e[3], short order)
float normalize_qt_qt(float r[4], const float q[4])
void mul_qt_qtqt(float q[4], const float a[4], const float b[4])
void quat_to_axis_angle(float axis[3], float *angle, const float q[4])
void quat_apply_track(float quat[4], short axis, short upflag)
void eulO_to_mat3(float M[3][3], const float e[3], short order)
void copy_qt_qt(float q[4], const float a[4])
void axis_angle_to_mat3(float R[3][3], const float axis[3], float angle)
void mat3_normalized_to_quat(float q[4], const float mat[3][3])
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE float len_squared_v3(const float v[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v3_v3(float r[3], const float a[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void project_plane_v3_v3v3(float out[3], const float p[3], const float v_plane[3])
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void mul_v3_v3v3(float r[3], const float v1[3], const float v2[3])
MINLINE float normalize_v3_v3(float r[3], const float a[3])
MINLINE bool is_zero_v3(const float v[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void zero_v2(float r[2])
MINLINE void zero_v3(float r[3])
MINLINE void add_v3_v3(float r[3], const float a[3])
void mid_v3_v3v3v3(float v[3], const float v1[3], const float v2[3], const float v3[3])
MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
char * STRNCPY(char(&dst)[N], const char *src)
#define STRNCPY_UTF8(dst, src)
#define POINTER_FROM_INT(i)
#define POINTER_AS_INT(i)
#define MEMCMP_STRUCT_AFTER_IS_ZERO(struct_var, member)
#define MEMCPY_STRUCT_AFTER(struct_dst, struct_src, member)
Main * BLO_read_lib_get_main(BlendLibReader *reader)
bool BLO_read_data_is_undo(BlendDataReader *reader)
void BLO_read_int32_array(BlendDataReader *reader, int64_t array_size, int32_t **ptr_p)
#define BLO_write_id_struct(writer, struct_name, id_address, id)
#define BLO_write_struct(writer, struct_name, data_ptr)
BlendFileReadReport * BLO_read_lib_reports(BlendLibReader *reader)
#define BLO_read_struct_list(reader, struct_name, list)
#define BLO_write_struct_list(writer, struct_name, list_ptr)
void BLO_read_char_array(BlendDataReader *reader, int64_t array_size, char **ptr_p)
#define BLO_read_struct(reader, struct_name, ptr_p)
void BLO_write_pointer_array(BlendWriter *writer, int64_t num, const void *data_ptr)
void BLO_read_pointer_array(BlendDataReader *reader, int64_t array_size, void **ptr_p)
bool BLO_write_is_undo(BlendWriter *writer)
void BLO_write_char_array(BlendWriter *writer, int64_t num, const char *data_ptr)
void BLO_reportf_wrap(BlendFileReadReport *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
external readfile function prototypes.
#define BLT_I18NCONTEXT_ID_ID
#define BLT_I18NCONTEXT_ID_LIGHT
#define BLT_I18NCONTEXT_ID_OBJECT
#define CTX_DATA_(context, msgid)
#define CLOG_ERROR(clg_ref,...)
#define CLOG_WARN(clg_ref,...)
void DEG_id_tag_update(ID *id, unsigned int flags)
bool DEG_is_active(const Depsgraph *depsgraph)
float DEG_get_ctime(const Depsgraph *graph)
#define DEG_OBJECT_ITER_BEGIN(settings_, instance_)
bool DEG_is_original(const T *id)
#define DEG_OBJECT_ITER_END
bool DEG_object_geometry_is_evaluated(const Object &object)
T * DEG_get_original(T *id)
T * DEG_get_evaluated(const Depsgraph *depsgraph, T *id)
@ DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY
@ DEG_ITER_OBJECT_FLAG_VISIBLE
@ DEG_ITER_OBJECT_FLAG_DUPLI
@ ID_TAG_COPIED_ON_EVAL_FINAL_RESULT
#define ID_IS_LINKED(_id)
@ POSE_CONSTRAINTS_NEED_UPDATE_FLAGS
@ BONE_RELATIVE_PARENTING
Object groups, one object can be in many groups at once.
@ CONSTRAINT_TYPE_CAMERASOLVER
@ CONSTRAINT_OBTYPE_OBJECT
@ CAMERASOLVER_ACTIVECLIP
#define DNA_struct_default_get(struct_name)
@ BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT
#define ME_EDIT_PAINT_SEL_MODE(_me)
@ eParticleSystemFlag_file_loaded
@ eModifierType_ParticleSystem
@ eModifierType_MeshSequenceCache
@ eModifierType_Collision
@ eModifierType_DynamicPaint
@ eModifierType_MeshCache
#define OB_MODE_ALL_MODE_DATA
@ OB_MODE_WEIGHT_GREASE_PENCIL
#define OB_MODE_ALL_SCULPT
Object is a sort of wrapper for general info.
@ OB_EMPTY_IMAGE_HIDE_FRONT
@ OB_EMPTY_IMAGE_HIDE_NON_AXIS_ALIGNED
@ OB_EMPTY_IMAGE_HIDE_ORTHOGRAPHIC
@ OB_EMPTY_IMAGE_HIDE_BACK
@ OB_EMPTY_IMAGE_HIDE_PERSPECTIVE
#define OB_TYPE_SUPPORT_PARVERT(_type)
#define OB_DATA_SUPPORT_EDITMODE(_type)
@ OB_PARENT_USE_FINAL_INDICES
#define OB_TYPE_SUPPORT_VGROUP(_type)
@ PTCACHE_FLAG_INFO_DIRTY
Types and defines for representing Rigid Body entities.
#define BASE_SELECTED(v3d, base)
#define BASE_SELECTED_EDITABLE(v3d, base)
#define BASE_EDITABLE(v3d, base)
#define BASE_VISIBLE(v3d, base)
static double angle(const Eigen::Vector3d &v1, const Eigen::Vector3d &v2)
Read Guarded memory(de)allocation.
void BKE_object_matrix_local_get(Object *ob, float r_mat[4][4])
static void ob_parvert3(const Object *ob, const Object *par, float r_mat[4][4])
void BKE_object_where_is_calc_mat4(const Object *ob, float r_obmat[4][4])
void BKE_object_protected_location_set(Object *ob, const float location[3])
bool BKE_object_obdata_texspace_get(Object *ob, char **r_texspace_flag, float **r_texspace_location, float **r_texspace_size)
static void object_asset_metadata_ensure(void *asset_ptr, AssetMetaData *asset_data)
static blender::Mutex vparent_lock
static void object_blend_write(BlendWriter *writer, ID *id, const void *id_address)
void BKE_object_to_mesh_clear(Object *object)
void BKE_object_groups_clear(Main *bmain, Scene *scene, Object *ob)
void BKE_object_empty_draw_type_set(Object *ob, const int value)
bool BKE_object_is_libdata(const Object *ob)
void BKE_object_to_curve_clear(Object *object)
bool BKE_object_has_mode_data(const Object *ob, eObjectMode object_mode)
static KeyBlock * insert_curvekey(Main *bmain, Object *ob, const char *name, const bool from_mix)
Vector< Object * > BKE_object_pose_array_get_unique(const Scene *scene, ViewLayer *view_layer, View3D *v3d)
static IDProperty * object_asset_dimensions_property(Object *ob)
const Mesh * BKE_object_get_editmesh_eval_cage(const Object *object)
blender::float4x4 BKE_object_calc_parent(Depsgraph *depsgraph, Scene *scene, Object *ob)
static Object * object_add_common(Main *bmain, const Scene *scene, ViewLayer *view_layer, int type, const char *name)
KDTree_3d * BKE_object_as_kdtree(Object *ob, int *r_tot)
static void object_blend_read_after_liblink(BlendLibReader *reader, ID *id)
bool BKE_object_flag_test_recursive(const Object *ob, short flag)
void BKE_object_copy_softbody(Object *ob_dst, const Object *ob_src, const int flag)
LinkNode * BKE_object_relational_superset(const Scene *scene, ViewLayer *view_layer, eObjectSet objectSet, eObRelationTypes includeFilter)
void BKE_object_sculpt_data_create(Object *ob)
void BKE_object_modifier_set_active(Object *ob, ModifierData *md)
void BKE_object_protected_rotation_axisangle_set(Object *ob, const float axis[3], const float angle)
static void library_foreach_modifiersForeachIDLink(void *user_data, Object *, ID **id_pointer, const LibraryForeachIDCallbackFlag cb_flag)
PartEff * BKE_object_do_version_give_parteff_245(Object *ob)
MovieClip * BKE_object_movieclip_get(Scene *scene, const Object *ob, bool use_default)
void BKE_object_tfm_restore(Object *ob, void *obtfm_pt)
static void object_where_is_calc_ex(Depsgraph *depsgraph, Scene *scene, Object *ob, float ctime, RigidBodyWorld *rbw, float r_originmat[3][3])
Vector< Base * > BKE_object_pose_base_array_get_unique(const Scene *scene, ViewLayer *view_layer, View3D *v3d)
bool BKE_object_is_in_editmode(const Object *ob)
bool BKE_object_exists_check(Main *bmain, const Object *obtest)
void BKE_object_handle_update_ex(Depsgraph *depsgraph, Scene *scene, Object *ob, RigidBodyWorld *rbw)
Vector< Base * > BKE_object_pose_base_array_get(const Scene *scene, ViewLayer *view_layer, View3D *v3d)
static void object_foreach_working_space_color(ID *id, const IDTypeForeachColorFunctionCallback &fn)
static KeyBlock * insert_lattkey(Main *bmain, Object *ob, const char *name, const bool from_mix)
static bool ob_parcurve(const Object *ob, Object *par, float r_mat[4][4])
static bool object_modifier_type_copy_check(ModifierType md_type)
static void object_init(Object *ob, const short ob_type)
void BKE_object_scale_to_mat3(const Object *ob, float mat[3][3])
void BKE_object_update_select_id(Main *bmain)
Object * BKE_object_add_from(Main *bmain, Scene *scene, ViewLayer *view_layer, int type, const char *name, Object *ob_src)
int BKE_object_obdata_to_type(const ID *id)
void BKE_object_check_uids_unique_and_report(const Object *object)
void BKE_object_dimensions_set(Object *ob, const float value[3], int axis_mask)
const Mesh * BKE_object_get_pre_modified_mesh(const Object *object)
void BKE_object_tfm_protected_backup(const Object *ob, ObjectTfmProtectedChannels *obtfm)
static void object_copy_data(Main *bmain, std::optional< Library * >, ID *id_dst, const ID *id_src, const int flag)
void BKE_object_replace_data_on_shallow_copy(Object *ob, ID *new_data)
void BKE_object_workob_clear(Object *workob)
void BKE_object_dimensions_eval_cached_get(const Object *ob, float r_vec[3])
static void object_lib_override_apply_post(ID *id_dst, ID *id_src)
std::optional< Bounds< float3 > > BKE_object_boundbox_eval_cached_get(const Object *ob)
void BKE_object_get_parent_matrix(const Object *ob, Object *par, float r_parentmat[4][4])
static void object_foreach_path(ID *id, BPathForeachPathData *bpath_data)
bool BKE_object_minmax_empty_drawtype(const Object *ob, float r_min[3], float r_max[3])
static AssetTypeInfo AssetType_OB
void BKE_object_copy_particlesystems(Object *ob_dst, const Object *ob_src, const int flag)
bool BKE_object_supports_modifiers(const Object *ob)
void * BKE_object_obdata_add_from_type(Main *bmain, int type, const char *name)
char * BKE_object_data_editmode_flush_ptr_get(ID *id)
void BKE_object_runtime_reset(Object *object)
void BKE_object_tfm_copy(Object *object_dst, const Object *object_src)
static void object_update_from_subsurf_ccg(Object *object)
Object * BKE_object_add_only_object(Main *bmain, int type, const char *name)
static void object_cacheIgnoreClear(Object *ob, const bool state)
Object * BKE_object_add(Main *bmain, Scene *scene, ViewLayer *view_layer, int type, const char *name)
bool BKE_object_pose_context_check(const Object *ob)
static int pc_cmp(const void *a, const void *b)
Mesh * BKE_object_get_evaluated_mesh(const Object *object_eval)
static void library_foreach_constraintObjectLooper(bConstraint *, ID **id_pointer, bool is_reference, void *user_data)
Object * BKE_object_add_for_data(Main *bmain, const Scene *scene, ViewLayer *view_layer, int type, const char *name, ID *data, bool do_id_user)
void BKE_scene_foreach_display_point(Depsgraph *depsgraph, void(*func_cb)(const float[3], void *), void *user_data)
bool BKE_object_shapekey_free(Main *bmain, Object *ob)
static Object * obrel_armature_find(Object *ob)
int BKE_object_is_deform_modified(Scene *scene, Object *ob)
void BKE_object_apply_mat4(Object *ob, const float mat[4][4], const bool use_compat, const bool use_parent)
static void library_foreach_gpencil_modifiersForeachIDLink(void *user_data, Object *, ID **id_pointer, const LibraryForeachIDCallbackFlag cb_flag)
int BKE_object_insert_ptcache(Object *ob)
static void ob_parbone(const Object *ob, const Object *par, float r_mat[4][4])
bool BKE_object_moves_in_time(const Object *object, bool recurse_parent)
static ParticleSystem * object_copy_modifier_particle_system_ensure(Main *bmain, const Scene *scene, Object *ob_dst, ParticleSystem *psys_src)
int BKE_object_scenes_users_get(Main *bmain, Object *ob)
bool BKE_object_shapekey_remove(Main *bmain, Object *ob, KeyBlock *kb)
static KeyBlock * insert_meshkey(Main *bmain, Object *ob, const char *name, const bool from_mix)
Object * BKE_object_pose_armature_get(Object *ob)
void BKE_object_free_modifiers(Object *ob, const int flag)
static bool modifiers_has_animation_check(const Object *ob)
void BKE_object_modifier_hook_reset(Object *ob, HookModifierData *hmd)
void BKE_object_dimensions_set_ex(Object *ob, const float value[3], int axis_mask, const float ob_scale_orig[3], const float ob_obmat_orig[4][4])
const Mesh * BKE_object_get_mesh_deform_eval(const Object *object)
void BKE_object_runtime_free_data(Object *object)
static bool object_modifier_recurse_for_update_subframe(const ObjectModifierUpdateContext &ctx, Object *ob, const bool update_mesh, const int parent_recursion_limit)
static void solve_parenting(const Object *ob, Object *par, const bool set_origin, float r_obmat[4][4], float r_originmat[3][3])
blender::Vector< Base * > BKE_object_pose_base_array_get_ex(const Scene *scene, ViewLayer *view_layer, View3D *v3d, bool unique)
bool BKE_object_supports_material_slots(Object *ob)
bool BKE_object_obdata_is_libdata(const Object *ob)
static void copy_object_pose(Object *obn, const Object *ob, const int flag)
static void object_blend_read_data(BlendDataReader *reader, ID *id)
static bool object_moves_in_time(const Object *object)
ModifierData * BKE_object_active_modifier(const Object *ob)
SubsurfModifierData * BKE_object_get_last_subsurf_modifier(const Object *ob)
void BKE_object_free_particlesystems(Object *ob)
void BKE_object_free_curve_cache(Object *ob)
void BKE_object_obdata_size_init(Object *ob, const float size)
static void library_foreach_particlesystemsObjectLooper(ParticleSystem *, ID **id_pointer, void *user_data, const LibraryForeachIDCallbackFlag cb_flag)
void BKE_object_where_is_calc_ex(Depsgraph *depsgraph, Scene *scene, RigidBodyWorld *rbw, Object *ob, float r_originmat[3][3])
bool BKE_object_data_is_in_editmode(const Object *ob, const ID *id)
void BKE_object_mat3_to_rot(Object *ob, float mat[3][3], bool use_compat)
static void object_init_data(ID *id)
Object * BKE_object_pose_armature_get_with_wpaint_check(Object *ob)
bool BKE_object_is_mode_compat(const Object *ob, eObjectMode object_mode)
void BKE_object_runtime_reset_on_copy(Object *object, const int)
void BKE_object_foreach_display_point(Object *ob, const float obmat[4][4], void(*func_cb)(const float[3], void *), void *user_data)
Mesh * BKE_object_to_mesh(Depsgraph *depsgraph, Object *object, bool preserve_all_data_layers)
void BKE_object_apply_mat4_ex(Object *ob, const float mat[4][4], Object *parent, const float parentinv[4][4], const bool use_compat)
void BKE_object_link_modifiers(Object *ob_dst, const Object *ob_src)
Vector< Object * > BKE_object_pose_array_get(const Scene *scene, ViewLayer *view_layer, View3D *v3d)
const Mesh * BKE_object_get_editmesh_eval_final(const Object *object)
Vector< Object * > BKE_object_pose_array_get_ex(const Scene *scene, ViewLayer *view_layer, View3D *v3d, bool unique)
bool BKE_object_is_child_recursive(const Object *ob_parent, const Object *ob_child)
Object * BKE_object_duplicate(Main *bmain, Object *ob, eDupli_ID_Flags dupflag, uint duplicate_options)
static int pc_findindex(ListBase *listbase, int index)
Mesh * BKE_object_get_evaluated_mesh_no_subsurf_unchecked(const Object *object)
bool BKE_object_support_modifier_type_check(const Object *ob, int modifier_type)
bool BKE_object_modifier_stack_copy(Object *ob_dst, const Object *ob_src, const bool do_copy_all, const int flag_subdata)
bool BKE_object_empty_image_frame_is_visible_in_view3d(const Object *ob, const RegionView3D *rv3d)
Mesh * BKE_object_get_evaluated_mesh_no_subsurf(const Object *object)
static void give_parvert(const Object *par, int nr, float vec[3], const bool use_evaluated_indices)
KeyBlock * BKE_object_shapekey_insert(Main *bmain, Object *ob, const char *name, const bool from_mix)
bool BKE_object_copy_modifier(Main *bmain, const Scene *scene, Object *ob_dst, const Object *ob_src, const ModifierData *md_src)
int BKE_object_visibility(const Object *ob, const int dag_eval_mode)
void BKE_object_minmax(Object *ob, float3 &r_min, float3 &r_max)
Lattice * BKE_object_get_lattice(const Object *object)
void BKE_object_modifier_gpencil_hook_reset(Object *ob, HookGpencilModifierData *hmd)
void BKE_object_protected_rotation_quaternion_set(Object *ob, const float quat[4])
void BKE_object_protected_rotation_euler_set(Object *ob, const float euler[3])
bool BKE_object_is_in_wpaint_select_vert(const Object *ob)
void BKE_object_apply_parent_inverse(Object *ob)
bool BKE_object_minmax_dupli(Depsgraph *depsgraph, Scene *scene, Object *ob, float3 &r_min, float3 &r_max, const bool use_hidden)
std::optional< blender::Bounds< blender::float3 > > BKE_object_boundbox_get(const Object *ob)
Mesh * BKE_object_get_evaluated_mesh_unchecked(const Object *object_eval)
Mesh * BKE_object_get_original_mesh(const Object *object)
void BKE_object_to_mat4(const Object *ob, float r_mat[4][4])
Curve * BKE_object_to_curve(Object *object, Depsgraph *depsgraph, bool apply_modifiers)
Lattice * BKE_object_get_evaluated_lattice(const Object *object)
static bool constructive_modifier_is_deform_modified(Object *ob, ModifierData *md)
void BKE_object_eval_assign_data(Object *object_eval, ID *data_eval, bool is_owned)
void * BKE_object_tfm_backup(Object *ob)
void BKE_object_tfm_protected_restore(Object *ob, const ObjectTfmProtectedChannels *obtfm, const short protectflag)
static bool object_deforms_in_time(Object *object)
void BKE_object_modifier_update_subframe_only_callback(Object *ob, const bool update_mesh, const int parent_recursion_limit, const int modifier_type, blender::FunctionRef< void(Object *object, bool update_mesh)> update_or_tag_fn)
Object * BKE_object_pose_armature_get_visible(Object *ob, const Scene *scene, ViewLayer *view_layer, View3D *v3d)
static void object_foreach_cache(ID *id, IDTypeForeachCacheFunctionCallback function_callback, void *user_data)
void BKE_object_to_mat3(const Object *ob, float r_mat[3][3])
void BKE_object_handle_update(Depsgraph *depsgraph, Scene *scene, Object *ob)
static const char * get_obdata_defname(int type)
void BKE_object_delete_ptcache(Object *ob, int index)
void BKE_object_free_caches(Object *object)
bool BKE_object_parent_loop_check(const Object *par, const Object *ob)
static void object_foreach_id(ID *id, LibraryForeachIDData *data)
LinkNode * BKE_object_groups(Main *bmain, Scene *scene, Object *ob)
void BKE_object_dimensions_get(const Object *ob, float r_vec[3])
static float3 boundbox_to_dimensions(const Object *ob, const std::optional< Bounds< float3 > > bounds)
void BKE_object_where_is_calc_time(Depsgraph *depsgraph, Scene *scene, Object *ob, float ctime)
static void library_foreach_shaderfxForeachIDLink(void *user_data, Object *, ID **id_pointer, const LibraryForeachIDCallbackFlag cb_flag)
bool BKE_object_is_in_editmode_vgroup(const Object *ob)
static void copy_ccg_data(Mesh *mesh_destination, Mesh *mesh_source, const eCustomDataType layer_type)
bool BKE_object_empty_image_data_is_visible_in_view3d(const Object *ob, const RegionView3D *rv3d)
void BKE_object_modifier_update_subframe(Depsgraph *depsgraph, Scene *scene, Object *ob, const bool update_mesh, const int parent_recursion_limit, const float frame, const int modifier_type)
static void object_free_data(ID *id)
void BKE_object_where_is_calc(Depsgraph *depsgraph, Scene *scene, Object *ob)
void BKE_object_transform_copy(Object *ob_tar, const Object *ob_src)
void BKE_object_rot_to_mat3(const Object *ob, float mat[3][3], bool use_drot)
int BKE_object_is_modified(Scene *scene, Object *ob)
ParticleSystem * BKE_object_copy_particlesystem(ParticleSystem *psys, const int flag)
void BKE_object_protected_scale_set(Object *ob, const float scale[3])
static bool obrel_list_test(Object *ob)
static void obrel_list_add(LinkNode **links, Object *ob)
void BKE_object_free_derived_caches(Object *ob)
void BKE_object_free_softbody(Object *ob)
std::optional< Bounds< float3 > > BKE_object_evaluated_geometry_bounds(const Object *ob)
static void object_foreach_path_pointcache(ListBase *ptcache_list, BPathForeachPathData *bpath_data)
void BKE_object_free_shaderfx(Object *ob, const int flag)
BMesh const char void * data
void BM_mesh_elem_table_ensure(BMesh *bm, const char htype)
BLI_INLINE BMVert * BM_vert_at_index(BMesh *bm, const int index)
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert * v
BPy_StructRNA * depsgraph
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
constexpr int64_t size() const
constexpr IndexRange index_range() const
dot(value.rgb, luminance_coefficients)") DEFINE_VALUE("REDUCE(lhs
VecBase< float, D > constexpr mod(VecOp< float, D >, VecOp< float, D >) RET
DEG_id_tag_update_ex(cb_data->bmain, cb_data->owner_id, ID_RECALC_TAG_FOR_UNDO|ID_RECALC_SYNC_TO_EVAL)
void * MEM_mallocN(size_t len, const char *str)
void * MEM_callocN(size_t len, const char *str)
void * MEM_dupallocN(const void *vmemh)
void MEM_freeN(void *vmemh)
Vector< FCurve * > fcurves_for_assigned_action(AnimData *adt)
std::unique_ptr< IDProperty, IDPropertyDeleter > create(StringRef prop_name, int32_t value, eIDPropertyFlag flags={})
Allocate a new IDProperty of type IDP_INT, set its name and value.
bool object_has_geometry_set_instances(const Object &object)
Bounds< VecBase< T, 3 > > transform_bounds(const MatBase< T, D, D > &matrix, const Bounds< VecBase< T, 3 > > &bounds)
T min(const T &a, const T &b)
void min_max(const T &value, T &min, T &max)
VecBase< T, 3 > to_scale(const MatBase< T, NumCol, NumRow > &mat)
T max(const T &a, const T &b)
VecBase< T, 3 > transform_point(const CartesianBasis &basis, const VecBase< T, 3 > &v)
void parallel_for(const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1))
MatBase< float, 4, 4 > float4x4
VecBase< float, 3 > float3
struct Object * start_cap
struct Object * offset_ob
struct BlendFileReadReport::@124362246150331065306145367225174223236260272332 count
struct PointCache * point_cache
float texspace_location[3]
struct ParticleSystem * psys
struct DynamicPaintCanvasSettings * canvas
struct DynamicPaintBrushSettings * brush
struct Collection * group
char cache_directory[1024]
struct ParticleSystem * psys
struct FluidDomainSettings * domain
struct FluidFlowSettings * flow
struct FluidsimSettings * fss
GreasePencilRuntimeHandle * runtime
const blender::FunctionRef< void(float rgb[3])> single
ID_RuntimeHandle * runtime
struct EditLatt * editlatt
struct Collection * collection
struct Collection * blocker_collection
struct Collection * receiver_collection
MeshRuntimeHandle * runtime
struct Object * mirror_ob
struct ModifierData * next
struct ModifierData * prev
void(* modify_geometry_set)(ModifierData *md, const ModifierEvalContext *ctx, blender::bke::GeometrySet *geometry_set)
void(* foreach_working_space_color)(ModifierData *md, const IDTypeForeachColorFunctionCallback &fn)
blender::FunctionRef< void(Object *object, bool update_mesh)> update_or_tag_fn
ModifierType modifier_type
struct Collection * instance_collection
struct LightProbeObjectCache * lightprobe_cache
ObjectRuntimeHandle * runtime
struct RigidBodyOb * rigidbody_object
ListBase greasepencil_modifiers
struct PreviewImage * preview
LightLinking * light_linking
char duplicator_visibility_flag
struct SculptSession * sculpt
struct RigidBodyCon * rigidbody_constraint
struct LightgroupMembership * lightgroup
char empty_image_visibility_flag
struct ListBase * ptcaches
unsigned int default_step
struct Collection * group
struct ParticleSystem * psys
struct Mesh * mesh_original
struct PTCacheEdit * edit
struct ListBase * effectors
struct PointCache * pointcache
struct ClothModifierData * clmd
struct ParticleCacheKey ** childcache
struct Mesh * hair_in_mesh
struct Mesh * hair_out_mesh
struct ParticleDrawData * pdd
struct ParticleCacheKey ** pathcache
void * physics_constraint
struct RigidBodyOb_Shared * shared
struct RigidBodyWorld * rigidbody_world
void(* foreach_working_space_color)(ShaderFxData *fx, const IDTypeForeachColorFunctionCallback &func)
struct PointCache * pointcache
struct SoftBody_Shared * shared
struct Collection * collision_group
struct EffectorWeights * effector_weights
struct BodySpring * bspring
struct SBScratch * scratch
struct BodyPoint * bpoint
struct SubdivCCG::@013326174356303061066227044362260371376134015325 dirty
struct bConstraint * next
const Mesh * get_mesh() const
::Curve * object_as_temp_curve
Array< float3x3, 0 > crazyspace_deform_imats
Mesh * object_as_temp_mesh
GeometrySet * geometry_set_eval
Array< float3, 0 > crazyspace_deform_cos