Blender  V2.93
Classes | Typedefs | Enumerations | Functions | Variables
BKE_object.h File Reference

General operations, lookup, etc. for blender objects. More...

#include "BLI_compiler_attrs.h"
#include "BLI_sys_types.h"
#include "DNA_object_enums.h"

Go to the source code of this file.

Classes

struct  ObjectTfmProtectedChannels
 

Typedefs

typedef enum eObjectVisibilityResult eObjectVisibilityResult
 
typedef struct ObjectTfmProtectedChannels ObjectTfmProtectedChannels
 
typedef enum eObRelationTypes eObRelationTypes
 
typedef enum eObjectSet eObjectSet
 

Enumerations

enum  eObjectVisibilityResult { OB_VISIBLE_SELF = 1 , OB_VISIBLE_PARTICLES = 2 , OB_VISIBLE_INSTANCES = 4 , OB_VISIBLE_ALL = (OB_VISIBLE_SELF | OB_VISIBLE_PARTICLES | OB_VISIBLE_INSTANCES) }
 
enum  eObRelationTypes {
  OB_REL_NONE = 0 , OB_REL_PARENT = (1 << 0) , OB_REL_PARENT_RECURSIVE = (1 << 1) , OB_REL_CHILDREN = (1 << 2) ,
  OB_REL_CHILDREN_RECURSIVE = (1 << 3) , OB_REL_MOD_ARMATURE = (1 << 4)
}
 
enum  eObjectSet { OB_SET_SELECTED , OB_SET_VISIBLE , OB_SET_ALL }
 

Functions

void BKE_object_workob_clear (struct Object *workob)
 
void BKE_object_workob_calc_parent (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct Object *workob)
 
void BKE_object_transform_copy (struct Object *ob_tar, const struct Object *ob_src)
 
void BKE_object_copy_softbody (struct Object *ob_dst, const struct Object *ob_src, const int flag)
 
struct ParticleSystemBKE_object_copy_particlesystem (struct ParticleSystem *psys, const int flag)
 
void BKE_object_copy_particlesystems (struct Object *ob_dst, const struct Object *ob_src, const int flag)
 
void BKE_object_free_particlesystems (struct Object *ob)
 
void BKE_object_free_softbody (struct Object *ob)
 
void BKE_object_free_curve_cache (struct Object *ob)
 
void BKE_object_free_derived_caches (struct Object *ob)
 
void BKE_object_free_caches (struct Object *object)
 
void BKE_object_preview_geometry_set_add (struct Object *ob, const uint64_t key, struct GeometrySet *geometry_set)
 
void BKE_object_modifier_hook_reset (struct Object *ob, struct HookModifierData *hmd)
 
void BKE_object_modifier_gpencil_hook_reset (struct Object *ob, struct HookGpencilModifierData *hmd)
 
bool BKE_object_modifier_gpencil_use_time (struct Object *ob, struct GpencilModifierData *md)
 
bool BKE_object_shaderfx_use_time (struct Object *ob, struct ShaderFxData *md)
 
bool BKE_object_supports_modifiers (const struct Object *ob)
 
bool BKE_object_support_modifier_type_check (const struct Object *ob, int modifier_type)
 
void BKE_object_modifier_set_active (struct Object *ob, struct ModifierData *md)
 
struct ModifierDataBKE_object_active_modifier (const struct Object *ob)
 
bool BKE_object_copy_modifier (struct Main *bmain, struct Scene *scene, struct Object *ob_dst, const struct Object *ob_src, struct ModifierData *md)
 
bool BKE_object_copy_gpencil_modifier (struct Object *ob_dst, struct GpencilModifierData *md)
 
bool BKE_object_modifier_stack_copy (struct Object *ob_dst, const struct Object *ob_src, const bool do_copy_all, const int flag_subdata)
 
void BKE_object_link_modifiers (struct Object *ob_dst, const struct Object *ob_src)
 
void BKE_object_free_modifiers (struct Object *ob, const int flag)
 
void BKE_object_free_shaderfx (struct Object *ob, const int flag)
 
void BKE_object_make_proxy (struct Main *bmain, struct Object *ob, struct Object *target, struct Object *cob)
 
void BKE_object_copy_proxy_drivers (struct Object *ob, struct Object *target)
 
bool BKE_object_exists_check (struct Main *bmain, const struct Object *obtest)
 
bool BKE_object_is_in_editmode (const struct Object *ob)
 
bool BKE_object_is_in_editmode_vgroup (const struct Object *ob)
 
bool BKE_object_is_in_wpaint_select_vert (const struct Object *ob)
 
bool BKE_object_has_mode_data (const struct Object *ob, eObjectMode object_mode)
 
bool BKE_object_is_mode_compat (const struct Object *ob, eObjectMode object_mode)
 
bool BKE_object_data_is_in_editmode (const struct ID *id)
 
char * BKE_object_data_editmode_flush_ptr_get (struct ID *id)
 
void BKE_object_update_select_id (struct Main *bmain)
 
int BKE_object_visibility (const struct Object *ob, const int dag_eval_mode)
 
struct ObjectBKE_object_add_only_object (struct Main *bmain, int type, const char *name) ATTR_NONNULL(1) ATTR_RETURNS_NONNULL
 
