[Bf-extensions-cvs] [e264efb] master: Mocap Tools: context sensitive panels (armature selected) T50357
meta-androcto
noreply at git.blender.org
Mon Jan 16 12:31:06 CET 2017
Commit: e264efb7e8424d300d49fe99d87f9f279d40fe09
Author: meta-androcto
Date: Mon Jan 16 22:30:34 2017 +1100
Branches: master
https://developer.blender.org/rBAe264efb7e8424d300d49fe99d87f9f279d40fe09
Mocap Tools: context sensitive panels (armature selected) T50357
===================================================================
M mocap/__init__.py
===================================================================
diff --git a/mocap/__init__.py b/mocap/__init__.py
index 729848e..27b166a 100644
--- a/mocap/__init__.py
+++ b/mocap/__init__.py
@@ -23,7 +23,7 @@ bl_info = {
"author": "Benjy Cook",
"blender": (2, 73, 0),
"version": (1, 1, 1),
- "location": "Object UI > Mocap tools",
+ "location": "Active Armature > Object Properties > Mocap tools",
"description": "Various tools for working with motion capture animation",
"warning": "",
"wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
@@ -269,6 +269,13 @@ class MocapPanel(bpy.types.Panel):
bl_region_type = "WINDOW"
bl_context = "object"
+ @classmethod
+ def poll(cls, context):
+ obj = context.object
+ return obj.type == 'ARMATURE' and context.active_object is not None and context.mode in {'EDIT_ARMATURE',
+ 'POSE',
+ 'OBJECT'}
+
def draw(self, context):
layout = self.layout
@@ -349,6 +356,14 @@ class MocapConstraintsPanel(bpy.types.Panel):
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "object"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ obj = context.object
+ return obj.type == 'ARMATURE' and context.active_object is not None and context.mode in {'EDIT_ARMATURE',
+ 'POSE',
+ 'OBJECT'}
def draw(self, context):
layout = self.layout
@@ -405,7 +420,14 @@ class ExtraToolsPanel(bpy.types.Panel):
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "object"
+ bl_options = {'DEFAULT_CLOSED'}
+ @classmethod
+ def poll(cls, context):
+ obj = context.object
+ return obj.type == 'ARMATURE' and context.active_object is not None and context.mode in {'EDIT_ARMATURE',
+ 'POSE',
+ 'OBJECT'}
def draw(self, context):
layout = self.layout
layout.operator("mocap.samples", text='Samples to Beziers')
More information about the Bf-extensions-cvs
mailing list