From cc8f5dce95bb41a54ba4f0393720bb82ed424052 Mon Sep 17 00:00:00 2001
From: Nathan Vegdahl <cessen@cessen.com>
Date: Wed, 24 Apr 2013 00:11:45 +0000
Subject: [PATCH] Rigify bugfix: dev tools panel was displayed regardless of
 mode.

Thanks to Sanc Tuary for the bug report! Bug #35040
---
 rigify/ui.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/rigify/ui.py b/rigify/ui.py
index e95e47748..0e34ba420 100644
--- a/rigify/ui.py
+++ b/rigify/ui.py
@@ -202,6 +202,10 @@ class VIEW3D_PT_tools_rigify_dev(bpy.types.Panel):
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'TOOLS'
 
+    @classmethod
+    def poll(cls, context):
+        return context.mode == 'EDIT_ARMATURE' or context.mode == 'EDIT_MESH'
+
     def draw(self, context):
         obj = context.active_object
         if obj != None:
-- 
GitLab