|
Blender
V2.93
|
Go to the source code of this file.
Functions | |
| void | BKE_key_free (struct Key *key) |
| void | BKE_key_free_nolib (struct Key *key) |
| struct Key * | BKE_key_add (struct Main *bmain, struct ID *id) |
| void | BKE_key_sort (struct Key *key) |
| void | key_curve_position_weights (float t, float data[4], int type) |
| void | key_curve_tangent_weights (float t, float data[4], int type) |
| void | key_curve_normal_weights (float t, float data[4], int type) |
| float * | BKE_key_evaluate_object_ex (struct Object *ob, int *r_totelem, float *arr, size_t arr_size) |
| float * | BKE_key_evaluate_object (struct Object *ob, int *r_totelem) |
| int | BKE_keyblock_element_count_from_shape (const struct Key *key, const int shape_index) |
| int | BKE_keyblock_element_count (const struct Key *key) |
| size_t | BKE_keyblock_element_calc_size_from_shape (const struct Key *key, const int shape_index) |
| size_t | BKE_keyblock_element_calc_size (const struct Key *key) |
| bool | BKE_key_idtype_support (const short id_type) |
| struct Key ** | BKE_key_from_id_p (struct ID *id) |
| struct Key * | BKE_key_from_id (struct ID *id) |
| struct Key ** | BKE_key_from_object_p (const struct Object *ob) |
| struct Key * | BKE_key_from_object (const struct Object *ob) |
| struct KeyBlock * | BKE_keyblock_from_object (struct Object *ob) |
| struct KeyBlock * | BKE_keyblock_from_object_reference (struct Object *ob) |
| struct KeyBlock * | BKE_keyblock_add (struct Key *key, const char *name) |
| struct KeyBlock * | BKE_keyblock_add_ctime (struct Key *key, const char *name, const bool do_force) |
| struct KeyBlock * | BKE_keyblock_from_key (struct Key *key, int index) |
| struct KeyBlock * | BKE_keyblock_find_name (struct Key *key, const char name[]) |
| void | BKE_keyblock_copy_settings (struct KeyBlock *kb_dst, const struct KeyBlock *kb_src) |
| char * | BKE_keyblock_curval_rnapath_get (struct Key *key, struct KeyBlock *kb) |
| void | BKE_keyblock_update_from_lattice (struct Lattice *lt, struct KeyBlock *kb) |
| void | BKE_keyblock_convert_from_lattice (struct Lattice *lt, struct KeyBlock *kb) |
| void | BKE_keyblock_convert_to_lattice (struct KeyBlock *kb, struct Lattice *lt) |
| int | BKE_keyblock_curve_element_count (struct ListBase *nurb) |
| void | BKE_keyblock_curve_data_transform (const struct ListBase *nurb, const float mat[4][4], const void *src, void *dst) |
| void | BKE_keyblock_update_from_curve (struct Curve *cu, struct KeyBlock *kb, struct ListBase *nurb) |
| void | BKE_keyblock_convert_from_curve (struct Curve *cu, struct KeyBlock *kb, struct ListBase *nurb) |
| void | BKE_keyblock_convert_to_curve (struct KeyBlock *kb, struct Curve *cu, struct ListBase *nurb) |
| void | BKE_keyblock_update_from_mesh (struct Mesh *me, struct KeyBlock *kb) |
| void | BKE_keyblock_convert_from_mesh (struct Mesh *me, struct Key *key, struct KeyBlock *kb) |
| void | BKE_keyblock_convert_to_mesh (struct KeyBlock *kb, struct Mesh *me) |
| void | BKE_keyblock_mesh_calc_normals (struct KeyBlock *kb, struct Mesh *mesh, float(*r_vertnors)[3], float(*r_polynors)[3], float(*r_loopnors)[3]) |
| void | BKE_keyblock_update_from_vertcos (struct Object *ob, struct KeyBlock *kb, const float(*vertCos)[3]) |
| void | BKE_keyblock_convert_from_vertcos (struct Object *ob, struct KeyBlock *kb, const float(*vertCos)[3]) |
| float(* | BKE_keyblock_convert_to_vertcos (struct Object *ob, struct KeyBlock *kb))[3] |
| void | BKE_keyblock_update_from_offset (struct Object *ob, struct KeyBlock *kb, const float(*ofs)[3]) |
| bool | BKE_keyblock_move (struct Object *ob, int org_index, int new_index) |
| bool | BKE_keyblock_is_basis (struct Key *key, const int index) |
Key-Block Data Access | |
| void | BKE_keyblock_data_get_from_shape (const struct Key *key, float(*arr)[3], const int shape_index) |
| void | BKE_keyblock_data_get (const struct Key *key, float(*arr)[3]) |
| void | BKE_keyblock_data_set_with_mat4 (struct Key *key, const int shape_index, const float(*coords)[3], const float mat[4][4]) |
| void | BKE_keyblock_curve_data_set_with_mat4 (struct Key *key, const struct ListBase *nurb, const int shape_index, const void *data, const float mat[4][4]) |
| void | BKE_keyblock_data_set (struct Key *key, const int shape_index, const void *data) |
Definition at line 259 of file key.c.
References BKE_id_new(), Key::elemsize, Key::elemstr, Key::from, GS, id, ID_CU, ID_KE, ID_LT, ID_ME, IPO_BPOINT, IPO_FLOAT, KEY_NORMAL, KEYELEM_ELEM_SIZE_CURVE, KEYELEM_FLOAT_LEN_COORD, ID::name, Key::type, and Key::uidgen.
Referenced by ED_mesh_join_objects_exec(), ED_mesh_shapes_join_objects_exec(), insert_curvekey(), insert_lattkey(), insert_meshkey(), ArmatureImporter::make_shape_keys(), and modifier_apply_shape().
Definition at line 1616 of file key.c.
References BKE_key_evaluate_object_ex(), and NULL.
Referenced by BKE_curve_calc_modifiers_pre(), insert_curvekey(), insert_lattkey(), and insert_meshkey().
| float* BKE_key_evaluate_object_ex | ( | struct Object * | ob, |
| int * | r_totelem, | ||
| float * | arr, | ||
| size_t | arr_size | ||
| ) |
Definition at line 1520 of file key.c.
References BKE_key_from_object(), BKE_keyblock_curve_element_count(), BKE_keyblock_from_object(), BLI_findlink(), BLI_listbase_is_empty(), Key::block, cp_cu_key(), cp_key(), Object::data, do_curve_key(), do_latt_key(), do_mesh_key(), ELEM, ListBase::first, KeyBlock::flag, get_weights_array(), KEYBLOCK_MUTE, KEYELEM_ELEM_SIZE_CURVE, KEYELEM_FLOAT_LEN_COORD, MEM_callocN, MEM_freeN, NULL, Curve::nurb, OB_CURVE, OB_LATTICE, OB_MESH, OB_SHAPE_LOCK, OB_SURF, OB_TYPE_SUPPORT_VGROUP, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, Key::refkey, Object::shapeflag, Object::shapenr, size(), Mesh::totvert, Object::type, and KeyBlock::vgroup.
Referenced by BKE_key_evaluate_object(), and deformVerts().
| void BKE_key_free | ( | Key * | key | ) |
Free (or release) any data used by this shapekey (does not free the key itself).
Definition at line 242 of file key.c.
References Key::id, and shapekey_free_data().
Referenced by undomesh_free_data().
| void BKE_key_free_nolib | ( | struct Key * | key | ) |
Definition at line 247 of file key.c.
References BLI_pophead(), Key::block, KeyBlock::data, and MEM_freeN.
Definition at line 1786 of file key.c.
References BKE_key_from_id_p(), and NULL.
Referenced by BKE_id_copy_for_duplicate(), BKE_id_free_ex(), BKE_lib_id_make_local_generic(), BKE_lib_override_library_create_from_id(), BKE_lib_override_library_create_from_tag(), BKE_lib_override_library_make_local(), BKE_lib_override_library_update(), BLO_main_validate_shapekeys(), blender::deg::DepsgraphRelationBuilder::build_object_data_geometry_datablock(), blender::deg::DepsgraphNodeBuilder::build_object_data_geometry_datablock(), lib_id_clear_library_data_ex(), lib_override_library_create_from(), and lib_relocate_do().
Definition at line 1761 of file key.c.
References GS, id, ID_CU, ID_LT, ID_ME, Curve::key, Lattice::key, Mesh::key, ID::name, NULL, and Curve::vfont.
Referenced by BKE_key_from_id(), BKE_key_from_object_p(), BKE_lib_override_library_update(), and lib_relocate_do().
Referenced by actedit_get_shapekeys(), action_new_poll(), animdata_filter_dopesheet_ob(), bc_has_animations(), BKE_modifiers_get_virtual_modifierlist(), BKE_object_is_deform_modified(), BKE_object_is_modified(), BKE_object_shapekey_remove(), blender::deg::DepsgraphRelationBuilder::build_object_data(), blender::deg::DepsgraphRelationBuilder::build_object_data_geometry(), blender::io::AbstractHierarchyWriter::check_is_animated(), deformMatrices(), deformMatricesEM(), deformVerts(), deformVertsEM(), draw_selected_name(), ED_actedit_animdata_from_context(), ED_object_shape_key_add(), get_orco_coords(), object_deforms_in_time(), object_frame_has_keyframe(), object_shape_key_mirror(), object_shapekey_remove(), ControllerExporter::operator()(), GeometryExporter::operator()(), sculpt_undo_restore_coords(), shape_key_clear_exec(), shape_key_move_exec(), shape_key_move_poll(), shape_key_retime_exec(), and special_aftertrans_update__actedit().
Referenced by BKE_object_shapekey_free().
| bool BKE_key_idtype_support | ( | const short | id_type | ) |
| void BKE_key_sort | ( | struct Key * | key | ) |
Definition at line 316 of file key.c.
References BLI_insertlinkafter(), BLI_remlink(), Key::block, ListBase::first, KeyBlock::next, KeyBlock::pos, KeyBlock::prev, and Key::refkey.
Referenced by BKE_keyblock_add_ctime(), and ED_mesh_join_objects_exec().
Definition at line 1817 of file key.c.
References BLI_addtail(), BLI_listbase_count(), BLI_snprintf(), BLI_strncpy(), BLI_uniquename(), Key::block, DATA_, KEY_LINEAR, ListBase::last, MEM_callocN, KeyBlock::name, KeyBlock::pos, Key::refkey, KeyBlock::slidermax, KeyBlock::slidermin, Key::totkey, KeyBlock::type, KeyBlock::uid, and Key::uidgen.
Referenced by BKE_keyblock_add_ctime(), BM_mesh_bm_to_me(), ED_mesh_join_objects_exec(), ED_mesh_shapes_join_objects_exec(), modifier_apply_shape(), and shapekey_layers_to_keyblocks().
| key | The key datablock to add to. |
| name | Optional name for the new keyblock. |
| do_force | always use ctime even for relative keys. |
Definition at line 1873 of file key.c.
References BKE_key_sort(), BKE_keyblock_add(), Key::block, compare_ff(), Key::ctime, ListBase::first, KEY_RELATIVE, KeyBlock::next, KeyBlock::pos, and Key::type.
Referenced by insert_curvekey(), insert_lattkey(), insert_meshkey(), and ArmatureImporter::make_shape_keys().
| void BKE_keyblock_convert_from_curve | ( | struct Curve * | cu, |
| struct KeyBlock * | kb, | ||
| struct ListBase * | nurb | ||
| ) |
Definition at line 2133 of file key.c.
References BKE_keyblock_curve_element_count(), BKE_keyblock_update_from_curve(), KeyBlock::data, Key::elemsize, Curve::key, MEM_mallocN, MEM_SAFE_FREE, and KeyBlock::totelem.
Referenced by insert_curvekey().
Definition at line 2008 of file key.c.
References BKE_keyblock_update_from_lattice(), KeyBlock::data, Key::elemsize, Lattice::key, MEM_mallocN, MEM_SAFE_FREE, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and KeyBlock::totelem.
Referenced by insert_lattkey().
Definition at line 2208 of file key.c.
References BKE_keyblock_update_from_mesh(), KeyBlock::data, Key::elemsize, len, MEM_malloc_arrayN, MEM_SAFE_FREE, KeyBlock::totelem, and Mesh::totvert.
Referenced by BKE_mesh_runtime_eval_to_meshkey(), ED_mesh_shapes_join_objects_exec(), insert_meshkey(), ArmatureImporter::make_shape_keys(), and modifier_apply_shape().
| void BKE_keyblock_convert_from_vertcos | ( | struct Object * | ob, |
| struct KeyBlock * | kb, | ||
| const float(*) | vertCos[3] | ||
| ) |
Definition at line 2380 of file key.c.
References BKE_keyblock_curve_element_count(), BKE_keyblock_update_from_vertcos(), KeyBlock::data, Object::data, ELEM, Key::elemsize, Curve::key, Lattice::key, Mesh::key, MEM_mallocN, MEM_SAFE_FREE, Curve::nurb, OB_CURVE, OB_LATTICE, OB_MESH, OB_SURF, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, Mesh::totvert, and Object::type.
| void BKE_keyblock_convert_to_curve | ( | struct KeyBlock * | kb, |
| struct Curve * | cu, | ||
| struct ListBase * | nurb | ||
| ) |
Referenced by BKE_object_shapekey_remove(), and ED_curve_editnurb_make().
Definition at line 2025 of file key.c.
References Freestyle::a, copy_v3_v3(), KeyBlock::data, Lattice::def, float(), min_ii(), Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, KeyBlock::totelem, and BPoint::vec.
Referenced by BKE_editlattice_make(), and BKE_object_shapekey_remove().
Definition at line 2224 of file key.c.
References Freestyle::a, MVert::co, copy_v3_v3(), KeyBlock::data, float(), min_ii(), Mesh::mvert, KeyBlock::totelem, and Mesh::totvert.
Referenced by BKE_keyblock_mesh_calc_normals(), BKE_mesh_create_derived_for_modifier(), BKE_object_shapekey_remove(), and GeometryExporter::operator()().
Definition at line 2413 of file key.c.
References Freestyle::a, BKE_nurbList_verts_count(), copy_v3_v3(), KeyBlock::data, Object::data, ELEM, ListBase::first, float(), KEYELEM_FLOAT_LEN_BEZTRIPLE, KEYELEM_FLOAT_LEN_BPOINT, MEM_mallocN, NULL, Curve::nurb, OB_CURVE, OB_LATTICE, OB_MESH, OB_SURF, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, Mesh::totvert, and Object::type.
Referenced by sculpt_undo_restore_coords(), sculpt_update_object(), and SCULPT_vertcos_to_key().
Referenced by ED_mesh_join_objects_exec().
Definition at line 1966 of file key.c.
References ELEM, Key::id, NULL, ptr, RNA_path_from_ID_to_property(), RNA_pointer_create(), RNA_ShapeKey, and RNA_struct_find_property().
Referenced by achannel_setting_slider_shapekey_cb(), ANIM_channel_draw_widgets(), and make_new_animlistelem().
| void BKE_keyblock_curve_data_set_with_mat4 | ( | struct Key * | key, |
| const struct ListBase * | nurb, | ||
| const int | shape_index, | ||
| const void * | data, | ||
| const float | mat[4][4] | ||
| ) |
Referenced by ED_object_data_xform_by_mat4().
| void BKE_keyblock_curve_data_transform | ( | const struct ListBase * | nurb, |
| const float | mat[4][4], | ||
| const void * | src, | ||
| void * | dst | ||
| ) |
| int BKE_keyblock_curve_element_count | ( | struct ListBase * | nurb | ) |
Definition at line 2044 of file key.c.
References Nurb::bezt, Nurb::bp, ListBase::first, KEYELEM_ELEM_LEN_BEZTRIPLE, KEYELEM_ELEM_LEN_BPOINT, Nurb::next, Nurb::pntsu, and Nurb::pntsv.
Referenced by BKE_curve_calc_modifiers_pre(), BKE_key_evaluate_object_ex(), BKE_keyblock_convert_from_curve(), BKE_keyblock_convert_from_vertcos(), BKE_keyblock_convert_to_curve(), BKE_keyblock_update_from_curve(), BKE_keyblock_update_from_vertcos(), calc_shapeKeys(), and do_versions_after_linking_280().
| void BKE_keyblock_data_get_from_shape | ( | const struct Key * | key, |
| float(*) | arr[3], | ||
| const int | shape_index | ||
| ) |
Referenced by ED_object_data_xform_create_ex().
| void BKE_keyblock_data_set | ( | Key * | key, |
| const int | shape_index, | ||
| const void * | data | ||
| ) |
Set the data for all key-blocks (or shape_index if != -1).
Definition at line 1734 of file key.c.
References Key::block, data, ELEM, Key::elemsize, and ListBase::first.
Referenced by ED_object_data_xform_restore().
| void BKE_keyblock_data_set_with_mat4 | ( | Key * | key, |
| const int | shape_index, | ||
| const float(*) | coords[3], | ||
| const float | mat[4][4] | ||
| ) |
Set the data to all key-blocks (or shape_index if != -1).
Definition at line 1685 of file key.c.
References BLI_assert, Key::block, ELEM, Key::elemsize, ListBase::first, float(), and mul_v3_m4v3().
Referenced by ED_object_data_xform_by_mat4().
| size_t BKE_keyblock_element_calc_size | ( | const struct Key * | key | ) |
| size_t BKE_keyblock_element_calc_size_from_shape | ( | const struct Key * | key, |
| const int | shape_index | ||
| ) |
Referenced by ED_object_data_xform_create_ex().
| int BKE_keyblock_element_count | ( | const struct Key * | key | ) |
| int BKE_keyblock_element_count_from_shape | ( | const struct Key * | key, |
| const int | shape_index | ||
| ) |
Definition at line 1944 of file key.c.
References BLI_findstring(), and Key::block.
Referenced by ED_mesh_join_objects_exec(), edbm_blend_from_shape_exec(), join_mesh_single(), and sculpt_undo_restore_coords().
Definition at line 1926 of file key.c.
References Key::block, ListBase::first, KeyBlock::next, NULL, and Key::totkey.
Referenced by deformVerts(), get_orco_coords(), and shapekey_adrcodes_to_paths().
Definition at line 1902 of file key.c.
References BKE_key_from_object(), BLI_findlink(), Key::block, NULL, and Object::shapenr.
Referenced by BKE_editlattice_make(), BKE_key_evaluate_object_ex(), deformMatrices(), deformMatricesEM(), do_curve_key(), do_latt_key(), do_mesh_key(), ED_curve_editnurb_make(), get_stats_string(), sculpt_update_object(), shape_key_clear_exec(), shape_key_mode_exists_poll(), and shape_key_retime_exec().
Definition at line 1914 of file key.c.
References BKE_key_from_object(), NULL, and Key::refkey.
| bool BKE_keyblock_is_basis | ( | Key * | key, |
| const int | index | ||
| ) |
Check if given keyblock (as index) is used as basis by others in given key.
Definition at line 2600 of file key.c.
References Key::block, ListBase::first, KEY_RELATIVE, KeyBlock::next, KeyBlock::relative, and Key::type.
Referenced by BM_mesh_bm_to_me(), calc_shapeKeys(), SCULPT_vertcos_to_key(), and undomesh_to_editmesh().
| void BKE_keyblock_mesh_calc_normals | ( | struct KeyBlock * | kb, |
| struct Mesh * | mesh, | ||
| float(*) | r_vertnors[3], | ||
| float(*) | r_polynors[3], | ||
| float(*) | r_loopnors[3] | ||
| ) |
Computes normals (vertices, polygons and/or loops ones) of given mesh for given shape key.
| kb | the KeyBlock to use to compute normals. |
| mesh | the Mesh to apply keyblock to. |
| r_vertnors | if non-NULL, an array of vectors, same length as number of vertices. |
| r_polynors | if non-NULL, an array of vectors, same length as number of polygons. |
| r_loopnors | if non-NULL, an array of vectors, same length as number of loops. |
Definition at line 2249 of file key.c.
References BKE_keyblock_convert_to_mesh(), BKE_mesh_calc_normals_poly(), BKE_mesh_normals_loop_split(), CD_CUSTOMLOOPNORMAL, CustomData_free(), CustomData_get_layer(), CustomData_reset(), Mesh::fdata, Mesh::flag, Mesh::ldata, ME_AUTOSMOOTH, Mesh::medge, MEM_dupallocN, MEM_freeN, MEM_mallocN, mesh, Mesh::mloop, Mesh::mpoly, Mesh::mvert, NULL, Mesh::smoothresh, Mesh::totedge, Mesh::totface, Mesh::totloop, Mesh::totpoly, and Mesh::totvert.
| bool BKE_keyblock_move | ( | Object * | ob, |
| int | org_index, | ||
| int | new_index | ||
| ) |
Move shape key from org_index to new_index. Safe, clamps index to valid range, updates reference keys, the object's active shape index, the 'frame' value in case of absolute keys, etc. Note indices are expected in real values (not 'fake' shapenr +1 ones).
| org_index | if < 0, current object's active shape will be used as skey to move. |
Definition at line 2519 of file key.c.
References BKE_key_from_object(), BLI_listbase_swaplinks(), Key::block, CLAMP, ListBase::first, ListBase::last, KeyBlock::next, KeyBlock::pos, KeyBlock::prev, Key::refkey, KeyBlock::relative, Object::shapenr, SWAP, and Key::totkey.
Referenced by shape_key_move_exec().
| void BKE_keyblock_update_from_curve | ( | struct Curve * | cu, |
| struct KeyBlock * | kb, | ||
| struct ListBase * | nurb | ||
| ) |
Definition at line 1988 of file key.c.
References Freestyle::a, BLI_assert, copy_v3_v3(), KeyBlock::data, Lattice::def, float(), Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, KeyBlock::totelem, and BPoint::vec.
Referenced by BKE_keyblock_convert_from_lattice().
Definition at line 2188 of file key.c.
References Freestyle::a, BLI_assert, MVert::co, copy_v3_v3(), KeyBlock::data, float(), Mesh::mvert, KeyBlock::totelem, and Mesh::totvert.
Referenced by BKE_keyblock_convert_from_mesh(), and undomesh_to_editmesh().
| void BKE_keyblock_update_from_offset | ( | struct Object * | ob, |
| struct KeyBlock * | kb, | ||
| const float(*) | ofs[3] | ||
| ) |
Definition at line 2473 of file key.c.
References Freestyle::a, add_v3_v3(), KeyBlock::data, Object::data, ELEM, ListBase::first, KEYELEM_FLOAT_LEN_BEZTRIPLE, KEYELEM_FLOAT_LEN_BPOINT, Curve::nurb, OB_CURVE, OB_LATTICE, OB_MESH, OB_SURF, KeyBlock::totelem, and Object::type.
Referenced by SCULPT_vertcos_to_key().
| void BKE_keyblock_update_from_vertcos | ( | struct Object * | ob, |
| struct KeyBlock * | kb, | ||
| const float(*) | vertCos[3] | ||
| ) |
Definition at line 2320 of file key.c.
References Freestyle::a, BKE_keyblock_curve_element_count(), BLI_assert, copy_v3_v3(), KeyBlock::data, Object::data, ELEM, ListBase::first, float(), KEYELEM_FLOAT_LEN_BEZTRIPLE, KEYELEM_FLOAT_LEN_BPOINT, Curve::nurb, OB_CURVE, OB_LATTICE, OB_MESH, OB_SURF, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, KeyBlock::totelem, Mesh::totvert, and Object::type.
Referenced by BKE_keyblock_convert_from_vertcos(), and SCULPT_vertcos_to_key().
Definition at line 429 of file key.c.
References data, KEY_BSPLINE, KEY_CARDINAL, KEY_CATMULL_ROM, KEY_LINEAR, t, and type.
Definition at line 348 of file key.c.
References data, KEY_BSPLINE, KEY_CARDINAL, KEY_CATMULL_ROM, KEY_LINEAR, t, and type.
Referenced by BKE_colorband_evaluate(), BKE_lattice_deform_data_eval_co(), BKE_where_on_path(), psys_interpolate_particle(), setkeys(), subdiv_mesh_vertex_of_loose_edge(), and tilt_bezpart().
Definition at line 390 of file key.c.
References data, KEY_BSPLINE, KEY_CARDINAL, KEY_CATMULL_ROM, KEY_LINEAR, t, and type.
Referenced by BKE_where_on_path().