diff options
author | meta-androcto <meta.androcto1@gmail.com> | 2016-08-15 15:03:40 +0300 |
---|---|---|
committer | meta-androcto <meta.androcto1@gmail.com> | 2016-08-15 15:03:40 +0300 |
commit | 259988c4aff46253d3898202de20e385500fba43 (patch) | |
tree | 220ed9e7e81955ed42753f3629271faf08064f5e /io_export_unreal_psk_psa.py | |
parent | 344ae07195a3208bd17091e588c65fdc881ccc53 (diff) |
psk io: unify change tab category
Diffstat (limited to 'io_export_unreal_psk_psa.py')
-rw-r--r-- | io_export_unreal_psk_psa.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/io_export_unreal_psk_psa.py b/io_export_unreal_psk_psa.py index dcba311f..47aea0ec 100644 --- a/io_export_unreal_psk_psa.py +++ b/io_export_unreal_psk_psa.py @@ -2653,6 +2653,33 @@ def menu_func(self, context): default_path = os.path.splitext(bpy.data.filepath)[0] + ".psk" self.layout.operator(ExportUDKAnimData.bl_idname, text="Skeleton Mesh / Animation Data (.psk/.psa)").filepath = default_path +## Addons Preferences Update Panel +def update_panel(self, context): + try: + bpy.utils.unregister_class(Panel_UDKExport) + except: + pass + Panel_UDKExport.bl_category = context.user_preferences.addons[__name__].preferences.category + bpy.utils.register_class(Panel_UDKExport) + +class PskAddonPreferences(bpy.types.AddonPreferences): + # this must match the addon name, use '__package__' + # when defining this in a submodule of a python package. + bl_idname = __name__ + + category = bpy.props.StringProperty( + name="Tab Category", + description="Choose a name for the category of the panel", + default="Import/Export", + update=update_panel) + + def draw(self, context): + + layout = self.layout + row = layout.row() + col = row.column() + col.label(text="Tab Category:") + col.prop(self, "category", text="") #=========================================================================== # Entry #=========================================================================== |