Blender V5.3
BKE_object.hh File Reference

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

#include <optional>
#include "BLI_bounds_types.hh"
#include "BLI_compiler_attrs.hh"
#include "BLI_function_ref.hh"
#include "BLI_math_matrix_types.hh"
#include "BLI_math_vector_types.hh"
#include "BLI_sys_types.hh"
#include "BLI_vector.hh"
#include "DNA_object_enums.h"
#include "DNA_userdef_enums.h"

Go to the source code of this file.

Classes

struct  blender::ObjectTfmProtectedChannels

Namespaces

namespace  blender
 BMesh Iterators.

Macros

#define OBJECT_MODIFIER_UPDATE_SUBFRAME_RECURSION_DEFAULT   5

Enumerations

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

Functions

void blender::BKE_object_workob_clear (Object *workob)
void blender::BKE_object_transform_copy (Object *ob_tar, const Object *ob_src)
void blender::BKE_object_copy_softbody (Object *ob_dst, const Object *ob_src, int flag)
ParticleSystem * blender::BKE_object_copy_particlesystem (ParticleSystem *psys, int flag)
void blender::BKE_object_copy_particlesystems (Object *ob_dst, const Object *ob_src, int flag)
void blender::BKE_object_free_particlesystems (Object *ob)
void blender::BKE_object_free_softbody (Object *ob)
void blender::BKE_object_free_curve_cache (Object *ob)
void blender::BKE_object_free_derived_caches (Object *ob)
void blender::BKE_object_free_caches (Object *object)
void blender::BKE_object_modifier_hook_reset (Object *ob, HookModifierData *hmd)
void blender::BKE_object_modifier_gpencil_hook_reset (Object *ob, HookGpencilModifierData *hmd)
bool blender::BKE_object_supports_modifiers (const Object *ob)
bool blender::BKE_object_support_modifier_type_check (const Object *ob, int modifier_type)
void blender::BKE_object_modifier_set_active (Object *ob, ModifierData *md)
ModifierData * blender::BKE_object_active_modifier (const Object *ob)
ModifierData * blender::BKE_object_copy_modifier (Main *bmain, const Scene *scene, Object *ob_dst, const Object *ob_src, const ModifierData *md)
bool blender::BKE_object_modifier_stack_copy (Object *ob_dst, const Object *ob_src, bool do_copy_all, int flag_subdata)
void blender::BKE_object_link_modifiers (Object *ob_dst, const Object *ob_src)
void blender::BKE_object_free_modifiers (Object *ob, int flag)
void blender::BKE_object_free_shaderfx (Object *ob, int flag)
bool blender::BKE_object_exists_check (Main *bmain, const Object *obtest)
bool blender::BKE_object_is_in_editmode (const Object *ob)
bool blender::BKE_object_is_in_editmode_vgroup (const Object *ob)
bool blender::BKE_object_is_in_wpaint_select_vert (const Object *ob)
bool blender::BKE_object_has_mode_data (const Object *ob, eObjectMode object_mode)
bool blender::BKE_object_is_mode_compat (const Object *ob, eObjectMode object_mode)
bool blender::BKE_object_data_is_in_editmode (const Object *ob, const ID *id)
char * blender::BKE_object_data_editmode_flush_ptr_get (ID *id)
int blender::BKE_object_visibility (const Object *ob, int dag_eval_mode)
Object * blender::BKE_object_add_only_object (Main *bmain, ObjectType type, const char *name) ATTR_RETURNS_NONNULL
Object * blender::BKE_object_add (Main *bmain, Scene *scene, ViewLayer *view_layer, ObjectType type, const char *name) ATTR_NONNULL(1
Object * blender::BKE_object_add_from (Main *bmain, Scene *scene, ViewLayer *view_layer, ObjectType type, const char *name, Object *ob_src) ATTR_NONNULL(1
Object * blender::BKE_object_add_for_data (Main *bmain, const Scene *scene, ViewLayer *view_layer, ObjectType type, const char *name, ID *data, bool do_id_user) ATTR_RETURNS_NONNULL
void * blender::BKE_object_obdata_add_from_type (Main *bmain, ObjectType type, const char *name) ATTR_NONNULL(1)
int blender::BKE_object_obdata_to_type (const ID *id) ATTR_NONNULL(1)
bool blender::BKE_object_is_libdata (const Object *ob)
bool blender::BKE_object_obdata_is_libdata (const Object *ob)
Object * blender::BKE_object_duplicate (Main *bmain, Object *ob, eDupli_ID_Flags dupflag, uint duplicate_options)
void blender::BKE_object_obdata_size_init (Object *ob, float size)
bool blender::BKE_object_pose_context_check (const Object *ob)
Object * blender::BKE_object_pose_armature_get (Object *ob)
Object * blender::BKE_object_pose_armature_get_with_wpaint_check (Object *ob)
Object * blender::BKE_object_pose_armature_get_visible (const Main &bmain, Object *ob, const Scene *scene, ViewLayer *view_layer, View3D *v3d)
Vector< Object * > blender::BKE_object_pose_array_get_ex (const Main &bmain, const Scene *scene, ViewLayer *view_layer, View3D *v3d, bool unique)
Vector< Object * > blender::BKE_object_pose_array_get_unique (const Main &bmain, const Scene *scene, ViewLayer *view_layer, View3D *v3d)
Vector< Object * > blender::BKE_object_pose_array_get (const Main &bmain, const Scene *scene, ViewLayer *view_layer, View3D *v3d)
Vector< Base * > blender::BKE_object_pose_base_array_get_ex (const Main &bmain, const Scene *scene, ViewLayer *view_layer, View3D *v3d, bool unique)
Vector< Base * > blender::BKE_object_pose_base_array_get_unique (const Main &bmain, const Scene *scene, ViewLayer *view_layer, View3D *v3d)
Vector< Base * > blender::BKE_object_pose_base_array_get (const Main &bmain, const Scene *scene, ViewLayer *view_layer, View3D *v3d)
void blender::BKE_object_eval_reset (Object *ob_eval)
void blender::BKE_object_eval_local_transform (Depsgraph *depsgraph, Object *ob)
void blender::BKE_object_eval_parent (Depsgraph *depsgraph, Object *ob)
void blender::BKE_object_eval_constraints (Depsgraph *depsgraph, Scene *scene, Object *ob)
void blender::BKE_object_eval_transform_final (Depsgraph *depsgraph, Object *ob)
void blender::BKE_object_eval_uber_transform (Depsgraph *depsgraph, Object *object)
void blender::BKE_object_eval_uber_data (Depsgraph *depsgraph, Scene *scene, Object *ob)
void blender::BKE_object_eval_shading (Depsgraph *depsgraph, Object *object)
void blender::BKE_object_eval_light_linking (Depsgraph *depsgraph, Object *object)
void blender::BKE_object_eval_assign_data (Object *object, ID *data, bool is_owned)
void blender::BKE_object_sync_to_original (Depsgraph *depsgraph, Object *object)
void blender::BKE_object_eval_ptcache_reset (Depsgraph *depsgraph, Scene *scene, Object *object)
void blender::BKE_object_eval_transform_all (Depsgraph *depsgraph, Scene *scene, Object *object)
void blender::BKE_object_data_select_update (Depsgraph *depsgraph, ID *object_data)
void blender::BKE_object_select_update (Depsgraph *depsgraph, Object *object)
void blender::BKE_object_eval_eval_base_flags (Depsgraph *depsgraph, Scene *scene, int view_layer_index, Object *object, int base_index, bool is_from_set)
void blender::BKE_object_handle_data_update (Depsgraph *depsgraph, Scene *scene, Object *ob)
void blender::BKE_object_batch_cache_dirty_tag (Object *ob)
PartEff * blender::BKE_object_do_version_give_parteff_245 (Object *ob)
Object Matrix Evaluation API
float4x4 blender::BKE_object_calc_parent (Depsgraph *depsgraph, Scene *scene, Object *ob)
void blender::BKE_object_apply_mat4_ex (Object *ob, const float mat[4][4], Object *parent, const float parentinv[4][4], bool use_compat)
void blender::BKE_object_apply_mat4 (Object *ob, const float mat[4][4], bool use_compat, bool use_parent)
void blender::BKE_object_apply_parent_inverse (Object *ob)
void blender::BKE_object_where_is_calc (Depsgraph *depsgraph, Scene *scene, Object *ob)
void blender::BKE_object_where_is_calc_ex (Depsgraph *depsgraph, Scene *scene, RigidBodyWorld *rbw, Object *ob, float r_originmat[3][3])
void blender::BKE_object_where_is_calc_time (Depsgraph *depsgraph, Scene *scene, Object *ob, float ctime)
void blender::BKE_object_where_is_calc_mat4 (const Object *ob, float r_obmat[4][4])
Object Modifier Utilities
void blender::BKE_object_update_select_id (Main *bmain)
void blender::BKE_object_modifier_update_subframe (Depsgraph *depsgraph, Scene *scene, Object *ob, bool update_mesh, int parent_recursion_limit, float frame, int modifier_type)
void blender::BKE_object_modifier_update_subframe_only_callback (Object *ob, bool update_mesh, int parent_recursion_limit, int modifier_type, FunctionRef< void(Object *object, bool update_mesh)> update_or_tag_fn)
Object Matrix Get/Set API
void blender::BKE_object_scale_to_mat3 (const Object *ob, float r_mat[3][3])
void blender::BKE_object_rot_to_mat3 (const Object *ob, float r_mat[3][3], bool use_drot)
void blender::BKE_object_mat3_to_rot (Object *ob, float r_mat[3][3], bool use_compat)
float4 blender::BKE_object_rot_to_quat (const Object &ob)
void blender::BKE_object_quat_to_rot (Object &ob, const float4 &quat)
void blender::BKE_object_to_mat3 (const Object *ob, float r_mat[3][3])
void blender::BKE_object_to_mat4 (const Object *ob, float r_mat[4][4])
void blender::BKE_object_matrix_local_get (Object *ob, float r_mat[4][4])
float4x4 blender::BKE_object_delta_matrix_get (const Object &obj)
void blender::BKE_object_get_parent_matrix (const Object *ob, Object *par, float r_parentmat[4][4])
void blender::BKE_object_tfm_protected_backup (const Object *ob, ObjectTfmProtectedChannels *obtfm)
void blender::BKE_object_tfm_protected_restore (Object *ob, const ObjectTfmProtectedChannels *obtfm, short protectflag)
void blender::BKE_object_tfm_copy (Object *object_dst, const Object *object_src)
Object Bounding Box API
std::optional< Bounds< float3 > > blender::BKE_object_evaluated_geometry_bounds (const Object *ob)
std::optional< Bounds< float3 > > blender::BKE_object_boundbox_get (const Object *ob)
std::optional< Bounds< float3 > > blender::BKE_object_boundbox_eval_cached_get (const Object *ob)
Object Dimension Get/Set
Warning
Setting dimensions is prone to feedback loops in evaluation.
void blender::BKE_object_dimensions_get (const Object *ob, float r_vec[3])
void blender::BKE_object_dimensions_eval_cached_get (const Object *ob, float r_vec[3])
void blender::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])
void blender::BKE_object_dimensions_set (Object *ob, const float value[3], int axis_mask)
void blender::BKE_object_empty_draw_type_set (Object *ob, int value)
void blender::BKE_object_minmax (Object *ob, float3 &r_min, float3 &r_max)
bool blender::BKE_object_minmax_dupli (Depsgraph *depsgraph, Object *ob, float3 &r_min, float3 &r_max, bool use_hidden)
bool blender::BKE_object_minmax_empty_drawtype (const Object *ob, float r_min[3], float r_max[3])
void blender::BKE_object_foreach_display_point (Object *ob, const float obmat[4][4], void(*func_cb)(const float[3], void *), void *user_data)
void blender::BKE_scene_foreach_display_point (Depsgraph *depsgraph, void(*func_cb)(const float[3], void *), void *user_data)
bool blender::BKE_object_empty_image_frame_is_visible_in_view3d (const Object *ob, const RegionView3D *rv3d)
bool blender::BKE_object_empty_image_data_is_visible_in_view3d (const Object *ob, const RegionView3D *rv3d)
Object Query API
bool blender::BKE_object_parent_loop_check (const Object *parent, const Object *ob)
bool blender::BKE_object_flag_test_recursive (const Object *ob, short flag)
bool blender::BKE_object_is_child_recursive (const Object *ob_parent, const Object *ob_child)
int blender::BKE_object_is_modified (Scene *scene, Object *ob)
int blender::BKE_object_is_deform_modified (Scene *scene, Object *ob)
void blender::BKE_object_get_mirror_axes (const Object *ob, bool r_axis[3])
bool blender::BKE_object_moves_in_time (const Object *object, bool recurse_parent)
int blender::BKE_object_scenes_users_get (Main *bmain, Object *ob)
MovieClip * blender::BKE_object_movieclip_get (Scene *scene, const Object *ob, bool use_default)
bool blender::BKE_object_supports_material_slots (Object *ob)
Object Transform Channels (Backup/Restore)
void * blender::BKE_object_tfm_backup (Object *ob)
void blender::BKE_object_tfm_restore (Object *ob, void *obtfm_pt)
void blender::BKE_object_tfm_free (void *obtfm_pt)
Object Evaluation/Update API
void blender::BKE_object_handle_update (Depsgraph *depsgraph, Scene *scene, Object *ob)
void blender::BKE_object_handle_update_ex (Depsgraph *depsgraph, Scene *scene, Object *ob, RigidBodyWorld *rbw)
bool blender::BKE_object_use_sculptsession (eObjectMode mode)
void blender::BKE_object_sculpt_data_create (Object *ob)
bool blender::BKE_object_obdata_texspace_get (Object *ob, char **r_texspace_flag, float **r_texspace_location, float **r_texspace_size)
Mesh * blender::BKE_object_get_evaluated_mesh_no_subsurf (const Object *object_eval)
Mesh * blender::BKE_object_get_evaluated_mesh (const Object *object_eval)
Mesh * blender::BKE_object_get_evaluated_mesh_no_subsurf_unchecked (const Object *object)
Mesh * blender::BKE_object_get_evaluated_mesh_unchecked (const Object *object)
const Mesh * blender::BKE_object_get_pre_modified_mesh (const Object *object)
Mesh * blender::BKE_object_get_original_mesh (const Object *object)
const Mesh * blender::BKE_object_get_editmesh_eval_final (const Object *object)
const Mesh * blender::BKE_object_get_editmesh_eval_cage (const Object *object)
const Mesh * blender::BKE_object_get_mesh_deform_eval (const Object *object)
Lattice * blender::BKE_object_get_lattice (const Object *object)
Lattice * blender::BKE_object_get_evaluated_lattice (const Object *object)
Object Point Cache
int blender::BKE_object_insert_ptcache (Object *ob)
void blender::BKE_object_delete_ptcache (Object *ob, int index)
Object Shape Key API
KeyBlock * blender::BKE_object_shapekey_insert (Main *bmain, Object *ob, const char *name, bool from_mix)
bool blender::BKE_object_shapekey_remove (Main *bmain, Object *ob, KeyBlock *kb)
bool blender::BKE_object_shapekey_free (Main *bmain, Object *ob)
Object Runtime
void blender::BKE_object_runtime_reset (Object *object)
void blender::BKE_object_runtime_reset_on_copy (Object *object, int flag)
void blender::BKE_object_runtime_free_data (Object *object)
Object Relationships
LinkNode * blender::BKE_object_relational_superset (const Main &bmain, const Scene *scene, ViewLayer *view_layer, eObjectSet objectSet, eObRelationTypes includeFilter)
LinkNode * blender::BKE_object_groups (Main *bmain, Scene *scene, Object *ob)
void blender::BKE_object_groups_clear (Main *bmain, Scene *scene, Object *object)
Object KD-Tree
KDTree< float3 > * blender::BKE_object_as_kdtree (Object *ob, int *r_tot)
Object Conversion
Mesh * blender::BKE_object_to_mesh (Depsgraph *depsgraph, Object *object, bool preserve_all_data_layers)
void blender::BKE_object_to_mesh_clear (Object *object)
Curve * blender::BKE_object_to_curve (Object *object, Depsgraph *depsgraph, bool apply_modifiers)
void blender::BKE_object_to_curve_clear (Object *object)
void blender::BKE_object_check_uids_unique_and_report (const Object *object)
SubsurfModifierData * blender::BKE_object_get_last_subsurf_modifier (const Object *ob)
void blender::BKE_object_replace_data_on_shallow_copy (Object *ob, ID *new_data)
Protected Transform Channel Assignment
void blender::BKE_object_protected_location_set (Object *ob, const float location[3])
void blender::BKE_object_protected_scale_set (Object *ob, const float scale[3])
void blender::BKE_object_protected_rotation_quaternion_set (Object *ob, const float quat[4])
void blender::BKE_object_protected_rotation_euler_set (Object *ob, const float euler[3])
void blender::BKE_object_protected_rotation_axisangle_set (Object *ob, const float axis[3], float angle)

Variables

Object blender::ATTR_RETURNS_NONNULL

Detailed Description

General operations, lookup, etc. for blender objects.

Definition in file BKE_object.hh.

Macro Definition Documentation

◆ OBJECT_MODIFIER_UPDATE_SUBFRAME_RECURSION_DEFAULT

#define OBJECT_MODIFIER_UPDATE_SUBFRAME_RECURSION_DEFAULT   5

The number of times to recurse parents for evaluation.

NOTE(@ideasman42): This value was picked to avoid infinite recursion. 5 is arbitrary but changing it would change behavior in some corner cases. See code comments in #BKE_object_modifier_update_subframe_only_callback for details.

Definition at line 678 of file BKE_object.hh.

Referenced by blender::DEG_add_collision_relations().