Tools: Only show cursor tool in wpaint mode when a pose object exists
authorCampbell Barton <ideasman42@gmail.com>
Mon, 11 Mar 2019 23:51:04 +0000 (10:51 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 11 Mar 2019 23:54:39 +0000 (10:54 +1100)
release/scripts/startup/bl_ui/space_toolsystem_toolbar.py

index a7f555288ad931ade6317d2d2bca93ab8de8e756..cc17f6cfbe811d0672ae3414c08be7960ddaa633 100644 (file)
@@ -1748,8 +1748,11 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
             _defs_weight_paint.sample_weight_group,
             ),
             None,
-            # TODO, check for mixed pose mode
-            _defs_view3d_generic.cursor,
+            lambda context: (
+                (_defs_view3d_generic.cursor,)
+                if context.pose_object
+                else ()
+            ),
             None,
             lambda context: (
                 VIEW3D_PT_tools_active._tools_select