From c12d9760209e104c89b3978443679356a57f89b1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 15 Apr 2018 11:45:51 +0200 Subject: Cleanup: ED_armature naming - Wasn't clear which functions handle edit-bones. - Mixed both ebone and edit_bone in names. - Didn't use ED_armature_* prefix for public API. See P655 to apply to branches. --- source/blender/editors/include/ED_armature.h | 43 ++++++++++++++-------------- 1 file changed, 22 insertions(+), 21 deletions(-) (limited to 'source/blender/editors/include/ED_armature.h') diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h index ae54dd802ee..fbaa65211e6 100644 --- a/source/blender/editors/include/ED_armature.h +++ b/source/blender/editors/include/ED_armature.h @@ -130,29 +130,30 @@ void ED_armature_from_edit(struct bArmature *arm); void ED_armature_to_edit(struct bArmature *arm); void ED_armature_edit_free(struct bArmature *arm); -void ED_armature_deselect_all(struct Object *obedit); -void ED_armature_deselect_all_visible(struct Object *obedit); +void ED_armature_edit_deselect_all(struct Object *obedit); +void ED_armature_edit_deselect_all_visible(struct Object *obedit); -bool ED_do_pose_selectbuffer( +bool ED_armature_pose_select_pick_with_buffer( struct Scene *scene, struct Base *base, const unsigned int *buffer, short hits, bool extend, bool deselect, bool toggle, bool do_nearest); -bool ED_armature_select_pick(struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle); +bool ED_armature_edit_select_pick( + struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle); int join_armature_exec(struct bContext *C, struct wmOperator *op); -struct Bone *get_indexed_bone(struct Object *ob, int index); -float ED_rollBoneToVector(EditBone *bone, const float new_up_axis[3], const bool axis_only); -EditBone *ED_armature_bone_find_name(const struct ListBase *edbo, const char *name); -EditBone *ED_armature_bone_get_mirrored(const struct ListBase *edbo, EditBone *ebo); -void ED_armature_sync_selection(struct ListBase *edbo); -void ED_armature_validate_active(struct bArmature *arm); +struct Bone *ED_armature_bone_find_index(struct Object *ob, int index); +float ED_armature_ebone_roll_to_vector(EditBone *bone, const float new_up_axis[3], const bool axis_only); +EditBone *ED_armature_ebone_find_name(const struct ListBase *edbo, const char *name); +EditBone *ED_armature_ebone_get_mirrored(const struct ListBase *edbo, EditBone *ebo); +void ED_armature_edit_sync_selection(struct ListBase *edbo); +void ED_armature_edit_validate_active(struct bArmature *arm); -EditBone *ED_armature_edit_bone_add_primitive(struct Object *obedit_arm, float length, bool view_aligned); -EditBone *ED_armature_edit_bone_add(struct bArmature *arm, const char *name); +EditBone *ED_armature_ebone_add_primitive(struct Object *obedit_arm, float length, bool view_aligned); +EditBone *ED_armature_ebone_add(struct bArmature *arm, const char *name); -void ED_armature_edit_bone_remove_ex(struct bArmature *arm, EditBone *exBone, bool clear_connected); -void ED_armature_edit_bone_remove(struct bArmature *arm, EditBone *exBone); +void ED_armature_ebone_remove_ex(struct bArmature *arm, EditBone *exBone, bool clear_connected); +void ED_armature_ebone_remove(struct bArmature *arm, EditBone *exBone); bool ED_armature_ebone_is_child_recursive(EditBone *ebone_parent, EditBone *ebone_child); -EditBone *ED_armature_bone_find_shared_parent(EditBone *ebone_child[], const unsigned int ebone_child_tot); +EditBone *ED_armature_ebone_find_shared_parent(EditBone *ebone_child[], const unsigned int ebone_child_tot); void ED_armature_ebone_to_mat3(EditBone *ebone, float mat[3][3]); void ED_armature_ebone_to_mat4(EditBone *ebone, float mat[4][4]); @@ -160,22 +161,22 @@ void ED_armature_ebone_to_mat4(EditBone *ebone, float mat[4][4]); void ED_armature_ebone_from_mat3(EditBone *ebone, float mat[3][3]); void ED_armature_ebone_from_mat4(EditBone *ebone, float mat[4][4]); -void transform_armature_mirror_update(struct Object *obedit); +void ED_armature_edit_transform_mirror_update(struct Object *obedit); void ED_armature_origin_set(struct Scene *scene, struct Object *ob, float cursor[3], int centermode, int around); void ED_armature_transform_bones(struct bArmature *arm, float mat[4][4], const bool do_props); -void ED_armature_apply_transform(struct Object *ob, float mat[4][4], const bool do_props); +void ED_armature_transform_apply(struct Object *ob, float mat[4][4], const bool do_props); void ED_armature_transform(struct bArmature *arm, float mat[4][4], const bool do_props); #define ARM_GROUPS_NAME 1 #define ARM_GROUPS_ENVELOPE 2 #define ARM_GROUPS_AUTO 3 -void create_vgroups_from_armature(struct ReportList *reports, struct Scene *scene, struct Object *ob, +void ED_object_vgroup_calc_from_armature(struct ReportList *reports, struct Scene *scene, struct Object *ob, struct Object *par, const int mode, const bool mirror); /* if bone is already in list, pass it as param to ignore it */ -void unique_editbone_name(struct ListBase *ebones, char *name, EditBone *bone); +void ED_armature_ebone_unique_name(struct ListBase *ebones, char *name, EditBone *bone); void ED_armature_bone_rename(struct bArmature *arm, const char *oldnamep, const char *newnamep); void ED_armature_bones_flip_names(struct bArmature *arm, struct ListBase *bones_names, const bool do_strip_numbers); @@ -199,7 +200,7 @@ bool ED_object_posemode_exit_ex(struct Object *ob); bool ED_object_posemode_exit(struct bContext *C, struct Object *ob); bool ED_object_posemode_enter_ex(struct Object *ob); bool ED_object_posemode_enter(struct bContext *C, struct Object *ob); -void ED_pose_de_selectall(struct Object *ob, int select_mode, const bool ignore_visibility); +void ED_pose_deselect_all(struct Object *ob, int select_mode, const bool ignore_visibility); void ED_pose_bone_select(struct Object *ob, struct bPoseChannel *pchan, bool select); void ED_pose_recalculate_paths(struct Scene *scene, struct Object *ob); struct Object *ED_pose_object_from_context(struct bContext *C); @@ -225,7 +226,7 @@ void BDR_drawSketch(const struct bContext *vc); int BDR_drawSketchNames(struct ViewContext *vc); /* meshlaplacian.c */ -void mesh_deform_bind(struct Scene *scene, +void ED_mesh_deform_bind_callback(struct Scene *scene, struct MeshDeformModifierData *mmd, struct DerivedMesh *cagedm, float *vertexcos, int totvert, float cagemat[4][4]); -- cgit v1.2.3