|
Blender V5.0
|
#include <cmath>#include <cstdlib>#include <cstring>#include "MEM_guardedalloc.h"#include "BLI_bitmap.h"#include "BLI_listbase.h"#include "BLI_math_matrix.h"#include "BLI_math_vector.h"#include "BLI_utildefines.h"#include "BLT_translation.hh"#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 "BKE_curve.hh"#include "BKE_deform.hh"#include "BKE_displist.h"#include "BKE_idtype.hh"#include "BKE_lattice.hh"#include "BKE_lib_id.hh"#include "BKE_lib_query.hh"#include "BKE_modifier.hh"#include "BKE_object.hh"#include "BKE_object_types.hh"#include "BLO_read_write.hh"Go to the source code of this file.
Macros | |
| #define | DNA_DEPRECATED_ALLOW |
Typedefs | |
| using | float3 |
| using | float4x4 |
Functions | |
| static void | lattice_init_data (ID *id) |
| static void | lattice_copy_data (Main *bmain, std::optional< Library * > owner_library, ID *id_dst, const ID *id_src, const int flag) |
| static void | lattice_free_data (ID *id) |
| static void | lattice_foreach_id (ID *id, LibraryForeachIDData *data) |
| static void | lattice_blend_write (BlendWriter *writer, ID *id, const void *id_address) |
| static void | lattice_blend_read_data (BlendDataReader *reader, ID *id) |
| int | BKE_lattice_index_from_uvw (const Lattice *lt, const int u, const int v, const int w) |
| void | BKE_lattice_index_to_uvw (const Lattice *lt, const int index, int *r_u, int *r_v, int *r_w) |
| int | BKE_lattice_index_flip (const Lattice *lt, const int index, const bool flip_u, const bool flip_v, const bool flip_w) |
| void | BKE_lattice_bitmap_from_flag (const Lattice *lt, BLI_bitmap *bitmap, const uint8_t flag, const bool clear, const bool respecthide) |
| void | calc_lat_fudu (int flag, int res, float *r_fu, float *r_du) |
| void | BKE_lattice_resize (Lattice *lt, int u_new, int v_new, int w_new, Object *lt_ob) |
| Lattice * | BKE_lattice_add (Main *bmain, const char *name) |
| static BPoint * | latt_bp (Lattice *lt, int u, int v, int w) |
| void | outside_lattice (Lattice *lt) |
| void | BKE_lattice_vert_coords_get (const Lattice *lt, MutableSpan< float3 > vert_coords) |
| Array< float3 > | BKE_lattice_vert_coords_alloc (const Lattice *lt) |
| void | BKE_lattice_vert_coords_apply_with_mat4 (Lattice *lt, const Span< float3 > vert_coords, const float4x4 &transform) |
| void | BKE_lattice_vert_coords_apply (Lattice *lt, const Span< float3 > vert_coords) |
| void | BKE_lattice_modifiers_calc (Depsgraph *depsgraph, Scene *scene, Object *ob) |
| MDeformVert * | BKE_lattice_deform_verts_get (const Object *oblatt) |
| BPoint * | BKE_lattice_active_point_get (Lattice *lt) |
| void | BKE_lattice_center_median (Lattice *lt, float cent[3]) |
| std::optional< blender::Bounds< blender::float3 > > | BKE_lattice_minmax (const Lattice *lt) |
| void | BKE_lattice_transform (Lattice *lt, const float mat[4][4], bool do_keys) |
| void | BKE_lattice_translate (Lattice *lt, const float offset[3], bool do_keys) |
| bool | BKE_lattice_is_any_selected (const Lattice *lt) |
| void | BKE_lattice_eval_geometry (Depsgraph *, Lattice *) |
| void | BKE_lattice_batch_cache_dirty_tag (Lattice *lt, int mode) |
| void | BKE_lattice_batch_cache_free (Lattice *lt) |
Variables | |
| IDTypeInfo | IDType_ID_LT |
| void(* | BKE_lattice_batch_cache_dirty_tag_cb )(Lattice *lt, int mode) = nullptr |
| void(* | BKE_lattice_batch_cache_free_cb )(Lattice *lt) = nullptr |
| #define DNA_DEPRECATED_ALLOW |
Definition at line 24 of file lattice.cc.
| using blender::float3 |
Definition at line 619 of file BLI_math_vector_types.hh.
| using blender::float4x4 |
Definition at line 1012 of file BLI_math_matrix_types.hh.
Definition at line 576 of file lattice.cc.
References Lattice::actbp, BLI_assert, Lattice::def, Lattice::editlatt, GS, Lattice::id, ID_LT, EditLatt::latt, LT_ACTBP_NONE, ID::name, Lattice::pntsu, Lattice::pntsv, and Lattice::pntsw.
Referenced by blender::ed::object::calc_active_center_for_editmode(), and blender::ed::object::vgroup_select_verts().
Definition at line 387 of file lattice.cc.
References BKE_id_new(), and name.
Referenced by BKE_object_obdata_add_from_type().
| void BKE_lattice_batch_cache_dirty_tag | ( | Lattice * | lt, |
| int | mode ) |
Definition at line 704 of file lattice.cc.
References Lattice::batch_cache, and BKE_lattice_batch_cache_dirty_tag_cb.
Referenced by BKE_object_batch_cache_dirty_tag(), and BKE_object_data_select_update().
| void BKE_lattice_batch_cache_free | ( | Lattice * | lt | ) |
Definition at line 710 of file lattice.cc.
References Lattice::batch_cache, and BKE_lattice_batch_cache_free_cb.
Referenced by lattice_free_data().
| void BKE_lattice_bitmap_from_flag | ( | const Lattice * | lt, |
| BLI_bitmap * | bitmap, | ||
| const uint8_t | flag, | ||
| const bool | clear, | ||
| const bool | respecthide ) |
Definition at line 234 of file lattice.cc.
References BLI_BITMAP_DISABLE, BLI_BITMAP_ENABLE, clear(), Lattice::def, BPoint::f1, flag, BPoint::hide, i, Lattice::pntsu, Lattice::pntsv, and Lattice::pntsw.
Referenced by ed_lattice_select_mirrored(), and lattice_select_more_less().
Definition at line 593 of file lattice.cc.
References add_v3_v3(), Lattice::def, Lattice::editlatt, i, EditLatt::latt, mul_v3_fl(), Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, BPoint::vec, and zero_v3().
Referenced by blender::ed::object::object_origin_set_exec().
| MDeformVert * BKE_lattice_deform_verts_get | ( | const Object * | oblatt | ) |
Definition at line 569 of file lattice.cc.
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().
| void BKE_lattice_eval_geometry | ( | Depsgraph * | depsgraph, |
| Lattice * | latt ) |
Definition at line 697 of file lattice.cc.
Referenced by blender::deg::DepsgraphNodeBuilder::build_object_data_geometry_datablock().
| int BKE_lattice_index_flip | ( | const Lattice * | lt, |
| const int | index, | ||
| const bool | flip_u, | ||
| const bool | flip_v, | ||
| const bool | flip_w ) |
Definition at line 212 of file lattice.cc.
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 | ( | const Lattice * | lt, |
| const int | u, | ||
| const int | v, | ||
| const int | w ) |
Definition at line 194 of file lattice.cc.
References Lattice::pntsu, Lattice::pntsv, v, and w().
Referenced by BKE_lattice_index_flip(), latt_bp(), lattice_flip_point_value(), lattice_swap_point_pairs(), lattice_test_bitmap_uvw(), blender::ed::object::shape_key_mirror(), and blender::ed::object::vgroup_mirror().
| void BKE_lattice_index_to_uvw | ( | const Lattice * | lt, |
| const int | index, | ||
| int * | r_u, | ||
| int * | r_v, | ||
| int * | r_w ) |
Definition at line 202 of file lattice.cc.
References Lattice::pntsu, and Lattice::pntsv.
Referenced by BKE_lattice_index_flip().
| bool BKE_lattice_is_any_selected | ( | const Lattice * | lt | ) |
Definition at line 679 of file lattice.cc.
References Lattice::def, BPoint::f1, BPoint::hide, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and SELECT.
Referenced by lattice_select_all_exec().
| std::optional< blender::Bounds< blender::float3 > > BKE_lattice_minmax | ( | const Lattice * | lt | ) |
Definition at line 611 of file lattice.cc.
References Lattice::def, Lattice::editlatt, i, EditLatt::latt, max, min, minmax_v3v3_v3(), Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and BPoint::vec.
Referenced by BKE_object_boundbox_get(), and blender::ed::object::object_origin_set_exec().
Definition at line 514 of file lattice.cc.
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::data, ModifierTypeInfo::deform_verts, depsgraph, Lattice::editlatt, eModifierMode_Editmode, eModifierMode_Realtime, eModifierTypeFlag_AcceptsVertexCosOnly, ModifierTypeInfo::flags, Lattice::id, ModifierTypeInfo::is_disabled, blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), LIB_ID_COPY_LOCALIZE, MEM_callocN(), ModifierData::mode, ModifierData::next, OnlyDeform, Object::runtime, ModifierData::type, and ModifierTypeInfo::type.
Referenced by BKE_object_handle_data_update(), and blender::ed::object::object_force_modifier_update_for_bind().
Definition at line 272 of file lattice.cc.
References Lattice::actbp, BKE_defvert_array_free(), BKE_displist_free(), BKE_lattice_deform_coords(), calc_lat_fudu(), copy_m4_m4(), copy_v3_v3(), Lattice::def, Lattice::du, Lattice::dv, Lattice::dvert, Lattice::dw, Lattice::flag, Lattice::fu, Lattice::fv, Lattice::fw, i, KEY_LINEAR, LT_ACTBP_NONE, MEM_calloc_arrayN(), MEM_freeN(), MEM_malloc_arrayN(), Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, Object::runtime, Lattice::typeu, Lattice::typev, Lattice::typew, unit_m4(), v, BPoint::vec, and w().
Referenced by blender::ed::object::lattice_add_to_selected_exec(), lattice_init_data(), and make_regular_exec().
Definition at line 631 of file lattice.cc.
References Key::block, Lattice::def, i, Lattice::key, LISTBASE_FOREACH, mul_m4_v3(), Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and BPoint::vec.
Referenced by blender::ed::object::apply_objects_internal(), and BKE_object_obdata_size_init().
Definition at line 651 of file lattice.cc.
References add_v3_v3(), Key::block, Lattice::def, Lattice::editlatt, i, Lattice::key, EditLatt::latt, LISTBASE_FOREACH, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and BPoint::vec.
Referenced by blender::ed::object::object_origin_set_exec().
Definition at line 488 of file lattice.cc.
References BKE_lattice_vert_coords_get(), Lattice::pntsu, Lattice::pntsv, and Lattice::pntsw.
Referenced by BKE_lattice_modifiers_calc(), blender::ed::object::data_xform_create_ex(), and blender::ed::object::modifier_apply_obdata().
Definition at line 506 of file lattice.cc.
References copy_v3_v3(), Lattice::def, i, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and BPoint::vec.
Referenced by BKE_lattice_modifiers_calc().
| void BKE_lattice_vert_coords_apply_with_mat4 | ( | Lattice * | lt, |
| const Span< float3 > | vert_coords, | ||
| const float4x4 & | transform ) |
Definition at line 496 of file lattice.cc.
References Lattice::def, i, mul_v3_m4v3(), Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, transform(), and BPoint::vec.
| void BKE_lattice_vert_coords_get | ( | const Lattice * | lt, |
| MutableSpan< float3 > | vert_coords ) |
Definition at line 480 of file lattice.cc.
References Lattice::def, i, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and BPoint::vec.
Referenced by BKE_lattice_vert_coords_alloc().
Definition at line 256 of file lattice.cc.
Referenced by BKE_lattice_resize(), and blo_do_versions_pre250().
Definition at line 396 of file lattice.cc.
References BKE_lattice_index_from_uvw(), Lattice::def, v, and w().
Referenced by outside_lattice().
|
static |
Definition at line 150 of file lattice.cc.
References Lattice::batch_cache, BKE_defvert_blend_read(), BLO_read_struct_array, BLO_read_struct_list, Lattice::def, Lattice::dvert, Lattice::editlatt, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and Lattice::vertex_group_names.
|
static |
Definition at line 131 of file lattice.cc.
References Lattice::batch_cache, 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, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and Lattice::vertex_group_names.
|
static |
Definition at line 64 of file lattice.cc.
References Lattice::batch_cache, BKE_defgroup_copy_list(), BKE_defvert_array_copy(), BKE_id_copy_in_lib(), Lattice::def, Lattice::dvert, Lattice::editlatt, flag, Key::id, Lattice::id, Lattice::key, LIB_ID_COPY_SHAPEKEY, MEM_dupallocN(), MEM_malloc_arrayN(), Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and Lattice::vertex_group_names.
|
static |
Definition at line 125 of file lattice.cc.
References BKE_LIB_FOREACHID_PROCESS_IDSUPER, data, IDWALK_CB_USER, and Lattice::key.
|
static |
Definition at line 96 of file lattice.cc.
References BKE_defvert_array_free(), BKE_lattice_batch_cache_free(), BLI_freelistN(), Lattice::def, Lattice::dvert, Lattice::editlatt, EditLatt::latt, MEM_freeN(), MEM_SAFE_FREE, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and Lattice::vertex_group_names.
|
static |
Definition at line 52 of file lattice.cc.
References BKE_lattice_resize(), BLI_assert, Lattice::def, DNA_struct_default_get, MEM_callocN(), MEMCMP_STRUCT_AFTER_IS_ZERO, and MEMCPY_STRUCT_AFTER.
| void outside_lattice | ( | Lattice * | lt | ) |
Definition at line 401 of file lattice.cc.
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 blender::ed::transform::recalcData_lattice().
| void(* BKE_lattice_batch_cache_dirty_tag_cb) (Lattice *lt, int mode) | ( | Lattice * | lt, |
| int | mode ) = nullptr |
Definition at line 701 of file lattice.cc.
Referenced by BKE_lattice_batch_cache_dirty_tag(), and DRW_module_init().
Definition at line 702 of file lattice.cc.
Referenced by BKE_lattice_batch_cache_free(), and DRW_module_init().
| IDTypeInfo IDType_ID_LT |
Definition at line 163 of file lattice.cc.