struct ObjectBKE_object_add (struct Main *bmain, struct ViewLayer *view_layer, int type, const char *name) ATTR_NONNULL(1
 
struct ObjectBKE_object_add_from (struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, int type, const char *name, struct Object *ob_src) ATTR_NONNULL(1
 
struct ObjectBKE_object_add_for_data (struct Main *bmain, struct ViewLayer *view_layer, int type, const char *name, struct ID *data, bool do_id_user) ATTR_RETURNS_NONNULL
 
void * BKE_object_obdata_add_from_type (struct Main *bmain, int type, const char *name) ATTR_NONNULL(1)
 
int BKE_object_obdata_to_type (const struct ID *id) ATTR_NONNULL(1)
 
bool BKE_object_is_libdata (const struct Object *ob)
 
bool BKE_object_obdata_is_libdata (const struct Object *ob)
 
struct ObjectBKE_object_duplicate (struct Main *bmain, struct Object *ob, uint dupflag, const uint duplicate_options)
 
void BKE_object_obdata_size_init (struct Object *ob, const float size)
 
void BKE_object_scale_to_mat3 (struct Object *ob, float r_mat[3][3])
 
void BKE_object_rot_to_mat3 (const struct Object *ob, float r_mat[3][3], bool use_drot)
 
void BKE_object_mat3_to_rot (struct Object *ob, float r_mat[3][3], bool use_compat)
 
void BKE_object_to_mat3 (struct Object *ob, float r_mat[3][3])
 
void BKE_object_to_mat4 (struct Object *ob, float r_mat[4][4])
 
void BKE_object_apply_mat4 (struct Object *ob, const float mat[4][4], const bool use_compat, const bool use_parent)
 
void BKE_object_apply_mat4_ex (struct Object *ob, const float mat[4][4], struct Object *parent, const float parentinv[4][4], const bool use_compat)
 
void BKE_object_matrix_local_get (struct Object *ob, float r_mat[4][4])
 
bool BKE_object_pose_context_check (const struct Object *ob)
 
struct ObjectBKE_object_pose_armature_get (struct Object *ob)
 
struct ObjectBKE_object_pose_armature_get_visible (struct Object *ob, struct ViewLayer *view_layer, struct View3D *v3d)
 
struct Object ** BKE_object_pose_array_get_ex (struct ViewLayer *view_layer, struct View3D *v3d, unsigned int *r_objects_len, bool unique)
 
struct Object ** BKE_object_pose_array_get_unique (struct ViewLayer *view_layer, struct View3D *v3d, unsigned int *r_objects_len)
 
struct Object ** BKE_object_pose_array_get (struct ViewLayer *view_layer, struct View3D *v3d, unsigned int *r_objects_len)
 
struct Base ** BKE_object_pose_base_array_get_ex (struct ViewLayer *view_layer, struct View3D *v3d, unsigned int *r_bases_len, bool unique)
 
struct Base ** BKE_object_pose_base_array_get_unique (struct ViewLayer *view_layer, struct View3D *v3d, unsigned int *r_bases_len)
 
struct Base ** BKE_object_pose_base_array_get (struct ViewLayer *view_layer, struct View3D *v3d, unsigned int *r_bases_len)
 
void BKE_object_get_parent_matrix (struct Object *ob, struct Object *par, float r_parentmat[4][4])
 
void BKE_object_where_is_calc (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
 
void BKE_object_where_is_calc_ex (struct Depsgraph *depsgraph, struct Scene *scene, struct RigidBodyWorld *rbw, struct Object *ob, float r_originmat[3][3])
 
void BKE_object_where_is_calc_time (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, float ctime)
 
void BKE_object_where_is_calc_mat4 (struct Object *ob, float r_obmat[4][4])
 
struct BoundBoxBKE_boundbox_alloc_unit (void)
 
void BKE_boundbox_init_from_minmax (struct BoundBox *bb, const float min[3], const float max[3])
 
void BKE_boundbox_calc_center_aabb (const struct BoundBox *bb, float r_cent[3])
 
void BKE_boundbox_calc_size_aabb (const struct BoundBox *bb, float r_size[3])
 
void BKE_boundbox_minmax (const struct BoundBox *bb, const float obmat[4][4], float r_min[3], float r_max[3])
 
struct BoundBoxBKE_object_boundbox_get (struct Object *ob)
 
void BKE_object_dimensions_get (struct Object *ob, float r_vec[3])
 
void BKE_object_dimensions_set_ex (struct Object *ob, const float value[3], int axis_mask, const float ob_scale_orig[3], const float ob_obmat_orig[4][4])
 
void BKE_object_dimensions_set (struct Object *ob, const float value[3], int axis_mask)
 
void BKE_object_empty_draw_type_set (struct Object *ob, const int value)
 
void BKE_object_boundbox_flag (struct Object *ob, int flag, const bool set)
 
void BKE_object_boundbox_calc_from_mesh (struct Object *ob, struct Mesh *me_eval)
 
void BKE_object_minmax (struct Object *ob, float r_min[3], float r_max[3], const bool use_hidden)
 
bool BKE_object_minmax_dupli (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, float r_min[3], float r_max[3], const bool use_hidden)
 
void BKE_object_foreach_display_point (struct Object *ob, const float obmat[4][4], void(*func_cb)(const float[3], void *), void *user_data)
 
void BKE_scene_foreach_display_point (struct Depsgraph *depsgraph, void(*func_cb)(const float[3], void *), void *user_data)
 
bool BKE_object_parent_loop_check (const struct Object *parent, const struct Object *ob)
 
void * BKE_object_tfm_backup (struct Object *ob)
 
void BKE_object_tfm_restore (struct Object *ob, void *obtfm_pt)
 
void BKE_object_tfm_protected_backup (const struct Object *ob, ObjectTfmProtectedChannels *obtfm)
 
void BKE_object_tfm_protected_restore (struct Object *ob, const ObjectTfmProtectedChannels *obtfm, const short protectflag)
 
void BKE_object_tfm_copy (struct Object *object_dst, const struct Object *object_src)
 
void BKE_object_eval_reset (struct Object *ob_eval)
 
void BKE_object_eval_local_transform (struct Depsgraph *depsgraph, struct Object *ob)
 
void BKE_object_eval_parent (struct Depsgraph *depsgraph, struct Object *ob)
 
void BKE_object_eval_constraints (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
 
void BKE_object_eval_transform_final (struct Depsgraph *depsgraph, struct Object *ob)
 
bool BKE_object_eval_proxy_copy (struct Depsgraph *depsgraph, struct Object *object)
 
void BKE_object_eval_uber_transform (struct Depsgraph *depsgraph, struct Object *ob)
 
void BKE_object_eval_uber_data (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
 
void BKE_object_eval_assign_data (struct Object *object, struct ID *data, bool is_owned)
 
void BKE_object_sync_to_original (struct Depsgraph *depsgraph, struct Object *object)
 
void BKE_object_eval_ptcache_reset (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *object)
 
void BKE_object_eval_transform_all (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *object)
 
void BKE_object_data_select_update (struct Depsgraph *depsgraph, struct ID *object_data)
 
void BKE_object_select_update (struct Depsgraph *depsgraph, struct Object *object)
 
void BKE_object_eval_eval_base_flags (struct Depsgraph *depsgraph, struct Scene *scene, const int view_layer_index, struct Object *object, int base_index, const bool is_from_set)
 
void BKE_object_handle_data_update (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
 
void BKE_object_handle_update (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
 
void BKE_object_handle_update_ex (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct RigidBodyWorld *rbw, const bool do_proxy_update)
 
void BKE_object_sculpt_data_create (struct Object *ob)
 
bool BKE_object_obdata_texspace_get (struct Object *ob, short **r_texflag, float **r_loc, float **r_size)
 
struct MeshBKE_object_get_evaluated_mesh (struct Object *object)
 
struct MeshBKE_object_get_pre_modified_mesh (struct Object *object)
 
struct MeshBKE_object_get_original_mesh (struct Object *object)
 
struct LatticeBKE_object_get_lattice (const struct Object *object)
 
struct LatticeBKE_object_get_evaluated_lattice (const struct Object *object)
 
int BKE_object_insert_ptcache (struct Object *ob)
 
void BKE_object_delete_ptcache (struct Object *ob, int index)
 
struct KeyBlockBKE_object_shapekey_insert (struct Main *bmain, struct Object *ob, const char *name, const bool from_mix)
 
bool BKE_object_shapekey_remove (struct Main *bmain, struct Object *ob, struct KeyBlock *kb)
 
bool BKE_object_shapekey_free (struct Main *bmain, struct Object *ob)
 
bool BKE_object_flag_test_recursive (const struct Object *ob, short flag)
 
bool BKE_object_is_child_recursive (const struct Object *ob_parent, const struct Object *ob_child)
 
int BKE_object_is_modified (struct Scene *scene, struct Object *ob)
 
int BKE_object_is_deform_modified (struct Scene *scene, struct Object *ob)
 
bool BKE_object_moves_in_time (const struct Object *object, bool recurse_parent)
 
int BKE_object_scenes_users_get (struct Main *bmain, struct Object *ob)
 
struct MovieClipBKE_object_movieclip_get (struct Scene *scene, struct Object *ob, bool use_default)
 
void BKE_object_runtime_reset (struct Object *object)
 
void BKE_object_runtime_reset_on_copy (struct Object *object, const int flag)
 
void BKE_object_batch_cache_dirty_tag (struct Object *ob)
 
struct LinkNodeBKE_object_relational_superset (struct ViewLayer *view_layer, eObjectSet objectSet, eObRelationTypes includeFilter)
 
struct LinkNodeBKE_object_groups (struct Main *bmain, struct Scene *scene, struct Object *ob)
 
void BKE_object_groups_clear (struct Main *bmain, struct Scene *scene, struct Object *object)
 
struct KDTree_3d * BKE_object_as_kdtree (struct Object *ob, int *r_tot)
 
bool BKE_object_modifier_use_time (struct Object *ob, struct ModifierData *md)
 
bool BKE_object_modifier_update_subframe (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, bool update_mesh, int parent_recursion, float frame, int type)
 
bool BKE_object_empty_image_frame_is_visible_in_view3d (const struct Object *ob, const struct RegionView3D *rv3d)
 
bool BKE_object_empty_image_data_is_visible_in_view3d (const struct Object *ob, const struct RegionView3D *rv3d)
 
struct MeshBKE_object_to_mesh (struct Depsgraph *depsgraph, struct Object *object, bool preserve_all_data_layers)
 
void BKE_object_to_mesh_clear (struct Object *object)
 
struct CurveBKE_object_to_curve (struct Object *object, struct Depsgraph *depsgraph, bool apply_modifiers)
 
void BKE_object_to_curve_clear (struct Object *object)
 
void BKE_object_check_uuids_unique_and_report (const struct Object *object)
 
void BKE_object_modifiers_lib_link_common (void *userData, struct Object *ob, struct ID **idpoin, int cb_flag)
 
struct PartEffBKE_object_do_version_give_parteff_245 (struct Object *ob)
 

Variables

struct Object ATTR_RETURNS_NONNULL
 

Detailed Description

General operations, lookup, etc. for blender objects.

Definition in file BKE_object.h.

Typedef Documentation

◆ eObjectSet

typedef enum eObjectSet eObjectSet

◆ eObjectVisibilityResult

◆ eObRelationTypes

◆ ObjectTfmProtectedChannels

Enumeration Type Documentation

◆ eObjectSet

enum eObjectSet
Enumerator
OB_SET_SELECTED 
OB_SET_VISIBLE 
OB_SET_ALL 

Definition at line 393 of file BKE_object.h.

◆ eObjectVisibilityResult

Enumerator
OB_VISIBLE_SELF 
OB_VISIBLE_PARTICLES 
OB_VISIBLE_INSTANCES 
OB_VISIBLE_ALL 

Definition at line 124 of file BKE_object.h.

◆ eObRelationTypes

Enumerator
OB_REL_NONE 
OB_REL_PARENT 
OB_REL_PARENT_RECURSIVE 
OB_REL_CHILDREN 
OB_REL_CHILDREN_RECURSIVE 
OB_REL_MOD_ARMATURE 

Definition at line 382 of file BKE_object.h.

Function Documentation

◆ BKE_boundbox_alloc_unit()

struct BoundBox* BKE_boundbox_alloc_unit ( void  )

Definition at line 3768 of file object.c.

References BKE_boundbox_init_from_minmax(), max, MEM_callocN, and min.

◆ BKE_boundbox_calc_center_aabb()

void BKE_boundbox_calc_center_aabb ( const struct BoundBox bb,
float  r_cent[3] 
)

◆ BKE_boundbox_calc_size_aabb()

void BKE_boundbox_calc_size_aabb ( const struct BoundBox bb,
float  r_size[3] 
)

◆ BKE_boundbox_init_from_minmax()

void BKE_boundbox_init_from_minmax ( struct BoundBox bb,
const float  min[3],
const float  max[3] 
)

◆ BKE_boundbox_minmax()

void BKE_boundbox_minmax ( const struct BoundBox bb,
const float  obmat[4][4],
float  r_min[3],
float  r_max[3] 
)

Referenced by BKE_pose_minmax().

◆ BKE_object_active_modifier()

struct ModifierData* BKE_object_active_modifier ( const struct Object ob)

◆ BKE_object_add()

struct Object* BKE_object_add ( struct Main bmain,
struct ViewLayer view_layer,
int  type,
const char *  name 
)

◆ BKE_object_add_for_data()

struct Object* BKE_object_add_for_data ( Main bmain,
ViewLayer view_layer,
int  type,
const char *  name,
ID data,
bool  do_id_user 
)

Add a new object, but assign the given datablock as the ob->data for the newly created object.

Parameters
dataThe datablock to assign as ob->data for the new object. This is assumed to be of the correct type.
do_id_userIf true, id_us_plus() will be called on data when assigning it to the object.

Definition at line 2269 of file object.c.

References BKE_collection_object_add(), BKE_layer_collection_get_active(), BKE_object_add_only_object(), BKE_view_layer_base_deselect_all(), BKE_view_layer_base_find(), BKE_view_layer_base_select_and_set_active(), LayerCollection::collection, data, Object::data, DEG_id_tag_update_ex(), Object::id, ID_RECALC_ANIMATION, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, id_us_plus(), and type.

Referenced by ED_object_add_type_with_obdata(), and gpencil_convert_old_files_exec().

◆ BKE_object_add_from()

struct Object* BKE_object_add_from ( struct Main bmain,
struct Scene scene,
struct ViewLayer view_layer,
int  type,
const char *  name,
struct Object ob_src 
)

Referenced by make_proxy_exec().

◆ BKE_object_add_only_object()

struct Object* BKE_object_add_only_object ( Main bmain,
int  type,
const char *  name 
)

◆ BKE_object_apply_mat4()

void BKE_object_apply_mat4 ( Object ob,
const float  mat[4][4],
const bool  use_compat,
const bool  use_parent 
)

◆ BKE_object_apply_mat4_ex()

void BKE_object_apply_mat4_ex ( Object ob,
const float  mat[4][4],
Object parent,
const float  parentinv[4][4],
const bool  use_compat 
)

Applies the global transformation mat to the ob using a relative parent space if supplied.

Parameters
matthe global transformation mat that the object should be set object to.
parentthe parent space in which this object will be set relative to (should probably always be parent_eval).
use_compattrue to ensure that rotations are set using the min difference between the old and new orientation.

Definition at line 3708 of file object.c.

References BKE_object_get_parent_matrix(), BKE_object_mat3_to_rot(), Object::dloc, Object::dscale, invert_m4_m4(), Object::loc, mat4_to_loc_rot_size(), mul_m4_m4m4(), NULL, rot, Object::scale, and sub_v3_v3().

Referenced by BKE_object_apply_mat4(), ED_mesh_join_objects_exec(), and ED_view3d_to_object().

◆ BKE_object_as_kdtree()

struct KDTree_3d* BKE_object_as_kdtree ( Object ob,
int *  r_tot 
)

Return a KDTree_3d from the deformed object (in worldspace)

Note
Only mesh objects currently support deforming, others are TODO.
Parameters
ob
r_tot
Returns
The kdtree or NULL if it can't be created.

Definition at line 5280 of file object.c.

References Freestyle::a, Nurb::bezt, BKE_nurbList_verts_count_without_handles(), Nurb::bp, CD_ORIGINDEX, MVert::co, CustomData_get_layer(), Object::data, Lattice::def, ListBase::first, Object_Runtime::mesh_deform_eval, mul_v3_m4v3(), Mesh::mvert, Nurb::next, NULL, Curve::nurb, OB_CURVE, OB_LATTICE, OB_MESH, OB_SURF, Object::obmat, ORIGINDEX_NONE, Nurb::pntsu, Lattice::pntsu, Nurb::pntsv, Lattice::pntsv, Lattice::pntsw, Object::runtime, Mesh::totvert, tree, Object::type, BezTriple::vec, and BPoint::vec.

Referenced by parent_set_vertex_parent().

◆ BKE_object_batch_cache_dirty_tag()

void BKE_object_batch_cache_dirty_tag ( struct Object ob)

◆ BKE_object_boundbox_calc_from_mesh()

void BKE_object_boundbox_calc_from_mesh ( struct Object ob,
struct Mesh me_eval 
)

◆ BKE_object_boundbox_flag()

void BKE_object_boundbox_flag ( Object ob,
int  flag,
const bool  set 
)

Use this to temporally disable/enable bound-box.

Definition at line 3860 of file object.c.

References BKE_object_boundbox_get(), Lattice::flag, and BoundBox::flag.

◆ BKE_object_boundbox_get()

struct BoundBox* BKE_object_boundbox_get ( struct Object ob)

◆ BKE_object_check_uuids_unique_and_report()

void BKE_object_check_uuids_unique_and_report ( const struct Object object)

◆ BKE_object_copy_gpencil_modifier()

bool BKE_object_copy_gpencil_modifier ( struct Object ob_dst,
GpencilModifierData gmd_src 
)

◆ BKE_object_copy_modifier()

bool BKE_object_copy_modifier ( struct Main bmain,
struct Scene scene,
struct Object ob_dst,
const struct Object ob_src,
struct ModifierData md 
)

◆ BKE_object_copy_particlesystem()

struct ParticleSystem* BKE_object_copy_particlesystem ( struct ParticleSystem psys,
const int  flag 
)

◆ BKE_object_copy_particlesystems()

void BKE_object_copy_particlesystems ( struct Object ob_dst,
const struct Object ob_src,
const int  flag 
)

◆ BKE_object_copy_proxy_drivers()

void BKE_object_copy_proxy_drivers ( struct Object ob,
struct Object target 
)

◆ BKE_object_copy_softbody()

void BKE_object_copy_softbody ( struct Object ob_dst,
const struct Object ob_src,
const int  flag 
)

◆ BKE_object_data_editmode_flush_ptr_get()

char* BKE_object_data_editmode_flush_ptr_get ( struct ID id)

◆ BKE_object_data_is_in_editmode()

bool BKE_object_data_is_in_editmode ( const struct ID id)

◆ BKE_object_data_select_update()

void BKE_object_data_select_update ( struct Depsgraph depsgraph,
struct ID object_data 
)

◆ BKE_object_delete_ptcache()

void BKE_object_delete_ptcache ( struct Object ob,
int  index 
)

Definition at line 4598 of file object.c.

References BLI_findlink(), BLI_freelinkN(), pc_findindex(), and Object::pc_ids.

Referenced by BKE_ptcache_toggle_disk_cache().

◆ BKE_object_dimensions_get()

void BKE_object_dimensions_get ( struct Object ob,
float  r_vec[3] 
)

◆ BKE_object_dimensions_set()

void BKE_object_dimensions_set ( struct Object ob,
const float  value[3],
int  axis_mask 
)

Definition at line 3959 of file object.c.

References BKE_object_dimensions_set_ex(), and NULL.

◆ BKE_object_dimensions_set_ex()

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] 
)

The original scale and object matrix can be passed in so any difference of the objects matrix and the final matrix can be accounted for, typically this caused by parenting, constraints or delta-scale.

Re-using these values from the object causes a feedback loop when multiple values are modified at once in some situations. see: T69536.

Definition at line 3926 of file object.c.

References BKE_object_boundbox_get(), copysignf, CCL_NAMESPACE_BEGIN::isfinite(), len, len_v3(), NULL, Object::scale, and BoundBox::vec.

Referenced by BKE_object_dimensions_set(), and v3d_object_dimension_buts().

◆ BKE_object_do_version_give_parteff_245()

struct PartEff* BKE_object_do_version_give_parteff_245 ( struct Object ob)

Definition at line 1024 of file object.c.

References EFF_PARTICLE, PartEff::next, NULL, and PartEff::type.

Referenced by blo_do_versions_pre250(), and object_blend_read_expand().

◆ BKE_object_duplicate()

struct Object* BKE_object_duplicate ( struct Main bmain,
struct Object ob,
uint  dupflag,
const uint  duplicate_options 
)

◆ BKE_object_empty_draw_type_set()

void BKE_object_empty_draw_type_set ( struct Object ob,
const int  value 
)

◆ BKE_object_empty_image_data_is_visible_in_view3d()

bool BKE_object_empty_image_data_is_visible_in_view3d ( const struct Object ob,
const struct RegionView3D rv3d 
)

◆ BKE_object_empty_image_frame_is_visible_in_view3d()

bool BKE_object_empty_image_frame_is_visible_in_view3d ( const struct Object ob,
const struct RegionView3D rv3d 
)

◆ BKE_object_eval_assign_data()

void BKE_object_eval_assign_data ( Object object_eval,
ID data_eval,
bool  is_owned 
)

◆ BKE_object_eval_constraints()

void BKE_object_eval_constraints ( struct Depsgraph depsgraph,
struct Scene scene,
struct Object ob 
)

◆ BKE_object_eval_eval_base_flags()

void BKE_object_eval_eval_base_flags ( struct Depsgraph depsgraph,
struct Scene scene,
const int  view_layer_index,
struct Object object,
int  base_index,
const bool  is_from_set 
)

◆ BKE_object_eval_local_transform()

void BKE_object_eval_local_transform ( struct Depsgraph depsgraph,
struct Object ob 
)

◆ BKE_object_eval_parent()

void BKE_object_eval_parent ( struct Depsgraph depsgraph,
struct Object ob 
)

◆ BKE_object_eval_proxy_copy()

bool BKE_object_eval_proxy_copy ( struct Depsgraph depsgraph,
struct Object object 
)

◆ BKE_object_eval_ptcache_reset()

void BKE_object_eval_ptcache_reset ( struct Depsgraph depsgraph,
struct Scene scene,
struct Object object 
)

◆ BKE_object_eval_reset()

void BKE_object_eval_reset ( Object ob_eval)

Restore the object->data to a non-modifier evaluated state.

Some changes done directly in evaluated object require them to be reset before being re-evaluated. For example, we need to call this before BKE_mesh_new_from_object(), in case we removed/added modifiers in the evaluated object.

Definition at line 78 of file object_update.c.

References BKE_object_free_derived_caches().

Referenced by bake(), and object_force_modifier_update_for_bind().

◆ BKE_object_eval_transform_all()

void BKE_object_eval_transform_all ( struct Depsgraph depsgraph,
struct Scene scene,
struct Object object 
)

◆ BKE_object_eval_transform_final()

void BKE_object_eval_transform_final ( struct Depsgraph depsgraph,
struct Object ob 
)

◆ BKE_object_eval_uber_data()

void BKE_object_eval_uber_data ( struct Depsgraph depsgraph,
struct Scene scene,
struct Object ob 
)

◆ BKE_object_eval_uber_transform()

void BKE_object_eval_uber_transform ( struct Depsgraph depsgraph,
struct Object ob 
)

Definition at line 347 of file object_update.c.

References BKE_object_eval_proxy_copy(), and depsgraph.

Referenced by BKE_object_eval_transform_all().

◆ BKE_object_exists_check()

bool BKE_object_exists_check ( struct Main bmain,
const struct Object obtest 
)

Referenced by test_constraint().

◆ BKE_object_flag_test_recursive()

bool BKE_object_flag_test_recursive ( const struct Object ob,
short  flag 
)

◆ BKE_object_foreach_display_point()

void BKE_object_foreach_display_point ( struct Object ob,
const float  obmat[4][4],
void(*)(const float[3], void *)  func_cb,
void *  user_data 
)

◆ BKE_object_free_caches()

void BKE_object_free_caches ( struct Object object)

◆ BKE_object_free_curve_cache()

void BKE_object_free_curve_cache ( struct Object ob)

◆ BKE_object_free_derived_caches()

void BKE_object_free_derived_caches ( Object ob)

◆ BKE_object_free_modifiers()

void BKE_object_free_modifiers ( struct Object ob,
const int  flag 
)

◆ BKE_object_free_particlesystems()

void BKE_object_free_particlesystems ( struct Object ob)

◆ BKE_object_free_shaderfx()

void BKE_object_free_shaderfx ( struct Object ob,
const int  flag 
)

Definition at line 1222 of file object.c.

References BKE_shaderfx_free_ex(), BLI_pophead(), and Object::shader_fx.

Referenced by object_convert_exec(), and object_free_data().

◆ BKE_object_free_softbody()

void BKE_object_free_softbody ( struct Object ob)

Definition at line 1181 of file object.c.

References sbFree().

Referenced by BKE_object_free_modifiers().

◆ BKE_object_get_evaluated_lattice()

struct Lattice* BKE_object_get_evaluated_lattice ( const struct Object object)

◆ BKE_object_get_evaluated_mesh()

struct Mesh* BKE_object_get_evaluated_mesh ( Object object)

Get evaluated mesh for given object.

Definition at line 4459 of file object.c.

References GS, ID_ME, ID::name, and NULL.

Referenced by BKE_effectors_create(), BKE_gpencil_convert_mesh(), BKE_modifier_get_evaluated_mesh_from_evaluated_object(), BKE_object_foreach_display_point(), BKE_sculpt_update_object_after_eval(), BKE_sculpt_update_object_for_edit(), boundbox_displist_object(), contarget_get_mesh_mat(), DRW_batch_cache_free_old(), drw_batch_cache_generate_requested(), drw_batch_cache_validate(), DRW_cache_curve_edge_detection_get(), DRW_cache_curve_edge_wire_get(), DRW_cache_curve_face_wireframe_get(), DRW_cache_curve_loose_edges_get(), DRW_cache_curve_surface_get(), DRW_cache_curve_surface_shaded_get(), DRW_cache_object_material_count_get(), DRW_cache_object_pos_vertbuf_get(), DRW_cache_surf_edge_detection_get(), DRW_cache_surf_edge_wire_get(), DRW_cache_surf_face_wireframe_get(), DRW_cache_surf_loose_edges_get(), DRW_cache_surf_surface_get(), DRW_cache_surf_surface_shaded_get(), DRW_cache_text_edge_detection_get(), DRW_cache_text_edge_wire_get(), DRW_cache_text_face_wireframe_get(), DRW_cache_text_loose_edges_get(), DRW_cache_text_surface_get(), DRW_cache_text_surface_shaded_get(), ED_draw_object_facemap(), followtrack_project_to_depth_object_if_needed(), get_effector_data(), get_effector_tot(), blender::io::alembic::ABCCurveMeshWriter::get_export_mesh(), blender::io::alembic::ABCMetaballWriter::get_export_mesh(), blender::io::alembic::ABCMeshWriter::get_export_mesh(), blender::io::usd::USDMeshWriter::get_export_mesh(), blender::io::usd::USDMetaballWriter::get_export_mesh(), give_parvert(), knifeproject_poly_from_object(), mesh_data_from_duplicator_object(), mesh_get_eval_final(), object_update_from_subsurf_ccg(), paintvert_flush_flags(), PE_create_shape_tree(), raycast_obj_fn(), shrinkwrap_get_tarmat(), snap_obj_fn(), stats_object(), and vertex_paint_use_fast_update_check().

◆ BKE_object_get_lattice()

struct Lattice* BKE_object_get_lattice ( const struct Object object)

◆ BKE_object_get_original_mesh()

struct Mesh* BKE_object_get_original_mesh ( Object object)

Get a mesh which corresponds to very very original mesh from Main.

  • For original objects it will be object->data.
  • For evaluated objects it will be same mesh as corresponding original object uses as data.

Definition at line 4493 of file object.c.

References BLI_assert, Object::id, LIB_TAG_COPIED_ON_WRITE, LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT, NULL, ID::orig_id, result, and ID::tag.

Referenced by BKE_sculpt_color_layer_create_if_needed(), build_pbvh_from_regular_mesh(), SCULPT_geodesic_fallback_create(), SCULPT_geodesic_mesh_create(), sculpt_undo_face_sets_push(), sculpt_undo_restore_face_sets(), sculpt_update_object(), and SCULPT_visibility_sync_all_face_sets_to_vertices().

◆ BKE_object_get_parent_matrix()

void BKE_object_get_parent_matrix ( struct Object ob,
struct Object par,
float  r_parentmat[4][4] 
)

◆ BKE_object_get_pre_modified_mesh()

struct Mesh* BKE_object_get_pre_modified_mesh ( Object object)

Get mesh which is not affected by modifiers:

  • For original objects it will be same as object->data, and it is a mesh which is in the corresponding Main.
  • For copied-on-write objects it will give pointer to a copied-on-write mesh which corresponds to original object's mesh.

Definition at line 4472 of file object.c.

References BLI_assert, Object_Runtime::data_orig, Object::id, LIB_TAG_COPIED_ON_WRITE, LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT, NULL, OB_MESH, ID::orig_id, result, Object::runtime, ID::tag, and Object::type.

Referenced by MOD_deform_mesh_eval_get().

◆ BKE_object_groups()

struct LinkNode* BKE_object_groups ( Main bmain,
Scene scene,
Object ob 
)

return all groups this object is a part of, caller must free.

Definition at line 5251 of file object.c.

References BKE_collection_object_find(), BLI_linklist_prepend(), NULL, and scene.

Referenced by make_links_data_exec().

◆ BKE_object_groups_clear()

void BKE_object_groups_clear ( struct Main bmain,
struct Scene scene,
struct Object object 
)

◆ BKE_object_handle_data_update()

void BKE_object_handle_data_update ( struct Depsgraph depsgraph,
struct Scene scene,
struct Object ob 
)

Definition at line 164 of file object_update.c.

References BKE_displist_make_curveTypes(), BKE_displist_make_mball(), BKE_editmesh_from_object(), BKE_gpencil_modifiers_calc(), BKE_gpencil_prepare_eval_data(), BKE_gpencil_update_layer_transforms(), BKE_hair_data_update(), BKE_lattice_modifiers_calc(), BKE_pointcloud_data_update(), BKE_pose_copy_result(), BKE_pose_where_is(), BKE_volume_data_update(), BLI_remlink(), CD_MASK_BAREMESH, CD_MASK_FREESTYLE_EDGE, CD_MASK_FREESTYLE_FACE, CD_MASK_MDEFORMVERT, CD_MASK_MLOOPCOL, CD_MASK_MLOOPUV, CD_MASK_ORCO, CD_MASK_PROP_ALL, CD_MASK_PROP_COLOR, Scene::customdata_mask, CustomData_MeshMasks_update(), DAG_EVAL_RENDER, Object::data, DEG_debug_print_eval(), DEG_get_mode(), depsgraph, ParticleSettings::draw_as, CustomData_MeshMasks::emask, ListBase::first, ParticleSystem::flag, CustomData_MeshMasks::fmask, Object::id, ID_IS_LINKED, ParticleSettings::instance_collection, ParticleSettings::instance_object, CustomData_MeshMasks::lmask, makeDerivedMesh(), Object::mode, ID::name, ParticleSystem::next, NULL, OB_ARMATURE, OB_CURVE, OB_DUPLIPARTS, OB_FONT, OB_GPENCIL, OB_HAIR, OB_LATTICE, OB_MBALL, OB_MESH, OB_MODE_EDIT, OB_POINTCLOUD, OB_SURF, OB_VOLUME, ParticleSystem::part, PART_DRAW_GR, PART_DRAW_OB, PART_DRAW_REND, particle_system_update(), Object::particlesystem, CustomData_MeshMasks::pmask, Object::pose, Object::proxy_from, psys_check_enabled(), PSYS_DELETE, psys_free(), ParticleSettings::ren_as, scene, Object::transflag, Object::type, and CustomData_MeshMasks::vmask.

Referenced by bake(), BKE_object_eval_uber_data(), and BKE_object_handle_update_ex().

◆ BKE_object_handle_update()

void BKE_object_handle_update ( Depsgraph depsgraph,
Scene scene,
Object ob 
)
Warning
"scene" here may not be the scene object actually resides in. When dealing with background-sets, "scene" is actually the active scene. e.g. "scene" <– set 1 <– set 2 ("ob" lives here) <– set 3 <– ... <– set n rigid bodies depend on their world so use BKE_object_handle_update_ex() to also pass along the current rigid body world.

Definition at line 4401 of file object.c.

References BKE_object_handle_update_ex(), depsgraph, NULL, and scene.

Referenced by BKE_object_modifier_update_subframe(), and object_handle_update_proxy().

◆ BKE_object_handle_update_ex()

void BKE_object_handle_update_ex ( Depsgraph depsgraph,
Scene scene,
Object ob,
RigidBodyWorld rbw,
const bool  do_proxy_update 
)

Proxy rule:

  • lib_object->proxy_from == the one we borrow from, only set temporal and cleared here.
  • local_object->proxy == pointer to library object, saved in files and read.

Function below is polluted with proxy exceptions, cleanup will follow!

The main object update call, for object matrix, constraints, keys and displist (modifiers) requires flags to be set!

Ideally we shouldn't have to pass the rigid body world, but need bigger restructuring to avoid id.

Definition at line 4341 of file object.c.

References BKE_object_eval_proxy_copy(), BKE_object_handle_data_update(), BKE_object_where_is_calc_ex(), BKE_pose_channels_hash_make(), BKE_pose_rebuild(), BKE_pose_update_constraint_flags(), Object::data, depsgraph, bPose::flag, G, G_DEBUG_DEPSGRAPH_EVAL, Object::id, ID_RECALC_ALL, ID::name, NULL, OB_ARMATURE, object_handle_update_proxy(), Object::pose, POSE_CONSTRAINTS_NEED_UPDATE_FLAGS, POSE_RECALC, ID::recalc, scene, and Object::type.

Referenced by BKE_object_handle_update().

◆ BKE_object_has_mode_data()

bool BKE_object_has_mode_data ( const struct Object ob,
eObjectMode  object_mode 
)

◆ BKE_object_insert_ptcache()

int BKE_object_insert_ptcache ( struct Object ob)

◆ BKE_object_is_child_recursive()

bool BKE_object_is_child_recursive ( const struct Object ob_parent,
const struct Object ob_child 
)

◆ BKE_object_is_deform_modified()

int BKE_object_is_deform_modified ( Scene scene,
Object ob 
)

Test if object is affected by deforming modifiers (for motion blur). again most important is to avoid false positives, this is to skip computations and we can still if there was actual deformation afterwards.

Definition at line 5018 of file object.c.

References BKE_key_from_object(), BKE_modifier_get_info(), BKE_modifier_is_enabled(), BKE_modifiers_get_virtual_modifierlist(), constructive_modifier_is_deform_modified(), Object::data, DEG_get_original_object(), eModifierMode_Realtime, eModifierMode_Render, eModifierTypeType_OnlyDeform, if(), modifiers_has_animation_check(), ModifierData::next, NULL, OB_CURVE, object_deforms_in_time(), scene, Curve::taperobj, ModifierTypeInfo::type, ModifierData::type, and Object::type.

Referenced by EEVEE_motion_blur_cache_populate().

◆ BKE_object_is_in_editmode()

bool BKE_object_is_in_editmode ( const struct Object ob)

◆ BKE_object_is_in_editmode_vgroup()

bool BKE_object_is_in_editmode_vgroup ( const struct Object ob)

◆ BKE_object_is_in_wpaint_select_vert()

bool BKE_object_is_in_wpaint_select_vert ( const struct Object ob)

◆ BKE_object_is_libdata()

bool BKE_object_is_libdata ( const struct Object ob)

◆ BKE_object_is_mode_compat()

bool BKE_object_is_mode_compat ( const struct Object ob,
eObjectMode  object_mode 
)

◆ BKE_object_is_modified()

int BKE_object_is_modified ( Scene scene,
Object ob 
)

Most important if this is modified it should always return true, in certain cases false positives are hard to avoid (shape keys for example).

Definition at line 4869 of file object.c.

References BKE_key_from_object(), BKE_modifier_is_enabled(), BKE_modifiers_get_virtual_modifierlist(), DEG_get_original_object(), eModifierMode_Realtime, eModifierMode_Render, ModifierData::next, and scene.

Referenced by motion_blur_deform_data_get().

◆ BKE_object_link_modifiers()

void BKE_object_link_modifiers ( struct Object ob_dst,
const struct Object ob_src 
)

◆ BKE_object_make_proxy()

void BKE_object_make_proxy ( Main bmain,
Object ob,
Object target,
Object cob 
)

◆ BKE_object_mat3_to_rot()

void BKE_object_mat3_to_rot ( struct Object ob,
float  r_mat[3][3],
bool  use_compat 
)

◆ BKE_object_matrix_local_get()

void BKE_object_matrix_local_get ( struct Object ob,
float  r_mat[4][4] 
)

◆ BKE_object_minmax()

void BKE_object_minmax ( struct Object ob,
float  r_min[3],
float  r_max[3],
const bool  use_hidden 
)

◆ BKE_object_minmax_dupli()

bool BKE_object_minmax_dupli ( struct Depsgraph depsgraph,
struct Scene scene,
struct Object ob,
float  r_min[3],
float  r_max[3],
const bool  use_hidden 
)

◆ BKE_object_modifier_gpencil_hook_reset()

void BKE_object_modifier_gpencil_hook_reset ( struct Object ob,
struct HookGpencilModifierData hmd 
)

◆ BKE_object_modifier_gpencil_use_time()

bool BKE_object_modifier_gpencil_use_time ( struct Object ob,
struct GpencilModifierData md 
)

◆ BKE_object_modifier_hook_reset()

void BKE_object_modifier_hook_reset ( struct Object ob,
struct HookModifierData hmd 
)

◆ BKE_object_modifier_set_active()

void BKE_object_modifier_set_active ( Object ob,
ModifierData md 
)

◆ BKE_object_modifier_stack_copy()

bool BKE_object_modifier_stack_copy ( struct Object ob_dst,
const struct Object ob_src,
const bool  do_copy_all,
const int  flag_subdata 
)

◆ BKE_object_modifier_update_subframe()

bool BKE_object_modifier_update_subframe ( Depsgraph depsgraph,
Scene scene,
Object ob,
bool  update_mesh,
int  parent_recursion,
float  frame,
int  type 
)

◆ BKE_object_modifier_use_time()

bool BKE_object_modifier_use_time ( struct Object ob,
struct ModifierData md 
)

◆ BKE_object_modifiers_lib_link_common()

void BKE_object_modifiers_lib_link_common ( void *  userData,
struct Object ob,
struct ID **  idpoin,
int  cb_flag 
)

◆ BKE_object_moves_in_time()

bool BKE_object_moves_in_time ( const struct Object object,
bool  recurse_parent 
)

◆ BKE_object_movieclip_get()

struct MovieClip* BKE_object_movieclip_get ( struct Scene scene,
struct Object ob,
bool  use_default 
)

◆ BKE_object_obdata_add_from_type()

void* BKE_object_obdata_add_from_type ( struct Main bmain,
int  type,
const char *  name 
)

◆ BKE_object_obdata_is_libdata()

bool BKE_object_obdata_is_libdata ( const struct Object ob)

◆ BKE_object_obdata_size_init()

void BKE_object_obdata_size_init ( struct Object ob,
const float  size 
)

◆ BKE_object_obdata_texspace_get()

bool BKE_object_obdata_texspace_get ( struct Object ob,
short **  r_texflag,
float **  r_loc,
float **  r_size 
)

◆ BKE_object_obdata_to_type()

int BKE_object_obdata_to_type ( const struct ID id)

◆ BKE_object_parent_loop_check()

bool BKE_object_parent_loop_check ( const struct Object parent,
const struct Object ob 
)

◆ BKE_object_pose_armature_get()

struct Object* BKE_object_pose_armature_get ( struct Object ob)

Definition at line 2487 of file object.c.

References BKE_modifiers_is_deformed_by_armature(), BKE_object_pose_context_check(), and NULL.

Referenced by apply_armature_pose2bones_exec(), armature_layers_get_data(), BKE_object_defgroup_selected_get(), BKE_object_pose_armature_get_visible(), BKE_object_pose_array_get_ex(), BKE_object_pose_base_array_get_ex(), draw_selected_name(), drw_context_state_init(), dt_layers_select_src_itemf(), ED_object_vgroup_selection_itemf_helper(), ED_operator_posemode(), ED_operator_posemode_exclusive(), ED_operator_posemode_local(), ED_pose_object_from_context(), ED_vgroup_sync_from_pose(), ED_view3d_select_filter_from_mode(), get_poselib_object(), is_cursor_visible(), outliner_viewcontext_init(), pose_calculate_paths_exec(), pose_calculate_paths_invoke(), pose_clear_paths_exec(), pose_constraint_add_exec(), pose_copy_exec(), pose_ik_add_invoke(), pose_paste_exec(), pose_select_grouped_exec(), pose_select_hierarchy_exec(), pose_select_parent_exec(), pose_select_same_group(), pose_select_same_keyingset(), pose_update_paths_exec(), pose_update_paths_range_exec(), poseAnim_object_get(), poselib_rename_exec(), screen_ctx_active_pose_bone(), screen_ctx_pose_object(), screen_ctx_selected_pose_bones(), screen_ctx_selected_pose_bones_from_active_object(), screen_ctx_visible_pose_bones(), toggle_xray_exec(), tree_element_posechannel_activate(), view3d_orbit_calc_center(), view3d_select_exec(), WIDGETGROUP_armature_spline_poll(), WIDGETGROUP_armature_spline_refresh(), and WIDGETGROUP_armature_spline_setup().

◆ BKE_object_pose_armature_get_visible()

struct Object* BKE_object_pose_armature_get_visible ( struct Object ob,
struct ViewLayer view_layer,
struct View3D v3d 
)

◆ BKE_object_pose_array_get()

struct Object** BKE_object_pose_array_get ( struct ViewLayer view_layer,
struct View3D v3d,
unsigned int *  r_objects_len 
)

◆ BKE_object_pose_array_get_ex()

struct Object** BKE_object_pose_array_get_ex ( ViewLayer view_layer,
View3D v3d,
uint r_objects_len,
bool  unique 
)

Access pose array with special check to get pose object when in weight paint mode.

Definition at line 2524 of file object.c.

References BKE_object_pose_armature_get(), BKE_view_layer_array_from_objects_in_mode, MEM_mallocN, NULL, OB_MODE_POSE, and OBACT.

Referenced by BKE_object_pose_array_get(), and BKE_object_pose_array_get_unique().

◆ BKE_object_pose_array_get_unique()

struct Object** BKE_object_pose_array_get_unique ( struct ViewLayer view_layer,
struct View3D v3d,
unsigned int *  r_objects_len 
)

◆ BKE_object_pose_base_array_get()

struct Base** BKE_object_pose_base_array_get ( struct ViewLayer view_layer,
struct View3D v3d,
unsigned int *  r_bases_len 
)

Definition at line 2604 of file object.c.

References BKE_object_pose_base_array_get_ex().

Referenced by ed_armature_pick_bone_impl().

◆ BKE_object_pose_base_array_get_ex()

struct Base** BKE_object_pose_base_array_get_ex ( struct ViewLayer view_layer,
struct View3D v3d,
unsigned int *  r_bases_len,
bool  unique 
)

◆ BKE_object_pose_base_array_get_unique()

struct Base** BKE_object_pose_base_array_get_unique ( struct ViewLayer view_layer,
struct View3D v3d,
unsigned int *  r_bases_len 
)

Definition at line 2600 of file object.c.

References BKE_object_pose_base_array_get_ex().

Referenced by ED_pose_deselect_all_multi().

◆ BKE_object_pose_context_check()

bool BKE_object_pose_context_check ( const struct Object ob)

◆ BKE_object_preview_geometry_set_add()

void BKE_object_preview_geometry_set_add ( struct Object ob,
const uint64_t  key,
struct GeometrySet geometry_set 
)

◆ BKE_object_relational_superset()

struct LinkNode* BKE_object_relational_superset ( struct ViewLayer view_layer,
eObjectSet  objectSet,
eObRelationTypes  includeFilter 
)

Iterates over all objects of the given scene layer. Depending on the eObjectSet flag: collect either OB_SET_ALL, OB_SET_VISIBLE or OB_SET_SELECTED objects. If OB_SET_VISIBLE or::OB_SET_SELECTED are collected, then also add related objects according to the given includeFilter.

Definition at line 5167 of file object.c.

References BASE_EDITABLE, BASE_SELECTED_EDITABLE, BKE_object_is_child_recursive(), ListBase::first, Object::id, LIB_TAG_DOIT, Base::next, NULL, OB_REL_CHILDREN, OB_REL_CHILDREN_RECURSIVE, OB_REL_MOD_ARMATURE, OB_REL_PARENT, OB_REL_PARENT_RECURSIVE, OB_SET_ALL, OB_SET_SELECTED, OB_SET_VISIBLE, Base::object, ViewLayer::object_bases, obrel_armature_find(), obrel_list_add(), obrel_list_test(), Object::parent, and ID::tag.

Referenced by collada_export().

◆ BKE_object_rot_to_mat3()

void BKE_object_rot_to_mat3 ( const struct Object ob,
float  r_mat[3][3],
bool  use_drot 
)

◆ BKE_object_runtime_reset()

void BKE_object_runtime_reset ( struct Object object)

◆ BKE_object_runtime_reset_on_copy()

void BKE_object_runtime_reset_on_copy ( struct Object object,
const int  flag 
)

◆ BKE_object_scale_to_mat3()

void BKE_object_scale_to_mat3 ( struct Object ob,
float  r_mat[3][3] 
)

◆ BKE_object_scenes_users_get()

int BKE_object_scenes_users_get ( Main bmain,
Object ob 
)

Return the number of scenes using (instantiating) that object in their collections.

Definition at line 5068 of file object.c.

References BKE_collection_has_object_recursive(), ListBase::first, Scene::id, Scene::master_collection, ID::next, NULL, scene, and Main::scenes.

Referenced by single_object_users_collection().

◆ BKE_object_sculpt_data_create()

void BKE_object_sculpt_data_create ( struct Object ob)

◆ BKE_object_select_update()

void BKE_object_select_update ( struct Depsgraph depsgraph,
struct Object object 
)

◆ BKE_object_shaderfx_use_time()

bool BKE_object_shaderfx_use_time ( struct Object ob,
struct ShaderFxData md 
)

◆ BKE_object_shapekey_free()

bool BKE_object_shapekey_free ( struct Main bmain,
struct Object ob 
)

Definition at line 4758 of file object.c.

References BKE_id_free_us(), BKE_key_from_object_p(), ELEM, and NULL.

Referenced by BKE_object_shapekey_remove(), and shape_key_remove_exec().

◆ BKE_object_shapekey_insert()

struct KeyBlock* BKE_object_shapekey_insert ( struct Main bmain,
struct Object ob,
const char *  name,
const bool  from_mix 
)

◆ BKE_object_shapekey_remove()

bool BKE_object_shapekey_remove ( struct Main bmain,
struct Object ob,
struct KeyBlock kb 
)

◆ BKE_object_support_modifier_type_check()

bool BKE_object_support_modifier_type_check ( const struct Object ob,
int  modifier_type 
)

◆ BKE_object_supports_modifiers()

bool BKE_object_supports_modifiers ( const struct Object ob)

◆ BKE_object_sync_to_original()

void BKE_object_sync_to_original ( struct Depsgraph depsgraph,
struct Object object 
)

◆ BKE_object_tfm_backup()

void* BKE_object_tfm_backup ( struct Object ob)

◆ BKE_object_tfm_copy()

void BKE_object_tfm_copy ( struct Object object_dst,
const struct Object object_src 
)

Referenced by ObjectToTransData().

◆ BKE_object_tfm_protected_backup()

void BKE_object_tfm_protected_backup ( const struct Object ob,
ObjectTfmProtectedChannels obtfm 
)

◆ BKE_object_tfm_protected_restore()

void BKE_object_tfm_protected_restore ( struct Object ob,
const ObjectTfmProtectedChannels obtfm,
const short  protectflag 
)

◆ BKE_object_tfm_restore()

void BKE_object_tfm_restore ( struct Object ob,
void *  obtfm_pt 
)

◆ BKE_object_to_curve()

struct Curve* BKE_object_to_curve ( struct Object object,
struct Depsgraph depsgraph,
bool  apply_modifiers 
)

Definition at line 5682 of file object.c.

References BKE_curve_new_from_object(), BKE_object_to_curve_clear(), curve, and depsgraph.

◆ BKE_object_to_curve_clear()

void BKE_object_to_curve_clear ( struct Object object)

◆ BKE_object_to_mat3()

void BKE_object_to_mat3 ( struct Object ob,
float  r_mat[3][3] 
)

◆ BKE_object_to_mat4()

void BKE_object_to_mat4 ( struct Object ob,
float  r_mat[4][4] 
)

◆ BKE_object_to_mesh()

struct Mesh* BKE_object_to_mesh ( struct Depsgraph depsgraph,
struct Object object,
bool  preserve_all_data_layers 
)

◆ BKE_object_to_mesh_clear()

void BKE_object_to_mesh_clear ( struct Object object)

◆ BKE_object_transform_copy()

void BKE_object_transform_copy ( struct Object ob_tar,
const struct Object ob_src 
)

◆ BKE_object_update_select_id()

void BKE_object_update_select_id ( struct Main bmain)

◆ BKE_object_visibility()

int BKE_object_visibility ( const struct Object ob,
const int  dag_eval_mode 
)

◆ BKE_object_where_is_calc()

void BKE_object_where_is_calc ( struct Depsgraph depsgraph,
struct Scene scene,
struct Object ob 
)

◆ BKE_object_where_is_calc_ex()

void BKE_object_where_is_calc_ex ( struct Depsgraph depsgraph,
struct Scene scene,
struct RigidBodyWorld rbw,
struct Object ob,
float  r_originmat[3][3] 
)

◆ BKE_object_where_is_calc_mat4()

void BKE_object_where_is_calc_mat4 ( Object ob,
float  r_obmat[4][4] 
)

Calculate object transformation matrix without recalculating dependencies and constraints – assume dependencies are already solved by depsgraph. No changes to object and its parent would be done. Used for bundles orientation in 3d space relative to parented blender camera.

Definition at line 3636 of file object.c.

References BKE_object_to_mat4(), NULL, Object::parent, and solve_parenting().

Referenced by BKE_tracking_get_camera_object_matrix(), followtrack_distance_from_viewplane_get(), and object_solver_inverted_matrix().

◆ BKE_object_where_is_calc_time()

void BKE_object_where_is_calc_time ( struct Depsgraph depsgraph,
struct Scene scene,
struct Object ob,
float  ctime 
)

◆ BKE_object_workob_calc_parent()

void BKE_object_workob_calc_parent ( Depsgraph depsgraph,
Scene scene,
Object ob,
Object workob 
)

For calculation of the inverse parent transform, only used for editor.

It assumes the object parent is already in the depsgraph. Otherwise, after changing ob->parent you need to call:

  • #DEG_relations_tag_update(bmain);
  • #BKE_scene_graph_update_tagged(depsgraph, bmain);

Definition at line 3667 of file object.c.

References BKE_object_where_is_calc(), BKE_object_workob_clear(), BLI_strncpy(), Object::constinv, DEG_get_evaluated_object(), depsgraph, Object::obmat, Object::par1, Object::par2, Object::par3, Object::parent, Object::parentinv, Object::parsubstr, Object::partype, scene, Object::trackflag, unit_m4(), and Object::upflag.

Referenced by applyarmature_fix_boneparents(), ED_object_parent_set(), ignore_parent_tx(), SkinInfo::link_armature(), and vertex_parent_set_exec().

◆ BKE_object_workob_clear()

void BKE_object_workob_clear ( struct Object workob)

◆ BKE_scene_foreach_display_point()

void BKE_scene_foreach_display_point ( struct Depsgraph depsgraph,
void(*)(const float[3], void *)  func_cb,
void *  user_data 
)

Variable Documentation

◆ ATTR_RETURNS_NONNULL

struct Object ATTR_RETURNS_NONNULL

Definition at line 138 of file BKE_object.h.