UI: Show object data name in 3D Viewport text overlay
Helps identify the active mesh/armature data, useful for instances or when dealing with multiple data-blocks per object, as in the Keymesh add-on. More details and screenshots in the pull request. Pull Request: https://projects.blender.org/blender/blender/pulls/133403
This commit is contained in:
committed by
Pablo Vazquez
parent
b0e3cd14ff
commit
55de54557c
@@ -1347,6 +1347,14 @@ static void draw_selected_name(
|
||||
info_array[i++] = msg_space;
|
||||
info_array[i++] = ob->id.name + 2;
|
||||
|
||||
/* Show object data name when not in object mode. */
|
||||
if (ob->mode != OB_MODE_OBJECT) {
|
||||
if (const ID *data_id = static_cast<const ID *>(ob->data)) {
|
||||
info_array[i++] = " | ";
|
||||
info_array[i++] = data_id->name + 2;
|
||||
}
|
||||
}
|
||||
|
||||
/* name(s) to display depends on type of object */
|
||||
if (ob->type == OB_ARMATURE) {
|
||||
bArmature *arm = static_cast<bArmature *>(ob->data);
|
||||
|
||||
Reference in New Issue
Block a user