[Bf-extensions-cvs] [259988c] master: psk io: unify change tab category
meta-androcto
noreply at git.blender.org
Mon Aug 15 14:04:01 CEST 2016
Commit: 259988c4aff46253d3898202de20e385500fba43
Author: meta-androcto
Date: Mon Aug 15 22:03:40 2016 +1000
Branches: master
https://developer.blender.org/rBA259988c4aff46253d3898202de20e385500fba43
psk io: unify change tab category
===================================================================
M io_export_unreal_psk_psa.py
===================================================================
diff --git a/io_export_unreal_psk_psa.py b/io_export_unreal_psk_psa.py
index dcba311..47aea0e 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
#===========================================================================
More information about the Bf-extensions-cvs
mailing list