Blender V2.61 - r43446
|
General operations, lookup, etc. for blender objects. More...
Go to the source code of this file.
Classes | |
struct | ObjectTfmProtectedChannels |
Typedefs | |
typedef struct ObjectTfmProtectedChannels | ObjectTfmProtectedChannels |
Functions | |
void | clear_workob (struct Object *workob) |
void | what_does_parent (struct Scene *scene, struct Object *ob, struct Object *workob) |
void | copy_baseflags (struct Scene *scene) |
void | copy_objectflags (struct Scene *scene) |
struct SoftBody * | copy_softbody (struct SoftBody *sb) |
struct BulletSoftBody * | copy_bulletsoftbody (struct BulletSoftBody *sb) |
void | copy_object_particlesystems (struct Object *obn, struct Object *ob) |
void | copy_object_softbody (struct Object *obn, struct Object *ob) |
void | object_free_particlesystems (struct Object *ob) |
void | object_free_softbody (struct Object *ob) |
void | object_free_bulletsoftbody (struct Object *ob) |
void | update_base_layer (struct Scene *scene, struct Object *ob) |
void | free_object (struct Object *ob) |
void | object_free_display (struct Object *ob) |
void | object_link_modifiers (struct Object *ob, struct Object *from) |
void | object_free_modifiers (struct Object *ob) |
void | object_make_proxy (struct Object *ob, struct Object *target, struct Object *gob) |
void | object_copy_proxy_drivers (struct Object *ob, struct Object *target) |
void | unlink_object (struct Object *ob) |
int | exist_object (struct Object *obtest) |
struct Object * | add_only_object (int type, const char *name) |
struct Object * | add_object (struct Scene *scene, int type) |
struct Object * | copy_object (struct Object *ob) |
void | make_local_object (struct Object *ob) |
int | object_is_libdata (struct Object *ob) |
int | object_data_is_libdata (struct Object *ob) |
void | set_mblur_offs (float blur) |
void | set_field_offs (float field) |
void | disable_speed_curve (int val) |
void | object_scale_to_mat3 (struct Object *ob, float mat[][3]) |
void | object_rot_to_mat3 (struct Object *ob, float mat[][3]) |
void | object_mat3_to_rot (struct Object *ob, float mat[][3], short use_compat) |
void | object_to_mat3 (struct Object *ob, float mat[][3]) |
void | object_to_mat4 (struct Object *ob, float mat[][4]) |
void | object_apply_mat4 (struct Object *ob, float mat[][4], const short use_compat, const short use_parent) |
struct Object * | object_pose_armature_get (struct Object *ob) |
void | where_is_object_time (struct Scene *scene, struct Object *ob, float ctime) |
void | where_is_object (struct Scene *scene, struct Object *ob) |
void | where_is_object_simul (struct Scene *scene, struct Object *ob) |
void | where_is_object_mat (struct Scene *scene, struct Object *ob, float obmat[4][4]) |
struct BoundBox * | unit_boundbox (void) |
void | boundbox_set_from_min_max (struct BoundBox *bb, float min[3], float max[3]) |
struct BoundBox * | object_get_boundbox (struct Object *ob) |
void | object_get_dimensions (struct Object *ob, float *value) |
void | object_set_dimensions (struct Object *ob, const float *value) |
void | object_boundbox_flag (struct Object *ob, int flag, int set) |
void | minmax_object (struct Object *ob, float min[3], float max[3]) |
int | minmax_object_duplis (struct Scene *scene, struct Object *ob, float *min, float *max) |
void | BKE_object_foreach_display_point (struct Object *ob, float obmat[4][4], void(*func_cb)(const float[3], void *), void *user_data) |
void | BKE_scene_foreach_display_point (struct Scene *scene, struct View3D *v3d, const short flag, void(*func_cb)(const float[3], void *), void *user_data) |
int | BKE_object_parent_loop_check (const struct Object *parent, const struct Object *ob) |
void | solve_tracking (struct Object *ob, float targetmat[][4]) |
int | ray_hit_boundbox (struct BoundBox *bb, float ray_start[3], float ray_normal[3]) |
void * | object_tfm_backup (struct Object *ob) |
void | object_tfm_restore (struct Object *ob, void *obtfm_pt) |
void | object_tfm_protected_backup (const struct Object *ob, ObjectTfmProtectedChannels *obtfm) |
void | object_tfm_protected_restore (struct Object *ob, const ObjectTfmProtectedChannels *obtfm, const short protectflag) |
void | object_handle_update (struct Scene *scene, struct Object *ob) |
void | object_sculpt_modifiers_changed (struct Object *ob) |
int | give_obdata_texspace (struct Object *ob, short **texflag, float **loc, float **size, float **rot) |
int | object_insert_ptcache (struct Object *ob) |
struct KeyBlock * | object_insert_shape_key (struct Scene *scene, struct Object *ob, const char *name, int from_mix) |
int | object_is_modified (struct Scene *scene, struct Object *ob) |
void | object_relink (struct Object *ob) |
struct MovieClip * | object_get_movieclip (struct Scene *scene, struct Object *ob, int use_default) |
General operations, lookup, etc. for blender objects.
Definition in file BKE_object.h.
typedef struct ObjectTfmProtectedChannels ObjectTfmProtectedChannels |
Definition at line 829 of file object.c.
References add_obdata_from_type(), add_only_object(), BLI_strncpy(), Object::data, get_obdata_defname(), Scene::lay, Object::lay, MAX_ID_NAME, OB_RECALC_DATA, OB_RECALC_OB, OB_RECALC_TIME, Object::recalc, scene_add_base(), and scene_select_base().
Referenced by add_hook_object_new(), SkinInfo::create_armature(), DocumentImporter::create_camera_object(), DocumentImporter::create_lamp_object(), MeshImporter::create_mesh_object(), ED_object_add_type(), ED_object_modifier_convert(), get_new_constraint_target(), gp_layer_to_curve(), make_proxy_exec(), txt_add_object(), and DocumentImporter::write_node().
struct Object* add_only_object | ( | int | type, |
const char * | name | ||
) | [read] |
Definition at line 751 of file object.c.
References alloc_libblock(), animviz_settings_init(), Object::anisotropicFriction, Object::avs, Object::col, Object::constinv, Object::damping, Object::dquat, Object::drotAngle, Object::drotAxis, Object::dscale, Object::dt, Object::dupend, Object::dupfacesca, Object::dupoff, Object::dupon, Object::dupsta, Object::empty_drawsize, Object::empty_drawtype, ListBase::first, Object::fluidsimSettings, Object::formfactor, G, Object::gameflag, ID_OB, Object::inertia, Object::init_state, ListBase::last, Object::m_contactProcessingThreshold, Object::margin, Object::mass, NULL, OB_CAMERA, OB_COLLISION, OB_LAMP, OB_LOCK_ROT4D, OB_NEGZ, OB_PLAINAXES, OB_POSY, OB_POSZ, OB_PROP, OB_SPEAKER, OB_TEXTURE, Object::obmat, Object::obstacleRad, Object::parentinv, Object::pc_ids, Object::protectflag, Object::quat, Object::rdamping, ROT_MODE_EUL, Object::rotAngle, Object::rotAxis, Object::rotmode, Object::size, Object::state, Object::trackflag, Object::type, unit_axis_angle(), unit_m4(), unit_qt(), and Object::upflag.
Referenced by add_object(), and give_base_to_groups().
void BKE_object_foreach_display_point | ( | struct Object * | ob, |
float | obmat[4][4], | ||
void(*)(const float[3], void *) | func_cb, | ||
void * | user_data | ||
) |
Definition at line 2312 of file object.c.
References MVert::co, co, Object::derivedFinal, Object::disp, ListBase::first, DerivedMesh::getNumVerts, DerivedMesh::getVertArray, i, mul_v3_m4v3(), DispList::next, DispList::nr, and DispList::verts.
Referenced by BKE_scene_foreach_display_point().
void BKE_scene_foreach_display_point | ( | struct Scene * | scene, |
struct View3D * | v3d, | ||
const short | flag, | ||
void(*)(const float[3], void *) | func_cb, | ||
void * | user_data | ||
) |
Definition at line 2345 of file object.c.
References BASE_VISIBLE, BKE_object_foreach_display_point(), ListBase::first, FIRSTBASE, Base::flag, free_object_duplilist(), DupliObject::mat, DupliObject::next, Base::next, DupliObject::no_draw, DupliObject::ob, OB_DUPLI, Base::object, object_duplilist(), Object::obmat, and Object::transflag.
Referenced by camera_view_frame_fit_to_scene().
void boundbox_set_from_min_max | ( | struct BoundBox * | bb, |
float | min[3], | ||
float | max[3] | ||
) |
Definition at line 2121 of file object.c.
References BoundBox::vec.
Referenced by boundbox_displist(), boundbox_mesh(), DM_set_object_boundbox(), tex_space_curve(), tex_space_mball(), and unit_boundbox().
void clear_workob | ( | struct Object * | workob | ) |
Definition at line 118 of file object.c.
References Object::dscale, ROT_MODE_EUL, Object::rotmode, and Object::size.
Referenced by what_does_obaction(), and what_does_parent().
void copy_baseflags | ( | struct Scene * | scene | ) |
Definition at line 127 of file object.c.
References Scene::base, ListBase::first, Base::flag, Object::flag, Base::next, and Base::object.
Referenced by set_trans_object_base_flags().
struct BulletSoftBody* copy_bulletsoftbody | ( | struct BulletSoftBody * | sb | ) | [read] |
Definition at line 873 of file object.c.
References MEM_dupallocN(), and NULL.
Referenced by copy_attr(), copy_object(), and game_physics_copy_exec().
Definition at line 1071 of file object.c.
References Object::actuators, armature_rebuild_pose(), Object::bb, BLI_addtail(), BLI_strncpy(), Object::bsoft, Object::constraints, Object::controllers, copy_actuators(), copy_bulletsoftbody(), copy_constraints(), copy_controllers(), copy_libblock(), copy_object_particlesystems(), copy_object_pose(), copy_properties(), copy_sensors(), copy_softbody(), Object::data, Object::defbase, defgroup_copy_list(), Object::derivedDeform, Object::derivedFinal, Object::disp, Object::dup_group, ListBase::first, Object::flag, Object::gpd, Object::gpulamp, Tex::id, Object::id, id_lib_extern(), id_us_plus(), ListBase::last, Object::mat, Object::matbits, MEM_dupallocN(), Object::mode, modifier_copyData(), modifier_new(), Object::modifiers, Object::mpath, ModifierData::name, ModifierData::next, NULL, OB_ARMATURE, OB_FROMGROUP, Object::pc_ids, Object::pd, Object::pose, Object::prop, PartDeflect::rng, Object::sculpt, Object::sensors, Object::soft, PartDeflect::tex, Object::totcol, TRUE, Object::type, and ModifierData::type.
Referenced by AddNewBlenderMesh(), DocumentImporter::create_instance_node(), duplibase_for_convert(), id_copy(), make_local_object(), make_object_duplilist_real(), object_add_duplicate_internal(), and single_object_users().
Definition at line 951 of file object.c.
References BLI_addtail(), DynamicPaintModifierData::brush, copy_particlesystem(), eModifierType_DynamicPaint, eModifierType_ParticleSystem, eModifierType_Smoke, ListBase::first, SmokeModifierData::flow, ListBase::last, MOD_SMOKE_TYPE_FLOW, Object::modifiers, ModifierData::next, ParticleSystem::next, NULL, Object::particlesystem, SmokeFlowSettings::psys, DynamicPaintBrushSettings::psys, ParticleSystemModifierData::psys, SmokeModifierData::type, and ModifierData::type.
Referenced by copy_object(), and object_link_modifiers().
Definition at line 991 of file object.c.
References copy_softbody(), and Object::soft.
Referenced by object_link_modifiers().
void copy_objectflags | ( | struct Scene * | scene | ) |
Definition at line 137 of file object.c.
References Scene::base, ListBase::first, Object::flag, Base::flag, Base::next, and Base::object.
Definition at line 849 of file object.c.
References BKE_ptcache_copy_list(), SoftBody::bpoint, SoftBody::bspring, SoftBody::effector_weights, SoftBody::keys, MEM_dupallocN(), NULL, SoftBody::pointcache, SoftBody::ptcaches, SoftBody::scratch, SoftBody::totkey, SoftBody::totpoint, SoftBody::totpointkey, and SoftBody::totspring.
Referenced by copy_attr(), copy_object(), and copy_object_softbody().
void disable_speed_curve | ( | int | val | ) |
int exist_object | ( | struct Object * | obtest | ) |
Definition at line 694 of file object.c.
References G, Object::id, ID::next, and NULL.
Referenced by test_constraints().
void free_object | ( | struct Object * | ob | ) |
Definition at line 283 of file object.c.
References Object::adt, animviz_free_motionpath(), Object::bb, BKE_free_animdata(), BLI_freelistN(), bsbFree(), Object::data, free_actuators(), free_constraints(), free_controllers(), free_partdeflect(), free_pose(), free_properties(), free_sculptsession(), free_sensors(), GPU_lamp_free(), Material::id, Object::mat, Object::matbits, MEM_freeN(), NULL, OB_CURVE, OB_MBALL, OB_MESH, object_free_display(), object_free_modifiers(), sbFree(), Object::totcol, Object::type, unlink_curve(), unlink_mball(), unlink_mesh(), and ID::us.
Referenced by free_libblock().
int give_obdata_texspace | ( | struct Object * | ob, |
short ** | texflag, | ||
float ** | loc, | ||
float ** | size, | ||
float ** | rot | ||
) |
Definition at line 2665 of file object.c.
References Object::data, GS, ID_CU, ID_MB, ID_ME, MetaBall::loc, Curve::loc, Mesh::loc, NULL, MetaBall::rot, Curve::rot, Mesh::rot, MetaBall::size, Curve::size, Mesh::size, MetaBall::texflag, Curve::texflag, and Mesh::texflag.
Referenced by createTransTexspace().
void make_local_object | ( | struct Object * | ob | ) |
Definition at line 1163 of file object.c.
References Scene::base, BKE_id_lib_local_paths(), copy_object(), ELEM, extern_local_object(), FALSE, ListBase::first, G, Scene::id, Object::id, id_clear_lib_data(), ID::lib, Base::next, ID::next, NULL, Base::object, object_in_scene(), Object::proxy, Object::proxy_from, Main::scene, TRUE, and ID::us.
Referenced by id_make_local().
void minmax_object | ( | struct Object * | ob, |
float | min[3], | ||
float | max[3] | ||
) |
Definition at line 2197 of file object.c.
References add_v3_v3(), Curve::bb, bPose::chanbase, copy_v3_v3(), Object::data, Lattice::def, DO_MINMAX, FALSE, ListBase::first, get_mesh(), mesh_get_bb(), mul_m4_v3(), mul_v3_m4v3(), bPoseChannel::next, NULL, OB_ARMATURE, OB_CURVE, OB_FONT, OB_LATTICE, OB_MESH, OB_SURF, Object::obmat, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, Object::pose, bPoseChannel::pose_head, bPoseChannel::pose_tail, Object::size, sub_v3_v3(), tex_space_curve(), TRUE, Object::type, BPoint::vec, BoundBox::vec, and simple_enum_gen::w.
Referenced by clampto_evaluate(), initlocalview(), PE_minmax(), view3d_all_exec(), and viewselected_exec().
Definition at line 2280 of file object.c.
References DO_MINMAX, ListBase::first, free_object_duplilist(), i, DupliObject::mat, mul_v3_m4v3(), DupliObject::next, DupliObject::no_draw, DupliObject::ob, OB_DUPLI, object_duplilist(), object_get_boundbox(), Object::transflag, and BoundBox::vec.
Referenced by object_origin_set_exec(), and viewselected_exec().
void object_apply_mat4 | ( | struct Object * | ob, |
float | mat[][4], | ||
const short | use_compat, | ||
const short | use_parent | ||
) |
Definition at line 1545 of file object.c.
References Object::dloc, Object::dscale, FALSE, invert_m4_m4(), Object::loc, mat4_to_loc_rot_size(), mult_m4_m4m4(), object_apply_mat4(), object_mat3_to_rot(), Object::obmat, Object::parent, Object::parentinv, rot, Object::size, and sub_v3_v3().
Referenced by applyarmature_fix_boneparents(), bc_set_parent(), DocumentImporter::create_instance_node(), ED_view3d_camera_lock_sync(), ED_view3d_to_object(), ignore_parent_tx(), SkinInfo::link_armature(), make_object_duplilist_real(), move_camera(), object_apply_mat4(), object_make_proxy(), object_track_clear_exec(), parent_clear_exec(), AnimationImporter::read_node_transform(), set_axis(), set_floor_exec(), view3d_camera_to_view_selected_exec(), and visual_transform_apply_exec().
void object_boundbox_flag | ( | struct Object * | ob, |
int | flag, | ||
int | set | ||
) |
Definition at line 2150 of file object.c.
References BoundBox::flag, and object_get_boundbox().
Referenced by draw_dupli_objects_color().
Definition at line 1261 of file object.c.
References Object::adt, BKE_id_add_animdata(), copy_fcurves(), FCurve::driver, DRIVER_TARGETS_LOOPER, DRIVER_TARGETS_LOOPER_END, AnimData::drivers, ListBase::first, free_fcurves(), Object::id, id_lib_extern(), ID::lib, DriverVar::next, FCurve::next, NULL, and ChannelDriver::variables.
Referenced by armature_rebuild_pose(), and object_make_proxy().
int object_data_is_libdata | ( | struct Object * | ob | ) |
Definition at line 1234 of file object.c.
References Object::data, Object::id, ID::lib, NULL, and Object::proxy.
Referenced by apply_armature_pose2bones_exec(), draw_modifier(), ED_object_enter_editmode(), join_exec(), join_shapes_exec(), set_vpaint(), and texture_paint_toggle_exec().
void object_free_bulletsoftbody | ( | struct Object * | ob | ) |
Definition at line 176 of file object.c.
References bsbFree(), Object::bsoft, and NULL.
void object_free_display | ( | struct Object * | ob | ) |
Definition at line 224 of file object.c.
References Object::derivedDeform, Object::derivedFinal, Object::disp, freedisplist(), DerivedMesh::needsFree, NULL, and DerivedMesh::release.
Referenced by flush_update_node(), and free_object().
void object_free_modifiers | ( | struct Object * | ob | ) |
Definition at line 184 of file object.c.
References BLI_remlink(), ListBase::first, modifier_free(), Object::modifiers, object_free_particlesystems(), and object_free_softbody().
Referenced by convert_exec(), curvetomesh(), free_object(), and object_link_modifiers().
void object_free_particlesystems | ( | struct Object * | ob | ) |
Definition at line 157 of file object.c.
References BLI_remlink(), ListBase::first, Object::particlesystem, and psys_free().
Referenced by object_free_modifiers().
void object_free_softbody | ( | struct Object * | ob | ) |
Definition at line 168 of file object.c.
References NULL, sbFree(), and Object::soft.
Referenced by object_free_modifiers().
Definition at line 2133 of file object.c.
References Object::bb, Object::data, ELEM3, mesh_get_bb(), NULL, OB_CURVE, OB_FONT, OB_MBALL, OB_MESH, OB_SURF, and Object::type.
Referenced by draw_dupli_objects_color(), minmax_object_duplis(), object_boundbox_flag(), object_get_dimensions(), object_set_dimensions(), peelDerivedMesh(), snapDerivedMesh(), and TargetSnapClosest().
void object_get_dimensions | ( | struct Object * | ob, |
float * | value | ||
) |
Definition at line 2159 of file object.c.
References fabsf, mat4_to_size(), NULL, object_get_boundbox(), Object::obmat, and BoundBox::vec.
struct MovieClip* object_get_movieclip | ( | struct Scene * | scene, |
struct Object * | ob, | ||
int | use_default | ||
) | [read] |
Definition at line 2960 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, and bConstraint::type.
Referenced by bundle_midpoint(), dag_id_flush_update(), draw_bgpic(), drawcamera(), get_camera_with_movieclip(), and mouse_select().
Definition at line 2450 of file object.c.
References add_v3_v3(), ADT_RECALC_DRIVERS, armature_rebuild_pose(), BKE_animdata_from_id(), BKE_animsys_evaluate_animdata(), BKE_mesh_end_editmesh(), BKE_mesh_get_editmesh(), BKE_ptcache_ids_from_object(), BLI_assert, BLI_freelistN(), BLI_remlink(), CD_MASK_BAREMESH, CD_MASK_MCOL, CD_MASK_MTFACE, RenderData::cfra, copy_m4_m4(), copy_pose_result(), Object::customdata_mask, Scene::customdata_mask, Object::data, ParticleSettings::draw_as, ParticleSettings::dup_group, Object::dup_group, ParticleSettings::dup_ob, Group::dupli_ofs, eParticleSystemFlag_psys_updated, ListBase::first, ParticleSystemModifierData::flag, ParticleSystem::flag, bPose::flag, G, G_DEBUG, Object::id, if(), Object::imat, invert_m4_m4(), lattice_calc_modifiers(), ID::lib, make_pose_channels_hash(), makeDerivedMesh(), makeDispListCurveTypes(), makeDispListMBall(), MAX_DUPLI_RECUR, mesh_create_derived_render(), MIN2, mult_m4_m4m4(), ID::name, ParticleSystem::next, NULL, OB_ARMATURE, OB_CURVE, OB_DUPLIPARTS, OB_FONT, OB_LATTICE, OB_MBALL, OB_MESH, OB_RECALC_ALL, OB_RECALC_DATA, OB_SURF, Scene::obedit, object_handle_update(), Object::obmat, ParticleSystem::part, PART_DRAW_GR, PART_DRAW_OB, PART_DRAW_REND, particle_system_update(), Object::particlesystem, Scene::physics_settings, Object::pose, POSE_RECALC, Object::proxy, Object::proxy_from, Object::proxy_group, psys_check_enabled(), PSYS_DELETE, psys_free(), psys_get_modifier(), PTCACHE_BAKED, PTCACHE_OUTDATED, PTCACHE_QUICK_CACHE, PTCACHE_SIMULATION_VALID, PhysicsSettings::quick_cache_step, Scene::r, Object::recalc, DerivedMesh::release, ParticleSettings::ren_as, Object::transflag, Object::type, where_is_object(), and where_is_pose().
Referenced by applyProject(), group_handle_recalc_and_update(), motionpaths_calc_update_scene(), object_handle_update(), scene_update_tagged_recursive(), set_trans_object_base_flags(), and subframe_updateObject().
int object_insert_ptcache | ( | struct Object * | ob | ) |
Definition at line 2741 of file object.c.
References BLI_addtail(), BLI_sortlist(), LinkData::data, ListBase::first, GET_INT_FROM_POINTER, i, link(), MEM_callocN(), LinkData::next, NULL, pc_cmp(), Object::pc_ids, and SET_INT_IN_POINTER.
Referenced by ptcache_filename().
struct KeyBlock* object_insert_shape_key | ( | struct Scene * | scene, |
struct Object * | ob, | ||
const char * | name, | ||
int | from_mix | ||
) | [read] |
Definition at line 2901 of file object.c.
References ELEM, insert_curvekey(), insert_lattkey(), insert_meshkey(), NULL, OB_CURVE, OB_LATTICE, OB_MESH, OB_SURF, and Object::type.
Referenced by ED_object_shape_key_add().
int object_is_libdata | ( | struct Object * | ob | ) |
Definition at line 1225 of file object.c.
References Object::id, ID::lib, and Object::proxy.
Referenced by ed_screen_context(), and view3d_context().
Definition at line 2912 of file object.c.
References eModifierMode_Realtime, eModifierMode_Render, modifier_isEnabled(), modifiers_getVirtualModifierList(), ModifierData::next, and ob_get_key().
Definition at line 201 of file object.c.
References BLI_addtail(), copy_object_particlesystems(), copy_object_softbody(), ELEM4, eModifierType_Collision, eModifierType_Hook, eModifierType_ParticleInstance, eModifierType_Softbody, ListBase::first, modifier_copyData(), modifier_new(), Object::modifiers, ModifierData::next, NULL, object_free_modifiers(), and ModifierData::type.
Referenced by make_links_data_exec().
Definition at line 1303 of file object.c.
References Object::actcol, armature_rebuild_pose(), armature_set_id_extern(), copy_m4_m4(), copy_object_pose(), copy_object_transform(), copy_v3_v3(), Object::data, Object::dt, Object::dup_group, Group::dupli_ofs, Object::empty_drawsize, Object::empty_drawtype, FALSE, i, Object::id, id_lib_extern(), id_us_plus(), IDP_CopyProperty(), IDP_FreeProperty(), ID::lib, Object::mat, Object::matbits, MEM_dupallocN(), MEM_freeN(), mul_mat3_m4_v3(), mult_m4_m4m4(), NULL, OB_ARMATURE, OB_EMPTY, OB_RECALC_DATA, OB_RECALC_OB, OB_RECALC_TIME, OB_TYPE_SUPPORT_MATERIAL, object_apply_mat4(), object_copy_proxy_drivers(), Object::obmat, Object::parent, Object::parentinv, Object::pose, ID::properties, Object::proxy, Object::proxy_group, Object::recalc, rest_pose(), Object::rotmode, sub_v3_v3(), Object::totcol, TRUE, and Object::type.
Referenced by make_proxy_exec().
void object_mat3_to_rot | ( | struct Object * | ob, |
float | mat[][3], | ||
short | use_compat | ||
) |
Definition at line 1442 of file object.c.
References Object::dquat, Object::drot, Object::drotAngle, Object::drotAxis, eulO_to_quat(), invert_qt(), mat3_to_axis_angle(), mat3_to_compatible_eulO(), mat3_to_eulO(), mat3_to_quat(), mul_qt_qtqt(), normalize_qt_qt(), Object::quat, quat_to_mat3(), Object::rot, ROT_MODE_AXISANGLE, ROT_MODE_QUAT, Object::rotAngle, Object::rotAxis, Object::rotmode, and sub_v3_v3().
Referenced by object_apply_mat4().
Definition at line 1044 of file object.c.
References modifiers_isDeformedByArmature(), NULL, and object_pose_context().
Referenced by apply_armature_pose2bones_exec(), ED_operator_posemode(), ed_screen_context(), get_poselib_object(), get_selected_defgroups(), pose_armature_layers_exec(), pose_armature_layers_invoke(), pose_armature_layers_showall_exec(), pose_autoside_names_exec(), pose_bone_flip_active_exec(), pose_bone_layers_exec(), pose_calculate_paths_exec(), pose_clear_paths_exec(), pose_clear_transform_generic_exec(), pose_constraint_add_exec(), pose_constraints_clear_exec(), pose_copy_exec(), pose_flip_names_exec(), pose_flip_quats_exec(), pose_group_add_exec(), pose_group_assign_exec(), pose_group_deselect_exec(), pose_group_remove_exec(), pose_group_select_exec(), pose_group_unassign_exec(), pose_groups_menu_invoke(), pose_hide_exec(), pose_ik_add_invoke(), pose_ik_clear_exec(), pose_paste_exec(), pose_propagate_exec(), pose_reveal_exec(), pose_select_constraint_target_exec(), pose_select_grouped_exec(), pose_select_hierarchy_exec(), pose_select_parent_exec(), pose_slide_init(), pose_visual_transform_apply_exec(), and poselib_rename_exec().
void object_relink | ( | struct Object * | ob | ) |
Definition at line 2937 of file object.c.
References Object::adt, BKE_relink_animdata(), bPose::chanbase, bPoseChannel::constraints, Object::constraints, copy_object__forwardModifierLinks(), ListBase::first, Object::id, ID_NEW, ID::lib, modifiers_foreachIDLink(), bPoseChannel::next, NULL, Object::parent, Object::pose, Object::proxy, Object::proxy_group, and relink_constraints().
Referenced by copy_object_set_idnew(), ED_object_add_duplicate(), and single_object_users().
void object_rot_to_mat3 | ( | struct Object * | ob, |
float | mat[][3] | ||
) |
Definition at line 1408 of file object.c.
References axis_angle_to_mat3(), 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 apply_objects_internal(), object_to_mat3(), and set_axis().
void object_scale_to_mat3 | ( | struct Object * | ob, |
float | mat[][3] | ||
) |
Definition at line 1401 of file object.c.
References Object::dscale, mul_v3_v3v3(), Object::size, and size_to_mat3().
Referenced by apply_objects_internal(), multiresModifier_prepare_join(), multiresModifier_scale_disp(), and object_to_mat3().
void object_sculpt_modifiers_changed | ( | struct Object * | ob | ) |
Definition at line 2638 of file object.c.
References BLI_pbvh_free(), BLI_pbvh_node_mark_update(), BLI_pbvh_search_gather(), SculptSession::cache, free_sculptsession_deformMats(), MEM_freeN(), nodes, NULL, SculptSession::pbvh, and Object::sculpt.
Referenced by clear_mesh_caches().
void object_set_dimensions | ( | struct Object * | ob, |
const float * | value | ||
) |
Definition at line 2177 of file object.c.
References len(), mat4_to_size(), NULL, object_get_boundbox(), Object::obmat, Object::size, and BoundBox::vec.
void* object_tfm_backup | ( | struct Object * | ob | ) |
Definition at line 2389 of file object.c.
References Object::constinv, ObTfmBack::constinv, copy_m4_m4(), copy_qt_qt(), copy_v3_v3(), Object::dloc, ObTfmBack::dloc, Object::dquat, ObTfmBack::dquat, Object::drot, ObTfmBack::drot, Object::drotAngle, ObTfmBack::drotAngle, Object::drotAxis, ObTfmBack::drotAxis, Object::dscale, ObTfmBack::dscale, Object::imat, ObTfmBack::imat, Object::loc, ObTfmBack::loc, MEM_mallocN(), Object::obmat, ObTfmBack::obmat, Object::orig, ObTfmBack::orig, Object::parentinv, ObTfmBack::parentinv, Object::quat, ObTfmBack::quat, Object::rot, ObTfmBack::rot, Object::rotAngle, ObTfmBack::rotAngle, Object::rotAxis, ObTfmBack::rotAxis, Object::size, and ObTfmBack::size.
Referenced by initFlyInfo().
void object_tfm_protected_backup | ( | const struct Object * | ob, |
ObjectTfmProtectedChannels * | obtfm | ||
) |
void object_tfm_protected_restore | ( | struct Object * | ob, |
const ObjectTfmProtectedChannels * | obtfm, | ||
const short | protectflag | ||
) |
Definition at line 1506 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, i, 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::size, and Object::size.
Referenced by ED_view3d_camera_lock_sync(), view3d_camera_to_view_exec(), and view3d_camera_to_view_selected_exec().
void object_tfm_restore | ( | struct Object * | ob, |
void * | obtfm_pt | ||
) |
Definition at line 2413 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::orig, Object::orig, ObTfmBack::parentinv, Object::parentinv, ObTfmBack::quat, Object::quat, ObTfmBack::rot, Object::rot, ObTfmBack::rotAngle, Object::rotAngle, ObTfmBack::rotAxis, Object::rotAxis, ObTfmBack::size, and Object::size.
Referenced by flyEnd().
void object_to_mat3 | ( | struct Object * | ob, |
float | mat[][3] | ||
) |
Definition at line 1574 of file object.c.
References mul_m3_m3m3(), object_rot_to_mat3(), and object_scale_to_mat3().
Referenced by apply_objects_internal(), arrayModifier_doArray(), object_to_mat4(), and ObjectToTransData().
void object_to_mat4 | ( | struct Object * | ob, |
float | mat[][4] | ||
) |
Definition at line 1588 of file object.c.
References add_v3_v3v3(), copy_m4_m3(), Object::dloc, Object::loc, and object_to_mat3().
Referenced by actcon_get_tarmat(), TransformWriter::add_node_transform_ob(), constraint_mat_convertspace(), dvar_eval_transChan(), set_axis(), set_floor_exec(), solve_parenting(), where_is_object_mat(), where_is_object_simul(), and where_is_object_time().
int ray_hit_boundbox | ( | struct BoundBox * | bb, |
float | ray_start[3], | ||
float | ray_normal[3] | ||
) |
Definition at line 2709 of file object.c.
References i, isect_ray_tri_v3(), NULL, and BoundBox::vec.
Referenced by peelDerivedMesh(), and snapDerivedMesh().
void set_field_offs | ( | float | field | ) |
void set_mblur_offs | ( | float | blur | ) |
void solve_tracking | ( | struct Object * | ob, |
float | targetmat[][4] | ||
) |
struct BoundBox* unit_boundbox | ( | void | ) | [read] |
Definition at line 2110 of file object.c.
References boundbox_set_from_min_max(), max, MEM_callocN(), and min.
Referenced by add_curve(), and add_mesh().
void unlink_object | ( | struct Object * | ob | ) |
Definition at line 349 of file object.c.
References Object::actuators, bScreen::areabase, Curve::bevobj, ParticleData::boid, ParticleSettings::boids, Main::camera, View3D::camera, TimeMarker::camera, Scene::camera, bPose::chanbase, constraint_get_typeinfo(), Object::constraints, bPoseChannel::constraints, Object::controllers, bPoseChannel::custom, TreeStore::data, Object::data, Camera::dof_ob, ParticleSettings::dup_ob, eBoidRuleType_Avoid, eBoidRuleType_FollowLeader, Scene::ed, ELEM, eModifierType_Cloth, Tex::env, ListBase::first, SpaceButs::flag, bConstraintTypeInfo::flush_constraint_targets, G, bConstraintTypeInfo::get_constraint_targets, BoidParticle::ground, Main::group, Camera::id, Group::id, bScreen::id, TreeStoreElem::id, Scene::id, World::id, Tex::id, Material::id, Object::id, if(), is_mball_basis_for(), ID::lib, RegionView3D::localvd, View3D::localvd, Scene::markers, Main::mat, MAX_MTEX, Object::modifiers, modifiers_foreachObjectLink(), World::mtex, Material::mtex, ScrArea::next, ARegion::next, SpaceLink::next, TimeMarker::next, ID::next, BoidRule::next, BoidState::next, ParticleTarget::next, ParticleSystem::next, bActionModifier::next, ModifierData::next, bConstraintTarget::next, bConstraint::next, bPoseChannel::next, NULL, BoidRuleFollowLeader::ob, BoidRuleGoalAvoid::ob, ParticleTarget::ob, bActionModifier::ob, OB_ARMATURE, OB_CURVE, OB_FONT, OB_MBALL, OB_RECALC_DATA, OB_RECALC_OB, OB_RECALC_TIME, ParticleEditSettings::object, VoxelData::object, PointDensity::object, EnvMap::object, MTex::object, Main::object, p, Object::parent, ParticleSystem::part, PART_PHYS_BOIDS, ToolSettings::particle, ParticleSystem::particles, Object::particlesystem, Tex::pd, Object::pd, RegionView3D::persp, ParticleSettings::phystype, SpaceButs::pinid, Object::pose, Object::proxy, Object::proxy_from, Object::proxy_group, Object::recalc, ScrArea::regionbase, ARegion::regiondata, ARegion::regiontype, rem_from_group(), RGN_TYPE_WINDOW, BoidState::rules, RV3D_CAMOB, RV3D_PERSP, SB_PIN_CONTEXT, sca_remove_ob_poin(), Main::scene, Sequence::scene_camera, Main::screen, SEQ_BEGIN, SEQ_END, ToolSettings::skgen_template, Object::soft, SPACE_BUTS, SPACE_OUTLINER, SPACE_VIEW3D, ScrArea::spacedata, ScrArea::spacetype, SpaceLink::spacetype, state, BoidSettings::states, io_export_cycles_xml::strip(), bConstraintTarget::subtarget, Curve::taperobj, bConstraintTarget::tar, ParticleSystem::target_ob, ParticleSystem::targets, Main::tex, Curve::textoncurve, Scene::toolsettings, SpaceOops::treestore, BoidRule::type, ModifierData::type, Object::type, unlink_actuators(), unlink_controllers(), unlink_object__unlinkModifierLinks(), TreeStore::usedelem, Tex::vd, and Main::world.
Referenced by free_libblock_us(), and id_unlink().
Definition at line 147 of file object.c.
References Scene::base, ListBase::first, Object::lay, Base::lay, Base::next, and Base::object.
Definition at line 2085 of file object.c.
References BLI_strncpy(), clear_workob(), Object::constinv, Object::constraints, ListBase::first, ListBase::last, Object::obmat, Object::par1, Object::par2, Object::par3, Object::parent, Object::parentinv, Object::parsubstr, Object::partype, Object::trackflag, unit_m4(), Object::upflag, and where_is_object().
Referenced by applyarmature_fix_boneparents(), bc_set_parent(), child_get_inverse_matrix(), ignore_parent_tx(), SkinInfo::link_armature(), parent_set_exec(), and vertex_parent_set_exec().
Definition at line 2037 of file object.c.
References RenderData::cfra, Scene::r, and where_is_object_time().
Referenced by add_hook_object(), apply_objects_internal(), bc_set_parent(), ED_object_base_init_transform(), initFlyInfo(), object_handle_update(), object_origin_set_exec(), object_slow_parent_clear_exec(), ObjectToTransData(), RE_make_sticky(), set_floor_exec(), setviewmatrixview3d(), snap_sel_to_curs(), snap_sel_to_grid(), txt_add_object(), visual_transform_apply_exec(), and what_does_parent().
Definition at line 1941 of file object.c.
References MAT4_UNITY, object_to_mat4(), Object::parent, PARSLOW, Object::partype, solve_parenting(), and where_is_object_parslow().
Referenced by BKE_get_tracking_mat(), followtrack_evaluate(), object_solver_inverted_matrix(), and objectsolver_evaluate().
Definition at line 2043 of file object.c.
References RenderData::cfra, CONSTRAINT_OBTYPE_OBJECT, Object::constraints, constraints_clear_evalob(), constraints_make_evalob(), fabs(), ListBase::first, NULL, object_to_mat4(), Object::obmat, Object::parent, PARSLOW, Object::partype, Scene::r, Object::sf, solve_constraints(), and solve_parenting().
Referenced by GPU_scene_object_lights().
Definition at line 1875 of file object.c.
References Object::adt, ADT_RECALC_DRIVERS, BKE_animsys_evaluate_animdata(), CONSTRAINT_OBTYPE_OBJECT, Object::constraints, constraints_clear_evalob(), constraints_make_evalob(), Object::ctime, ListBase::first, Object::id, is_negative_m4(), MAT4_UNITY, NULL, OB_NEG_SCALE, OB_NO_CONSTRAINTS, object_to_mat4(), Object::obmat, Object::parent, PARSLOW, Object::partype, Object::proxy_from, solve_constraints(), solve_parenting(), Object::transflag, where_is_object_parslow(), and where_is_object_time().
Referenced by frames_duplilist(), new_particle_duplilist(), particle_system_update(), precalculate_effector(), reset_particle(), subframe_updateObject(), where_is_object(), and where_is_object_time().