Blender
V3.3
|
#include "DNA_armature_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_string_utils.h"
#include "BKE_action.h"
#include "BKE_armature.h"
#include "BKE_deform.h"
#include "BKE_mesh_iterators.h"
#include "BKE_mesh_runtime.h"
#include "BKE_modifier.h"
#include "BKE_object_deform.h"
#include "BKE_report.h"
#include "BKE_subsurf.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
#include "ED_armature.h"
#include "ED_mesh.h"
#include "armature_intern.h"
#include "meshlaplacian.h"
Go to the source code of this file.
Functions | |
static int | bone_skinnable_cb (Object *UNUSED(ob), Bone *bone, void *datap) |
static int | vgroup_add_unique_bone_cb (Object *ob, Bone *bone, void *UNUSED(ptr)) |
static int | dgroup_skinnable_cb (Object *ob, Bone *bone, void *datap) |
static void | envelope_bone_weighting (Object *ob, Mesh *mesh, float(*verts)[3], int numbones, Bone **bonelist, bDeformGroup **dgrouplist, bDeformGroup **dgroupflip, float(*root)[3], float(*tip)[3], const int *selected, float scale) |
static void | add_verts_to_dgroups (ReportList *reports, Depsgraph *depsgraph, Scene *UNUSED(scene), Object *ob, Object *par, int heat, const bool mirror) |
void | ED_object_vgroup_calc_from_armature (ReportList *reports, Depsgraph *depsgraph, Scene *scene, Object *ob, Object *par, const int mode, const bool mirror) |
API's for creating vertex groups from bones
Definition in file armature_skinning.c.
|
static |
Definition at line 252 of file armature_skinning.c.
References Bone::arm_head, Bone::arm_mat, Bone::arm_tail, BKE_mesh_foreach_mapped_vert_coords_get(), BKE_modifiers_findby_type(), BKE_object_defgroup_data_create(), BKE_object_defgroup_find_name(), BKE_pchan_bbone_spline_setup(), BKE_pose_channel_find_name(), BKE_report(), BLI_string_flip_side_name(), bone_looper(), BONE_SELECTED, bone_skinnable_cb(), bArmature::bonebase, CD_MASK_BAREMESH, MVert::co, copy_v3_v3(), Object::data, DEG_get_evaluated_object(), DEG_get_evaluated_scene(), depsgraph, dgroup_skinnable_cb(), ED_mesh_mirror_spatial_table_end(), eModifierType_Subsurf, envelope_bone_weighting(), error(), ListBase::first, Bone::flag, float(), heat_bone_weighting(), Bone::layer, bArmature::layer, Mat4::mat, mat4_to_scale(), MAX_BBONE_SUBDIV, MAXBONENAME, MEM_callocN, MEM_freeN, mesh, mesh_get_eval_final(), Object::mode, mul_m4_v3(), mul_v3_m4v3(), Mesh::mvert, Bone::name, bDeformGroup::name, NULL, OB_MODE_WEIGHT_PAINT, Object::obmat, Object::pose, RPT_WARNING, Bone::segments, subsurf_calculate_limit_positions(), Mesh::totvert, and verts.
Referenced by ED_object_vgroup_calc_from_armature().
Definition at line 42 of file armature_skinning.c.
References Freestyle::a, BKE_pose_channel_find_name(), BONE_HIDDEN_P, BONE_NO_DEFORM, data, Bone::flag, Bone::name, NULL, and Bone::segments.
Referenced by add_verts_to_dgroups().
Definition at line 114 of file armature_skinning.c.
References Freestyle::a, BKE_object_defgroup_add_name(), BKE_object_defgroup_find_name(), BKE_pose_channel_find_name(), BONE_HIDDEN_P, BONE_NO_DEFORM, BONE_SELECTED, data, DG_LOCK_WEIGHT, Bone::flag, bDeformGroup::flag, Bone::layer, bArmature::layer, Bone::name, NULL, and Bone::segments.
Referenced by add_verts_to_dgroups().
void ED_object_vgroup_calc_from_armature | ( | ReportList * | reports, |
Depsgraph * | depsgraph, | ||
Scene * | scene, | ||
Object * | ob, | ||
Object * | par, | ||
const int | mode, | ||
const bool | mirror | ||
) |
Definition at line 452 of file armature_skinning.c.
References add_verts_to_dgroups(), ARM_GROUPS_AUTO, ARM_GROUPS_ENVELOPE, ARM_GROUPS_NAME, BKE_object_defgroup_count(), bone_looper(), bArmature::bonebase, Object::data, depsgraph, ED_vgroup_data_clamp_range(), ELEM, ListBase::first, NULL, scene, and vgroup_add_unique_bone_cb().
Referenced by ED_object_parent_set(), and weight_from_bones_exec().
|
static |
Definition at line 183 of file armature_skinning.c.
References Bone::dist, blender::math::distance(), distfactor_to_bone(), ED_vgroup_vert_add(), ED_vgroup_vert_remove(), Mesh::editflag, MVert::flag, ME_EDIT_MIRROR_TOPO, ME_EDIT_PAINT_FACE_SEL, ME_EDIT_PAINT_VERT_SEL, mesh, mesh_get_x_mirror_vert(), Object::mode, Mesh::mvert, NULL, OB_MODE_WEIGHT_PAINT, Bone::rad_head, Bone::rad_tail, SELECT, Mesh::totvert, verts, and WEIGHT_REPLACE.
Referenced by add_verts_to_dgroups().
Definition at line 99 of file armature_skinning.c.
References BKE_object_defgroup_add_name(), BKE_object_defgroup_find_name(), BONE_NO_DEFORM, Bone::flag, and Bone::name.
Referenced by ED_object_vgroup_calc_from_armature().