Blender
V3.3
|
General operations, lookup, etc. for blender objects. More...
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 } |
Variables | |
struct Object | ATTR_RETURNS_NONNULL |
General operations, lookup, etc. for blender objects.
Definition in file BKE_object.h.
typedef enum eObjectSet eObjectSet |
typedef enum eObjectVisibilityResult eObjectVisibilityResult |
typedef enum eObRelationTypes eObRelationTypes |
typedef struct ObjectTfmProtectedChannels ObjectTfmProtectedChannels |
enum eObjectSet |
Enumerator | |
---|---|
OB_SET_SELECTED | |
OB_SET_VISIBLE | |
OB_SET_ALL |
Definition at line 613 of file BKE_object.h.
Enumerator | |
---|---|
OB_VISIBLE_SELF | |
OB_VISIBLE_PARTICLES | |
OB_VISIBLE_INSTANCES | |
OB_VISIBLE_ALL |
Definition at line 149 of file BKE_object.h.
enum 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 603 of file BKE_object.h.
Definition at line 3638 of file object.cc.
References BKE_boundbox_init_from_minmax().
Referenced by gpencil_depth_plane(), gpencil_object_cache_add(), and OVERLAY_bounds().
Definition at line 3645 of file object.cc.
References max, min, and BoundBox::vec.
Referenced by BKE_boundbox_alloc_unit(), BKE_curve_boundbox_get(), BKE_curves_boundbox_get(), BKE_editmesh_cage_boundbox_get(), BKE_mball_texspace_calc(), BKE_mesh_boundbox_get(), BKE_object_boundbox_calc_from_evaluated_geometry(), BKE_object_boundbox_calc_from_mesh(), BKE_pchan_minmax(), BKE_pointcloud_boundbox_get(), BKE_volume_boundbox_get(), boundbox_armature(), boundbox_gpencil(), boundbox_lattice(), draw_frustum_boundbox_calc(), DRW_debug_m4_as_bbox(), ED_gpencil_projected_2d_bound_box(), eevee_lightprobes_culling_test(), lineart_geometry_check_visible(), OVERLAY_bounds(), sculpt_debug_cb(), SCULPT_update_object_bounding_box(), and workbench_shadow_object_shadow_bbox_get().
void BKE_boundbox_minmax | ( | const struct BoundBox * | bb, |
const float | obmat[4][4], | ||
float | r_min[3], | ||
float | r_max[3] | ||
) |
Referenced by BKE_pchan_minmax().
struct ModifierData* BKE_object_active_modifier | ( | const struct Object * | ob | ) |
Referenced by buttons_context_path_modifier(), ED_spreadsheet_context_path_set_geometry_node(), edit_modifier_poll_generic(), geometry_node_tree_copy_assign_exec(), geometry_node_tree_get_from_context(), blender::ed::space_node::get_context_path_node_geometry(), and tree_element_modifier_state_get().
struct Object* BKE_object_add | ( | struct Main * | bmain, |
struct ViewLayer * | view_layer, | ||
int | type, | ||
const char * | name | ||
) |
General add: to scene, with layer from area and default name.
Object is added to the active Collection. If there is no linked collection to the active ViewLayer we create a new one.
Referenced by add_hook_object_new(), Freestyle::BlenderStrokeRenderer::BlenderStrokeRenderer(), blender::ed::curves::convert_from_particle_system::curves_convert_from_particle_system_exec(), ED_object_add_type_with_obdata(), ED_object_modifier_convert_psys_to_mesh(), Freestyle::BlenderStrokeRenderer::GenerateStrokeMesh(), get_new_constraint_target(), modifier_skin_armature_create(), object_preview_camera_create(), and txt_add_object().
struct Object* BKE_object_add_for_data | ( | struct Main * | bmain, |
struct ViewLayer * | view_layer, | ||
int | type, | ||
const char * | name, | ||
struct ID * | data, | ||
bool | do_id_user | ||
) |
Add a new object, but assign the given data-block as the ob->data
for the newly created object.
data | The data-block to assign as ob->data for the new object. This is assumed to be of the correct type. |
do_id_user | If true, id_us_plus() will be called on data when assigning it to the object. |
Definition at line 2299 of file object.cc.
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().
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 | ||
) |
Add a new object, using another one as a reference
ob_src | object to use to determine the collections of the new object. |
More general add: creates minimum required data, but without vertices etc.
bmain | The main to add the object to. May be null for LIB_ID_CREATE_NO_MAIN behavior. |
Definition at line 2241 of file object.cc.
References BKE_libblock_alloc(), get_obdata_defname(), Object::id, ID_OB, id_us_min(), LIB_ID_CREATE_NO_MAIN, object_init(), and type.
Referenced by bc_add_object(), BKE_object_add_for_data(), blender::io::obj::CurveFromGeometry::create_curve(), blender::io::obj::MeshFromGeometry::create_mesh(), blender::io::usd::USDCameraReader::create_object(), blender::io::usd::USDCurvesReader::create_object(), blender::io::usd::USDLightReader::create_object(), blender::io::usd::USDMeshReader::create_object(), blender::io::usd::USDNurbsReader::create_object(), blender::io::usd::USDVolumeReader::create_object(), blender::io::usd::USDXformReader::create_object(), duplicate_ids(), gpencil_layer_to_curve(), blender::io::stl::importer_main(), loose_data_instantiate_collection_process(), loose_data_instantiate_obdata_process(), Freestyle::BlenderStrokeRenderer::NewMesh(), object_add_common(), blender::io::alembic::AbcCameraReader::readObjectData(), blender::io::alembic::AbcCurveReader::readObjectData(), blender::io::alembic::AbcMeshReader::readObjectData(), blender::io::alembic::AbcSubDReader::readObjectData(), blender::io::alembic::AbcNurbsReader::readObjectData(), blender::io::alembic::AbcPointsReader::readObjectData(), blender::io::alembic::AbcEmptyReader::readObjectData(), and blender::bke::tests::MeshObjectTestData::setup().
void BKE_object_apply_mat4 | ( | struct Object * | ob, |
const float | mat[4][4], | ||
bool | use_compat, | ||
bool | use_parent | ||
) |
Definition at line 3575 of file object.cc.
References BKE_object_apply_mat4_ex(), Object::parent, and Object::parentinv.
Referenced by apply_objects_internal(), applyarmature_fix_boneparents(), bc_match_scale(), BKE_constraint_apply_for_object(), BKE_object_apply_parent_inverse(), DocumentImporter::create_instance_node(), blender::ed::curves::convert_from_particle_system::curves_convert_from_particle_system_exec(), ED_object_parent_clear(), ED_object_parent_set(), ED_object_xform_array_m4(), ED_view3d_camera_lock_sync(), ignore_parent_tx(), blender::io::stl::importer_main(), SkinInfo::link_armature(), make_object_duplilist_real(), object_add_named_exec(), object_apply_location(), object_apply_mat4_with_protect(), object_apply_rotation(), object_curves_empty_hair_add_exec(), object_track_clear_exec(), AnimationImporter::read_node_transform(), blender::io::usd::USDXformReader::read_object_data(), set_axis(), set_plane_exec(), blender::io::alembic::AbcObjectReader::setupObjectTransform(), blender::io::obj::transform_object(), view3d_camera_to_view_selected_impl(), and visual_transform_apply_exec().
void BKE_object_apply_mat4_ex | ( | struct Object * | ob, |
const float | mat[4][4], | ||
struct Object * | parent, | ||
const float | parentinv[4][4], | ||
bool | use_compat | ||
) |
Applies the global transformation mat to the ob using a relative parent space if supplied.
mat | the global transformation mat that the object should be set object to. |
parent | the parent space in which this object will be set relative to (should probably always be parent_eval). |
use_compat | true to ensure that rotations are set using the min difference between the old and new orientation. |
Definition at line 3532 of file object.cc.
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(), rot, Object::scale, and sub_v3_v3().
Referenced by BKE_object_apply_mat4(), ED_mesh_join_objects_exec(), and ED_view3d_to_object().
Use parent's world location and rotation as the child's origin. The parent inverse will become identity when the parent has no shearing. Otherwise, it is non-identity and contains the object's local matrix data that cannot be decomposed into location, rotation and scale.
Assumes the object's world matrix has no shear. Assumes parent exists.
Definition at line 3583 of file object.cc.
References BKE_object_apply_mat4(), BKE_object_get_parent_matrix(), copy_m4_m4(), invert_m4(), invert_m4_m4(), mul_m4_m4_post(), mul_m4_m4m4(), Object::obmat, orthogonalize_m4_stable(), Object::parent, and Object::parentinv.
Referenced by object_parent_inverse_apply_exec(), and parent_noinv_set_exec().
struct KDTree_3d* BKE_object_as_kdtree | ( | struct Object * | ob, |
int * | r_tot | ||
) |
Return a KDTree_3d from the deformed object (in world-space).
ob | |
r_tot |
Definition at line 5260 of file object.cc.
References Freestyle::a, BKE_nurbList_verts_count_without_handles(), BKE_object_get_evaluated_mesh(), CD_ORIGINDEX, MVert::co, CustomData_get_layer(), Object::data, Lattice::def, ListBase::first, Object_Runtime::mesh_deform_eval, mul_v3_m4v3(), Mesh::mvert, Curve::nurb, OB_CURVES_LEGACY, OB_LATTICE, OB_MESH, OB_SURF, Object::obmat, ORIGINDEX_NONE, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, Object::runtime, Mesh::totvert, tree, Object::type, BezTriple::vec, and BPoint::vec.
Referenced by parent_set_vertex_parent().
Definition at line 322 of file object_update.c.
References BKE_object_data_batch_cache_dirty_tag(), and Object::data.
Referenced by BKE_object_defgroup_new(), BKE_object_defgroup_remove(), BKE_object_eval_uber_data(), and object_origin_set_exec().
Definition at line 3743 of file object.cc.
References Object_Runtime::bb, BKE_boundbox_init_from_minmax(), BKE_displist_minmax(), BKE_mesh_wrapper_minmax(), BKE_object_get_evaluated_mesh(), BOUNDBOX_DIRTY, GeometrySet::compute_boundbox_without_instances(), Object_Runtime::curve_cache, CurveCache::disp, BoundBox::flag, Object_Runtime::geometry_set_eval, max, min, and Object::runtime.
Referenced by BKE_displist_make_curveTypes(), and object_sync_boundbox_to_original().
Referenced by editbmesh_build_data(), and mesh_build_data().
Definition at line 3684 of file object.cc.
References BKE_armature_boundbox_get(), BKE_curve_boundbox_get(), BKE_curves_boundbox_get(), BKE_gpencil_boundbox_get(), BKE_lattice_boundbox_get(), BKE_mball_boundbox_get(), BKE_mesh_boundbox_get(), BKE_pointcloud_boundbox_get(), BKE_volume_boundbox_get(), OB_ARMATURE, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_GPENCIL, OB_LATTICE, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, and Object::type.
Referenced by BKE_object_dimensions_get(), BKE_object_dimensions_set_ex(), BKE_object_minmax_dupli(), BKE_pchan_minmax(), cursor_draw_tiling_preview(), do_tiled(), drw_call_culling_init(), ED_transform_calc_gizmo_stats(), EEVEE_shadows_caster_register(), gpencil_depth_plane(), gpencil_object_cache_add(), mesh_to_volume(), object_sync_boundbox_to_original(), OVERLAY_bounds(), raycastMesh(), RE_point_density_minmax(), select_id_object_min_max(), snapMesh(), TargetSnapClosest(), blender::io::alembic::ABCAbstractWriter::update_bounding_box(), view3d_ob_drop_matrix_from_snap(), and workbench_shadow_object_shadow_bbox_get().
bool BKE_object_copy_gpencil_modifier | ( | struct Object * | ob_dst, |
struct GpencilModifierData * | gmd_src | ||
) |
Copy a single GPencil modifier.
BKE_object_modifier_stack_copy
instead. Definition at line 1581 of file object.cc.
References BKE_gpencil_modifier_get_info(), BKE_gpencil_modifier_new(), BKE_gpencil_modifier_unique_name(), BLI_addtail(), BLI_assert, BLI_strncpy(), GpencilModifierTypeInfo::copyData, Object::greasepencil_modifiers, GpencilModifierData::name, OB_GPENCIL, GpencilModifierData::type, and Object::type.
Referenced by ED_object_gpencil_modifier_copy_to_object(), and gpencil_modifier_copy_to_selected_exec().
bool BKE_object_copy_modifier | ( | struct Main * | bmain, |
struct Scene * | scene, | ||
struct Object * | ob_dst, | ||
const struct Object * | ob_src, | ||
struct ModifierData * | md | ||
) |
Copy a single modifier.
BKE_object_modifier_stack_copy
instead.ob_dst
, and it's placement in the stack, etc. If used more than once, this function should preferably be called in stack order. Referenced by ED_object_modifier_copy_to_object(), and modifier_copy_to_selected_exec().
struct ParticleSystem* BKE_object_copy_particlesystem | ( | struct ParticleSystem * | psys, |
int | flag | ||
) |
Definition at line 2379 of file object.cc.
References ParticleSystem::batch_cache, BKE_modifier_copydata_ex(), BKE_modifier_new(), BKE_ptcache_copy_list(), BLI_assert, BLI_duplicatelist(), BLI_listbase_clear(), ParticleSystem::bvhtree, ParticleSystem::childcache, ParticleSystem::childcachebufs, ParticleSystem::clmd, ParticleSystem::edit, ParticleSystem::effectors, eModifierType_Cloth, BodySpring::flag, ParticleSystem::flag, ParticleSystem::hair_in_mesh, ParticleSystem::hair_out_mesh, id_us_plus(), LIB_ID_COPY_SET_COPIED_ON_WRITE, LIB_ID_CREATE_NO_USER_REFCOUNT, MEM_dupallocN, ParticleSystem::part, ParticleSystem::pathcache, ParticleSystem::pathcachebufs, ParticleSystem::pdd, ClothModifierData::point_cache, ParticleSystem::pointcache, psys_copy_particles(), PSYS_SHARED_CACHES, ParticleSystem::ptcaches, ParticleSystem::targets, and ParticleSystem::tree.
Referenced by BKE_object_copy_particlesystems(), and copy_particle_systems_to_object().
void BKE_object_copy_particlesystems | ( | struct Object * | ob_dst, |
const struct Object * | ob_src, | ||
int | flag | ||
) |
Definition at line 288 of file object_update.c.
References BKE_curve_batch_cache_dirty_tag(), BKE_CURVE_BATCH_DIRTY_ALL, BKE_curves_batch_cache_dirty_tag(), BKE_CURVES_BATCH_DIRTY_ALL, BKE_gpencil_batch_cache_dirty_tag(), BKE_lattice_batch_cache_dirty_tag(), BKE_LATTICE_BATCH_DIRTY_ALL, BKE_mball_batch_cache_dirty_tag(), BKE_MBALL_BATCH_DIRTY_ALL, BKE_mesh_batch_cache_dirty_tag(), BKE_MESH_BATCH_DIRTY_ALL, BKE_pointcloud_batch_cache_dirty_tag(), BKE_POINTCLOUD_BATCH_DIRTY_ALL, BKE_volume_batch_cache_dirty_tag(), BKE_VOLUME_BATCH_DIRTY_ALL, GS, ID_CU_LEGACY, ID_CV, ID_GD, ID_LT, ID_MB, ID_ME, ID_PT, ID_VO, and ID::name.
Referenced by BKE_object_batch_cache_dirty_tag().
char* BKE_object_data_editmode_flush_ptr_get | ( | struct ID * | id | ) |
Definition at line 1941 of file object.cc.
References BLI_assert_unreachable, GS, id, ID_AR, ID_CU_LEGACY, ID_CV, ID_LT, ID_MB, ID_ME, ID::name, BMEditMesh::needs_flush_to_id, EditFont::needs_flush_to_id, bArmature::needs_flush_to_id, EditNurb::needs_flush_to_id, EditLatt::needs_flush_to_id, MetaBall::needs_flush_to_id, and type.
Referenced by ED_editors_flush_edits_for_object_ex(), and ED_object_editmode_load_free_ex().
Referenced by blender::deg::deg_update_copy_on_write_datablock(), and is_object_data_in_editmode().
Definition at line 355 of file object_update.c.
References BKE_curve_batch_cache_dirty_tag(), BKE_CURVE_BATCH_DIRTY_SELECT, BKE_lattice_batch_cache_dirty_tag(), BKE_LATTICE_BATCH_DIRTY_SELECT, BKE_mesh_batch_cache_dirty_tag(), BKE_MESH_BATCH_DIRTY_SELECT, DEG_debug_print_eval(), depsgraph, GS, ID_CU_LEGACY, ID_LT, ID_ME, and ID::name.
Referenced by BKE_object_select_update(), and blender::deg::DepsgraphNodeBuilder::build_object_data_geometry_datablock().
Definition at line 4567 of file object.cc.
References BLI_findlink(), BLI_freelinkN(), pc_findindex(), and Object::pc_ids.
Referenced by BKE_ptcache_toggle_disk_cache().
Definition at line 3786 of file object.cc.
References BKE_object_boundbox_get(), fabsf, mat4_to_size(), Object::obmat, BoundBox::vec, and zero_v3().
Referenced by DRW_object_is_flat(), object_asset_dimensions_property(), v3d_object_dimension_buts(), view3d_ob_drop_draw_activate(), workbench_volume_modifier_cache_populate(), and workbench_volume_object_cache_populate().
Definition at line 3834 of file object.cc.
References BKE_object_dimensions_set_ex().
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] | ||
) |
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 3802 of file object.cc.
References BKE_object_boundbox_get(), copysignf, CCL_NAMESPACE_BEGIN::isfinite(), len, len_v3(), Object::scale, and BoundBox::vec.
Referenced by BKE_object_dimensions_set(), and v3d_object_dimension_buts().
Definition at line 1026 of file object.cc.
References EFF_PARTICLE, PartEff::next, and PartEff::type.
Referenced by blo_do_versions_pre250(), and object_blend_read_expand().
struct Object* BKE_object_duplicate | ( | struct Main * | bmain, |
struct Object * | ob, | ||
uint | dupflag, | ||
uint | duplicate_options | ||
) |
Perform deep-copy of object and its 'children' data-blocks (obdata, materials, actions, etc.).
dupflag | Controls which sub-data are also duplicated (see eDupli_ID_Flags in DNA_userdef_types.h). |
Definition at line 2661 of file object.cc.
References BKE_id_copy_for_duplicate(), BKE_libblock_relink_to_newid(), BKE_main_id_newptr_and_tag_clear(), BKE_object_material_array_p(), BKE_pose_tag_recalc(), BLI_assert, Object::data, DEG_id_tag_update(), DEG_id_tag_update_ex(), ELEM, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, Object::id, ID_IS_LINKED, ID_RECALC_EDITORS, ID_RECALC_GEOMETRY, LIB_ID_COPY_DEFAULT, LIB_ID_COPY_RIGID_BODY_NO_COLLECTION_HANDLING, LIB_ID_DUPLICATE_IS_ROOT_ID, LIB_ID_DUPLICATE_IS_SUBPROCESS, LIB_TAG_NEW, LISTBASE_FOREACH, Object::mat, ID::newid, OB_ARMATURE, OB_CAMERA, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_GPENCIL, OB_LAMP, OB_LATTICE, OB_LIGHTPROBE, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SPEAKER, OB_SURF, OB_VOLUME, Object::particlesystem, Object::pose, ID::tag, Object::totcol, Object::type, USER_DUP_ARM, USER_DUP_CAMERA, USER_DUP_CURVE, USER_DUP_CURVES, USER_DUP_FONT, USER_DUP_GPENCIL, USER_DUP_LAMP, USER_DUP_LATTICE, USER_DUP_LIGHTPROBE, USER_DUP_LINKED_ID, USER_DUP_MAT, USER_DUP_MBALL, USER_DUP_MESH, USER_DUP_POINTCLOUD, USER_DUP_PSYS, USER_DUP_SPEAKER, USER_DUP_SURF, and USER_DUP_VOLUME.
Referenced by collection_duplicate_recursive(), and object_add_duplicate_internal().
Definition at line 3937 of file object.cc.
References Object::empty_drawtype, ImageUser::flag, ImageUser::frames, IMA_ANIM_ALWAYS, Object::iuser, MEM_SAFE_FREE, OB_EMPTY, OB_EMPTY_IMAGE, ImageUser::sfra, and Object::type.
Referenced by empty_drop_named_image_invoke(), object_blend_read_data(), and object_empty_add_exec().
bool BKE_object_empty_image_data_is_visible_in_view3d | ( | const struct Object * | ob, |
const struct RegionView3D * | rv3d | ||
) |
Referenced by OVERLAY_image_empty_cache_populate().
bool BKE_object_empty_image_frame_is_visible_in_view3d | ( | const struct Object * | ob, |
const struct RegionView3D * | rv3d | ||
) |
Assign Object.data after modifier stack evaluation.
Definition at line 1745 of file object.cc.
References BLI_assert, data, Object::data, Object_Runtime::data_eval, Object_Runtime::geometry_set_eval, GS, Object::id, if(), Object_Runtime::is_data_eval_owned, LIB_TAG_COPIED_ON_WRITE, LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT, LIB_TAG_NO_MAIN, ID::name, Object::runtime, and ID::tag.
Referenced by BKE_curves_data_update(), BKE_displist_make_curveTypes(), BKE_lattice_modifiers_calc(), BKE_pointcloud_data_update(), BKE_volume_data_update(), editbmesh_build_data(), and mesh_build_data().
void BKE_object_eval_constraints | ( | struct Depsgraph * | depsgraph, |
struct Scene * | scene, | ||
struct Object * | ob | ||
) |
Definition at line 99 of file object_update.c.
References BKE_constraints_clear_evalob(), BKE_constraints_make_evalob(), BKE_constraints_solve(), BKE_scene_ctime_get(), CONSTRAINT_OBTYPE_OBJECT, Object::constraints, DEG_debug_print_eval(), depsgraph, Object::id, ID::name, NULL, and scene.
Referenced by BKE_object_eval_transform_all(), and force_evaluation_if_constraint_disabled().
void BKE_object_eval_eval_base_flags | ( | struct Depsgraph * | depsgraph, |
struct Scene * | scene, | ||
int | view_layer_index, | ||
struct Object * | object, | ||
int | base_index, | ||
bool | is_from_set | ||
) |
Definition at line 389 of file object_update.c.
References BASE_ENABLED_RENDER, BASE_FROM_SET, Base::base_orig, BASE_SELECTABLE, BASE_SELECTED, BASE_VISIBLE_DEPSGRAPH, BKE_base_eval_flags(), BKE_particle_batch_cache_dirty_tag(), BKE_PARTICLE_BATCH_DIRTY_ALL, BLI_assert, BLI_findlink(), DAG_EVAL_RENDER, DEG_debug_print_eval(), DEG_get_evaluated_view_layer(), DEG_get_mode(), DEG_is_active(), depsgraph, ListBase::first, Base::flag, Object::id, Base::local_collections_bits, Base::local_view_bits, MEM_allocN_len, Object::mode, ID::name, NULL, OB_MODE_PARTICLE_EDIT, Base::object, ViewLayer::object_bases_array, Object::particlesystem, scene, and Scene::view_layers.
Definition at line 59 of file object_update.c.
References BKE_object_to_mat4(), DEG_debug_print_eval(), depsgraph, Object::id, ID::name, and Object::obmat.
Referenced by BKE_object_eval_transform_all().
Definition at line 67 of file object_update.c.
References BKE_object_get_parent_matrix(), copy_m4_m4(), copy_v3_v3(), DEG_debug_print_eval(), depsgraph, Object::id, mul_m4_m4m4(), ID::name, Object::obmat, Object::parent, Object_Runtime::parent_display_origin, Object::parentinv, PARSKEL, Object::partype, PARTYPE, and Object::runtime.
Referenced by BKE_object_eval_transform_all().
void BKE_object_eval_ptcache_reset | ( | struct Depsgraph * | depsgraph, |
struct Scene * | scene, | ||
struct Object * | object | ||
) |
Definition at line 335 of file object_update.c.
References BKE_ptcache_object_reset(), DEG_debug_print_eval(), depsgraph, Object::id, ID::name, PTCACHE_RESET_DEPSGRAPH, and scene.
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 54 of file object_update.c.
References BKE_object_free_derived_caches().
Referenced by bake(), and object_force_modifier_update_for_bind().
void BKE_object_eval_transform_all | ( | struct Depsgraph * | depsgraph, |
struct Scene * | scene, | ||
struct Object * | object | ||
) |
Definition at line 341 of file object_update.c.
References BKE_object_eval_constraints(), BKE_object_eval_local_transform(), BKE_object_eval_parent(), BKE_object_eval_transform_final(), BKE_object_eval_uber_transform(), BLI_listbase_is_empty(), Object::constraints, depsgraph, NULL, Object::parent, and scene.
Referenced by applyFaceNearest(), applyFaceProject(), applyGridAbsolute(), and ignore_parent_tx().
Definition at line 120 of file object_update.c.
References DEG_debug_print_eval(), depsgraph, Object::id, Object::imat, invert_m4_m4_safe(), is_negative_m4(), ID::name, OB_NEG_SCALE, Object::obmat, and Object::transflag.
Referenced by BKE_object_eval_transform_all().
void BKE_object_eval_uber_data | ( | struct Depsgraph * | depsgraph, |
struct Scene * | scene, | ||
struct Object * | ob | ||
) |
Definition at line 327 of file object_update.c.
References BKE_object_batch_cache_dirty_tag(), BKE_object_handle_data_update(), BLI_assert, DEG_debug_print_eval(), depsgraph, Object::id, ID::name, OB_ARMATURE, scene, and Object::type.
Referenced by test_constraint().
Referenced by snap_selected_to_location().
void BKE_object_foreach_display_point | ( | struct Object * | ob, |
const float | obmat[4][4], | ||
void(*)(const float[3], void *) | func_cb, | ||
void * | user_data | ||
) |
Sometimes min-max isn't enough, we need to loop over each point.
Definition at line 4142 of file object.cc.
References BKE_gpencil_visible_stroke_iter(), BKE_object_get_evaluated_mesh(), Object_Runtime::curve_cache, Object::data, CurveCache::disp, ListBase::first, foreach_display_point_gpencil_stroke_fn(), LISTBASE_FOREACH, mul_v3_m4v3(), Mesh::mvert, OB_GPENCIL, GPencilStrokePointIterData::obmat, Object::runtime, Mesh::totvert, Object::type, and user_data.
Referenced by BKE_scene_foreach_display_point().
Definition at line 1832 of file object.cc.
References Object::base_flag, BASE_FROM_DUPLI, BKE_id_free(), BKE_object_free_derived_caches(), DEG_id_tag_update(), eModifierType_ParticleSystem, eParticleSystemFlag_file_loaded, ListBase::first, ParticleSystemModifierData::flag, Object::id, ID_RECALC_GEOMETRY, ID_RECALC_PSYS_REDO, LISTBASE_FOREACH, ParticleSystemModifierData::mesh_final, ParticleSystemModifierData::mesh_original, Object::modifiers, Object::particlesystem, and psys_free_path_cache().
Definition at line 1275 of file object.cc.
References CurveCache::anim_path_accum_length, CurveCache::bev, BKE_curve_bevelList_free(), BKE_displist_free(), BKE_nurbList_free(), Object_Runtime::curve_cache, CurveCache::deformed_nurbs, CurveCache::disp, MEM_freeN, and Object::runtime.
Referenced by BKE_object_free_derived_caches(), and object_convert_exec().
Free data derived from mesh, called when mesh changes or is freed.
Definition at line 1774 of file object.cc.
References Object_Runtime::bb, BKE_crazyspace_api_eval_clear(), BKE_geometry_set_free(), BKE_gpencil_eval_delete(), BKE_libblock_free_data(), BKE_libblock_free_datablock(), BKE_mesh_eval_delete(), BKE_object_free_curve_cache(), BKE_object_to_curve_clear(), BKE_object_to_mesh_clear(), Object::data, Object_Runtime::data_eval, Object_Runtime::data_orig, Object_Runtime::editmesh_bb_cage, Object_Runtime::editmesh_eval_cage, Object_Runtime::geometry_set_eval, Object_Runtime::gpd_eval, GS, ID_ME, Object_Runtime::is_data_eval_owned, MEM_freeN, MEM_SAFE_FREE, Object_Runtime::mesh_deform_eval, ID::name, object_update_from_subsurf_ccg(), and Object::runtime.
Referenced by BKE_curves_data_update(), BKE_displist_make_curveTypes(), BKE_lattice_modifiers_calc(), BKE_mesh_to_curve(), BKE_mesh_to_pointcloud(), BKE_object_eval_reset(), BKE_object_free_caches(), BKE_object_free_modifiers(), BKE_object_runtime_free_data(), BKE_pointcloud_data_update(), BKE_pointcloud_to_mesh(), BKE_sculptsession_bm_to_me_for_render(), BKE_volume_data_update(), clean_viewport_memory_base(), ED_mesh_join_objects_exec(), ED_object_modifier_apply(), ED_object_sculptmode_exit_ex(), ed_vwpaintmode_enter_generic(), ed_vwpaintmode_exit_generic(), gpencil_object_modifier_remove(), makeDerivedMesh(), object_convert_exec(), object_modifier_remove(), object_shaderfx_remove(), blender::deg::ObjectRuntimeBackup::restore_to_object(), and SCULPT_pbvh_clear().
Definition at line 1289 of file object.cc.
References BKE_gpencil_modifier_free_ex(), BKE_modifier_free_ex(), BKE_object_free_derived_caches(), BKE_object_free_particlesystems(), BKE_object_free_softbody(), BLI_pophead(), Object::greasepencil_modifiers, and Object::modifiers.
Referenced by BKE_object_link_modifiers(), object_convert_exec(), object_data_convert_curve_to_mesh(), object_for_curve_to_mesh_create(), and object_free_data().
Definition at line 1261 of file object.cc.
References BLI_pophead(), Object::particlesystem, and psys_free().
Referenced by BKE_object_free_modifiers(), and remove_particle_systems_from_object().
Definition at line 1311 of file object.cc.
References BKE_shaderfx_free_ex(), BLI_pophead(), and Object::shader_fx.
Referenced by object_convert_exec(), and object_free_data().
Definition at line 1270 of file object.cc.
References sbFree().
Referenced by BKE_object_free_modifiers().
Referenced by BKE_editmesh_vert_coords_when_deformed(), BKE_modifier_get_evaluated_mesh_from_evaluated_object(), draw_subdiv_create_requested_buffers(), DRW_mesh_batch_cache_create_requested(), editmesh_final_or_this(), get_evaluated_object_data_with_materials(), mesh_for_snap(), mesh_new_from_mesh_object(), mesh_render_data_create(), mesh_render_mat_len_get(), overlay_edit_mesh_add_ob_to_pass(), OVERLAY_wireframe_cache_populate(), and snap_object_data_editmesh_runtime_get().
Referenced by BKE_lattice_modifiers_calc().
Get evaluated mesh for given object.
Referenced by BKE_effectors_create(), BKE_gpencil_convert_mesh(), BKE_modifier_get_evaluated_mesh_from_evaluated_object(), BKE_sculpt_update_object_after_eval(), BKE_sculpt_update_object_for_edit(), contarget_get_mesh_mat(), ED_draw_object_facemap(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), 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(), blender::io::obj::obj_importer_test::import_and_check(), knifeproject_poly_from_object(), lineart_gpencil_generate(), lineart_object_load_single_instance(), mesh_data_from_duplicator_object(), mesh_for_snap(), mesh_get_eval_final(), mesh_new_from_evaluated_curve_type_object(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_invoke(), nearest_world_object_fn(), blender::io::obj::OBJMesh::OBJMesh(), paintvert_flush_flags(), PE_create_shape_tree(), raycast_obj_fn(), blender::ed::sculpt_paint::sample_curves_3d_brush(), shrinkwrap_get_tarmat(), snap_obj_fn(), stats_object(), and blender::ed::sculpt_paint::use_add_density_mode().
struct SubsurfModifierData* BKE_object_get_last_subsurf_modifier | ( | const struct Object * | ob | ) |
Return the last subsurf modifier of an object, this does not check whether modifiers on top of it are disabled. Return NULL if no such modifier is found.
This does not check if the modifier is enabled as it is assumed that the caller verified that it is enabled for its evaluation mode.
Referenced by BKE_lattice_deform_data_create(), BKE_lattice_deform_verts_get(), and BKE_lattice_modifiers_calc().
Get a mesh which corresponds to the very original mesh from Main.
Referenced by BKE_sculpt_color_layer_create_if_needed(), BKE_sculpt_object_pbvh_ensure(), BKE_sculpt_update_object_before_eval(), build_pbvh_from_regular_mesh(), edbm_reverse_colors_exec(), edbm_rotate_colors_exec(), paint_object_attributes_active_color_fill_ex(), SCULPT_geodesic_fallback_create(), SCULPT_geodesic_mesh_create(), SCULPT_has_loop_colors(), sculpt_save_active_attribute(), sculpt_undo_face_sets_push(), SCULPT_undo_push_node(), sculpt_undo_restore_color(), sculpt_undo_restore_face_sets(), sculpt_undo_set_active_layer(), sculpt_update_object(), SCULPT_visibility_sync_all_face_sets_to_vertices(), vertex_paint_init_stroke(), and vpaint_stroke_update_step_intern().
void BKE_object_get_parent_matrix | ( | struct Object * | ob, |
struct Object * | par, | ||
float | r_parentmat[4][4] | ||
) |
Definition at line 3342 of file object.cc.
References copy_m4_m4(), CU_PATH, Object::data, give_parvert(), mul_m4_m4m4(), mul_v3_m4v3(), OB_CURVES_LEGACY, ob_parbone(), ob_parcurve(), ob_parvert3(), Object::obmat, Object::par1, PARBONE, PAROBJECT, PARSKEL, Object::partype, PARTYPE, PARVERT1, PARVERT3, Object::type, and unit_m4().
Referenced by ABC_get_transform(), BKE_object_apply_mat4_ex(), BKE_object_apply_parent_inverse(), BKE_object_eval_parent(), BKE_object_matrix_local_get(), snap_selected_to_location(), solve_parenting(), and USD_get_transform().
Get mesh which is not affected by modifiers:
object->data
, and it is a mesh which is in the corresponding Main.Referenced by MOD_deform_mesh_eval_get(), and blender::io::obj::OBJMesh::OBJMesh().
struct LinkNode* BKE_object_groups | ( | struct Main * | bmain, |
struct Scene * | scene, | ||
struct Object * | ob | ||
) |
Definition at line 5234 of file object.cc.
References BKE_collection_object_find(), BLI_linklist_prepend(), and scene.
Referenced by make_links_data_exec().
Definition at line 5245 of file object.cc.
References BKE_collection_object_find(), BKE_collection_object_remove(), DEG_id_tag_update(), Collection::id, ID_RECALC_COPY_ON_WRITE, and scene.
Referenced by collection_objects_remove_all_exec(), and make_links_data_exec().
void BKE_object_handle_data_update | ( | struct Depsgraph * | depsgraph, |
struct Scene * | scene, | ||
struct Object * | ob | ||
) |
Definition at line 135 of file object_update.c.
References BKE_curves_data_update(), BKE_displist_make_curveTypes(), BKE_displist_make_mball(), BKE_gpencil_modifiers_calc(), BKE_gpencil_prepare_eval_data(), BKE_gpencil_update_layer_transforms(), BKE_lattice_modifiers_calc(), BKE_pointcloud_data_update(), 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_MLOOPUV, CD_MASK_NORMAL, CD_MASK_ORCO, CD_MASK_PROP_ALL, CD_MASK_PROP_BYTE_COLOR, CD_MASK_PROP_COLOR, Scene::customdata_mask, CustomData_MeshMasks_update(), DAG_EVAL_RENDER, DEG_debug_print_eval(), DEG_get_mode(), depsgraph, ParticleSettings::draw_as, CustomData_MeshMasks::emask, ListBase::first, ParticleSystem::flag, CustomData_MeshMasks::fmask, Object::id, ParticleSettings::instance_collection, ParticleSettings::instance_object, CustomData_MeshMasks::lmask, makeDerivedMesh(), Object::mode, ID::name, ParticleSystem::next, OB_ARMATURE, OB_CURVES, OB_CURVES_LEGACY, OB_DUPLIPARTS, OB_FONT, OB_GPENCIL, 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, 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().
void BKE_object_handle_update | ( | struct Depsgraph * | depsgraph, |
struct Scene * | scene, | ||
struct Object * | ob | ||
) |
Definition at line 4316 of file object.cc.
References BKE_object_handle_update_ex(), depsgraph, and scene.
Referenced by BKE_object_modifier_update_subframe().
void BKE_object_handle_update_ex | ( | struct Depsgraph * | depsgraph, |
struct Scene * | scene, | ||
struct Object * | ob, | ||
struct RigidBodyWorld * | rbw | ||
) |
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 4269 of file object.cc.
References BKE_object_handle_data_update(), BKE_object_where_is_calc_ex(), BKE_pose_channels_hash_ensure(), 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, OB_ARMATURE, Object::pose, POSE_CONSTRAINTS_NEED_UPDATE_FLAGS, POSE_RECALC, ID::recalc, scene, and Object::type.
Referenced by BKE_object_handle_update().
bool BKE_object_has_mode_data | ( | const struct Object * | ob, |
eObjectMode | object_mode | ||
) |
Definition at line 2004 of file object.cc.
References BKE_object_is_in_editmode(), SculptSession::mode_type, OB_MODE_EDIT, OB_MODE_POSE, OB_MODE_SCULPT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, Object::pose, and Object::sculpt.
Referenced by ED_editors_init().
int BKE_object_insert_ptcache | ( | struct Object * | ob | ) |
Definition at line 4524 of file object.cc.
References BLI_addtail(), BLI_listbase_sort(), LinkData::data, ListBase::first, LinkData::next, pc_cmp(), Object::pc_ids, POINTER_AS_INT, and POINTER_FROM_INT.
Referenced by ptcache_filename_ext_append().
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 4982 of file object.cc.
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, OB_CURVES_LEGACY, object_deforms_in_time(), scene, Curve::taperobj, ModifierTypeInfo::type, ModifierData::type, and Object::type.
Referenced by EEVEE_motion_blur_cache_populate().
Actual check for internal data, not context or flags.
Referenced by armature_undosys_step_decode(), BKE_object_facemap_remove(), createTransObject(), curve_undosys_step_decode(), do_outliner_item_editmode_toggle(), DRW_object_is_in_edit_mode(), ED_armature_edit_select_pick_bone(), ED_armature_origin_set(), ED_object_add_duplicate(), ED_object_editmode_enter_ex(), ed_object_mode_generic_exit_ex(), ED_object_modifier_apply(), ED_view3d_viewcontext_init_object(), ED_wpaint_ensure_data(), foreach_libblock_remap_callback(), knifeproject_exec(), lattice_undosys_step_decode(), material_slot_remove_unused_exec(), mball_undosys_step_decode(), mesh_for_snap(), mesh_undosys_step_decode(), object_array_for_shading_edit_mode_disabled_filter(), object_array_for_shading_edit_mode_enabled_filter(), object_convert_poll(), object_facemap_remap(), object_remesh_poll(), outliner_object_delete_fn(), setSnappingCallback(), snap_obj_fn(), and snapCurve().
Returns true if the Object is from an external blend file (libdata).
Referenced by BKE_view_layer_selected_editable_objects_iterator_begin(), and BKE_view_layer_selected_editable_objects_iterator_next().
bool BKE_object_is_mode_compat | ( | const struct Object * | ob, |
eObjectMode | object_mode | ||
) |
Definition at line 2034 of file object.cc.
References Object::mode.
Referenced by drw_select_filter_object_mode_lock(), ed_object_select_pick(), and tree_element_object_activate().
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 4854 of file object.cc.
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 ED_object_modifier_link(), and make_links_data_exec().
Definition at line 2934 of file object.cc.
References axis_angle_to_quat(), BLI_ASSERT_UNIT_M3, Object::dquat, Object::drot, Object::drotAngle, Object::drotAxis, eulO_to_quat(), invert_qt_normalized(), mat3_normalized_to_quat(), mul_qt_qtqt(), normalize_qt_qt(), Object::quat, quat_to_axis_angle(), quat_to_compatible_eulO(), quat_to_eulO(), Object::rot, ROT_MODE_AXISANGLE, ROT_MODE_QUAT, Object::rotAngle, Object::rotAxis, and Object::rotmode.
Referenced by BKE_object_apply_mat4_ex(), and ObjectToTransData().
Definition at line 3093 of file object.cc.
References BKE_object_get_parent_matrix(), copy_m4_m4(), invert_m4(), mul_m4_m4m4(), Object::obmat, and Object::parent.
Referenced by TransformWriter::add_node_transform_ob(), and BCMatrix::set_transform().
Definition at line 3839 of file object.cc.
References add_v3_v3(), BKE_boundbox_minmax(), BKE_curve_boundbox_get(), BKE_curves_boundbox_get(), BKE_gpencil_boundbox_get(), BKE_mball_minmax_ex(), BKE_mesh_boundbox_get(), BKE_pointcloud_boundbox_get(), BKE_pose_minmax(), BKE_volume_boundbox_get(), copy_v3_v3(), Object::data, Lattice::def, Object::empty_drawsize, minmax_v3v3_v3(), mul_v3_m4v3(), OB_ARMATURE, OB_CURVES, OB_CURVES_LEGACY, OB_EMPTY, OB_FONT, OB_GPENCIL, OB_LATTICE, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, Object::obmat, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, Object::scale, size(), sub_v3_v3(), Object::type, v, and w().
Referenced by clampto_evaluate(), PE_minmax(), view3d_localview_init(), and view3d_object_calc_minmax().
bool BKE_object_minmax_dupli | ( | struct Depsgraph * | depsgraph, |
struct Scene * | scene, | ||
struct Object * | ob, | ||
float | r_min[3], | ||
float | r_max[3], | ||
bool | use_hidden | ||
) |
Definition at line 4075 of file object.cc.
References Object_Runtime::bb, BKE_object_boundbox_get(), BKE_object_replace_data_on_shallow_copy(), depsgraph, free_object_duplilist(), Object_Runtime::geometry_set_eval, LISTBASE_FOREACH, MEM_SAFE_FREE, minmax_v3v3_v3(), mul_v3_m4v3(), OB_DUPLI, object_duplilist(), Object::runtime, scene, Object::transflag, and BoundBox::vec.
Referenced by object_origin_set_exec(), and view3d_object_calc_minmax().
Calculate visual bounds from an empty objects draw-type.
Definition at line 4011 of file object.cc.
References BLI_assert, CLAMP_MAX, CLAMP_MIN, copy_v3_v3(), Object::empty_drawsize, Object::empty_drawtype, Object::ima_ofs, max, min, OB_ARROWS, OB_CIRCLE, OB_CUBE, OB_EMPTY, OB_EMPTY_CONE, OB_EMPTY_IMAGE, OB_EMPTY_SPHERE, OB_PLAINAXES, OB_SINGLE_ARROW, and Object::type.
Referenced by BKE_pchan_minmax().
void BKE_object_modifier_gpencil_hook_reset | ( | struct Object * | ob, |
struct HookGpencilModifierData * | hmd | ||
) |
Definition at line 1343 of file object.cc.
References BKE_pose_channel_find_name(), Object::imat, invert_m4_m4(), mul_m4_m4m4(), HookGpencilModifierData::object, Object::obmat, HookGpencilModifierData::parentinv, Object::pose, bPoseChannel::pose_mat, and HookGpencilModifierData::subtarget.
void BKE_object_modifier_hook_reset | ( | struct Object * | ob, |
struct HookModifierData * | hmd | ||
) |
Definition at line 1320 of file object.cc.
References BKE_pose_channel_find_name(), Object::imat, invert_m4_m4(), mul_m4_m4m4(), HookModifierData::object, Object::obmat, HookModifierData::parentinv, Object::pose, bPoseChannel::pose_mat, and HookModifierData::subtarget.
Referenced by object_hook_reset_exec().
void BKE_object_modifier_set_active | ( | struct Object * | ob, |
struct ModifierData * | md | ||
) |
Set the object's active modifier.
md | If nullptr, only clear the active modifier, otherwise it must be in the Object.modifiers list. |
Definition at line 1367 of file object.cc.
References BLI_assert, BLI_findindex(), eModifierFlag_Active, ModifierData::flag, LISTBASE_FOREACH, and Object::modifiers.
Referenced by BKE_modifier_remove_from_list(), BKE_object_copy_modifier(), ED_object_modifier_add(), ED_object_modifier_copy(), modifier_set_active_exec(), object_add_or_copy_particle_system(), and tree_element_modifier_activate().
bool BKE_object_modifier_stack_copy | ( | struct Object * | ob_dst, |
const struct Object * | ob_src, | ||
bool | do_copy_all, | ||
int | flag_subdata | ||
) |
Copy the whole stack of modifiers from one object into another.
ob_dst
, if needed calling code must do it.do_copy_all | If true, even modifiers that should not support copying (like Hook one) will be duplicated. |
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 | ||
) |
Definition at line 5405 of file object.cc.
References bArmature::adt, Curve::adt, Object::adt, ADT_RECALC_ANIM, BKE_animsys_eval_context_construct(), BKE_animsys_evaluate_animdata(), BKE_constraint_targets_flush(), BKE_constraint_targets_get(), BKE_modifiers_findby_type(), BKE_object_handle_update(), BKE_object_modifier_update_subframe(), BKE_object_where_is_calc_time(), BKE_pose_where_is(), DynamicPaintModifierData::canvas, Object::constraints, Object::data, DEG_is_active(), depsgraph, ELEM, eModifierType_DynamicPaint, eModifierType_Fluid, bArmature::id, Curve::id, Object::id, ID_RECALC_ALL, LISTBASE_FOREACH, MOD_FLUID_TYPE_DOMAIN, OB_ARMATURE, OB_CURVES_LEGACY, object_cacheIgnoreClear(), Object::parent, Object::partype, PARVERT1, PARVERT3, ID::recalc, scene, Object::track, type, FluidModifierData::type, and Object::type.
Referenced by BKE_object_modifier_update_subframe(), dynamicPaint_brushMeshCalculateVelocity(), dynamicPaint_brushObjectCalculateVelocity(), and dynamicPaint_doStep().
void BKE_object_modifiers_lib_link_common | ( | void * | userData, |
struct Object * | ob, | ||
struct ID ** | idpoin, | ||
int | cb_flag | ||
) |
Definition at line 5562 of file object.cc.
References BLO_read_id_address, Object::id, id_us_plus_no_lib(), IDWALK_CB_USER, and ID::lib.
Referenced by BKE_gpencil_modifier_blend_read_lib(), BKE_modifier_blend_read_lib(), and BKE_shaderfx_blend_read_lib().
Check of objects moves in time.
This makes it possible to give some degree of false-positives here, but it's currently an acceptable tradeoff between complexity and check speed. In combination with checks of modifier stack and real life usage percentage of false-positives shouldn't be that high.
Referenced by blender::io::alembic::ABCTransformWriter::check_is_animated(), blender::io::usd::USDTransformWriter::check_is_animated(), and EEVEE_motion_blur_cache_populate().
struct MovieClip* BKE_object_movieclip_get | ( | struct Scene * | scene, |
struct Object * | ob, | ||
bool | use_default | ||
) |
Definition at line 5042 of file object.cc.
References CAMERASOLVER_ACTIVECLIP, bCameraSolverConstraint::clip, Scene::clip, CONSTRAINT_OFF, CONSTRAINT_TYPE_CAMERASOLVER, Object::constraints, ListBase::first, bCameraSolverConstraint::flag, if(), bConstraint::next, scene, and bConstraint::type.
Referenced by apply_objects_internal(), bundle_midpoint(), camera_view3d_reconstruction(), ed_object_select_pick(), get_camera_with_movieclip(), image_camera_background_texture_get(), and snapCamera().
Definition at line 2161 of file object.cc.
References BKE_armature_add(), BKE_camera_add(), BKE_curve_add(), BKE_curves_add(), BKE_gpencil_data_addnew(), BKE_lattice_add(), BKE_light_add(), BKE_lightprobe_add(), BKE_mball_add(), BKE_mesh_add(), BKE_pointcloud_add_default(), BKE_speaker_add(), BKE_volume_add(), CLOG_ERROR, get_obdata_defname(), LOG, OB_ARMATURE, OB_CAMERA, OB_CURVES, OB_CURVES_LEGACY, OB_EMPTY, OB_FONT, OB_GPENCIL, OB_LAMP, OB_LATTICE, OB_LIGHTPROBE, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SPEAKER, OB_SURF, OB_VOLUME, and type.
Referenced by bc_add_object(), blender::io::obj::MeshFromGeometry::create_mesh(), and object_add_common().
Returns true if the Object data is from an external blend file (libdata).
Referenced by apply_armature_pose2bones_exec(), createTransTexspace(), ED_object_editmode_enter_ex(), gpencil_bake_mesh_animation_exec(), gpencil_trace_image_exec(), join_shapes_exec(), and object_join_exec().
Use with newly created objects to set their size (used to apply scene-scale).
Definition at line 2842 of file object.cc.
References Light::area_size, Light::area_sizey, Light::area_sizez, BKE_lattice_transform(), Object::data, Light::dist, Camera::drawsize, Object::empty_drawsize, Curve::fsize, lamp, OB_CAMERA, OB_EMPTY, OB_FONT, OB_LAMP, OB_LATTICE, scale_m4_fl(), size(), Object::type, and unit_m4().
Referenced by effector_add_exec(), object_add_exec(), object_add_text_exec(), object_empty_add_exec(), and object_light_add_exec().
bool BKE_object_obdata_texspace_get | ( | struct Object * | ob, |
char ** | r_texflag, | ||
float ** | r_loc, | ||
float ** | r_size | ||
) |
Definition at line 4328 of file object.cc.
References BKE_curve_texspace_ensure(), BKE_mesh_texspace_get_reference(), Object::data, GS, ID_CU_LEGACY, ID_MB, ID_ME, if(), Curve::loc, MetaBall::loc, Curve::size, MetaBall::size, Curve::texflag, and MetaBall::texflag.
Referenced by BKE_mesh_texspace_copy_from_object(), and createTransTexspace().
int BKE_object_obdata_to_type | ( | const struct ID * | id | ) |
Return -1 on failure.
Referenced by ED_object_add_type_with_obdata(), loose_data_instantiate_obdata_process(), and object_data_instance_add_exec().
Referenced by ED_object_parent(), ED_object_parent_set(), parent_noinv_set_exec(), and vertex_parent_set_exec().
Definition at line 2511 of file object.cc.
References BKE_modifiers_is_deformed_by_armature(), and BKE_object_pose_context_check().
Referenced by apply_armature_pose2bones_exec(), armature_layers_get_data(), BKE_object_defgroup_selected_get(), BKE_object_pose_armature_get_visible(), BKE_object_pose_armature_get_with_wpaint_check(), 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_ex(), ED_operator_posemode_local(), ED_pose_object_from_context(), ED_transform_calc_gizmo_stats(), ED_vgroup_sync_from_pose(), ED_view3d_select_filter_from_mode(), get_poselib_object(), is_cursor_visible(), outliner_show_active_get_element(), 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().
struct Object* BKE_object_pose_armature_get_visible | ( | struct Object * | ob, |
struct ViewLayer * | view_layer, | ||
struct View3D * | v3d | ||
) |
Definition at line 2553 of file object.cc.
References BASE_VISIBLE, BKE_object_pose_armature_get(), and BKE_view_layer_base_find().
A version of BKE_object_pose_armature_get with an additional check. When ob
isn't an armature: only return the referenced pose object when the active object is in weight paint mode.
Definition at line 2531 of file object.cc.
References BKE_object_pose_armature_get(), Object::mode, OB_GPENCIL, OB_MESH, OB_MODE_WEIGHT_GPENCIL, OB_MODE_WEIGHT_PAINT, and Object::type.
Referenced by view3d_select_exec().
struct Object** BKE_object_pose_array_get | ( | struct ViewLayer * | view_layer, |
struct View3D * | v3d, | ||
unsigned int * | r_objects_len | ||
) |
Definition at line 2598 of file object.cc.
References BKE_object_pose_array_get_ex().
Referenced by ED_transform_calc_gizmo_stats(), snap_sel_to_grid_exec(), and snap_selected_to_location().
struct Object** BKE_object_pose_array_get_ex | ( | struct ViewLayer * | view_layer, |
struct View3D * | v3d, | ||
unsigned int * | r_objects_len, | ||
bool | unique | ||
) |
Access pose array with special check to get pose object when in weight paint mode.
Definition at line 2567 of file object.cc.
References BKE_object_pose_armature_get(), BKE_view_layer_array_from_objects_in_mode_params(), MEM_mallocN, OB_MODE_POSE, OBACT, and ObjectsInModeParams::object_mode.
Referenced by BKE_object_pose_array_get(), and 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 | ||
) |
Definition at line 2594 of file object.cc.
References BKE_object_pose_array_get_ex().
Referenced by pose_hide_exec(), pose_reveal_exec(), pose_select_mirror_exec(), pose_select_same_group(), pose_select_same_keyingset(), pose_select_same_layer(), and tree_element_posechannel_activate().
struct Base** BKE_object_pose_base_array_get | ( | struct ViewLayer * | view_layer, |
struct View3D * | v3d, | ||
unsigned int * | r_bases_len | ||
) |
Definition at line 2645 of file object.cc.
References BKE_object_pose_base_array_get_ex().
Referenced by ed_armature_pick_bone_impl().
struct Base** BKE_object_pose_base_array_get_ex | ( | struct ViewLayer * | view_layer, |
struct View3D * | v3d, | ||
unsigned int * | r_bases_len, | ||
bool | unique | ||
) |
Definition at line 2603 of file object.cc.
References BASACT, BKE_object_pose_armature_get(), BKE_view_layer_array_from_bases_in_mode_params(), BKE_view_layer_base_find(), MEM_mallocN, OB_MODE_POSE, Base::object, and ObjectsInModeParams::object_mode.
Referenced by BKE_object_pose_base_array_get(), and 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 2641 of file object.cc.
References BKE_object_pose_base_array_get_ex().
Referenced by ED_pose_deselect_all_multi().
Referenced by ED_operator_posemode_context().
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 5157 of file object.cc.
References BASE_EDITABLE, BASE_SELECTED_EDITABLE, BKE_object_is_child_recursive(), LIB_TAG_DOIT, LISTBASE_FOREACH, 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, ViewLayer::object_bases, obrel_armature_find(), obrel_list_add(), obrel_list_test(), and Object::parent.
Referenced by collada_export().
Definition at line 5590 of file object.cc.
References Object_Runtime::bb, BKE_object_obdata_to_type(), BOUNDBOX_DIRTY, Object::data, Object_Runtime::data_eval, BoundBox::flag, Object_Runtime::geometry_set_eval, Object::id, ID::py_instance, Object::runtime, and Object::type.
Referenced by BKE_object_minmax_dupli(), and duplidata_key_free().
The function frees memory used by the runtime data, but not the runtime field itself.
All runtime data is cleared to ensure it's not used again, in keeping with other _free_data(..)
functions.
Definition at line 5110 of file object.cc.
References BKE_object_free_derived_caches(), and BKE_object_runtime_reset().
Referenced by curve_to_mesh_eval_ensure().
Definition at line 5090 of file object.cc.
References Object::runtime.
Referenced by BKE_object_runtime_free_data(), curve_to_mesh_eval_ensure(), blender::deg::ObjectRuntimeBackup::init_from_object(), object_blend_read_data(), and object_blend_write().
Reset all pointers which we don't want to be shared when copying the object.
Definition at line 2887 of file object.cc.
References Object::dscale, mul_v3_v3v3(), Object::scale, and size_to_mat3().
Referenced by apply_objects_internal(), BKE_object_to_mat3(), mball_select_similar_type(), mball_select_similar_type_get(), multiresModifier_prepare_join(), and multiresModifier_scale_disp().
Return the number of scenes using (instantiating) that object in their collections.
Definition at line 5031 of file object.cc.
References BKE_collection_has_object_recursive(), LISTBASE_FOREACH, Scene::master_collection, scene, and Main::scenes.
Referenced by single_object_users_collection().
Definition at line 4321 of file object.cc.
References BLI_assert, Object::mode, SculptSession::mode_type, OB_MODE_ALL_SCULPT, and Object::sculpt.
Referenced by ED_editors_init(), and object_blend_read_data().
Definition at line 374 of file object_update.c.
References BKE_object_data_select_update(), BLI_mutex_lock(), BLI_mutex_unlock(), Object::data, Object_Runtime::data_orig, DEG_debug_print_eval(), depsgraph, Object::id, Object_Runtime::is_data_eval_owned, ID::name, OB_MESH, Mesh::runtime, Object::runtime, and Object::type.
Definition at line 4729 of file object.cc.
References BKE_id_free_us(), BKE_key_from_object_p(), and ELEM.
Referenced by BKE_object_shapekey_remove(), and shape_key_remove_exec().
struct KeyBlock* BKE_object_shapekey_insert | ( | struct Main * | bmain, |
struct Object * | ob, | ||
const char * | name, | ||
bool | from_mix | ||
) |
Definition at line 4697 of file object.cc.
References insert_curvekey(), insert_lattkey(), insert_meshkey(), OB_CURVES_LEGACY, OB_LATTICE, OB_MESH, OB_SURF, Object::shapenr, and Object::type.
Referenced by ED_object_shape_key_add().
Definition at line 4746 of file object.cc.
References BKE_curve_nurbs_get(), BKE_key_from_object(), BKE_keyblock_convert_to_curve(), BKE_keyblock_convert_to_lattice(), BKE_keyblock_convert_to_mesh(), BKE_object_shapekey_free(), BLI_assert, BLI_findindex(), BLI_listbase_is_empty(), BLI_remlink(), Key::block, KeyBlock::data, Object::data, ListBase::first, if(), LISTBASE_FOREACH, MEM_freeN, mesh, Mesh::mvert, OB_CURVES_LEGACY, OB_LATTICE, OB_MESH, OB_SURF, Key::refkey, Object::shapenr, Key::totkey, Mesh::totvert, and Object::type.
Referenced by object_shapekey_remove().
Definition at line 5070 of file object.cc.
References ELEM, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_GPENCIL, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, and Object::type.
Referenced by basic_cache_populate(), and BKE_object_material_slot_used().
Referenced by modifier_copy_to_selected_poll().
Definition at line 255 of file object_update.c.
References Object::base_flag, BLI_assert, BLI_strdup(), Object::constinv, copy_m4_m4(), DEG_get_original_object(), DEG_is_active(), depsgraph, ListBase::first, Object::flag, Object::imat, MEM_SAFE_FREE, Object::modifiers, NULL, object_sync_boundbox_to_original(), Object::obmat, STREQ, and Object::transflag.
Definition at line 4219 of file object.cc.
References ObTfmBack::constinv, Object::constinv, copy_m4_m4(), copy_qt_qt(), copy_v3_v3(), ObTfmBack::dloc, Object::dloc, ObTfmBack::dquat, Object::dquat, ObTfmBack::drot, Object::drot, ObTfmBack::drotAngle, Object::drotAngle, ObTfmBack::drotAxis, Object::drotAxis, ObTfmBack::dscale, Object::dscale, ObTfmBack::imat, Object::imat, ObTfmBack::loc, Object::loc, MEM_mallocN, ObTfmBack::obmat, Object::obmat, ObTfmBack::parentinv, Object::parentinv, ObTfmBack::quat, Object::quat, ObTfmBack::rot, Object::rot, ObTfmBack::rotAngle, Object::rotAngle, ObTfmBack::rotAxis, Object::rotAxis, ObTfmBack::scale, and Object::scale.
Referenced by ED_view3d_cameracontrol_acquire(), and object_transform_axis_target_invoke().
Referenced by ObjectToTransData().
void BKE_object_tfm_protected_backup | ( | const struct Object * | ob, |
ObjectTfmProtectedChannels * | obtfm | ||
) |
void BKE_object_tfm_protected_restore | ( | struct Object * | ob, |
const ObjectTfmProtectedChannels * | obtfm, | ||
short | protectflag | ||
) |
Definition at line 3007 of file object.cc.
References ObjectTfmProtectedChannels::dloc, Object::dloc, ObjectTfmProtectedChannels::dquat, Object::dquat, ObjectTfmProtectedChannels::drot, Object::drot, ObjectTfmProtectedChannels::drotAngle, Object::drotAngle, ObjectTfmProtectedChannels::drotAxis, Object::drotAxis, ObjectTfmProtectedChannels::dscale, Object::dscale, ObjectTfmProtectedChannels::loc, Object::loc, OB_LOCK_LOCX, OB_LOCK_ROT4D, OB_LOCK_ROTW, OB_LOCK_ROTX, OB_LOCK_SCALEX, ObjectTfmProtectedChannels::quat, Object::quat, ObjectTfmProtectedChannels::rot, Object::rot, ObjectTfmProtectedChannels::rotAngle, Object::rotAngle, ObjectTfmProtectedChannels::rotAxis, Object::rotAxis, ObjectTfmProtectedChannels::scale, and Object::scale.
Referenced by ED_view3d_camera_lock_sync(), object_apply_mat4_with_protect(), view3d_camera_to_view_exec(), and view3d_camera_to_view_selected_impl().
Definition at line 4242 of file object.cc.
References ObTfmBack::constinv, Object::constinv, copy_m4_m4(), copy_qt_qt(), copy_v3_v3(), ObTfmBack::dloc, Object::dloc, ObTfmBack::dquat, Object::dquat, ObTfmBack::drot, Object::drot, ObTfmBack::drotAngle, Object::drotAngle, ObTfmBack::drotAxis, Object::drotAxis, ObTfmBack::dscale, Object::dscale, ObTfmBack::imat, Object::imat, ObTfmBack::loc, Object::loc, ObTfmBack::obmat, Object::obmat, ObTfmBack::parentinv, Object::parentinv, ObTfmBack::quat, Object::quat, ObTfmBack::rot, Object::rot, ObTfmBack::rotAngle, Object::rotAngle, ObTfmBack::rotAxis, Object::rotAxis, ObTfmBack::scale, and Object::scale.
Referenced by ED_view3d_cameracontrol_release(), and object_transform_axis_target_cancel().
struct Curve* BKE_object_to_curve | ( | struct Object * | object, |
struct Depsgraph * | depsgraph, | ||
bool | apply_modifiers | ||
) |
This is an utility function for Python's object.to_curve()
. The result is owned by the object.
The curve will be freed when object is re-evaluated or is destroyed. It is possible to force clear memory used by this curve by calling BKE_object_to_curve_clear().
If apply_modifiers is true and the object is a curve one, then spline deform modifiers are applied on the curve control points.
Definition at line 5538 of file object.cc.
References BKE_curve_new_from_object(), BKE_object_to_curve_clear(), curve, and depsgraph.
Definition at line 5547 of file object.cc.
References BKE_id_free(), Object_Runtime::object_as_temp_curve, and Object::runtime.
Referenced by BKE_object_free_derived_caches(), and BKE_object_to_curve().
Definition at line 3069 of file object.cc.
References BKE_object_rot_to_mat3(), BKE_object_scale_to_mat3(), and mul_m3_m3m3().
Referenced by apply_objects_internal(), BKE_object_to_mat4(), object_transform_axis_target_invoke(), and ObjectToTransData().
Definition at line 3082 of file object.cc.
References add_v3_v3v3(), BKE_object_to_mat3(), copy_m4_m3(), Object::dloc, and Object::loc.
Referenced by actcon_get_tarmat(), BKE_constraint_mat_convertspace(), BKE_object_eval_local_transform(), BKE_object_where_is_calc_mat4(), ED_object_base_init_transform_on_add(), ED_object_xform_array_m4(), object_apply_mat4_with_protect(), object_origin_set_exec(), object_where_is_calc_ex(), set_axis(), set_plane_exec(), blender::io::alembic::AbcObjectReader::setupObjectTransform(), and solve_parenting().
struct Mesh* BKE_object_to_mesh | ( | struct Depsgraph * | depsgraph, |
struct Object * | object, | ||
bool | preserve_all_data_layers | ||
) |
This is an utility function for Python's object.to_mesh() (the naming is not very clear though). The result is owned by the object.
The mesh will be freed when object is re-evaluated or is destroyed. It is possible to force to clear memory used by this mesh by calling BKE_object_to_mesh_clear().
If preserve_all_data_layers is truth then the modifier stack is re-evaluated to ensure it preserves all possible custom data layers.
NOTE: Dependency graph argument is required when preserve_all_data_layers is truth, and is ignored otherwise.
Definition at line 5520 of file object.cc.
References BKE_mesh_new_from_object(), BKE_object_to_mesh_clear(), depsgraph, and mesh.
Referenced by Freestyle::BlenderFileLoader::Load().
Definition at line 5529 of file object.cc.
References BKE_id_free(), Object_Runtime::object_as_temp_mesh, and Object::runtime.
Referenced by BKE_object_free_derived_caches(), BKE_object_to_mesh(), and Freestyle::BlenderFileLoader::Load().
Updates select_id of all objects in the given bmain.
Definition at line 5504 of file object.cc.
References ListBase::first, Object::id, ID::next, Main::objects, Object::runtime, and Object_Runtime::select_id.
Referenced by armature_select_linked_pick_invoke(), armature_shortest_path_pick_invoke(), ed_view3d_give_base_under_cursor_ex(), view3d_box_select_exec(), view3d_circle_select_exec(), view3d_lasso_select_exec(), and view3d_select_exec().
int BKE_object_visibility | ( | const struct Object * | ob, |
int | dag_eval_mode | ||
) |
Return which parts of the object are visible, as evaluated by depsgraph.
Referenced by DRW_object_visibility_in_active_context(), eevee_lightbake_count_probes(), eevee_lightbake_gather_probes(), init_meta(), blender::io::HierarchyContext::is_object_visible(), lineart_main_load_geometries(), and Freestyle::BlenderFileLoader::Load().
void BKE_object_where_is_calc | ( | struct Depsgraph * | depsgraph, |
struct Scene * | scene, | ||
struct Object * | ob | ||
) |
Compute object world transform and store it in ob->obmat
.
Definition at line 3495 of file object.cc.
References DEG_get_ctime(), depsgraph, object_where_is_calc_ex(), and scene.
Referenced by add_hook_object(), apply_objects_internal(), BKE_object_workob_calc_parent(), ED_view3d_cameracontrol_acquire(), object_origin_set_exec(), ObjectToTransData(), set_plane_exec(), txt_add_object(), and visual_transform_apply_exec().
void BKE_object_where_is_calc_ex | ( | struct Depsgraph * | depsgraph, |
struct Scene * | scene, | ||
struct RigidBodyWorld * | rbw, | ||
struct Object * | ob, | ||
float | r_originmat[3][3] | ||
) |
Definition at line 3489 of file object.cc.
References DEG_get_ctime(), depsgraph, object_where_is_calc_ex(), and scene.
Referenced by BKE_object_handle_update_ex(), and snap_sel_to_grid_exec().
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 3478 of file object.cc.
References BKE_object_to_mat4(), Object::parent, and solve_parenting().
Referenced by BKE_tracking_get_camera_object_matrix(), followtrack_distance_from_viewplane_get(), and object_solver_inverted_matrix().
void BKE_object_where_is_calc_time | ( | struct Depsgraph * | depsgraph, |
struct Scene * | scene, | ||
struct Object * | ob, | ||
float | ctime | ||
) |
Definition at line 3467 of file object.cc.
References Object::adt, ADT_RECALC_ALL, BKE_animsys_eval_context_construct(), BKE_animsys_evaluate_animdata(), DEG_is_active(), depsgraph, Object::id, object_where_is_calc_ex(), and scene.
Referenced by BKE_object_modifier_update_subframe(), and evaluate_emitter_anim().
void BKE_object_workob_calc_parent | ( | struct Depsgraph * | depsgraph, |
struct Scene * | scene, | ||
struct Object * | ob, | ||
struct 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:
Definition at line 3501 of file object.cc.
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 apply_objects_internal(), applyarmature_fix_boneparents(), ED_object_parent_set(), ignore_parent_tx(), SkinInfo::link_armature(), and vertex_parent_set_exec().
Definition at line 1252 of file object.cc.
References Object::dscale, ROT_MODE_EUL, Object::rotmode, and Object::scale.
Referenced by BKE_object_workob_calc_parent(), and what_does_obaction().
void BKE_scene_foreach_display_point | ( | struct Depsgraph * | depsgraph, |
void(*)(const float[3], void *) | func_cb, | ||
void * | user_data | ||
) |
Definition at line 4182 of file object.cc.
References Object::base_flag, BASE_SELECTED, BKE_object_foreach_display_point(), DEG_ITER_OBJECT_FLAG_DUPLI, DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY, DEG_ITER_OBJECT_FLAG_VISIBLE, DEG_OBJECT_ITER_BEGIN, DEG_OBJECT_ITER_END, depsgraph, Object::obmat, and user_data.
Referenced by BKE_camera_view_frame_fit_to_scene().
struct Object ATTR_RETURNS_NONNULL |
Definition at line 180 of file BKE_object.h.