# Path: prop/operators.py
# class KSPMU_OT_ImportProp(bpy.types.Operator, ImportHelper):
#     '''Load a KSP Mu (.mu) File as a Prop'''
#     bl_idname = "import_object.ksp_mu_prop"
#     bl_label = "Import Mu Prop"
#     bl_description = """Import a KSP .mu model as a prop."""
#     bl_options = {'REGISTER', 'UNDO'}
# 
#     filename_ext = ".cfg"
#     filter_glob: StringProperty(default="*.cfg", options={'HIDDEN'})
# 
#     def execute(self, context):
#         keywords = self.as_keywords (ignore=("filter_glob",))
#         return import_prop_op(self, context, **keywords)
# 
# class KSPMU_OT_MakeProps(bpy.types.Operator):
#     bl_idname = "object.make_ksp_props"
#     bl_label = "Make KSP Props"
#     bl_description = """Make KSP props from selected objects."""
#     bl_options = {'REGISTER', 'UNDO'}
# 
#     def execute(self, context):
#         return make_props(self, context)


import os
import bpy
from .operators import KSPMU_OT_ImportProp, KSPMU_OT_MakeProps
#  as published by the Free Software Foundation; either version 2
#  of the License, or (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software Foundation,
#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####

# <pep8 compliant>




class WORKSPACE_PT_tools_mu_props(bpy.types.Panel):
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = "Tool"
    bl_context = ".objectmode"
    bl_label = "Prop Tools"

    def draw(self, context):
        layout = self.layout
        #col = layout.column(align=True)
        layout.operator(KSPMU_OT_ImportProp.bl_idname, text = KSPMU_OT_ImportProp.bl_description);

# Path: prop/operators.py
# class KSPMU_OT_ImportProp(bpy.types.Operator, ImportHelper):
#     '''Load a KSP Mu (.mu) File as a Prop'''
#     bl_idname = "import_object.ksp_mu_prop"
#     bl_label = "Import Mu Prop"
#     bl_description = """Import a KSP .mu model as a prop."""
#     bl_options = {'REGISTER', 'UNDO'}
# 
#     filename_ext = ".cfg"
#     filter_glob: StringProperty(default="*.cfg", options={'HIDDEN'})
# 
#     def execute(self, context):
#         keywords = self.as_keywords (ignore=("filter_glob",))
#         return import_prop_op(self, context, **keywords)
# 
# class KSPMU_OT_MakeProps(bpy.types.Operator):
#     bl_idname = "object.make_ksp_props"
#     bl_label = "Make KSP Props"
#     bl_description = """Make KSP props from selected objects."""
#     bl_options = {'REGISTER', 'UNDO'}
# 
#     def execute(self, context):
#         return make_props(self, context)


# Path: prop/panels.py
import os
import bpy
from .operators import KSPMU_OT_ImportProp, KSPMU_OT_MakeProps

#  as published by the Free Software Foundation; either version 2
#  of the License, or (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software Foundation,
#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####

# <pep8 compliant>




class WORKSPACE_PT_tools_mu_props(bpy.types.Panel):
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = "Tool"
    bl_context = ".objectmode"
    bl_label = "Prop Tools"

    def draw(self, context):
        layout = self.layout
        #col = layout.column(align=True)
        layout.operator(KSPMU_OT_ImportProp.bl_idname, text = KSPMU_OT_ImportProp.bl_description);

        layout.operator(KSPMU_OT_MakeProps.bl_idname, text = KSPMU_OT_MakeProps.bl_description);