Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-12-08 06:05:46 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-08 06:05:46 +0300
commit2e667e45fc02c5de285df836e59248a82b45dff9 (patch)
treedb50ed1d0d743baf836dbc1cf5a185c4c4342e93 /source/blender/editors/armature/poseobject.c
parent47d6166adb7a5100e04c645e7d6284c5c1b95c9d (diff)
Changed armature active bone so it is separate from selection this is consistent with active object, mesh editmode, curves & metaballs.
- active is no longer assumed to be selected. this fixes a simple bug - eg: Adding a new armature, entering pose mode and toggling selection failed. - outliner editbone selection now works like object and pose mode. - mouse selection sets the bone active even when the tip is selected. - active, unselected bones draw as wire color with a 15% tint of the selected color.
Diffstat (limited to 'source/blender/editors/armature/poseobject.c')
-rw-r--r--source/blender/editors/armature/poseobject.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index 55d24550167..f1bace1201f 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -164,7 +164,7 @@ void ED_armature_exit_posemode(bContext *C, Base *base)
/* if a selected or active bone is protected, throw error (oonly if warn==1) and return 1 */
/* only_selected==1 : the active bone is allowed to be protected */
-static short pose_has_protected_selected(Object *ob, short only_selected, short warn)
+static short pose_has_protected_selected(Object *ob, short warn)
{
/* check protection */
if (ob->proxy) {
@@ -174,8 +174,7 @@ static short pose_has_protected_selected(Object *ob, short only_selected, short
for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
if (pchan->bone && (pchan->bone->layer & arm->layer)) {
if (pchan->bone->layer & arm->layer_protected) {
- if (only_selected && (pchan->bone == arm->act_bone));
- else if (pchan->bone->flag & BONE_SELECTED || pchan->bone == arm->act_bone)
+ if (pchan->bone->flag & BONE_SELECTED)
break;
}
}
@@ -363,13 +362,12 @@ void POSE_OT_paths_clear (wmOperatorType *ot)
static int pose_select_constraint_target_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
- bArmature *arm= ob->data;
bConstraint *con;
int found= 0;
CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones)
{
- if ((pchan->bone->flag & BONE_SELECTED) || (pchan->bone == arm->act_bone)) {
+ if (pchan->bone->flag & BONE_SELECTED) {
for (con= pchan->constraints.first; con; con= con->next) {
bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
@@ -527,7 +525,7 @@ static short pose_select_same_group (bContext *C, Object *ob, short extend)
CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones)
{
/* keep track of group as group to use later? */
- if ((pchan->bone->flag & BONE_SELECTED) || (pchan->bone == arm->act_bone)) {
+ if (pchan->bone->flag & BONE_SELECTED) {
group_flags[pchan->agrp_index] = 1;
tagged= 1;
}
@@ -574,7 +572,7 @@ static short pose_select_same_layer (bContext *C, Object *ob, short extend)
CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones)
{
/* keep track of layers to use later? */
- if ((pchan->bone->flag & BONE_SELECTED) || (pchan->bone == arm->act_bone))
+ if (pchan->bone->flag & BONE_SELECTED)
layers |= pchan->bone->layer;
/* deselect all bones before selecting new ones? */
@@ -681,7 +679,7 @@ void pose_copy_menu(Scene *scene)
/* if proxy-protected bones selected, some things (such as locks + displays) shouldn't be changable,
* but for constraints (just add local constraints)
*/
- if (pose_has_protected_selected(ob, 1, 0)) {
+ if (pose_has_protected_selected(ob, 0)) {
i= BLI_countlist(&(pchanact->constraints)); /* if there are 24 or less, allow for the user to select constraints */
if (i < 25)
nr= pupmenu("Copy Pose Attributes %t|Local Location%x1|Local Rotation%x2|Local Size%x3|%l|Visual Location %x9|Visual Rotation%x10|Visual Size%x11|%l|Constraints (All)%x4|Constraints...%x5");