diff options
author | Kalle-Samuli Riihikoski <haikalle@gmail.com> | 2018-12-10 03:13:49 +0300 |
---|---|---|
committer | Kalle-Samuli Riihikoski <haikalle@gmail.com> | 2018-12-10 03:13:49 +0300 |
commit | abbd6b0a89cf4188b0196ea173324651d35186e1 (patch) | |
tree | d3ea923e8084b6e7fbbdba5b32f738c62ecf6155 | |
parent | cd22ea98050651f2fb32b7883ab72a0695f7b53f (diff) |
disable when in edit mode.
-rw-r--r-- | io_coat3D/__init__.py | 11 |
1 files changed, 11 insertions, 0 deletions
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' |