Blender  V2.59
Functions
BKE_object.h File Reference

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

Go to the source code of this file.

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 SoftBodycopy_softbody (struct SoftBody *sb)
struct BulletSoftBodycopy_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)
void * add_camera (const char *name)
struct Cameracopy_camera (struct Camera *cam)
void make_local_camera (struct Camera *cam)
float dof_camera (struct Object *ob)
void * add_lamp (const char *name)
struct Lampcopy_lamp (struct Lamp *la)
struct Lamplocalize_lamp (struct Lamp *la)
void make_local_lamp (struct Lamp *la)
void free_camera (struct Camera *ca)
void free_lamp (struct Lamp *la)
struct Objectadd_only_object (int type, const char *name)
struct Objectadd_object (struct Scene *scene, int type)
struct Objectcopy_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)
float bsystem_time (struct Scene *scene, struct Object *ob, float cfra, float ofs)
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)
void set_no_parent_ipo (int val)
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)
struct BoundBoxunit_boundbox (void)
void boundbox_set_from_min_max (struct BoundBox *bb, float min[3], float max[3])
struct BoundBoxobject_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, float *max)
int minmax_object_duplis (struct Scene *scene, struct Object *ob, float *min, float *max)
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_handle_update (struct Scene *scene, struct Object *ob)
float give_timeoffset (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 KeyBlockobject_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_camera_mode (struct RenderData *rd, struct Object *camera)
void object_camera_matrix (struct RenderData *rd, struct Object *camera, int winx, int winy, short field_second, float winmat[][4], struct rctf *viewplane, float *clipsta, float *clipend, float *lens, float *ycor, float *viewdx, float *viewdy)
void object_relink (struct Object *ob)

Detailed Description

General operations, lookup, etc. for blender objects.

Definition in file BKE_object.h.


Function Documentation

void* add_camera ( const char *  name)
void* add_lamp ( const char *  name)
struct Object* add_object ( struct Scene scene,
int  type 
) [read]
struct Object* add_only_object ( int  type,
const char *  name 
) [read]
void boundbox_set_from_min_max ( struct BoundBox bb,
float  min[3],
float  max[3] 
)
float bsystem_time ( struct Scene scene,
struct Object ob,
float  cfra,
float  ofs 
)
void clear_workob ( struct Object workob)

Definition at line 115 of file object.c.

References 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 123 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 1140 of file object.c.

References MEM_dupallocN(), and NULL.

Referenced by copy_attr(), and copy_object().

struct Camera* copy_camera ( struct Camera cam) [read]
struct Lamp* copy_lamp ( struct Lamp la) [read]
struct Object* copy_object ( struct Object ob) [read]
void copy_object_particlesystems ( struct Object obn,
struct Object ob 
)
void copy_object_softbody ( struct Object obn,
struct Object ob 
)

Definition at line 1241 of file object.c.

References copy_softbody(), and Object::soft.

Referenced by object_link_modifiers().

void copy_objectflags ( struct Scene scene)

Definition at line 133 of file object.c.

References Scene::base, ListBase::first, Base::flag, Object::flag, Base::next, and Base::object.

struct SoftBody* copy_softbody ( struct SoftBody sb) [read]
void disable_speed_curve ( int  val)

Referenced by draw_object().

float dof_camera ( struct Object ob)
int exist_object ( struct Object obtest)

Definition at line 694 of file object.c.

References ListBase::first, G, Object::id, Global::main, ID::next, NULL, and Main::object.

Referenced by test_constraints().

void free_camera ( struct Camera ca)

Definition at line 953 of file object.c.

References BKE_free_animdata().

Referenced by free_libblock().

void free_lamp ( struct Lamp la)
void free_object ( struct Object ob)
int give_obdata_texspace ( struct Object ob,
short **  texflag,
float **  loc,
float **  size,
float **  rot 
)
float give_timeoffset ( struct Object ob)
struct Lamp* localize_lamp ( struct Lamp la) [read]
void make_local_camera ( struct Camera cam)
void make_local_lamp ( struct Lamp la)
void make_local_object ( struct Object ob)
void minmax_object ( struct Object ob,
float *  min,
float *  max 
)
int minmax_object_duplis ( struct Scene scene,
struct Object ob,
float *  min,
float *  max 
)
void object_apply_mat4 ( struct Object ob,
float  mat[][4],
const short  use_compat,
const short  use_parent 
)
void object_boundbox_flag ( struct Object ob,
int  flag,
int  set 
)

Definition at line 2340 of file object.c.

References BoundBox::flag, and object_get_boundbox().

Referenced by draw_dupli_objects_color().

void object_camera_matrix ( struct RenderData rd,
struct Object camera,
int  winx,
int  winy,
short  field_second,
float  winmat[][4],
struct rctf viewplane,
float *  clipsta,
float *  clipend,
float *  lens,
float *  ycor,
float *  viewdx,
float *  viewdy 
)
void object_camera_mode ( struct RenderData rd,
struct Object camera 
)
void object_copy_proxy_drivers ( struct Object ob,
struct Object target 
)
int object_data_is_libdata ( struct Object ob)
void object_free_bulletsoftbody ( struct Object ob)

Definition at line 172 of file object.c.

References bsbFree(), Object::bsoft, and NULL.

void object_free_display ( struct Object ob)
void object_free_modifiers ( struct Object ob)
void object_free_particlesystems ( struct Object ob)

Definition at line 153 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 164 of file object.c.

References NULL, sbFree(), and Object::soft.

Referenced by object_free_modifiers().

struct BoundBox* object_get_boundbox ( struct Object ob) [read]
void object_get_dimensions ( struct Object ob,
float *  value 
)

Definition at line 2349 of file object.c.

References fabsf, mat4_to_size(), NULL, object_get_boundbox(), Object::obmat, and BoundBox::vec.

Referenced by get_fluid_size_m().

void object_handle_update ( struct Scene scene,
struct Object ob 
)

Definition at line 2569 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, Global::f, ListBase::first, ParticleSystem::flag, bPose::flag, ParticleSystemModifierData::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, mul_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, Global::rendering, 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(), and set_trans_object_base_flags().

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 
) [read]
int object_is_libdata ( struct Object ob)

