|
Blender
V2.93
|
#include <math.h>#include <stdio.h>#include <string.h>#include "CLG_log.h"#include "MEM_guardedalloc.h"#include "DNA_anim_types.h"#include "DNA_armature_types.h"#include "DNA_camera_types.h"#include "DNA_collection_types.h"#include "DNA_constraint_types.h"#include "DNA_defaults.h"#include "DNA_dynamicpaint_types.h"#include "DNA_effect_types.h"#include "DNA_fluid_types.h"#include "DNA_gpencil_modifier_types.h"#include "DNA_gpencil_types.h"#include "DNA_key_types.h"#include "DNA_lattice_types.h"#include "DNA_light_types.h"#include "DNA_lightprobe_types.h"#include "DNA_material_types.h"#include "DNA_mesh_types.h"#include "DNA_meshdata_types.h"#include "DNA_meta_types.h"#include "DNA_movieclip_types.h"#include "DNA_nla_types.h"#include "DNA_object_fluidsim_types.h"#include "DNA_object_types.h"#include "DNA_pointcloud_types.h"#include "DNA_rigidbody_types.h"#include "DNA_scene_types.h"#include "DNA_screen_types.h"#include "DNA_sequence_types.h"#include "DNA_shader_fx_types.h"#include "DNA_space_types.h"#include "DNA_view3d_types.h"#include "DNA_world_types.h"#include "BLI_blenlib.h"#include "BLI_kdtree.h"#include "BLI_linklist.h"#include "BLI_listbase.h"#include "BLI_math.h"#include "BLI_threads.h"#include "BLI_utildefines.h"#include "BLT_translation.h"#include "BKE_DerivedMesh.h"#include "BKE_action.h"#include "BKE_anim_data.h"#include "BKE_anim_path.h"#include "BKE_anim_visualization.h"#include "BKE_animsys.h"#include "BKE_armature.h"#include "BKE_camera.h"#include "BKE_collection.h"#include "BKE_constraint.h"#include "BKE_curve.h"#include "BKE_deform.h"#include "BKE_displist.h"#include "BKE_duplilist.h"#include "BKE_editmesh.h"#include "BKE_editmesh_cache.h"#include "BKE_effect.h"#include "BKE_fcurve.h"#include "BKE_fcurve_driver.h"#include "BKE_font.h"#include "BKE_geometry_set.h"#include "BKE_global.h"#include "BKE_gpencil.h"#include "BKE_gpencil_geom.h"#include "BKE_gpencil_modifier.h"#include "BKE_hair.h"#include "BKE_icons.h"#include "BKE_idprop.h"#include "BKE_idtype.h"#include "BKE_image.h"#include "BKE_key.h"#include "BKE_lattice.h"#include "BKE_layer.h"#include "BKE_lib_id.h"#include "BKE_lib_query.h"#include "BKE_lib_remap.h"#include "BKE_light.h"#include "BKE_lightprobe.h"#include "BKE_linestyle.h"#include "BKE_main.h"#include "BKE_material.h"#include "BKE_mball.h"#include "BKE_mesh.h"#include "BKE_mesh_wrapper.h"#include "BKE_modifier.h"#include "BKE_multires.h"#include "BKE_node.h"#include "BKE_object.h"#include "BKE_object_facemap.h"#include "BKE_paint.h"#include "BKE_particle.h"#include "BKE_pbvh.h"#include "BKE_pointcache.h"#include "BKE_pointcloud.h"#include "BKE_rigidbody.h"#include "BKE_scene.h"#include "BKE_shader_fx.h"#include "BKE_softbody.h"#include "BKE_speaker.h"#include "BKE_subdiv_ccg.h"#include "BKE_subsurf.h"#include "BKE_volume.h"#include "DEG_depsgraph.h"#include "DEG_depsgraph_query.h"#include "DRW_engine.h"#include "BLO_read_write.h"#include "SEQ_sequencer.h"#include "CCGSubSurf.h"#include "atomic_ops.h"Go to the source code of this file.
Classes | |
| struct | ObTfmBack |
Macros | |
| #define | DNA_DEPRECATED_ALLOW |
| #define | VPARENT_THREADING_HACK |
| #define | TFMCPY(_v) (obtfm->_v = ob->_v) |
| #define | TFMCPY3D(_v) copy_v3_v3(obtfm->_v, ob->_v) |
| #define | TFMCPY4D(_v) copy_v4_v4(obtfm->_v, ob->_v) |
| #define | TFMCPY(_v) (object_dst->_v = object_src->_v) |
| #define | TFMCPY3D(_v) copy_v3_v3(object_dst->_v, object_src->_v) |
| #define | TFMCPY4D(_v) copy_v4_v4(object_dst->_v, object_src->_v) |
Variables | |
| static CLG_LogRef | LOG = {"bke.object"} |
| static ThreadMutex | vparent_lock = BLI_MUTEX_INITIALIZER |
| IDTypeInfo | IDType_ID_OB |
| #define TFMCPY | ( | _v | ) | (obtfm->_v = ob->_v) |
| #define TFMCPY | ( | _v | ) | (object_dst->_v = object_src->_v) |
| #define TFMCPY3D | ( | _v | ) | copy_v3_v3(obtfm->_v, ob->_v) |
| #define TFMCPY3D | ( | _v | ) | copy_v3_v3(object_dst->_v, object_src->_v) |
| #define TFMCPY4D | ( | _v | ) | copy_v4_v4(obtfm->_v, ob->_v) |
| #define TFMCPY4D | ( | _v | ) | copy_v4_v4(object_dst->_v, object_src->_v) |
| #define VPARENT_THREADING_HACK |
Struct members from DNA_object_types.h
|
static |
Definition at line 2825 of file object.c.
References bPoseChannel::bone, bPose::chanbase, bPoseChannel::custom, Object::data, ListBase::first, id_lib_extern(), Bone::layer, bArmature::layer_protected, bPoseChannel::next, and Object::pose.
Referenced by BKE_object_make_proxy().
| 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.
Definition at line 3790 of file object.c.
References BoundBox::vec.
Definition at line 3797 of file object.c.
References fabsf, and BoundBox::vec.
Definition at line 3778 of file object.c.
References max, min, and BoundBox::vec.
Referenced by BKE_boundbox_alloc_unit(), BKE_curve_boundbox_get(), BKE_editmesh_cage_boundbox_get(), BKE_hair_boundbox_get(), BKE_mball_texspace_calc(), BKE_mesh_boundbox_get(), BKE_object_boundbox_calc_from_mesh(), BKE_pointcloud_boundbox_get(), BKE_volume_boundbox_get(), boundbox_armature(), boundbox_displist_object(), boundbox_gpencil(), boundbox_lattice(), draw_frustum_boundbox_calc(), DRW_debug_m4_as_bbox(), ED_gpencil_projected_2d_bound_box(), eevee_lightprobes_culling_test(), OVERLAY_bounds(), sculpt_debug_cb(), SCULPT_update_object_bounding_box(), and workbench_shadow_object_shadow_bbox_get().
| void BKE_boundbox_minmax | ( | const BoundBox * | bb, |
| const float | obmat[4][4], | ||
| float | r_min[3], | ||
| float | r_max[3] | ||
| ) |
Definition at line 3804 of file object.c.
References minmax_v3v3_v3(), mul_v3_m4v3(), and BoundBox::vec.
Referenced by BKE_object_minmax().
| ModifierData* BKE_object_active_modifier | ( | const Object * | ob | ) |
Definition at line 1296 of file object.c.
References BLI_assert, ELEM, eModifierFlag_Active, LISTBASE_FOREACH, Object::modifiers, and NULL.
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.
Definition at line 2230 of file object.c.
References BKE_collection_object_add(), BKE_layer_collection_get_active(), BKE_view_layer_base_find(), BKE_view_layer_base_select_and_set_active(), LayerCollection::collection, object_add_common(), and type.
| 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.
| data | The datablock 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 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().
| Object* BKE_object_add_from | ( | Main * | bmain, |
| Scene * | scene, | ||
| ViewLayer * | view_layer, | ||
| int | type, | ||
| const char * | name, | ||
| 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. |
Definition at line 2248 of file object.c.
References BKE_collection_object_add_from(), BKE_view_layer_base_find(), BKE_view_layer_base_select_and_set_active(), object_add_common(), scene, and type.
More general add: creates minimum required data, but without vertices etc.
Definition at line 2193 of file object.c.
References BKE_libblock_alloc(), get_obdata_defname(), Object::id, ID_OB, id_us_min(), object_init(), and type.
Referenced by add_collections_to_scene(), add_loose_object_data_to_scene(), bc_add_object(), BKE_object_add_for_data(), gpencil_layer_to_curve(), Freestyle::BlenderStrokeRenderer::NewMesh(), object_add_common(), blender::io::alembic::AbcCameraReader::readObjectData(), blender::io::alembic::AbcCurveReader::readObjectData(), blender::io::alembic::AbcSubDReader::readObjectData(), blender::io::alembic::AbcNurbsReader::readObjectData(), blender::io::alembic::AbcPointsReader::readObjectData(), blender::io::alembic::AbcEmptyReader::readObjectData(), and blender::io::alembic::AbcMeshReader::readObjectData().
| void BKE_object_apply_mat4 | ( | Object * | ob, |
| const float | mat[4][4], | ||
| const bool | use_compat, | ||
| const bool | use_parent | ||
| ) |
XXX: should be removed after COW operators port to use BKE_object_apply_mat4_ex directly.
Definition at line 3754 of file object.c.
References BKE_object_apply_mat4_ex(), NULL, Object::parent, and Object::parentinv.
Referenced by applyarmature_fix_boneparents(), bc_match_scale(), BKE_object_make_proxy(), DocumentImporter::create_instance_node(), ED_object_parent_clear(), ED_object_parent_set(), ED_view3d_camera_lock_sync(), ED_view3d_camera_to_view_selected(), ignore_parent_tx(), SkinInfo::link_armature(), make_object_duplilist_real(), object_apply_location(), object_apply_mat4_with_protect(), object_apply_rotation(), object_track_clear_exec(), AnimationImporter::read_node_transform(), set_axis(), set_plane_exec(), blender::io::alembic::AbcObjectReader::setupObjectTransform(), and visual_transform_apply_exec().
| 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.
| 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 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().
| KDTree_3d* BKE_object_as_kdtree | ( | Object * | ob, |
| int * | r_tot | ||
| ) |
Return a KDTree_3d from the deformed object (in worldspace)
| ob | |
| r_tot |
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().
Definition at line 3873 of file object.c.
References Object_Runtime::bb, BKE_boundbox_init_from_minmax(), BKE_mesh_wrapper_minmax(), BOUNDBOX_DIRTY, BoundBox::flag, INIT_MINMAX, max, MEM_callocN, min, NULL, Object::runtime, and zero_v3().
Referenced by boundbox_displist_object(), editbmesh_build_data(), and mesh_build_data().
| 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.
Definition at line 3817 of file object.c.
References BKE_armature_boundbox_get(), BKE_curve_boundbox_get(), BKE_gpencil_boundbox_get(), BKE_hair_boundbox_get(), BKE_lattice_boundbox_get(), BKE_mball_boundbox_get(), BKE_mesh_boundbox_get(), BKE_pointcloud_boundbox_get(), BKE_volume_boundbox_get(), NULL, OB_ARMATURE, OB_CURVE, OB_FONT, OB_GPENCIL, OB_HAIR, OB_LATTICE, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, and Object::type.
Referenced by BKE_object_boundbox_flag(), BKE_object_dimensions_get(), BKE_object_dimensions_set_ex(), BKE_object_minmax_dupli(), BKE_pose_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(), object_sync_boundbox_to_original(), OVERLAY_bounds(), RE_point_density_minmax(), select_id_object_min_max(), TargetSnapClosest(), blender::io::alembic::ABCAbstractWriter::update_bounding_box(), and workbench_shadow_object_shadow_bbox_get().
| void BKE_object_check_uuids_unique_and_report | ( | const Object * | object | ) |
Definition at line 5700 of file object.c.
References BKE_modifier_check_uuids_unique_and_report(), BKE_pose_check_uuids_unique_and_report(), and Object::pose.
| bool BKE_object_copy_gpencil_modifier | ( | struct Object * | ob_dst, |
| GpencilModifierData * | gmd_src | ||
| ) |
Copy a single GPencil modifier.
BKE_object_modifier_stack_copy instead. Definition at line 1512 of file object.c.
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 | ( | Main * | bmain, |
| Scene * | scene, | ||
| Object * | ob_dst, | ||
| const Object * | ob_src, | ||
| ModifierData * | md_src | ||
| ) |
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. Definition at line 1407 of file object.c.
References BKE_mesh_ensure_skin_customdata(), BKE_modifier_copydata(), BKE_modifier_get_info(), BKE_modifier_new(), BKE_modifier_unique_name(), BKE_modifiers_findby_type(), BKE_object_copy_softbody(), BKE_object_modifier_set_active(), BKE_object_support_modifier_type_check(), BLI_addtail(), BLI_assert, BLI_strncpy(), DynamicPaintModifierData::brush, Object::data, eModifierType_DynamicPaint, eModifierType_Fluid, eModifierType_Multires, eModifierType_ParticleSystem, eModifierType_Skin, eModifierType_Softbody, eModifierTypeFlag_Single, ModifierTypeInfo::flags, FluidModifierData::flow, MOD_FLUID_TYPE_FLOW, Object::modifiers, multiresModifier_sync_levels_ex(), ModifierData::name, NULL, OB_GPENCIL, object_copy_modifier_particle_system_ensure(), object_copy_particle_system(), object_modifier_type_copy_check(), DynamicPaintBrushSettings::psys, FluidFlowSettings::psys, scene, ModifierData::type, FluidModifierData::type, and Object::type.
| ParticleSystem* BKE_object_copy_particlesystem | ( | ParticleSystem * | psys, |
| const int | flag | ||
| ) |
Definition at line 2349 of file object.c.
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, ParticleSystem::flag, ParticleSystem::hair_in_mesh, ParticleSystem::hair_out_mesh, id_us_plus(), LIB_ID_CREATE_NO_MAIN, LIB_ID_CREATE_NO_USER_REFCOUNT, MEM_dupallocN, NULL, 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().
Definition at line 2399 of file object.c.
References BKE_object_copy_particlesystem(), BLI_addtail(), BLI_listbase_clear(), DynamicPaintModifierData::brush, eModifierType_DynamicPaint, eModifierType_Fluid, eModifierType_ParticleSystem, FluidModifierData::flow, LISTBASE_FOREACH, MOD_FLUID_TYPE_FLOW, Object::modifiers, OB_MESH, Object::particlesystem, DynamicPaintBrushSettings::psys, FluidFlowSettings::psys, ParticleSystemModifierData::psys, FluidModifierData::type, and Object::type.
Referenced by BKE_object_modifier_stack_copy().
Definition at line 2838 of file object.c.
References Object::adt, BKE_animdata_add_id(), BKE_fcurves_copy(), BKE_fcurves_free(), FCurve::driver, DRIVER_TARGETS_LOOPER_BEGIN, DRIVER_TARGETS_LOOPER_END, AnimData::drivers, ListBase::first, Object::id, ID_IS_LINKED, id_lib_extern(), DriverVar::next, FCurve::next, and ChannelDriver::variables.
Referenced by BKE_object_make_proxy(), and BKE_pose_rebuild().
Definition at line 2292 of file object.c.
References BKE_ptcache_copy_list(), SoftBody::bpoint, SoftBody::bspring, SoftBody::effector_weights, SoftBody::keys, LIB_ID_COPY_CACHES, LIB_ID_COPY_SET_COPIED_ON_WRITE, MEM_dupallocN, NULL, SoftBody_Shared::pointcache, SoftBody_Shared::ptcaches, SoftBody::scratch, SoftBody::shared, Object::soft, Object::softflag, BodyPoint::springs, SoftBody::totkey, SoftBody::totpoint, SoftBody::totpointkey, and SoftBody::totspring.
Referenced by BKE_object_copy_modifier(), and BKE_object_modifier_stack_copy().
| char* BKE_object_data_editmode_flush_ptr_get | ( | struct ID * | id | ) |
Definition at line 1893 of file object.c.
References BLI_assert_unreachable, GS, id, ID_AR, ID_CU, 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, NULL, and type.
Referenced by ED_editors_flush_edits_for_object_ex(), and ED_object_editmode_load_free_ex().
| bool BKE_object_data_is_in_editmode | ( | const ID * | id | ) |
Definition at line 1872 of file object.c.
References BLI_assert, BLI_assert_unreachable, GS, id, ID_AR, ID_CU, ID_LT, ID_MB, ID_ME, ID::name, NULL, OB_DATA_SUPPORT_EDITMODE, and type.
| void BKE_object_delete_ptcache | ( | 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().
Definition at line 3901 of file object.c.
References BKE_object_boundbox_get(), fabsf, mat4_to_size(), Object::obmat, BoundBox::vec, and zero_v3().
Referenced by DRW_object_is_flat(), v3d_object_dimension_buts(), workbench_volume_modifier_cache_populate(), and workbench_volume_object_cache_populate().
Definition at line 3959 of file object.c.
References BKE_object_dimensions_set_ex(), and NULL.
| 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().
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().
| Object* BKE_object_duplicate | ( | Main * | bmain, |
| Object * | ob, | ||
| eDupli_ID_Flags | dupflag, | ||
| eLibIDDuplicateFlags | 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 2631 of file object.c.
References BKE_animdata_duplicate_id_action(), BKE_id_copy_for_duplicate(), BKE_libblock_relink_to_newid(), BKE_main_id_clear_newpoins(), BKE_main_id_tag_all(), BKE_object_material_array_p(), BKE_pose_tag_recalc(), BLI_assert, Object::data, DEG_id_tag_update(), DEG_id_tag_update_ex(), ELEM, ListBase::first, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, Object::id, ID_IS_LINKED, ID_RECALC_EDITORS, ID_RECALC_GEOMETRY, LIB_ID_DUPLICATE_IS_ROOT_ID, LIB_ID_DUPLICATE_IS_SUBPROCESS, LIB_TAG_NEW, Object::mat, ID::newid, ParticleSystem::next, NULL, OB_ARMATURE, OB_CAMERA, OB_CURVE, OB_FONT, OB_GPENCIL, OB_HAIR, OB_LAMP, OB_LATTICE, OB_LIGHTPROBE, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SPEAKER, OB_SURF, OB_VOLUME, ParticleSystem::part, Object::particlesystem, Object::pose, ID::tag, Object::totcol, Object::type, USER_DUP_ARM, USER_DUP_CURVE, USER_DUP_FONT, USER_DUP_GPENCIL, USER_DUP_HAIR, USER_DUP_LAMP, USER_DUP_LIGHTPROBE, USER_DUP_LINKED_ID, USER_DUP_MAT, USER_DUP_MBALL, USER_DUP_MESH, USER_DUP_POINTCLOUD, USER_DUP_PSYS, USER_DUP_SURF, and USER_DUP_VOLUME.
| void BKE_object_empty_draw_type_set | ( | Object * | ob, |
| const int | value | ||
| ) |
Definition at line 4061 of file object.c.
References Object::empty_drawtype, ImageUser::flag, ImageUser::frames, IMA_ANIM_ALWAYS, Object::iuser, MEM_callocN, MEM_freeN, NULL, OB_EMPTY, OB_EMPTY_IMAGE, ImageUser::ok, 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 Object * | ob, |
| const RegionView3D * | rv3d | ||
| ) |
Definition at line 4092 of file object.c.
References BKE_object_empty_image_frame_is_visible_in_view3d(), BLI_assert, dot(), dot_v3v3(), Object::empty_image_visibility_flag, eps, RegionView3D::is_persp, len_squared_v3(), OB_EMPTY_IMAGE_HIDE_BACK, OB_EMPTY_IMAGE_HIDE_FRONT, OB_EMPTY_IMAGE_HIDE_NON_AXIS_ALIGNED, Object::obmat, project_plane_v3_v3v3(), sub_v3_v3v3(), and RegionView3D::viewinv.
| bool BKE_object_empty_image_frame_is_visible_in_view3d | ( | const Object * | ob, |
| const RegionView3D * | rv3d | ||
| ) |
Definition at line 4082 of file object.c.
References Object::empty_image_visibility_flag, RegionView3D::is_persp, OB_EMPTY_IMAGE_HIDE_ORTHOGRAPHIC, and OB_EMPTY_IMAGE_HIDE_PERSPECTIVE.
Referenced by BKE_object_empty_image_data_is_visible_in_view3d().
Assign Object.data after modifier stack evaluation.
Definition at line 1687 of file object.c.
References BLI_assert, data, Object::data, Object_Runtime::data_eval, Object_Runtime::geometry_set_eval, GS, Object::id, Object_Runtime::is_data_eval_owned, LIB_TAG_COPIED_ON_WRITE, LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT, LIB_TAG_NO_MAIN, ID::name, NULL, Object::runtime, and ID::tag.
Referenced by BKE_displist_make_curveTypes(), BKE_hair_data_update(), BKE_lattice_modifiers_calc(), BKE_pointcloud_data_update(), BKE_volume_data_update(), and mesh_build_data().
Definition at line 2029 of file object.c.
References LISTBASE_FOREACH, NULL, and Main::objects.
| bool BKE_object_flag_test_recursive | ( | const Object * | ob, |
| short | flag | ||
| ) |
Definition at line 4843 of file object.c.
References Object::flag, and Object::parent.
| void BKE_object_foreach_display_point | ( | Object * | ob, |
| const float | obmat[4][4], | ||
| void(*)(const float[3], void *) | func_cb, | ||
| void * | user_data | ||
| ) |
Definition at line 4176 of file object.c.
References BKE_object_get_evaluated_mesh(), Object_Runtime::curve_cache, CurveCache::disp, ListBase::first, mul_v3_m4v3(), Mesh::mvert, DispList::next, DispList::nr, NULL, Object::runtime, Mesh::totvert, user_data, and DispList::verts.
Referenced by BKE_scene_foreach_display_point().
| void BKE_object_free_caches | ( | Object * | object | ) |
Definition at line 1770 of file object.c.
References Object::base_flag, BASE_FROM_DUPLI, BKE_id_free(), BKE_object_free_derived_caches(), DEG_id_tag_update(), ParticleSystem::edit, 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, ParticleSystem::next, NULL, Object::particlesystem, and psys_free_path_cache().
| void BKE_object_free_curve_cache | ( | Object * | ob | ) |
Definition at line 1186 of file object.c.
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, NULL, and Object::runtime.
Referenced by BKE_object_free_derived_caches(), and object_convert_exec().
| void BKE_object_free_derived_caches | ( | Object * | ob | ) |
Free data derived from mesh, called when mesh changes or is freed.
Definition at line 1719 of file object.c.
References Object_Runtime::bb, BKE_geometry_set_free(), BKE_gpencil_eval_delete(), BKE_libblock_free_datablock(), BKE_mesh_eval_delete(), BKE_object_free_curve_cache(), BKE_object_to_curve_clear(), BKE_object_to_mesh_clear(), BLI_ghash_free(), Object::data, Object_Runtime::data_eval, Object_Runtime::data_orig, Object_Runtime::geometry_set_eval, Object_Runtime::geometry_set_previews, 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, NULL, object_update_from_subsurf_ccg(), and Object::runtime.
Referenced by BKE_displist_make_curveTypes(), BKE_hair_data_update(), 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_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(), EDBM_mesh_load_ex(), editbmesh_build_data(), gpencil_object_modifier_remove(), mesh_build_data(), object_modifier_remove(), object_shaderfx_remove(), blender::deg::ObjectRuntimeBackup::restore_to_object(), and SCULPT_pbvh_clear().
| void BKE_object_free_modifiers | ( | Object * | ob, |
| const int | flag | ||
| ) |
Definition at line 1200 of file object.c.
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().
| void BKE_object_free_particlesystems | ( | Object * | ob | ) |
Definition at line 1172 of file object.c.
References BLI_pophead(), Object::particlesystem, and psys_free().
Referenced by BKE_object_free_modifiers(), and remove_particle_systems_from_object().
| void BKE_object_free_shaderfx | ( | 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().
| void BKE_object_free_softbody | ( | Object * | ob | ) |
Definition at line 1181 of file object.c.
References sbFree().
Referenced by BKE_object_free_modifiers().
Definition at line 4525 of file object.c.
References Lattice::editlatt, GS, ID_LT, EditLatt::latt, ID::name, and NULL.
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().
Definition at line 4510 of file object.c.
References data, Lattice::editlatt, GS, ID_LT, EditLatt::latt, and NULL.
Get a mesh which corresponds to very very original mesh from Main.
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().
Definition at line 3494 of file object.c.
References copy_m4_m4(), CU_PATH, Object::data, give_parvert(), mul_m4_m4m4(), mul_v3_m4v3(), OB_CURVE, 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_eval_parent(), BKE_object_matrix_local_get(), snap_selected_to_location(), and solve_parenting().
Get mesh which is not affected by modifiers:
object->data, and it is a mesh which is in the corresponding Main.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().
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().
Definition at line 5262 of file object.c.
References BKE_collection_object_find(), BKE_collection_object_remove(), DEG_id_tag_update(), Collection::id, ID_RECALC_COPY_ON_WRITE, NULL, and scene.
Referenced by collection_objects_remove_all_exec(), and make_links_data_exec().
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().
| void BKE_object_handle_update_ex | ( | Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| Object * | ob, | ||
| RigidBodyWorld * | rbw, | ||
| const bool | do_proxy_update | ||
| ) |
Proxy rule:
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().
| bool BKE_object_has_mode_data | ( | const struct Object * | ob, |
| eObjectMode | object_mode | ||
| ) |
Definition at line 1952 of file object.c.
References BKE_object_is_in_editmode(), SculptSession::mode_type, NULL, 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 | ( | Object * | ob | ) |
Definition at line 4555 of file object.c.
References BLI_addtail(), BLI_listbase_sort(), LinkData::data, ListBase::first, MEM_callocN, LinkData::next, NULL, pc_cmp(), Object::pc_ids, POINTER_AS_INT, and POINTER_FROM_INT.
Referenced by ptcache_filename_ext_append().
Definition at line 4855 of file object.c.
References Object::parent.
Referenced by BKE_object_relational_superset().
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().
| bool BKE_object_is_in_editmode | ( | const Object * | ob | ) |
Actual check for internal data, not context or flags.
Definition at line 1839 of file object.c.
References Object::data, GPENCIL_EDIT_MODE, NULL, OB_ARMATURE, OB_CURVE, OB_FONT, OB_GPENCIL, OB_LATTICE, OB_MBALL, OB_MESH, OB_SURF, and Object::type.
Referenced by BKE_object_has_mode_data(), and BKE_object_is_in_editmode_vgroup().
| bool BKE_object_is_in_editmode_vgroup | ( | const Object * | ob | ) |
Definition at line 1867 of file object.c.
References BKE_object_is_in_editmode(), OB_TYPE_SUPPORT_VGROUP, and Object::type.
| bool BKE_object_is_in_wpaint_select_vert | ( | const Object * | ob | ) |
Definition at line 1941 of file object.c.
References Object::data, Mesh::edit_mesh, ME_EDIT_PAINT_SEL_MODE, Object::mode, NULL, OB_MESH, OB_MODE_WEIGHT_PAINT, SCE_SELECT_VERTEX, and Object::type.
| bool BKE_object_is_libdata | ( | const Object * | ob | ) |
Returns true if the Object is from an external blend file (libdata).
Definition at line 2805 of file object.c.
References ID_IS_LINKED.
| bool BKE_object_is_mode_compat | ( | const struct Object * | ob, |
| eObjectMode | object_mode | ||
| ) |
Definition at line 1982 of file object.c.
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 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().
Definition at line 1586 of file object.c.
References BKE_object_free_modifiers(), and BKE_object_modifier_stack_copy().
Proxy rule:
Definition at line 2885 of file object.c.
References Object::actcol, armature_set_id_extern(), BKE_defgroup_copy_list(), BKE_object_apply_mat4(), BKE_object_copy_proxy_drivers(), BKE_object_transform_copy(), BKE_pose_rebuild(), BKE_pose_rest(), CLOG_ERROR, copy_m4_m4(), copy_object_pose(), Object::data, Object::defbase, DEG_id_tag_update(), Object::dt, Object::empty_drawsize, Object::empty_drawtype, Object::id, ID_IS_LINKED, ID_RECALC_ANIMATION, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, id_us_plus(), IDP_CopyProperty(), IDP_FreeProperty(), Object::instance_collection, Collection::instance_offset, LOG, Object::mat, Object::matbits, MEM_dupallocN, MEM_freeN, mul_m4_m4m4(), mul_v3_mat3_m4v3(), NULL, OB_ARMATURE, OB_EMPTY, OB_TYPE_SUPPORT_MATERIAL, Object::obmat, Object::parent, Object::parentinv, Object::pose, ID::properties, Object::proxy, Object::proxy_group, Object::rotmode, sub_v3_v3(), Object::totcol, and Object::type.
Referenced by make_proxy_exec().
Definition at line 3085 of file object.c.
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 3245 of file object.c.
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 3964 of file object.c.
References add_v3_v3(), BKE_boundbox_minmax(), BKE_curve_boundbox_get(), BKE_gpencil_boundbox_get(), BKE_hair_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_fl(), mul_v3_m4v3(), OB_ARMATURE, OB_CURVE, OB_EMPTY, OB_FONT, OB_GPENCIL, OB_HAIR, 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, BPoint::vec, and w().
Referenced by clampto_evaluate(), PE_minmax(), view3d_localview_init(), and view3d_object_calc_minmax().
| bool BKE_object_minmax_dupli | ( | Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| Object * | ob, | ||
| float | r_min[3], | ||
| float | r_max[3], | ||
| const bool | use_hidden | ||
| ) |
Definition at line 4138 of file object.c.
References BKE_object_boundbox_get(), depsgraph, ListBase::first, free_object_duplilist(), Object_Runtime::geometry_set_eval, DupliObject::mat, minmax_v3v3_v3(), mul_v3_m4v3(), DupliObject::next, DupliObject::no_draw, NULL, DupliObject::ob, OB_DUPLI, object_duplilist(), Object::runtime, scene, Object::transflag, and BoundBox::vec.
Referenced by object_origin_set_exec(), and view3d_object_calc_minmax().
| void BKE_object_modifier_gpencil_hook_reset | ( | Object * | ob, |
| HookGpencilModifierData * | hmd | ||
| ) |
Definition at line 1254 of file object.c.
References BKE_pose_channel_find_name(), Object::imat, invert_m4_m4(), mul_m4_m4m4(), NULL, HookGpencilModifierData::object, Object::obmat, HookGpencilModifierData::parentinv, Object::pose, bPoseChannel::pose_mat, and HookGpencilModifierData::subtarget.
| bool BKE_object_modifier_gpencil_use_time | ( | Object * | ob, |
| GpencilModifierData * | md | ||
| ) |
Definition at line 5443 of file object.c.
References AnimData::action, Object::adt, BKE_gpencil_modifier_depends_ontime(), BLI_snprintf(), BLI_str_escape(), bAction::curves, AnimData::drivers, ListBase::first, GpencilModifierData::name, FCurve::next, NULL, and FCurve::rna_path.
Referenced by blender::deg::DepsgraphRelationBuilder::build_object_data_geometry().
| void BKE_object_modifier_hook_reset | ( | Object * | ob, |
| HookModifierData * | hmd | ||
| ) |
Definition at line 1231 of file object.c.
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 | ( | Object * | ob, |
| ModifierData * | md | ||
| ) |
Set the object's active modifier.
| md | If NULL, only clear the active modifier, otherwise it must be in the Object.modifiers list. |
Definition at line 1284 of file object.c.
References BLI_assert, BLI_findindex(), eModifierFlag_Active, ModifierData::flag, LISTBASE_FOREACH, Object::modifiers, and NULL.
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 | ( | Object * | ob_dst, |
| const Object * | ob_src, | ||
| const bool | do_copy_all, | ||
| const 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. |
Definition at line 1537 of file object.c.
References BKE_gpencil_modifier_copydata_ex(), BKE_gpencil_modifier_new(), BKE_modifier_copydata_ex(), BKE_modifier_new(), BKE_object_copy_particlesystems(), BKE_object_copy_softbody(), BKE_object_support_modifier_type_check(), BLI_addtail(), BLI_assert, BLI_listbase_is_empty(), BLI_strncpy(), Object::greasepencil_modifiers, LISTBASE_FOREACH, Object::modifiers, GpencilModifierData::name, ModifierData::name, OB_GPENCIL, object_modifier_type_copy_check(), and Object::type.
Referenced by BKE_object_link_modifiers(), and object_copy_data().
| bool BKE_object_modifier_update_subframe | ( | Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| Object * | ob, | ||
| bool | update_mesh, | ||
| int | parent_recursion, | ||
| float | frame, | ||
| int | type | ||
| ) |
Definition at line 5546 of file object.c.
References bArmature::adt, Curve::adt, Object::adt, ADT_RECALC_ANIM, BKE_animsys_eval_context_construct(), BKE_animsys_evaluate_animdata(), BKE_constraint_typeinfo_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, eModifierType_DynamicPaint, eModifierType_Fluid, ListBase::first, bConstraintTypeInfo::flush_constraint_targets, bConstraintTypeInfo::get_constraint_targets, bArmature::id, Curve::id, Object::id, ID_RECALC_ALL, MOD_FLUID_TYPE_DOMAIN, bConstraint::next, bConstraintTarget::next, NULL, OB_ARMATURE, OB_CURVE, object_cacheIgnoreClear(), Object::parent, Object::partype, PARVERT1, PARVERT3, ID::recalc, scene, bConstraintTarget::tar, Object::track, type, FluidModifierData::type, and Object::type.
Referenced by BKE_object_modifier_update_subframe(), dynamicPaint_brushMeshCalculateVelocity(), dynamicPaint_brushObjectCalculateVelocity(), and dynamicPaint_doStep().
| bool BKE_object_modifier_use_time | ( | Object * | ob, |
| ModifierData * | md | ||
| ) |
Definition at line 5397 of file object.c.
References AnimData::action, Object::adt, BKE_modifier_depends_ontime(), BLI_snprintf(), BLI_str_escape(), bAction::curves, AnimData::drivers, ListBase::first, ModifierData::name, FCurve::next, NULL, and FCurve::rna_path.
Referenced by blender::deg::DepsgraphRelationBuilder::build_object_data_geometry().
| void BKE_object_modifiers_lib_link_common | ( | void * | userData, |
| struct Object * | ob, | ||
| struct ID ** | idpoin, | ||
| int | cb_flag | ||
| ) |
Definition at line 5706 of file object.c.
References BLO_read_id_address, Object::id, id_us_plus_no_lib(), IDWALK_CB_USER, ID::lib, and NULL.
Referenced by BKE_gpencil_modifier_blend_read_lib(), BKE_modifier_blend_read_lib(), and BKE_shaderfx_blend_read_lib().
| bool BKE_object_moves_in_time | ( | const Object * | object, |
| bool | recurse_parent | ||
| ) |
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.
Definition at line 4917 of file object.c.
References BKE_animdata_id_is_animated(), BLI_listbase_is_empty(), Object::constraints, Object::id, NULL, and Object::parent.
Referenced by object_moves_in_time().
Definition at line 5079 of file object.c.
References CAMERASOLVER_ACTIVECLIP, bCameraSolverConstraint::clip, Scene::clip, CONSTRAINT_OFF, CONSTRAINT_TYPE_CAMERASOLVER, Object::constraints, ListBase::first, bCameraSolverConstraint::flag, bConstraint::next, NULL, 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().
| void* BKE_object_obdata_add_from_type | ( | Main * | bmain, |
| int | type, | ||
| const char * | name | ||
| ) |
Definition at line 2107 of file object.c.
References BKE_armature_add(), BKE_camera_add(), BKE_curve_add(), BKE_gpencil_data_addnew(), BKE_hair_add(), 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, NULL, OB_ARMATURE, OB_CAMERA, OB_CURVE, OB_EMPTY, OB_FONT, OB_GPENCIL, OB_HAIR, 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(), and object_add_common().
| bool BKE_object_obdata_is_libdata | ( | const Object * | ob | ) |
Returns true if the Object data is from an external blend file (libdata).
Definition at line 2813 of file object.c.
References BLI_assert, Object::data, and ID_IS_LINKED.
Use with newly created objects to set their size (used to apply scene-scale).
Definition at line 2991 of file object.c.
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 | ( | Object * | ob, |
| short ** | r_texflag, | ||
| float ** | r_loc, | ||
| float ** | r_size | ||
| ) |
Definition at line 4413 of file object.c.
References BKE_curve_texspace_ensure(), BKE_mesh_texspace_get_reference(), Object::data, GS, ID_CU, ID_MB, ID_ME, Curve::loc, MetaBall::loc, NULL, 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 ID * | id | ) |
Return -1 on failure.
Definition at line 2155 of file object.c.
References BKE_curve_type_get(), GS, id, ID_AR, ID_CA, ID_CU, ID_GD, ID_HA, ID_LA, ID_LP, ID_LT, ID_MB, ID_ME, ID_PT, ID_SPK, ID_VO, ID::name, OB_ARMATURE, OB_CAMERA, OB_GPENCIL, OB_HAIR, OB_LAMP, OB_LATTICE, OB_LIGHTPROBE, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SPEAKER, and OB_VOLUME.
Definition at line 4294 of file object.c.
References NULL, and Object::parent.
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().
Definition at line 2507 of file object.c.
References BASE_VISIBLE, BKE_object_pose_armature_get(), BKE_view_layer_base_find(), and NULL.
Definition at line 2556 of file object.c.
References BKE_object_pose_array_get_ex().
Referenced by ED_transform_calc_gizmo_stats(), snap_sel_to_grid_exec(), and snap_selected_to_location().
| 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().
| Object** BKE_object_pose_array_get_unique | ( | ViewLayer * | view_layer, |
| View3D * | v3d, | ||
| uint * | r_objects_len | ||
| ) |
Definition at line 2552 of file object.c.
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().
Definition at line 2604 of file object.c.
References BKE_object_pose_base_array_get_ex().
Referenced by ed_armature_pick_bone_impl().
| Base** BKE_object_pose_base_array_get_ex | ( | ViewLayer * | view_layer, |
| View3D * | v3d, | ||
| uint * | r_bases_len, | ||
| bool | unique | ||
| ) |
Definition at line 2561 of file object.c.
References BASACT, BKE_object_pose_armature_get(), BKE_view_layer_array_from_bases_in_mode, BKE_view_layer_base_find(), MEM_mallocN, NULL, OB_MODE_POSE, and Base::object.
Referenced by BKE_object_pose_base_array_get(), and BKE_object_pose_base_array_get_unique().
| Base** BKE_object_pose_base_array_get_unique | ( | ViewLayer * | view_layer, |
| View3D * | v3d, | ||
| uint * | 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().
| bool BKE_object_pose_context_check | ( | const Object * | ob | ) |
Definition at line 2478 of file object.c.
References Object::mode, OB_ARMATURE, OB_MODE_POSE, Object::pose, and Object::type.
Referenced by BKE_object_pose_armature_get().
| void BKE_object_preview_geometry_set_add | ( | Object * | ob, |
| const uint64_t | key, | ||
| struct GeometrySet * | geometry_set | ||
| ) |
Definition at line 1819 of file object.c.
References BKE_geometry_set_free(), BLI_ghash_int_new(), BLI_ghash_reinsert(), BLI_MUTEX_INITIALIZER, BLI_mutex_lock(), BLI_mutex_unlock(), Object_Runtime::geometry_set_previews, mutex, NULL, POINTER_FROM_UINT, and Object::runtime.
Referenced by log_preview_socket_value().
| 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().
Definition at line 3045 of file object.c.
References axis_angle_to_mat3(), copy_m3_m3(), Object::dquat, Object::drot, Object::drotAngle, Object::drotAxis, eulO_to_mat3(), mul_m3_m3m3(), normalize_qt_qt(), Object::quat, quat_to_mat3(), Object::rot, ROT_MODE_AXISANGLE, Object::rotAngle, Object::rotAxis, and Object::rotmode.
Referenced by BKE_object_to_mat3().
| void BKE_object_runtime_reset | ( | Object * | object | ) |
Definition at line 5107 of file object.c.
References Object::runtime.
Referenced by blender::deg::ObjectRuntimeBackup::init_from_object(), object_blend_read_data(), and object_blend_write().
| void BKE_object_runtime_reset_on_copy | ( | Object * | object, |
| const int | UNUSEDflag | ||
| ) |
Reset all pointers which we don't want to be shared when copying the object.
Definition at line 5115 of file object.c.
References Object_Runtime::curve_cache, Object_Runtime::data_eval, Object_Runtime::geometry_set_eval, Object_Runtime::gpd_eval, Object_Runtime::mesh_deform_eval, NULL, Object_Runtime::object_as_temp_curve, and Object_Runtime::object_as_temp_mesh.
Referenced by object_copy_data().
Definition at line 3038 of file object.c.
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 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().
| void BKE_object_sculpt_data_create | ( | Object * | ob | ) |
Definition at line 4406 of file object.c.
References BLI_assert, MEM_callocN, Object::mode, SculptSession::mode_type, NULL, OB_MODE_ALL_SCULPT, and Object::sculpt.
Referenced by ED_editors_init(), and object_blend_read_data().
| bool BKE_object_shaderfx_use_time | ( | Object * | ob, |
| ShaderFxData * | fx | ||
| ) |
Definition at line 5481 of file object.c.
References AnimData::action, Object::adt, BKE_shaderfx_depends_ontime(), BLI_snprintf(), BLI_str_escape(), bAction::curves, AnimData::drivers, ListBase::first, ShaderFxData::name, FCurve::next, NULL, and FCurve::rna_path.
Referenced by blender::deg::DepsgraphRelationBuilder::build_object_data_geometry().
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().
| KeyBlock* BKE_object_shapekey_insert | ( | Main * | bmain, |
| Object * | ob, | ||
| const char * | name, | ||
| const bool | from_mix | ||
| ) |
Definition at line 4726 of file object.c.
References insert_curvekey(), insert_lattkey(), insert_meshkey(), NULL, OB_CURVE, OB_LATTICE, OB_MESH, OB_SURF, Object::shapenr, and Object::type.
Referenced by ED_object_shape_key_add().
Definition at line 4775 of file object.c.
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, MEM_freeN, KeyBlock::next, NULL, OB_CURVE, OB_LATTICE, OB_MESH, OB_SURF, Key::refkey, KeyBlock::relative, Object::shapenr, Key::totkey, and Object::type.
Referenced by object_shapekey_remove().
| bool BKE_object_support_modifier_type_check | ( | const Object * | ob, |
| int | modifier_type | ||
| ) |
Definition at line 1327 of file object.c.
References BKE_modifier_get_info(), ELEM, eModifierTypeFlag_AcceptsCVs, eModifierTypeFlag_AcceptsMesh, eModifierTypeFlag_AcceptsVertexCosOnly, ModifierTypeInfo::flags, ModifierTypeInfo::modifyGeometrySet, ModifierTypeInfo::modifyHair, ModifierTypeInfo::modifyVolume, NULL, OB_CURVE, OB_FONT, OB_HAIR, OB_LATTICE, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, and Object::type.
Referenced by BKE_object_copy_modifier(), and BKE_object_modifier_stack_copy().
| bool BKE_object_supports_modifiers | ( | const Object * | ob | ) |
Definition at line 1321 of file object.c.
References ELEM, OB_CURVE, OB_FONT, OB_LATTICE, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, and Object::type.
| void* BKE_object_tfm_backup | ( | Object * | ob | ) |
Definition at line 4250 of file object.c.
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().
| void BKE_object_tfm_protected_backup | ( | const Object * | ob, |
| ObjectTfmProtectedChannels * | obtfm | ||
| ) |
| void BKE_object_tfm_protected_restore | ( | Object * | ob, |
| const ObjectTfmProtectedChannels * | obtfm, | ||
| const short | protectflag | ||
| ) |
Definition at line 3158 of file object.c.
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(), ED_view3d_camera_to_view_selected(), object_apply_mat4_with_protect(), and view3d_camera_to_view_exec().
| void BKE_object_tfm_restore | ( | Object * | ob, |
| void * | obtfm_pt | ||
| ) |
Definition at line 4273 of file object.c.
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().
Definition at line 5682 of file object.c.
References BKE_curve_new_from_object(), BKE_object_to_curve_clear(), curve, and depsgraph.
| void BKE_object_to_curve_clear | ( | Object * | object | ) |
Definition at line 5691 of file object.c.
References BKE_id_free(), NULL, Object_Runtime::object_as_temp_curve, and Object::runtime.
Referenced by BKE_object_free_derived_caches(), and BKE_object_to_curve().
Definition at line 3220 of file object.c.
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 3234 of file object.c.
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(), dvar_eval_transChan(), ED_object_base_init_transform_on_add(), 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().
Definition at line 5664 of file object.c.
References BKE_mesh_new_from_object(), BKE_object_to_mesh_clear(), depsgraph, and mesh.
Referenced by Freestyle::BlenderFileLoader::Load().
| void BKE_object_to_mesh_clear | ( | Object * | object | ) |
Definition at line 5673 of file object.c.
References BKE_id_free(), NULL, Object_Runtime::object_as_temp_mesh, and Object::runtime.
Referenced by BKE_object_free_derived_caches(), BKE_object_to_mesh(), and Freestyle::BlenderFileLoader::Load().
Definition at line 2609 of file object.c.
References copy_v3_v3(), copy_v4_v4(), Object::loc, Object::quat, Object::rot, Object::rotAngle, Object::rotAxis, Object::rotmode, and Object::scale.
Referenced by BKE_object_make_proxy().
| void BKE_object_update_select_id | ( | struct Main * | bmain | ) |
Updates select_id of all objects in the given bmain.
Definition at line 5654 of file object.c.
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(), view3d_box_select_exec(), view3d_circle_select_exec(), view3d_lasso_select_exec(), and view3d_select_exec().
| int BKE_object_visibility | ( | const Object * | ob, |
| const int | dag_eval_mode | ||
| ) |
Return which parts of the object are visible, as evaluated by depsgraph
Definition at line 1990 of file object.c.
References Object::base_flag, BASE_VISIBLE_DEPSGRAPH, BKE_geometry_set_has_instances(), DAG_EVAL_RENDER, DAG_EVAL_VIEWPORT, Object::duplicator_visibility_flag, ListBase::first, Object_Runtime::geometry_set_eval, NULL, OB_DUPLI, OB_DUPLI_FLAG_RENDER, OB_DUPLI_FLAG_VIEWPORT, OB_VISIBLE_INSTANCES, OB_VISIBLE_PARTICLES, OB_VISIBLE_SELF, Object::particlesystem, Object::runtime, and Object::transflag.
Definition at line 3653 of file object.c.
References DEG_get_ctime(), depsgraph, NULL, 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 | ( | Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| RigidBodyWorld * | rbw, | ||
| Object * | ob, | ||
| float | r_originmat[3][3] | ||
| ) |
Definition at line 3647 of file object.c.
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 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().
| void BKE_object_where_is_calc_time | ( | Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| Object * | ob, | ||
| float | ctime | ||
| ) |
Definition at line 3619 of file object.c.
References Object::adt, ADT_RECALC_ALL, BKE_animsys_eval_context_construct(), BKE_animsys_evaluate_animdata(), DEG_is_active(), depsgraph, Object::id, NULL, object_where_is_calc_ex(), and scene.
Referenced by BKE_object_modifier_update_subframe(), and evaluate_emitter_anim().
| 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:
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().
| void BKE_object_workob_clear | ( | Object * | workob | ) |
Definition at line 1163 of file object.c.
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 | ( | Depsgraph * | depsgraph, |
| void(*)(const float[3], void *) | func_cb, | ||
| void * | user_data | ||
| ) |
Definition at line 4209 of file object.c.
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().
|
static |
Definition at line 4948 of file object.c.
References ArrayModifierData::curve_ob, eModifierType_Array, eModifierType_MeshSequenceCache, eModifierType_Mirror, eModifierType_Nodes, eModifierType_Screw, ArrayModifierData::end_cap, MirrorModifierData::mirror_ob, NULL, ScrewModifierData::ob_axis, object_moves_in_time(), ArrayModifierData::offset_ob, ArrayModifierData::start_cap, and ModifierData::type.
Referenced by BKE_object_is_deform_modified().
Copy CCG related data. Used to sync copy of mesh with reshaped original mesh.
Definition at line 1596 of file object.c.
References BLI_assert, CD_CALLOC, CustomData_add_layer(), CustomData_copy_layer_type_data(), CustomData_free_layer(), CustomData_get_layer_index(), CustomData_has_layer(), Mesh::ldata, NULL, and Mesh::totloop.
Referenced by object_update_from_subsurf_ccg().
Definition at line 2443 of file object.c.
References BKE_constraint_typeinfo_get(), BKE_pose_copy_data_ex(), bPose::chanbase, ListBase::first, bConstraintTypeInfo::flush_constraint_targets, bConstraintTypeInfo::get_constraint_targets, LISTBASE_FOREACH, bConstraintTarget::next, NULL, Object::pose, POSE_LOC, POSE_ROT, POSE_SIZE, and bConstraintTarget::tar.
Referenced by BKE_object_make_proxy(), and object_copy_data().
|
static |
Definition at line 604 of file object.c.
References BLO_read_list(), and LISTBASE_FOREACH.
Referenced by object_blend_read_data().
|
static |
Definition at line 1008 of file object.c.
References BLO_expand, and LISTBASE_FOREACH.
Referenced by object_blend_read_expand().
|
static |
Definition at line 1015 of file object.c.
References BLO_expand.
Referenced by object_blend_read_expand().
|
static |
Definition at line 2046 of file object.c.
References BLT_I18NCONTEXT_ID_LIGHT, CLOG_ERROR, CTX_DATA_, DATA_, LOG, OB_ARMATURE, OB_CAMERA, OB_CURVE, OB_EMPTY, OB_FONT, OB_GPENCIL, OB_HAIR, OB_LAMP, OB_LATTICE, OB_LIGHTPROBE, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SPEAKER, OB_SURF, OB_VOLUME, and type.
Referenced by BKE_object_add_only_object(), and BKE_object_obdata_add_from_type().
Definition at line 3355 of file object.c.
References add_v3_v3(), BKE_curve_nurbs_get(), BKE_displist_find(), BKE_nurbList_index_get_co(), BKE_object_get_evaluated_mesh(), BLI_assert, BLI_mutex_lock(), BLI_mutex_unlock(), BMEditMesh::bm, BM_mesh_elem_table_ensure(), BM_VERT, BM_vert_at_index(), CD_ORIGINDEX, CLOG_ERROR, BMVert::co, MVert::co, copy_v3_v3(), count, Object_Runtime::curve_cache, CustomData_get_layer(), CustomData_has_layer(), Object::data, Lattice::def, CurveCache::deformed_nurbs, CurveCache::disp, DL_VERTS, Mesh_Runtime::edit_data, Mesh::edit_mesh, Lattice::editlatt, ELEM, BMesh::elem_table_dirty, ListBase::first, float(), if(), EditLatt::latt, LOG, ME_WRAPPER_TYPE_BMESH, BMEditMesh::mesh_eval_final, mul_v3_fl(), Mesh::mvert, DispList::nr, NULL, OB_CURVE, OB_LATTICE, OB_MESH, OB_SURF, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, Mesh::runtime, Object::runtime, BMesh::totvert, Mesh::totvert, Object::type, v, BPoint::vec, EditMeshData::vertexCos, DispList::verts, vparent_lock, Mesh_Runtime::wrapper_type, and zero_v3().
Referenced by BKE_object_get_parent_matrix(), and ob_parvert3().
|
static |
Definition at line 4680 of file object.c.
References BKE_curve_nurbs_get(), BKE_key_add(), BKE_key_evaluate_object(), BKE_keyblock_add_ctime(), BKE_keyblock_convert_from_curve(), Key::block, data, KeyBlock::data, Object::data, ListBase::first, Curve::key, KEY_RELATIVE, MEM_dupallocN, NULL, KeyBlock::totelem, and Key::type.
Referenced by BKE_object_shapekey_insert().
|
static |
Definition at line 4642 of file object.c.
References BKE_key_add(), BKE_key_evaluate_object(), BKE_keyblock_add_ctime(), BKE_keyblock_convert_from_lattice(), Key::block, data, KeyBlock::data, Object::data, ListBase::first, Lattice::key, KEY_RELATIVE, MEM_dupallocN, NULL, KeyBlock::totelem, and Key::type.
Referenced by BKE_object_shapekey_insert().
|
static |
Definition at line 4610 of file object.c.
References BKE_key_add(), BKE_key_evaluate_object(), BKE_keyblock_add_ctime(), BKE_keyblock_convert_from_mesh(), data, KeyBlock::data, Object::data, Mesh::key, KEY_RELATIVE, NULL, KeyBlock::totelem, and Key::type.
Referenced by BKE_object_shapekey_insert().
|
static |
Definition at line 831 of file object.c.
References BLO_read_id_address, id, ID::lib, and LISTBASE_FOREACH.
Referenced by object_blend_read_lib().
|
static |
Definition at line 818 of file object.c.
References BLO_read_id_address, id, ID::lib, and LISTBASE_FOREACH.
Referenced by object_blend_read_lib().
|
static |
Definition at line 399 of file object.c.
References BKE_lib_query_foreachid_process(), data, IDWALK_CB_NOP, IDWALK_CB_USER, and user_data.
Referenced by object_foreach_id().
|
static |
Definition at line 381 of file object.c.
References BKE_lib_query_foreachid_process(), data, and user_data.
Referenced by object_foreach_id().
|
static |
Definition at line 372 of file object.c.
References BKE_lib_query_foreachid_process(), data, and user_data.
Referenced by object_foreach_id().
|
static |
Definition at line 409 of file object.c.
References BKE_lib_query_foreachid_process(), data, and user_data.
Referenced by object_foreach_id().
|
static |
Definition at line 390 of file object.c.
References BKE_lib_query_foreachid_process(), data, and user_data.
Referenced by object_foreach_id().
|
static |
Definition at line 4988 of file object.c.
References AnimData::action, Object::adt, bAction::curves, AnimData::drivers, ListBase::first, FCurve::next, NULL, and FCurve::rna_path.
Referenced by BKE_object_is_deform_modified().
Definition at line 3321 of file object.c.
References add_v3_v3(), BKE_pose_channel_find_name(), bPoseChannel::bone, BONE_RELATIVE_PARENTING, bPoseChannel::chan_mat, CLOG_ERROR, copy_m4_m4(), copy_v3_v3(), Bone::flag, Object::id, Bone::length, LOG, mul_v3_fl(), ID::name, OB_ARMATURE, Object::parsubstr, Object::pose, bPoseChannel::pose_mat, Object::type, and unit_m4().
Referenced by BKE_object_get_parent_matrix().
Definition at line 3262 of file object.c.
References CurveCache::anim_path_accum_length, BKE_where_on_path(), CLAMP, copy_m4_m4(), copy_v3_v3(), Curve::ctime, CU_FOLLOW, CU_PATH_CLAMP, CU_PATH_RADIUS, Object_Runtime::curve_cache, Object::data, Curve::flag, mul_m4_m4m4(), normalize_qt(), NULL, Curve::pathlen, quat_apply_track(), quat_to_mat4(), Object::runtime, scale_m4_fl(), Object::trackflag, unit_m4(), and Object::upflag.
Referenced by BKE_object_get_parent_matrix().
Definition at line 3473 of file object.c.
References copy_m4_m3(), give_parvert(), mid_v3_v3v3v3(), OB_TYPE_SUPPORT_PARVERT, Object::par1, Object::par2, Object::par3, quat_to_mat3(), tri_to_quat(), Object::type, unit_m4(), v1, and v2.
Referenced by BKE_object_get_parent_matrix().
|
static |
Definition at line 2211 of file object.c.
References BKE_object_add_only_object(), BKE_object_obdata_add_from_type(), BKE_view_layer_base_deselect_all(), Object::data, DEG_id_tag_update_ex(), Object::id, ID_RECALC_ANIMATION, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, and type.
Referenced by BKE_object_add(), and BKE_object_add_from().
|
static |
Definition at line 613 of file object.c.
References Freestyle::a, Object::adt, animviz_motionpath_blend_read_data(), BKE_animdata_blend_read_data(), BKE_constraint_blend_read_data(), BKE_effector_add_weights(), BKE_gpencil_modifier_blend_read_data(), BKE_modifier_blend_read_data(), BKE_modifier_new(), BKE_modifier_unique_name(), BKE_object_empty_draw_type_set(), BKE_object_runtime_reset(), BKE_object_sculpt_data_create(), BKE_particle_partdeflect_blend_read_data(), BKE_particle_system_blend_read_data(), BKE_pose_blend_read_data(), BKE_previewimg_blend_read(), BKE_ptcache_blend_read_data(), BKE_shaderfx_blend_read_data(), BLI_addhead(), BLI_addtail(), BLI_remlink(), BLO_read_data_address, BLO_read_data_is_undo(), BLO_read_int32_array(), BLO_read_list(), BLO_read_pointer_array(), SoftBody::bpoint, SoftBody::bspring, HookModifierData::cent, ObHook::cent, CLAMP, Object::constraints, copy_v3_v3(), WaveEff::damp, WaveModifierData::damp, Object::defbase, direct_link_nlastrips(), EFF_BUILD, EFF_PARTICLE, EFF_WAVE, SoftBody::effector_weights, eModifierType_Build, eModifierType_Hook, eModifierType_Wave, Object::empty_drawtype, HookModifierData::falloff, ObHook::falloff, WaveEff::flag, WaveModifierData::flag, Object::fmaps, HookModifierData::force, ObHook::force, Object::greasepencil_modifiers, WaveEff::height, WaveModifierData::height, Object::id, HookModifierData::indexar, ObHook::indexar, Object::iuser, PartEff::keys, SoftBody::keys, BuildEff::len, BuildModifierData::length, LIB_TAG_EXTERN, LIB_TAG_INDIRECT, WaveEff::lifetime, WaveModifierData::lifetime, Object::mat, Object::matbits, MEM_callocN, MEM_freeN, Object::mode, Object::modifiers, Object::mpath, WaveEff::narrow, WaveModifierData::narrow, PartEff::next, next, NULL, OB_EMPTY, OB_EMPTY_IMAGE, OB_MODE_ALL_MODE_DATA, OB_MODE_ALL_SCULPT, OB_MODE_EDIT, OB_MODE_PARTICLE_EDIT, HookModifierData::object, ObHook::parent, HookModifierData::parentinv, ObHook::parentinv, Object::particlesystem, Object::pc_ids, Object::pd, RigidBodyCon::physics_constraint, SoftBody_Shared::pointcache, Object::pose, Object::preview, Object::proxy_from, SoftBody_Shared::ptcaches, BuildModifierData::randomize, Object::rigidbody_constraint, Object::rigidbody_object, ROT_MODE_MAX, ROT_MODE_MIN, Object::rotmode, SoftBody::scratch, Object::sculpt, BuildModifierData::seed, BuildEff::sfra, Object::shader_fx, SoftBody::shared, RigidBodyOb::shared, Object::soft, WaveEff::speed, WaveModifierData::speed, BuildModifierData::start, WaveEff::startx, WaveModifierData::startx, WaveModifierData::starty, ID::tag, WaveEff::timeoffs, WaveModifierData::timeoffs, HookModifierData::totindex, ObHook::totindex, SoftBody::totkey, PartEff::type, Object::type, WaveEff::width, and WaveModifierData::width.
|
static |
Definition at line 1038 of file object.c.
References Freestyle::a, BKE_constraint_blend_read_expand(), BKE_gpencil_modifiers_foreach_ID_link(), BKE_modifiers_foreach_ID_link(), BKE_object_do_version_give_parteff_245(), BKE_pose_blend_read_expand(), BKE_shaderfx_foreach_ID_link(), BLO_expand, SoftBody::collision_group, Object::constraints, Object::data, SoftBody::effector_weights, expand_constraint_channels(), expand_object_expandModifiers(), PartDeflect::f_source, ListBase::first, Object::greasepencil_modifiers, PartEff::group, EffectorWeights::group, Object::instance_collection, LISTBASE_FOREACH, Object::mat, Object::modifiers, RigidBodyCon::ob1, RigidBodyCon::ob2, Object::particlesystem, Object::pd, Object::pose, Object::poselib, Object::proxy, Object::proxy_group, Object::rigidbody_constraint, Object::shader_fx, Object::soft, PartDeflect::tex, and Object::totcol.
|
static |
Definition at line 838 of file object.c.
References Freestyle::a, BKE_constraint_blend_read_lib(), BKE_gpencil_modifier_blend_read_lib(), BKE_modifier_blend_read_lib(), BKE_modifiers_findby_type(), BKE_object_material_len_p(), BKE_object_material_resize(), BKE_particle_partdeflect_blend_read_lib(), BKE_particle_system_blend_read_lib(), BKE_pose_blend_read_lib(), BKE_pose_free(), BKE_shaderfx_blend_read_lib(), BLO_read_get_new_id_address(), BLO_read_id_address, BLO_read_lib_get_main(), BLO_read_lib_reports(), BLO_reportf_wrap(), SoftBody::collision_group, Object::constraints, Object::data, FluidModifierData::domain, EFF_PARTICLE, FluidModifierData::effector, SoftBody::effector_weights, eModifierType_Fluid, eModifierType_Fluidsim, Library::filepath, FluidDomainSettings::flags, FluidFlowSettings::flags, FluidEffectorSettings::flags, FluidModifierData::flow, FLUID_DOMAIN_FILE_LOAD, FLUID_EFFECTOR_NEEDS_UPDATE, FLUID_FLOW_NEEDS_UPDATE, FluidsimModifierData::fss, EffectorWeights::group, Collection::id, Object::id, Object::instance_collection, FluidsimSettings::ipo, ID::lib, lib_link_constraint_channels(), lib_link_nlastrips(), LISTBASE_FOREACH, Object::mat, MEM_freeN, MOD_FLUID_TYPE_DOMAIN, MOD_FLUID_TYPE_EFFEC, MOD_FLUID_TYPE_FLOW, Object::mode, ID::name, NULL, RigidBodyCon::ob1, RigidBodyCon::ob2, OB_DUPLICOLLECTION, OB_EMPTY, OB_MODE_POSE, Object::parent, Object::particlesystem, Object::pd, Object::pose, Object::poselib, Object::proxy, Object::proxy_from, Object::proxy_group, Object::rigidbody_constraint, RPT_WARNING, Object::soft, TIP_, Object::totcol, Object::track, Object::transflag, FluidModifierData::type, and Object::type.
|
static |
Definition at line 527 of file object.c.
References bArmature::act_bone, Object::adt, animviz_motionpath_blend_write(), BKE_animdata_blend_write(), BKE_constraint_blend_write(), BKE_gpencil_modifier_blend_write(), BKE_id_blend_write(), BKE_modifier_blend_write(), BKE_object_runtime_reset(), BKE_particle_system_blend_write(), BKE_pose_blend_write(), BKE_previewimg_blend_write(), BKE_ptcache_blend_write(), BKE_shaderfx_blend_write(), BLI_strncpy(), BLO_write_id_struct, BLO_write_is_undo(), BLO_write_pointer_array(), BLO_write_raw(), BLO_write_struct, BLO_write_struct_list, Object::constraints, Object::data, Object::defbase, SoftBody::effector_weights, Object::empty_drawtype, Object::fmaps, Object::greasepencil_modifiers, Object::id, Object::iuser, Object::mat, Object::matbits, Object::mode, Object::modifiers, Object::mpath, Bone::name, NULL, OB_ARMATURE, OB_EMPTY, OB_EMPTY_IMAGE, OB_MODE_EDIT, Object::particlesystem, Object::pc_ids, Object::pd, SoftBody_Shared::pointcache, Object::pose, Object::preview, bPose::proxy_act_bone, SoftBody_Shared::ptcaches, Object::rigidbody_constraint, Object::rigidbody_object, Object::shader_fx, SoftBody::shared, Object::soft, Object::totcol, Object::type, ID::us, write_defgroups(), and write_fmaps().
|
static |
Set "ignore cache" flag for all caches on this object.
Definition at line 5522 of file object.c.
References BKE_ptcache_ids_from_object(), BLI_freelistN(), PTCacheID::cache, ListBase::first, PointCache::flag, PTCacheID::next, NULL, PTCACHE_IGNORE_CLEAR, and state.
Referenced by BKE_object_modifier_update_subframe().
|
static |
Definition at line 190 of file object.c.
References animviz_copy_motionpath(), Object::avs, Object_Runtime::bb, BKE_constraints_copy_ex(), BKE_defgroup_copy_list(), BKE_object_facemap_copy_list(), BKE_object_modifier_stack_copy(), BKE_object_runtime_reset_on_copy(), BKE_pose_rebuild(), BKE_previewimg_id_copy(), BKE_rigidbody_object_copy(), BKE_shaderfx_copydata_ex(), BKE_shaderfx_new(), BLI_addtail(), BLI_assert, BLI_listbase_clear(), BLI_strncpy(), Object::constraints, copy_object_pose(), Object::data, Object::defbase, Object::drawdata, Object::fmaps, Object::greasepencil_modifiers, Object::id, Object::iuser, LIB_ID_COPY_NO_PREVIEW, LIB_ID_CREATE_NO_USER_REFCOUNT, LISTBASE_FOREACH, Object::mat, Object::matbits, MEM_dupallocN, Object::mode, Object::modifiers, Object::mpath, ShaderFxData::name, NULL, OB_ARMATURE, OB_GPENCIL, OB_MODE_OBJECT, Object::pc_ids, Object::pd, Object::pose, Object::preview, PartDeflect::rng, Object::runtime, Object::sculpt, Object::shader_fx, Object::totcol, and Object::type.
|
static |
Find a psys matching given psys_src in ob_dst (i.e. sharing the same ParticleSettings ID), or add one, and return valid psys from ob_dst.
Definition at line 1371 of file object.c.
References LISTBASE_FOREACH, NULL, object_copy_particle_system(), ParticleSystem::part, Object::particlesystem, and scene.
Referenced by BKE_object_copy_modifier().
|
static |
Definition at line 4937 of file object.c.
References BKE_key_from_object(), BLI_listbase_is_empty(), Object::modifiers, NULL, and object_moves_in_time().
Referenced by BKE_object_is_deform_modified().
|
static |
Definition at line 418 of file object.c.
References BKE_constraints_id_loop(), BKE_gpencil_modifiers_foreach_ID_link(), BKE_LIB_FOREACHID_PROCESS, BKE_LIB_FOREACHID_PROCESS_ID, BKE_lib_query_foreachid_process_callback_flag_override(), BKE_lib_query_foreachid_process_flags_get(), BKE_lib_query_idpropertiesForeachIDLink_callback(), BKE_modifiers_foreach_ID_link(), BKE_particlesystem_id_loop(), BKE_shaderfx_foreach_ID_link(), bPose::chanbase, SoftBody::collision_group, Object::constraints, data, Object::data, SoftBody::effector_weights, PartDeflect::f_source, EffectorWeights::group, ID_IS_LINKED, IDP_foreach_property(), IDP_TYPE_FILTER_ID, IDWALK_CB_INDIRECT_USAGE, IDWALK_CB_LOOPBACK, IDWALK_CB_NEVER_NULL, IDWALK_CB_NEVER_SELF, IDWALK_CB_NOP, IDWALK_CB_USER, IDWALK_NO_INDIRECT_PROXY_DATA_USAGE, Object::instance_collection, library_foreach_constraintObjectLooper(), library_foreach_gpencil_modifiersForeachIDLink(), library_foreach_modifiersForeachIDLink(), library_foreach_particlesystemsObjectLooper(), library_foreach_shaderfxForeachIDLink(), LISTBASE_FOREACH, Object::mat, NULL, RigidBodyCon::ob1, RigidBodyCon::ob2, OB_EMPTY, Object::parent, Object::particlesystem, Object::pd, Object::pose, Object::poselib, Object::proxy, Object::proxy_from, Object::proxy_group, Object::rigidbody_constraint, Object::soft, PartDeflect::tex, Object::track, and Object::type.
|
static |
Definition at line 273 of file object.c.
References CurveCache::anim_path_accum_length, animviz_free_motionpath(), Object_Runtime::bb, CurveCache::bev, BKE_constraints_free_ex(), BKE_curve_bevelList_free(), BKE_object_free_modifiers(), BKE_object_free_shaderfx(), BKE_partdeflect_free(), BKE_pose_free_ex(), BKE_previewimg_free(), BKE_rigidbody_free_constraint(), BKE_rigidbody_free_object(), BKE_sculptsession_free(), BLI_freelistN(), Object::constraints, Object_Runtime::curve_cache, Object::defbase, DRW_drawdata_free(), Object::fmaps, Object::iuser, LIB_ID_CREATE_NO_USER_REFCOUNT, Object::mat, Object::matbits, MEM_freeN, MEM_SAFE_FREE, Object::mpath, NULL, Object::pc_ids, Object::pd, Object::pose, Object::preview, Object::runtime, and sbFree().
|
static |
Definition at line 4306 of file object.c.
References BKE_object_handle_update(), depsgraph, NULL, Object::proxy, Object::proxy_group, and scene.
Referenced by BKE_object_handle_update_ex().
|
static |
Definition at line 2087 of file object.c.
References Object::dtx, ELEM, Object::id, Object::ima_ofs, OB_CAMERA, OB_EMPTY, OB_GPENCIL, OB_LAMP, OB_NEGZ, OB_POSY, OB_SPEAKER, OB_USE_GPENCIL_LIGHTS, object_init_data(), Object::trackflag, Object::type, Object::upflag, and zero_v2().
Referenced by BKE_object_add_only_object().
|
static |
Definition at line 174 of file object.c.
References animviz_settings_init(), Object::avs, BLI_assert, DNA_struct_default_get, MEMCMP_STRUCT_AFTER_IS_ZERO, MEMCPY_STRUCT_AFTER, OB_EMPTY, OB_POSY, OB_POSZ, Object::trackflag, Object::type, and Object::upflag.
Referenced by object_init().
Definition at line 1121 of file object.c.
References BKE_ptcache_ids_from_object(), BLI_freelistN(), LISTBASE_FOREACH, NULL, and PTCACHE_FLAG_INFO_DIRTY.
Definition at line 324 of file object.c.
References BKE_id_copy(), BKE_lib_id_clear_library_data(), BKE_lib_id_expand_local(), BKE_libblock_remap(), BKE_library_ID_test_usages(), Object::id, ID_IS_LINKED, ID_NEW_SET, ID_REMAP_SKIP_INDIRECT_USAGE, id_us_min(), LIB_ID_MAKELOCAL_FULL_LIBRARY, LIB_ID_MAKELOCAL_OBJECT_NO_PROXY_CLEARING, NULL, Object::proxy, Object::proxy_from, and Object::proxy_group.
|
static |
Definition at line 1357 of file object.c.
References ELEM, eModifierType_Collision, and eModifierType_Hook.
Referenced by BKE_object_copy_modifier(), and BKE_object_modifier_stack_copy().
|
static |
Definition at line 4932 of file object.c.
References BKE_object_moves_in_time().
Referenced by constructive_modifier_is_deform_modified(), and object_deforms_in_time().
|
static |
Definition at line 1613 of file object.c.
References BKE_object_get_evaluated_mesh(), CD_GRID_PAINT_MASK, CD_MDISPS, SubdivCCG::coords, copy_ccg_data(), Object::data, Object_Runtime::data_orig, DEG_get_original_object(), SubdivCCG::dirty, SubdivCCG::hidden, Object_Runtime::is_data_eval_owned, multiresModifier_reshapeFromCCG(), NULL, OB_MESH, Mesh::runtime, Object::runtime, Mesh_Runtime::subdiv_ccg, Mesh_Runtime::subdiv_ccg_tot_level, and Object::type.
Referenced by BKE_object_free_derived_caches().
|
static |
Definition at line 3580 of file object.c.
References BKE_constraints_clear_evalob(), BKE_constraints_make_evalob(), BKE_constraints_solve(), BKE_object_to_mat4(), BKE_rigidbody_sync_transforms(), CONSTRAINT_OBTYPE_OBJECT, Object::constraints, depsgraph, ListBase::first, is_negative_m4(), NULL, OB_NEG_SCALE, OB_NO_CONSTRAINTS, Object::obmat, Object::parent, Scene::rigidbody_world, scene, solve_parenting(), and Object::transflag.
Referenced by BKE_object_where_is_calc(), BKE_object_where_is_calc_ex(), and BKE_object_where_is_calc_time().
Find an associated armature object.
Definition at line 5130 of file object.c.
References eModifierType_Armature, ListBase::first, mod(), Object::modifiers, NULL, OB_ARMATURE, Object::parent, PARSKEL, Object::partype, and Object::type.
Referenced by BKE_object_relational_superset().
Definition at line 5154 of file object.c.
References BLI_linklist_prepend(), Object::id, LIB_TAG_DOIT, and ID::tag.
Referenced by BKE_object_relational_superset().
|
static |
Definition at line 5149 of file object.c.
References Object::id, LIB_TAG_DOIT, and ID::tag.
Referenced by BKE_object_relational_superset().
|
static |
Definition at line 4541 of file object.c.
References Freestyle::a, LinkData::data, and POINTER_AS_INT.
Referenced by BKE_object_insert_ptcache().
|
static |
Definition at line 4577 of file object.c.
References LinkData::data, ListBase::first, LinkData::next, NULL, and POINTER_AS_INT.
Referenced by BKE_object_delete_ptcache().
|
static |
| r_originmat | Optional matrix that stores the space the object is in (without its own matrix applied) |
Definition at line 3549 of file object.c.
References BKE_object_get_parent_matrix(), BKE_object_to_mat4(), copy_m3_m4(), copy_v3_v3(), mul_m4_m4m4(), Object::obmat, Object_Runtime::parent_display_origin, Object::parentinv, PARSKEL, Object::partype, PARTYPE, and Object::runtime.
Referenced by BKE_object_where_is_calc_mat4(), and object_where_is_calc_ex().
|
static |
Definition at line 513 of file object.c.
References BLO_write_struct, and LISTBASE_FOREACH.
Referenced by object_blend_write().
|
static |
Definition at line 520 of file object.c.
References BLO_write_struct, and LISTBASE_FOREACH.
Referenced by object_blend_write().
| IDTypeInfo IDType_ID_OB |
Definition at line 1135 of file object.c.
Referenced by blender::bke::tests::test_lattice_deform_free(), and blender::bke::tests::test_lattice_deform_init().
|
static |
Definition at line 157 of file object.c.
Referenced by BKE_object_make_proxy(), BKE_object_obdata_add_from_type(), get_obdata_defname(), give_parvert(), and ob_parbone().
|
static |
Definition at line 169 of file object.c.
Referenced by give_parvert().