Small code cleanup to remove old undo calls that do nothing.
This commit is contained in:
@@ -88,10 +88,6 @@
|
||||
#include "reeb.h"
|
||||
#endif
|
||||
|
||||
/* ************* XXX *************** */
|
||||
static void BIF_undo_push(const char *msg) {}
|
||||
/* ************* XXX *************** */
|
||||
|
||||
/* **************** tools on Editmode Armature **************** */
|
||||
|
||||
/* Sync selection to parent for connected children */
|
||||
@@ -1896,7 +1892,7 @@ void ARMATURE_OT_delete(wmOperatorType *ot)
|
||||
* toggle==2: only active tag
|
||||
* toggle==3: swap (no test)
|
||||
*/
|
||||
void ED_armature_deselectall(Object *obedit, int toggle, int doundo)
|
||||
void ED_armature_deselectall(Object *obedit, int toggle)
|
||||
{
|
||||
bArmature *arm= obedit->data;
|
||||
EditBone *eBone;
|
||||
@@ -1967,7 +1963,7 @@ int mouse_armature(bContext *C, short mval[2], int extend)
|
||||
if (nearBone) {
|
||||
|
||||
if (!extend)
|
||||
ED_armature_deselectall(obedit, 0, 0);
|
||||
ED_armature_deselectall(obedit, 0);
|
||||
|
||||
/* by definition the non-root connected bones have no root point drawn,
|
||||
so a root selection needs to be delivered to the parent tip */
|
||||
@@ -2362,7 +2358,7 @@ void add_primitive_bone(Scene *scene, View3D *v3d, RegionView3D *rv3d)
|
||||
mul_m3_m3m3(totmat, obmat, viewmat);
|
||||
invert_m3_m3(imat, totmat);
|
||||
|
||||
ED_armature_deselectall(obedit, 0, 0);
|
||||
ED_armature_deselectall(obedit, 0);
|
||||
|
||||
/* Create a bone */
|
||||
bone= ED_armature_edit_bone_add(obedit->data, "Bone");
|
||||
@@ -2415,7 +2411,7 @@ static int armature_click_extrude_exec(bContext *C, wmOperator *op)
|
||||
to_root= 1;
|
||||
}
|
||||
|
||||
ED_armature_deselectall(obedit, 0, 0);
|
||||
ED_armature_deselectall(obedit, 0);
|
||||
|
||||
/* we re-use code for mirror editing... */
|
||||
flipbone= NULL;
|
||||
@@ -3284,7 +3280,6 @@ static int armature_hide_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
ED_armature_validate_active(arm);
|
||||
ED_armature_sync_selection(arm->edbo);
|
||||
BIF_undo_push("Hide Bones");
|
||||
|
||||
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
|
||||
|
||||
@@ -3321,7 +3316,6 @@ static int armature_reveal_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
ED_armature_validate_active(arm);
|
||||
ED_armature_sync_selection(arm->edbo);
|
||||
BIF_undo_push("Reveal Bones");
|
||||
|
||||
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
|
||||
|
||||
@@ -3358,7 +3352,6 @@ void hide_selected_armature_bones(Scene *scene)
|
||||
}
|
||||
ED_armature_validate_active(arm);
|
||||
ED_armature_sync_selection(arm->edbo);
|
||||
BIF_undo_push("Hide Bones");
|
||||
}
|
||||
|
||||
|
||||
@@ -3381,7 +3374,6 @@ static void hide_unselected_armature_bones(Scene *scene)
|
||||
|
||||
ED_armature_validate_active(arm);
|
||||
ED_armature_sync_selection(arm->edbo);
|
||||
BIF_undo_push("Hide Unselected Bones");
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3402,7 +3394,6 @@ void show_all_armature_bones(Scene *scene)
|
||||
}
|
||||
ED_armature_validate_active(arm);
|
||||
ED_armature_sync_selection(arm->edbo);
|
||||
BIF_undo_push("Reveal Bones");
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3587,7 +3578,7 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op)
|
||||
mul_m3_m3m3(totmat, obmat, viewmat);
|
||||
invert_m3_m3(imat, totmat);
|
||||
|
||||
ED_armature_deselectall(obedit, 0, 0);
|
||||
ED_armature_deselectall(obedit, 0);
|
||||
|
||||
/* Create a bone */
|
||||
bone= ED_armature_edit_bone_add(obedit->data, name);
|
||||
@@ -4470,7 +4461,7 @@ int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, shor
|
||||
|
||||
/* since we do unified select, we don't shift+select a bone if the armature object was not active yet */
|
||||
if (!(extend) || (base != scene->basact)) {
|
||||
ED_pose_deselectall(ob, 0, 0);
|
||||
ED_pose_deselectall(ob, 0);
|
||||
nearBone->flag |= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
|
||||
arm->act_bone= nearBone;
|
||||
|
||||
@@ -4517,7 +4508,7 @@ int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, shor
|
||||
test==2: only clear active tag
|
||||
test==3: swap select (no test / inverse selection status of all independently)
|
||||
*/
|
||||
void ED_pose_deselectall (Object *ob, int test, int doundo)
|
||||
void ED_pose_deselectall (Object *ob, int test)
|
||||
{
|
||||
bArmature *arm= ob->data;
|
||||
bPoseChannel *pchan;
|
||||
@@ -4557,13 +4548,6 @@ void ED_pose_deselectall (Object *ob, int test, int doundo)
|
||||
|
||||
if(arm->act_bone && (arm->act_bone->flag & BONE_SELECTED)==0)
|
||||
arm->act_bone= NULL;
|
||||
|
||||
//countall(); // XXX need an equivalent to this...
|
||||
|
||||
if (doundo) {
|
||||
if (selectmode==1) BIF_undo_push("Select All");
|
||||
else BIF_undo_push("Deselect All");
|
||||
}
|
||||
}
|
||||
|
||||
static int bone_skinnable(Object *ob, Bone *bone, void *datap)
|
||||
@@ -6147,8 +6131,6 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg)
|
||||
}
|
||||
|
||||
BLI_ghash_free(arcBoneMap, NULL, NULL);
|
||||
|
||||
BIF_undo_push("Generate Skeleton");
|
||||
}
|
||||
|
||||
void generateSkeleton(Scene *scene)
|
||||
|
||||
@@ -102,7 +102,7 @@ void ED_keymap_armature(struct wmKeyConfig *keyconf);
|
||||
void ED_armature_from_edit(struct Object *obedit);
|
||||
void ED_armature_to_edit(struct Object *ob);
|
||||
void ED_armature_edit_free(struct Object *ob);
|
||||
void ED_armature_deselectall(struct Object *obedit, int toggle, int doundo);
|
||||
void ED_armature_deselectall(struct Object *obedit, int toggle);
|
||||
|
||||
int ED_do_pose_selectbuffer(struct Scene *scene, struct Base *base, unsigned int *buffer,
|
||||
short hits, short extend);
|
||||
@@ -140,7 +140,7 @@ void undo_push_armature(struct bContext *C, char *name);
|
||||
void ED_armature_exit_posemode(struct bContext *C, struct Base *base);
|
||||
void ED_armature_enter_posemode(struct bContext *C, struct Base *base);
|
||||
int ED_pose_channel_in_IK_chain(struct Object *ob, struct bPoseChannel *pchan);
|
||||
void ED_pose_deselectall(struct Object *ob, int test, int doundo);
|
||||
void ED_pose_deselectall(struct Object *ob, int test);
|
||||
void ED_pose_recalculate_paths(struct bContext *C, struct Scene *scene, struct Object *ob);
|
||||
|
||||
/* sketch */
|
||||
|
||||
@@ -2118,8 +2118,8 @@ static int tree_element_active_posechannel(bContext *C, Scene *scene, TreeElemen
|
||||
if(set) {
|
||||
if(!(pchan->bone->flag & BONE_HIDDEN_P)) {
|
||||
|
||||
if(set==2) ED_pose_deselectall(ob, 2, 0); // 2 = clear active tag
|
||||
else ED_pose_deselectall(ob, 0, 0); // 0 = deselect
|
||||
if(set==2) ED_pose_deselectall(ob, 2); // 2 = clear active tag
|
||||
else ED_pose_deselectall(ob, 0); // 0 = deselect
|
||||
|
||||
if(set==2 && (pchan->bone->flag & BONE_SELECTED)) {
|
||||
pchan->bone->flag &= ~BONE_SELECTED;
|
||||
@@ -2149,8 +2149,8 @@ static int tree_element_active_bone(bContext *C, Scene *scene, TreeElement *te,
|
||||
|
||||
if(set) {
|
||||
if(!(bone->flag & BONE_HIDDEN_P)) {
|
||||
if(set==2) ED_pose_deselectall(OBACT, 2, 0); // 2 is clear active tag
|
||||
else ED_pose_deselectall(OBACT, 0, 0);
|
||||
if(set==2) ED_pose_deselectall(OBACT, 2); // 2 is clear active tag
|
||||
else ED_pose_deselectall(OBACT, 0);
|
||||
|
||||
if(set==2 && (bone->flag & BONE_SELECTED)) {
|
||||
bone->flag &= ~BONE_SELECTED;
|
||||
@@ -2183,8 +2183,8 @@ static int tree_element_active_ebone(bContext *C, Scene *scene, TreeElement *te,
|
||||
if(set) {
|
||||
if(!(ebone->flag & BONE_HIDDEN_A)) {
|
||||
bArmature *arm= scene->obedit->data;
|
||||
if(set==2) ED_armature_deselectall(scene->obedit, 2, 0); // only clear active tag
|
||||
else ED_armature_deselectall(scene->obedit, 0, 0); // deselect
|
||||
if(set==2) ED_armature_deselectall(scene->obedit, 2); // only clear active tag
|
||||
else ED_armature_deselectall(scene->obedit, 0); // deselect
|
||||
|
||||
ebone->flag |= BONE_SELECTED|BONE_ROOTSEL|BONE_TIPSEL;
|
||||
arm->act_edbone= ebone;
|
||||
|
||||
Reference in New Issue
Block a user