Definition at line 1472 of file object.c.

References Object::id, ID::lib, and Object::proxy.

Referenced by ed_screen_context(), and view3d_context().

int object_is_modified ( struct Scene scene,
struct Object ob 
)
void object_link_modifiers ( struct Object ob,
struct Object from 
)
void object_make_proxy ( struct Object ob,
struct Object target,
struct Object gob 
)
void object_mat3_to_rot ( struct Object ob,
float  mat[][3],
short  use_compat 
)
void object_relink ( struct Object ob)
void object_rot_to_mat3 ( struct Object ob,
float  mat[][3] 
)
void object_scale_to_mat3 ( struct Object ob,
float  mat[][3] 
)
void object_set_dimensions ( struct Object ob,
const float *  value 
)
void* object_tfm_backup ( struct Object ob)
void object_tfm_restore ( struct Object ob,
void *  obtfm_pt 
)
void object_to_mat3 ( struct Object ob,
float  mat[][3] 
)
void object_to_mat4 ( struct Object ob,
float  mat[][4] 
)
int ray_hit_boundbox ( struct BoundBox bb,
float  ray_start[3],
float  ray_normal[3] 
)

Definition at line 2808 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 set_no_parent_ipo ( int  val)

Definition at line 2069 of file object.c.

References simple_enum_gen::val.

Referenced by draw_object().

void solve_tracking ( struct Object ob,
float  targetmat[][4] 
)
struct BoundBox* unit_boundbox ( void  ) [read]

Definition at line 2300 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 335 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(), bPoseChannel::constraints, Object::constraints, Object::controllers, bPoseChannel::custom, TreeStore::data, Object::data, Camera::dof_ob, IpoCurve::driver, 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, TreeStoreElem::id, Camera::id, bScreen::id, World::id, Group::id, Material::id, Object::id, Tex::id, Scene::id, if(), Main::ipo, is_mball_basis_for(), ID::lib, RegionView3D::localvd, View3D::localvd, Global::main, Scene::markers, Main::mat, MAX_MTEX, Object::modifiers, modifiers_foreachObjectLink(), World::mtex, Material::mtex, bActionModifier::next, bConstraint::next, BoidRule::next, IpoCurve::next, SpaceLink::next, ParticleTarget::next, bConstraintTarget::next, ModifierData::next, ID::next, ScrArea::next, ARegion::next, BoidState::next, bPoseChannel::next, ParticleSystem::next, TimeMarker::next, Object::nlastrips, NULL, bActionModifier::ob, IpoDriver::ob, BoidRuleGoalAvoid::ob, ParticleTarget::ob, BoidRuleFollowLeader::ob, OB_ARMATURE, OB_CURVE, OB_FONT, OB_MBALL, OB_RECALC_DATA, OB_RECALC_OB, OB_RECALC_TIME, MTex::object, Main::object, EnvMap::object, PointDensity::object, VoxelData::object, ParticleEditSettings::object, p, Object::parent, ParticleSystem::part, PART_PHYS_BOIDS, ToolSettings::particle, ParticleSystem::particles, Object::particlesystem, Object::pd, Tex::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, SpaceLink::spacetype, ScrArea::spacetype, state, BoidSettings::states, 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().

void update_base_layer ( struct Scene scene,
struct Object ob 
)

Definition at line 143 of file object.c.

References Scene::base, ListBase::first, Base::lay, Object::lay, Base::next, and Base::object.

void what_does_parent ( struct Scene scene,
struct Object ob,
struct Object workob 
)
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_time ( struct Scene scene,
struct Object ob,
float  ctime 
)