Commit: 7bda282c5d76b1bcb2481e282083504e6402e1fc
Author: Sergey Sharybin
Date:   Wed May 11 16:50:55 2022 +0200
Branches: tracking_tools
https://developer.blender.org/rB7bda282c5d76b1bcb2481e282083504e6402e1fc

Show tracking object name in popover menu button

Allows to see currently active tracking object without opening
the popover.

Would be nice to have a dedicated icons, but those icons were
already used in the list.

===================================================================

M       release/scripts/startup/bl_ui/space_clip.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_clip.py 
b/release/scripts/startup/bl_ui/space_clip.py
index 1ee996de8b9..de06ff27340 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -247,11 +247,12 @@ class CLIP_HT_header(Header):
             if sc.view == 'CLIP':
                 r = active_object.reconstruction
                 if r.is_valid and sc.view == 'CLIP':
-                    layout.label(text="%s Solve error: %.2f px" %
-                                 (active_object.name, r.average_error))
+                    layout.label(text="Solve error: %.2f px" % 
(r.average_error))
+
+                object_icon = 'CAMERA_DATA' if active_object.is_camera else 
'OBJECT_DATA'
 
                 row = layout.row()
-                row.popover(panel='CLIP_PT_objects')
+                row.popover(panel='CLIP_PT_objects', text=active_object.name, 
icon=object_icon)
                 row = layout.row(align=True)
                 icon = 'LOCKED' if sc.lock_selection else 'UNLOCKED'
                 row.operator("clip.lock_selection_toggle", icon=icon, text="", 
depress=sc.lock_selection)

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to