Blender
V3.3
|
#include "BLI_compiler_attrs.h"
Go to the source code of this file.
Enumerations | |
enum | { BKE_LATTICE_BATCH_DIRTY_ALL = 0 , BKE_LATTICE_BATCH_DIRTY_SELECT } |
Functions | |
void | BKE_lattice_resize (struct Lattice *lt, int u, int v, int w, struct Object *ltOb) |
struct Lattice * | BKE_lattice_add (struct Main *bmain, const char *name) |
void | calc_lat_fudu (int flag, int res, float *r_fu, float *r_du) |
bool | object_deform_mball (struct Object *ob, struct ListBase *dispbase) |
void | outside_lattice (struct Lattice *lt) |
float(* | BKE_lattice_vert_coords_alloc (const struct Lattice *lt, int *r_vert_len))[3] |
void | BKE_lattice_vert_coords_get (const struct Lattice *lt, float(*vert_coords)[3]) |
void | BKE_lattice_vert_coords_apply_with_mat4 (struct Lattice *lt, const float(*vert_coords)[3], const float mat[4][4]) |
void | BKE_lattice_vert_coords_apply (struct Lattice *lt, const float(*vert_coords)[3]) |
void | BKE_lattice_modifiers_calc (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob) |
struct MDeformVert * | BKE_lattice_deform_verts_get (const struct Object *oblatt) |
struct BPoint * | BKE_lattice_active_point_get (struct Lattice *lt) |
struct BoundBox * | BKE_lattice_boundbox_get (struct Object *ob) |
void | BKE_lattice_minmax_dl (struct Object *ob, struct Lattice *lt, float min[3], float max[3]) |
void | BKE_lattice_minmax (struct Lattice *lt, float min[3], float max[3]) |
void | BKE_lattice_center_median (struct Lattice *lt, float cent[3]) |
void | BKE_lattice_center_bounds (struct Lattice *lt, float cent[3]) |
void | BKE_lattice_translate (struct Lattice *lt, const float offset[3], bool do_keys) |
void | BKE_lattice_transform (struct Lattice *lt, const float mat[4][4], bool do_keys) |
bool | BKE_lattice_is_any_selected (const struct Lattice *lt) |
int | BKE_lattice_index_from_uvw (struct Lattice *lt, int u, int v, int w) |
void | BKE_lattice_index_to_uvw (struct Lattice *lt, int index, int *r_u, int *r_v, int *r_w) |
int | BKE_lattice_index_flip (struct Lattice *lt, int index, bool flip_u, bool flip_v, bool flip_w) |
void | BKE_lattice_bitmap_from_flag (struct Lattice *lt, unsigned int *bitmap, uint8_t flag, bool clear, bool respecthide) |
void | BKE_lattice_eval_geometry (struct Depsgraph *depsgraph, struct Lattice *latt) |
void | BKE_lattice_batch_cache_dirty_tag (struct Lattice *lt, int mode) |
void | BKE_lattice_batch_cache_free (struct Lattice *lt) |
Deform 3D Coordinates by Lattice (lattice_deform.c) | |
struct LatticeDeformData * | BKE_lattice_deform_data_create (const struct Object *oblatt, const struct Object *ob) ATTR_WARN_UNUSED_RESULT |
void | BKE_lattice_deform_data_eval_co (struct LatticeDeformData *lattice_deform_data, float co[3], float weight) |
void | BKE_lattice_deform_data_destroy (struct LatticeDeformData *lattice_deform_data) |
void | BKE_lattice_deform_coords (const struct Object *ob_lattice, const struct Object *ob_target, float(*vert_coords)[3], int vert_coords_len, short flag, const char *defgrp_name, float fac) |
void | BKE_lattice_deform_coords_with_mesh (const struct Object *ob_lattice, const struct Object *ob_target, float(*vert_coords)[3], int vert_coords_len, short flag, const char *defgrp_name, float fac, const struct Mesh *me_target) |
void | BKE_lattice_deform_coords_with_editmesh (const struct Object *ob_lattice, const struct Object *ob_target, float(*vert_coords)[3], int vert_coords_len, short flag, const char *defgrp_name, float fac, struct BMEditMesh *em_target) |
Variables | |
void(* | BKE_lattice_batch_cache_dirty_tag_cb )(struct Lattice *lt, int mode) |
void(* | BKE_lattice_batch_cache_free_cb )(struct Lattice *lt) |
anonymous enum |
Enumerator | |
---|---|
BKE_LATTICE_BATCH_DIRTY_ALL | |
BKE_LATTICE_BATCH_DIRTY_SELECT |
Definition at line 69 of file BKE_lattice.h.
Definition at line 597 of file lattice.c.
References Lattice::actbp, BLI_assert, Lattice::def, Lattice::editlatt, GS, Lattice::id, ID_LT, EditLatt::latt, LT_ACTBP_NONE, ID::name, NULL, Lattice::pntsu, Lattice::pntsv, and Lattice::pntsw.
Referenced by ED_object_calc_active_center_for_editmode(), and vgroup_select_verts().
Definition at line 392 of file lattice.c.
References BKE_id_new(), and ID_LT.
Referenced by BKE_object_obdata_add_from_type().
Definition at line 784 of file lattice.c.
References Lattice::batch_cache, and BKE_lattice_batch_cache_dirty_tag_cb.
Referenced by BKE_object_data_batch_cache_dirty_tag(), and BKE_object_data_select_update().
Definition at line 790 of file lattice.c.
References Lattice::batch_cache, and BKE_lattice_batch_cache_free_cb.
Referenced by lattice_free_data().
void BKE_lattice_bitmap_from_flag | ( | struct Lattice * | lt, |
unsigned int * | bitmap, | ||
uint8_t | flag, | ||
bool | clear, | ||
bool | respecthide | ||
) |
Definition at line 245 of file lattice.c.
References BLI_BITMAP_DISABLE, BLI_BITMAP_ENABLE, clear(), Lattice::def, BPoint::f1, BPoint::hide, Lattice::pntsu, Lattice::pntsv, and Lattice::pntsw.
Referenced by ed_lattice_select_mirrored(), and lattice_select_more_less().
Definition at line 652 of file lattice.c.
References Object_Runtime::bb, boundbox_lattice(), and Object::runtime.
Referenced by BKE_object_boundbox_get().
Definition at line 696 of file lattice.c.
References BKE_lattice_minmax(), INIT_MINMAX, max, mid_v3_v3v3(), and min.
Referenced by object_origin_set_exec().
Definition at line 614 of file lattice.c.
References add_v3_v3(), Lattice::def, Lattice::editlatt, EditLatt::latt, mul_v3_fl(), Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, BPoint::vec, and zero_v3().
Referenced by object_origin_set_exec().
void BKE_lattice_deform_coords | ( | const struct Object * | ob_lattice, |
const struct Object * | ob_target, | ||
float(*) | vert_coords[3], | ||
int | vert_coords_len, | ||
short | flag, | ||
const char * | defgrp_name, | ||
float | fac | ||
) |
Referenced by BKE_lattice_resize(), and object_deform_mball().
void BKE_lattice_deform_coords_with_editmesh | ( | const struct Object * | ob_lattice, |
const struct Object * | ob_target, | ||
float(*) | vert_coords[3], | ||
int | vert_coords_len, | ||
short | flag, | ||
const char * | defgrp_name, | ||
float | fac, | ||
struct BMEditMesh * | em_target | ||
) |
Definition at line 443 of file lattice_deform.c.
References lattice_deform_coords_impl(), and NULL.
Referenced by deformVertsEM().
void BKE_lattice_deform_coords_with_mesh | ( | const struct Object * | ob_lattice, |
const struct Object * | ob_target, | ||
float(*) | vert_coords[3], | ||
int | vert_coords_len, | ||
short | flag, | ||
const char * | defgrp_name, | ||
float | fac, | ||
const struct Mesh * | me_target | ||
) |
Referenced by deformVerts().
struct LatticeDeformData* BKE_lattice_deform_data_create | ( | const struct Object * | oblatt, |
const struct Object * | ob | ||
) |
void BKE_lattice_deform_data_destroy | ( | struct LatticeDeformData * | lattice_deform_data | ) |
Definition at line 249 of file lattice_deform.c.
References LatticeDeformData::latticedata, and MEM_freeN.
Referenced by bakeModifier(), BKE_gpencil_cache_data_clear(), BKE_gpencil_cache_data_init(), freeData(), lattice_deform_coords_impl(), psys_sim_data_free(), and blender::bke::tests::test_lattice_deform_free().
void BKE_lattice_deform_data_eval_co | ( | struct LatticeDeformData * | lattice_deform_data, |
float | co[3], | ||
float | weight | ||
) |
Definition at line 137 of file lattice_deform.c.
References BLI_assert, CLAMPIS, copy_v3_v3(), Lattice::du, Lattice::dv, Lattice::dw, blender::math::floor(), Lattice::fu, Lattice::fv, Lattice::fw, interp_v3_v3v3(), key_curve_position_weights(), LatticeDeformData::latmat, LatticeDeformData::lattice_weights, LatticeDeformData::latticedata, LatticeDeformData::lt, madd_v3_v3fl(), mul_v3_m4v3(), Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, Lattice::typeu, Lattice::typev, Lattice::typew, v, and w().
Referenced by deformStroke(), lattice_deform_vert_with_dvert(), psys_apply_hair_lattice(), psys_get_particle_on_path(), psys_get_particle_state(), and blender::bke::tests::test_lattice_deform().
struct MDeformVert* BKE_lattice_deform_verts_get | ( | const struct Object * | oblatt | ) |
Definition at line 590 of file lattice.c.
References BKE_object_get_lattice(), BLI_assert, Lattice::dvert, OB_LATTICE, and Object::type.
Referenced by BKE_lattice_deform_data_create(), and MOD_get_vgroup().
int BKE_lattice_index_flip | ( | struct Lattice * | lt, |
int | index, | ||
bool | flip_u, | ||
bool | flip_v, | ||
bool | flip_w | ||
) |
Definition at line 223 of file lattice.c.
References BKE_lattice_index_from_uvw(), BKE_lattice_index_to_uvw(), Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, v, and w().
Referenced by ed_lattice_select_mirrored().
int BKE_lattice_index_from_uvw | ( | struct Lattice * | lt, |
int | u, | ||
int | v, | ||
int | w | ||
) |
Definition at line 205 of file lattice.c.
References Lattice::pntsu, Lattice::pntsv, v, and w().
Referenced by BKE_lattice_index_flip(), ED_vgroup_mirror(), latt_bp(), lattice_flip_point_value(), lattice_swap_point_pairs(), lattice_test_bitmap_uvw(), and object_shape_key_mirror().
Definition at line 213 of file lattice.c.
References Lattice::pntsu, and Lattice::pntsv.
Referenced by BKE_lattice_index_flip().
Referenced by lattice_select_all_exec().
Definition at line 682 of file lattice.c.
References Lattice::def, Lattice::editlatt, EditLatt::latt, max, min, minmax_v3v3_v3(), Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and BPoint::vec.
Referenced by BKE_lattice_center_bounds(), and BKE_lattice_minmax_dl().
Definition at line 659 of file lattice.c.
References BKE_displist_find(), BKE_lattice_minmax(), Object_Runtime::curve_cache, CurveCache::disp, DL_VERTS, Lattice::editlatt, EditLatt::latt, max, min, minmax_v3v3_v3(), NULL, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, Object::runtime, and DispList::verts.
Referenced by boundbox_lattice().
void BKE_lattice_modifiers_calc | ( | struct Depsgraph * | depsgraph, |
struct Scene * | scene, | ||
struct Object * | ob | ||
) |
Definition at line 533 of file lattice.c.
References BKE_id_copy_ex(), BKE_lattice_vert_coords_alloc(), BKE_lattice_vert_coords_apply(), BKE_modifier_get_info(), BKE_modifiers_get_virtual_modifierlist(), BKE_object_eval_assign_data(), BKE_object_free_derived_caches(), BKE_object_get_evaluated_lattice(), BKE_object_get_lattice(), Object_Runtime::curve_cache, Object::data, ModifierTypeInfo::deformVerts, depsgraph, Lattice::editlatt, eModifierMode_Editmode, eModifierMode_Realtime, eModifierTypeFlag_AcceptsVertexCosOnly, eModifierTypeType_OnlyDeform, ModifierTypeInfo::flags, float(), Lattice::id, ModifierTypeInfo::isDisabled, LIB_ID_COPY_LOCALIZE, MEM_callocN, MEM_freeN, ModifierData::mode, ModifierData::next, NULL, Object::runtime, scene, ModifierTypeInfo::type, and ModifierData::type.
Referenced by BKE_object_handle_data_update(), and object_force_modifier_update_for_bind().
Definition at line 280 of file lattice.c.
References Lattice::actbp, BKE_defvert_array_free(), BKE_displist_free(), BKE_lattice_deform_coords(), calc_lat_fudu(), copy_m4_m4(), copy_v3_v3(), Object_Runtime::curve_cache, Lattice::def, CurveCache::disp, Lattice::du, Lattice::dv, Lattice::dvert, Lattice::dw, Lattice::flag, Lattice::fu, Lattice::fv, Lattice::fw, KEY_LINEAR, LT_ACTBP_NONE, MEM_callocN, MEM_freeN, MEM_mallocN, NULL, Object::obmat, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, Object::runtime, Lattice::typeu, Lattice::typev, Lattice::typew, unit_m4(), v, BPoint::vec, and w().
Referenced by lattice_init_data(), and make_regular_exec().
Definition at line 706 of file lattice.c.
References Key::block, KeyBlock::data, Lattice::def, ListBase::first, Lattice::key, mul_m4_v3(), KeyBlock::next, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, KeyBlock::totelem, and BPoint::vec.
Referenced by apply_objects_internal(), and BKE_object_obdata_size_init().
Definition at line 728 of file lattice.c.
References add_v3_v3(), Key::block, KeyBlock::data, Lattice::def, Lattice::editlatt, ListBase::first, Lattice::key, EditLatt::latt, KeyBlock::next, offset, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, KeyBlock::totelem, and BPoint::vec.
Referenced by object_origin_set_exec().
Referenced by modifier_apply_obdata().
Definition at line 525 of file lattice.c.
References copy_v3_v3(), Lattice::def, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and BPoint::vec.
Referenced by BKE_lattice_modifiers_calc(), ED_object_data_xform_restore(), and modifier_apply_obdata().
void BKE_lattice_vert_coords_apply_with_mat4 | ( | struct Lattice * | lt, |
const float(*) | vert_coords[3], | ||
const float | mat[4][4] | ||
) |
Definition at line 515 of file lattice.c.
References Lattice::def, mul_v3_m4v3(), Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and BPoint::vec.
Referenced by ED_object_data_xform_by_mat4().
Referenced by ED_object_data_xform_create_ex().
Definition at line 264 of file lattice.c.
References LT_GRID.
Referenced by BKE_lattice_resize(), and blo_do_versions_pre250().
Definition at line 401 of file lattice.c.
References BKE_lattice_deform_coords(), ListBase::first, DispList::next, DispList::nr, NULL, OB_LATTICE, Object::parent, PARSKEL, Object::partype, Object::type, and DispList::verts.
Referenced by BKE_displist_make_mball().
Definition at line 421 of file lattice.c.
References Lattice::def, BPoint::f1, Lattice::flag, float(), BPoint::hide, latt_bp(), LT_OUTSIDE, mul_v3_fl(), Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, SELECT, v, BPoint::vec, and w().
Referenced by do_latt_key(), ED_transverts_update_obedit(), and recalcData_lattice().
|
extern |
Definition at line 781 of file lattice.c.
Referenced by BKE_lattice_batch_cache_dirty_tag(), and DRW_engines_register().
Definition at line 782 of file lattice.c.
Referenced by BKE_lattice_batch_cache_free(), and DRW_engines_register().