[Bf-extensions-cvs] [abbd6b0a] blender2.8: disable when in edit mode.
Kalle-Samuli Riihikoski
noreply at git.blender.org
Mon Dec 10 01:17:11 CET 2018
Commit: abbd6b0a89cf4188b0196ea173324651d35186e1
Author: Kalle-Samuli Riihikoski
Date: Mon Dec 10 02:13:49 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBAabbd6b0a89cf4188b0196ea173324651d35186e1
disable when in edit mode.
===================================================================
M io_coat3D/__init__.py
===================================================================
diff --git a/io_coat3D/__init__.py b/io_coat3D/__init__.py
index 02c2848d..f1b408e4 100644
--- a/io_coat3D/__init__.py
+++ b/io_coat3D/__init__.py
@@ -857,6 +857,13 @@ class SCENE_PT_Main(bpy.types.Panel):
bl_region_type = "UI"
bl_category = 'View'
+ @classmethod
+ def poll(cls, context):
+ if bpy.context.mode == 'OBJECT':
+ return True
+ else:
+ return False
+
def draw(self, context):
layout = self.layout
coat = bpy.coat3D
@@ -874,6 +881,7 @@ class SCENE_PT_Main(bpy.types.Panel):
row.operator("update_exchange_folder.pilgway_3d_coat", text="Apply folder")
else:
+
#Here you add your GUI
row = layout.row()
row.prop(coat3D,"type",text = "")
@@ -885,6 +893,9 @@ class SCENE_PT_Main(bpy.types.Panel):
col = flow.column()
col.operator("import_applink.pilgway_3d_coat", text="Update")
+
+
+
class ObjectButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
More information about the Bf-extensions-cvs
mailing list