Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Rachinskiy <mikhail.rachinskiy@gmail.com>2019-10-09 18:58:36 +0300
committerMikhail Rachinskiy <mikhail.rachinskiy@gmail.com>2019-10-09 18:58:36 +0300
commit5c0205e95e15c94504834a495c232bab0d6a9ab8 (patch)
treef38dc993e47c5205fba10ada33c8011b1ae6d751 /object_print3d_utils/ui.py
parent6306134a0df1c76d289a418d891705ba5188cbe9 (diff)
3D-Print: make sure all UI panels have poll method
Diffstat (limited to 'object_print3d_utils/ui.py')
-rw-r--r--object_print3d_utils/ui.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/object_print3d_utils/ui.py b/object_print3d_utils/ui.py
index e43f5ef1..2ca771e6 100644
--- a/object_print3d_utils/ui.py
+++ b/object_print3d_utils/ui.py
@@ -31,6 +31,11 @@ class Setup:
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
+ @classmethod
+ def poll(cls, context):
+ obj = context.active_object
+ return obj is not None and obj.type == 'MESH' and obj.mode in {'OBJECT', 'EDIT'}
+
class VIEW3D_PT_print3d_analyze(Panel, Setup):
bl_label = "Analyze"
@@ -41,11 +46,6 @@ class VIEW3D_PT_print3d_analyze(Panel, Setup):
bmesh.types.BMFace: 'FACESEL',
}
- @classmethod
- def poll(cls, context):
- obj = context.active_object
- return obj is not None and obj.type == 'MESH' and obj.mode in {'OBJECT', 'EDIT'}
-
def draw_report(self, context):
layout = self.layout
info = report.info()