[Bf-extensions-cvs] [344ae07] master: animall: unify change tab category
meta-androcto
noreply at git.blender.org
Mon Aug 15 13:50:19 CEST 2016
Commit: 344ae07195a3208bd17091e588c65fdc881ccc53
Author: meta-androcto
Date: Mon Aug 15 21:49:58 2016 +1000
Branches: master
https://developer.blender.org/rBA344ae07195a3208bd17091e588c65fdc881ccc53
animall: unify change tab category
===================================================================
M animation_animall.py
===================================================================
diff --git a/animation_animall.py b/animation_animall.py
index 25fb9bd..9a4abb7 100644
--- a/animation_animall.py
+++ b/animation_animall.py
@@ -470,6 +470,34 @@ class ANIM_OT_clear_animation_animall(bpy.types.Operator):
return {'FINISHED'}
+## Addons Preferences Update Panel
+def update_panel(self, context):
+ try:
+ bpy.utils.unregister_class(VIEW3D_PT_animall)
+ except:
+ pass
+ VIEW3D_PT_animall.bl_category = context.user_preferences.addons[__name__].preferences.category
+ bpy.utils.register_class(VIEW3D_PT_animall)
+
+
+class AnimallAddonPreferences(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="Animation",
+ 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="")
def register():
bpy.utils.register_module(__name__)
More information about the Bf-extensions-cvs
mailing list