* Bone Groups - changed some of the options in the Ctrl-G menu so that it is more useful
* Tweaked one of the colours in the colour sets so that it is less similar to a colour in another set representing another state.
This commit is contained in:
@@ -64,7 +64,7 @@ void pose_adds_vgroups(struct Object *meshobj, int heatweights);
|
||||
void pose_add_posegroup(void);
|
||||
void pose_remove_posegroup(void);
|
||||
char *build_posegroups_menustr(struct bPose *pose, short for_pupmenu);
|
||||
void pose_assign_to_posegroup(void);
|
||||
void pose_assign_to_posegroup(short active);
|
||||
void pose_remove_from_posegroups(void);
|
||||
void pgroup_operation_with_menu(void);
|
||||
|
||||
|
||||
@@ -4096,15 +4096,18 @@ static void do_view3d_pose_armature_groupmenu(void *arg, int event)
|
||||
{
|
||||
switch (event) {
|
||||
case 1:
|
||||
pose_assign_to_posegroup();
|
||||
pose_assign_to_posegroup(1);
|
||||
break;
|
||||
case 2:
|
||||
pose_add_posegroup();
|
||||
pose_assign_to_posegroup(0);
|
||||
break;
|
||||
case 3:
|
||||
pose_remove_from_posegroups();
|
||||
pose_add_posegroup();
|
||||
break;
|
||||
case 4:
|
||||
pose_remove_from_posegroups();
|
||||
break;
|
||||
case 5:
|
||||
pose_remove_posegroup();
|
||||
break;
|
||||
}
|
||||
@@ -4118,10 +4121,11 @@ static uiBlock *view3d_pose_armature_groupmenu(void *arg_unused)
|
||||
block= uiNewBlock(&curarea->uiblocks, "view3d_pose_armature_groupmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||
uiBlockSetButmFunc(block, do_view3d_pose_armature_groupmenu, NULL);
|
||||
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add Selected to Group|Ctrl G, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add New Group|Ctrl G, 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Remove from All Groups|Ctrl G, 3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Remove Active Group|Ctrl G, 4", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add Selected to Active Group|Ctrl G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add Selected to Group|Ctrl G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add New Group|Ctrl G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Remove from All Groups|Ctrl G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Remove Active Group|Ctrl G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
|
||||
|
||||
uiBlockSetDirection(block, UI_RIGHT);
|
||||
uiTextBoundsBlock(block, 60);
|
||||
|
||||
@@ -1007,7 +1007,7 @@ char *build_posegroups_menustr (bPose *pose, short for_pupmenu)
|
||||
}
|
||||
|
||||
/* Assign selected pchans to the bone group that the user selects */
|
||||
void pose_assign_to_posegroup ()
|
||||
void pose_assign_to_posegroup (short active)
|
||||
{
|
||||
Object *ob= OBACT;
|
||||
bArmature *arm= (ob) ? ob->data : NULL;
|
||||
@@ -1022,18 +1022,20 @@ void pose_assign_to_posegroup ()
|
||||
return;
|
||||
|
||||
/* get group to affect */
|
||||
menustr= build_posegroups_menustr(pose, 1);
|
||||
nr= pupmenu(menustr);
|
||||
MEM_freeN(menustr);
|
||||
|
||||
if (nr < 0)
|
||||
return;
|
||||
else if (nr == 0) {
|
||||
/* add new - note: this does an undo push and sets active group */
|
||||
pose_add_posegroup();
|
||||
if ((active==0) || (pose->active_group <= 0)) {
|
||||
menustr= build_posegroups_menustr(pose, 1);
|
||||
nr= pupmenu(menustr);
|
||||
MEM_freeN(menustr);
|
||||
|
||||
if (nr < 0)
|
||||
return;
|
||||
else if (nr == 0) {
|
||||
/* add new - note: this does an undo push and sets active group */
|
||||
pose_add_posegroup();
|
||||
}
|
||||
else
|
||||
pose->active_group= nr;
|
||||
}
|
||||
else
|
||||
pose->active_group= nr;
|
||||
|
||||
/* add selected bones to group then */
|
||||
for (pchan= pose->chanbase.first; pchan; pchan= pchan->next) {
|
||||
@@ -1103,16 +1105,19 @@ void pgroup_operation_with_menu (void)
|
||||
|
||||
/* get mode of action */
|
||||
if (pchan)
|
||||
mode= pupmenu("Bone Groups%t|Add Selected to Group%x1|Add New Group%x2|Remove Selected From Groups%x3|Remove Active Group%x4");
|
||||
mode= pupmenu("Bone Groups%t|Add Selected to Active Group%x1|Add Selected to Group%x2|%|Remove Selected From Groups%x3|Remove Active Group%x4");
|
||||
else
|
||||
mode= pupmenu("Bone Groups%t|Add New Group%x2|Remove Active Group%x4");
|
||||
mode= pupmenu("Bone Groups%t|Add New Group%x5|Remove Active Group%x4");
|
||||
|
||||
/* handle mode */
|
||||
switch (mode) {
|
||||
case 1:
|
||||
pose_assign_to_posegroup();
|
||||
pose_assign_to_posegroup(1);
|
||||
break;
|
||||
case 2:
|
||||
pose_assign_to_posegroup(0);
|
||||
break;
|
||||
case 5:
|
||||
pose_add_posegroup();
|
||||
break;
|
||||
case 3:
|
||||
|
||||
@@ -375,7 +375,7 @@ void BIF_InitTheme(void)
|
||||
/* set 1 */
|
||||
SETCOL(btheme->tarm[0].solid, 0x9a, 0x00, 0x00, 255);
|
||||
SETCOL(btheme->tarm[0].select, 0xbd, 0x11, 0x11, 255);
|
||||
SETCOL(btheme->tarm[0].active, 0xea, 0x01, 0x01, 255);
|
||||
SETCOL(btheme->tarm[0].active, 0xf7, 0x0a, 0x0a, 255);
|
||||
/* set 2 */
|
||||
SETCOL(btheme->tarm[1].solid, 0xf7, 0x40, 0x18, 255);
|
||||
SETCOL(btheme->tarm[1].select, 0xf6, 0x69, 0x13, 255);
|
||||
|
||||
@@ -409,7 +409,7 @@ static void init_userdef_file(void)
|
||||
/* set 1 */
|
||||
SETCOL(btheme->tarm[0].solid, 0x9a, 0x00, 0x00, 255);
|
||||
SETCOL(btheme->tarm[0].select, 0xbd, 0x11, 0x11, 255);
|
||||
SETCOL(btheme->tarm[0].active, 0xea, 0x01, 0x01, 255);
|
||||
SETCOL(btheme->tarm[0].active, 0xf7, 0x0a, 0x0a, 255);
|
||||
/* set 2 */
|
||||
SETCOL(btheme->tarm[1].solid, 0xf7, 0x40, 0x18, 255);
|
||||
SETCOL(btheme->tarm[1].select, 0xf6, 0x69, 0x13, 255);
|
||||
|
||||
Reference in New Issue
Block a user