Blender
V3.3
|
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_bitmap.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
#include "DNA_curve_types.h"
#include "DNA_defaults.h"
#include "DNA_key_types.h"
#include "DNA_lattice_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_anim_data.h"
#include "BKE_curve.h"
#include "BKE_deform.h"
#include "BKE_displist.h"
#include "BKE_idtype.h"
#include "BKE_lattice.h"
#include "BKE_lib_id.h"
#include "BKE_lib_query.h"
#include "BKE_main.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "DEG_depsgraph_query.h"
#include "BLO_read_write.h"
Go to the source code of this file.
Macros | |
#define | DNA_DEPRECATED_ALLOW |
Variables | |
IDTypeInfo | IDType_ID_LT |
void(* | BKE_lattice_batch_cache_dirty_tag_cb )(Lattice *lt, int mode) = NULL |
void(* | BKE_lattice_batch_cache_free_cb )(Lattice *lt) = NULL |
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 | ( | Lattice * | lt, |
BLI_bitmap * | bitmap, | ||
const uint8_t | flag, | ||
const bool | clear, | ||
const 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().
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 | ( | Lattice * | lt, |
const int | index, | ||
const bool | flip_u, | ||
const bool | flip_v, | ||
const 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 | ( | Lattice * | lt, |
const int | u, | ||
const int | v, | ||
const 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().
Definition at line 758 of file lattice.c.
References Freestyle::a, Lattice::def, BPoint::f1, BPoint::hide, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and SELECT.
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().
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().
Definition at line 507 of file lattice.c.
References BKE_lattice_vert_coords_get(), float(), MEM_mallocN, Lattice::pntsu, Lattice::pntsv, and Lattice::pntsw.
Referenced by BKE_lattice_modifiers_calc().
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().
Definition at line 499 of file lattice.c.
References copy_v3_v3(), Lattice::def, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and BPoint::vec.
Referenced by BKE_lattice_vert_coords_alloc().
Definition at line 632 of file lattice.c.
References Object_Runtime::bb, BKE_boundbox_init_from_minmax(), BKE_lattice_minmax_dl(), BOUNDBOX_DIRTY, Object::data, BoundBox::flag, INIT_MINMAX, max, MEM_callocN, min, NULL, and Object::runtime.
Referenced by BKE_lattice_boundbox_get().
Definition at line 264 of file lattice.c.
References LT_GRID.
Referenced by BKE_lattice_resize(), and blo_do_versions_pre250().
Definition at line 416 of file lattice.c.
References BKE_lattice_index_from_uvw(), Lattice::def, v, and w().
Referenced by outside_lattice().
|
static |
Definition at line 145 of file lattice.c.
References Lattice::adt, Lattice::batch_cache, BKE_animdata_blend_read_data(), BKE_defvert_blend_read(), BLO_read_data_address, BLO_read_list(), Lattice::def, Lattice::dvert, Lattice::editlatt, NULL, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and Lattice::vertex_group_names.
|
static |
Definition at line 168 of file lattice.c.
References BLO_expand, and Lattice::key.
|
static |
Definition at line 161 of file lattice.c.
References BLO_read_id_address, Lattice::id, Lattice::key, and ID::lib.
|
static |
Definition at line 121 of file lattice.c.
References Lattice::adt, Lattice::batch_cache, BKE_animdata_blend_write(), BKE_defbase_blend_write(), BKE_defvert_blend_write(), BKE_id_blend_write(), BLO_write_id_struct, BLO_write_struct_array, Lattice::def, Lattice::dvert, Lattice::editlatt, Lattice::id, NULL, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and Lattice::vertex_group_names.
|
static |
Definition at line 61 of file lattice.c.
References Lattice::batch_cache, BKE_defgroup_copy_list(), BKE_defvert_array_copy(), BKE_id_copy_ex(), Lattice::def, Lattice::dvert, Lattice::editlatt, Key::from, Key::id, Lattice::id, Lattice::key, LIB_ID_COPY_SHAPEKEY, MEM_dupallocN, MEM_mallocN, NULL, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and Lattice::vertex_group_names.
|
static |
Definition at line 115 of file lattice.c.
References BKE_LIB_FOREACHID_PROCESS_IDSUPER, data, IDWALK_CB_USER, Lattice::key, and lattice.
Definition at line 86 of file lattice.c.
References BKE_defvert_array_free(), BKE_lattice_batch_cache_free(), BLI_freelistN(), Lattice::def, Lattice::dvert, Lattice::editlatt, EditLatt::latt, lattice, MEM_freeN, MEM_SAFE_FREE, NULL, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and Lattice::vertex_group_names.
Definition at line 49 of file lattice.c.
References BKE_lattice_resize(), BLI_assert, Lattice::def, DNA_struct_default_get, lattice, MEM_callocN, MEMCMP_STRUCT_AFTER_IS_ZERO, MEMCPY_STRUCT_AFTER, and NULL.
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().
void(* BKE_lattice_batch_cache_dirty_tag_cb) (Lattice *lt, int mode) | ( | Lattice * | lt, |
int | mode | ||
) | = NULL |
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().
IDTypeInfo IDType_ID_LT |
Definition at line 175 of file lattice.c.
Referenced by blender::bke::tests::test_lattice_deform_free(), and blender::bke::tests::test_lattice_deform_init().