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
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c30
1 files changed, 25 insertions, 5 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index c07fa85050c..1b6c6b463cd 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -914,7 +914,8 @@ static void draw_selected_name(Scene *scene, Object *ob, rcti *rect)
Key *key = NULL;
KeyBlock *kb = NULL;
char shapes[MAX_NAME + 10];
-
+ char *bone_name = NULL;
+
/* try to display active shapekey too */
shapes[0] = '\0';
key = BKE_key_from_object(ob);
@@ -928,10 +929,29 @@ static void draw_selected_name(Scene *scene, Object *ob, rcti *rect)
}
}
- if (markern)
- BLI_snprintf(info, sizeof(info), "(%d) %s %s <%s>", CFRA, ob->id.name + 2, shapes, markern);
- else
- BLI_snprintf(info, sizeof(info), "(%d) %s %s", CFRA, ob->id.name + 2, shapes);
+ if (ob->type == OB_MESH) {
+ Object *armobj = BKE_object_pose_armature_get(ob);
+ if (armobj && armobj->mode & OB_MODE_POSE) {
+ bArmature *arm = armobj->data;
+ if (arm->act_bone) {
+ if (arm->act_bone->layer & arm->layer)
+ bone_name = arm->act_bone->name;
+ }
+ }
+ }
+
+ if (bone_name) {
+ if (markern)
+ BLI_snprintf(info, sizeof(info), "(%d) %s %s %s <%s>", CFRA, ob->id.name + 2, bone_name, shapes, markern);
+ else
+ BLI_snprintf(info, sizeof(info), "(%d) %s %s %s", CFRA, ob->id.name + 2, bone_name, shapes);
+ }
+ else {
+ if (markern)
+ BLI_snprintf(info, sizeof(info), "(%d) %s %s <%s>", CFRA, ob->id.name + 2, shapes, markern);
+ else
+ BLI_snprintf(info, sizeof(info), "(%d) %s %s", CFRA, ob->id.name + 2, shapes);
+ }
}
else {
/* standard object */