| 
									
										
										
										
											2009-11-01 15:21:20 +00:00
										 |  |  | # ##### BEGIN GPL LICENSE BLOCK ##### | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | #  This program is free software; you can redistribute it and/or | 
					
						
							|  |  |  | #  modify it under the terms of the GNU General Public License | 
					
						
							|  |  |  | #  as published by the Free Software Foundation; either version 2 | 
					
						
							|  |  |  | #  of the License, or (at your option) any later version. | 
					
						
							| 
									
										
										
										
											2009-11-03 07:23:02 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2009-11-01 15:21:20 +00:00
										 |  |  | #  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. | 
					
						
							| 
									
										
										
										
											2009-11-03 07:23:02 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2009-11-01 15:21:20 +00:00
										 |  |  | #  You should have received a copy of the GNU General Public License | 
					
						
							|  |  |  | #  along with this program; if not, write to the Free Software Foundation, | 
					
						
							| 
									
										
										
										
											2010-02-12 13:34:04 +00:00
										 |  |  | #  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 
					
						
							| 
									
										
										
										
											2009-11-01 15:21:20 +00:00
										 |  |  | # | 
					
						
							|  |  |  | # ##### END GPL LICENSE BLOCK ##### | 
					
						
							| 
									
										
										
										
											2009-10-31 20:16:59 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | # <pep8 compliant> | 
					
						
							| 
									
										
										
										
											2009-05-19 15:38:36 +00:00
										 |  |  | import bpy | 
					
						
							| 
									
										
										
										
											2010-01-08 08:54:41 +00:00
										 |  |  | from rna_prop_ui import PropertyPanel | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  | class ArmatureButtonsPanel(): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_space_type = 'PROPERTIES' | 
					
						
							|  |  |  |     bl_region_type = 'WINDOW' | 
					
						
							|  |  |  |     bl_context = "data" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         return context.armature | 
					
						
							| 
									
										
										
										
											2009-05-20 02:17:53 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  | class DATA_PT_context_arm(ArmatureButtonsPanel, bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "" | 
					
						
							|  |  |  |     bl_show_header = False | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         ob = context.object | 
					
						
							|  |  |  |         arm = context.armature | 
					
						
							|  |  |  |         space = context.space_data | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         split = layout.split(percentage=0.65) | 
					
						
							|  |  |  |         if ob: | 
					
						
							|  |  |  |             split.template_ID(ob, "data") | 
					
						
							|  |  |  |             split.separator() | 
					
						
							|  |  |  |         elif arm: | 
					
						
							|  |  |  |             split.template_ID(space, "pin_id") | 
					
						
							|  |  |  |             split.separator() | 
					
						
							| 
									
										
										
										
											2009-06-07 13:36:12 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  | class DATA_PT_skeleton(ArmatureButtonsPanel, bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Skeleton" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         arm = context.armature | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         layout.prop(arm, "pose_position", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Layers:") | 
					
						
							|  |  |  |         col.prop(arm, "layer", text="") | 
					
						
							|  |  |  |         col.label(text="Protected Layers:") | 
					
						
							|  |  |  |         col.prop(arm, "layer_protection", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Deform:") | 
					
						
							| 
									
										
										
										
											2010-04-26 08:55:14 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(arm, "deform_vertexgroups", text="Vertex Groups") | 
					
						
							|  |  |  |         col.prop(arm, "deform_envelope", text="Envelopes") | 
					
						
							| 
									
										
										
										
											2010-04-26 08:55:14 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(arm, "deform_quaternion", text="Quaternion") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  | class DATA_PT_display(ArmatureButtonsPanel, bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Display" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-02 04:14:17 +00:00
										 |  |  |         ob = context.object | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         arm = context.armature | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         layout.row().prop(arm, "drawtype", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-12 21:44:35 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(arm, "draw_names", text="Names") | 
					
						
							|  |  |  |         col.prop(arm, "draw_axes", text="Axes") | 
					
						
							|  |  |  |         col.prop(arm, "draw_custom_bone_shapes", text="Shapes") | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(arm, "draw_group_colors", text="Colors") | 
					
						
							| 
									
										
										
										
											2010-07-27 05:53:29 +00:00
										 |  |  |         col.prop(ob, "x_ray", text="X-Ray") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(arm, "delay_deform", text="Delay Refresh") | 
					
						
							| 
									
										
										
										
											2009-05-19 15:38:36 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  | class DATA_PT_bone_groups(ArmatureButtonsPanel, bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Bone Groups" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |         return (context.object and context.object.type == 'ARMATURE' and context.object.pose) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         ob = context.object | 
					
						
							|  |  |  |         pose = ob.pose | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							|  |  |  |         row.template_list(pose, "bone_groups", pose, "active_bone_group_index", rows=2) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = row.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-22 17:41:35 +00:00
										 |  |  |         col.active = (ob.proxy is None) | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  |         col.operator("pose.group_add", icon='ZOOMIN', text="") | 
					
						
							|  |  |  |         col.operator("pose.group_remove", icon='ZOOMOUT', text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         group = pose.active_bone_group | 
					
						
							|  |  |  |         if group: | 
					
						
							|  |  |  |             col = layout.column() | 
					
						
							| 
									
										
										
										
											2009-11-22 17:41:35 +00:00
										 |  |  |             col.active = (ob.proxy is None) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(group, "name") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-12 21:44:35 +00:00
										 |  |  |             split = layout.split() | 
					
						
							| 
									
										
										
										
											2009-11-22 17:41:35 +00:00
										 |  |  |             split.active = (ob.proxy is None) | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-12 21:44:35 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(group, "color_set") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             if group.color_set: | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |                 col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-12 21:44:35 +00:00
										 |  |  |                 col.template_triColorSet(group, "colors") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-14 03:19:19 +00:00
										 |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-22 17:41:35 +00:00
										 |  |  |         row.active = (ob.proxy is None) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-14 03:19:19 +00:00
										 |  |  |         sub = row.row(align=True) | 
					
						
							|  |  |  |         sub.operator("pose.group_assign", text="Assign") | 
					
						
							|  |  |  |         sub.operator("pose.group_unassign", text="Remove") #row.operator("pose.bone_group_remove_from", text="Remove") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         sub = row.row(align=True) | 
					
						
							|  |  |  |         sub.operator("pose.group_select", text="Select") | 
					
						
							|  |  |  |         sub.operator("pose.group_deselect", text="Deselect") | 
					
						
							| 
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-19 11:31:49 +00:00
										 |  |  | # TODO: this panel will soon be depreceated too | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  | class DATA_PT_ghost(ArmatureButtonsPanel, bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Ghost" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         arm = context.armature | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         layout.prop(arm, "ghost_type", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         sub = col.column(align=True) | 
					
						
							|  |  |  |         if arm.ghost_type == 'RANGE': | 
					
						
							| 
									
										
										
										
											2010-04-01 21:44:56 +00:00
										 |  |  |             sub.prop(arm, "ghost_frame_start", text="Start") | 
					
						
							|  |  |  |             sub.prop(arm, "ghost_frame_end", text="End") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             sub.prop(arm, "ghost_size", text="Step") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         elif arm.ghost_type == 'CURRENT_FRAME': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             sub.prop(arm, "ghost_step", text="Range") | 
					
						
							|  |  |  |             sub.prop(arm, "ghost_size", text="Step") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Display:") | 
					
						
							|  |  |  |         col.prop(arm, "ghost_only_selected", text="Selected Only") | 
					
						
							| 
									
										
										
										
											2009-05-19 15:38:36 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-16 13:27:30 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  | class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-12-14 03:01:42 +00:00
										 |  |  |     bl_label = "iTaSC parameters" | 
					
						
							|  |  |  |     bl_default_closed = True | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2009-12-14 03:01:42 +00:00
										 |  |  |         ob = context.object | 
					
						
							|  |  |  |         return (ob and ob.pose) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         ob = context.object | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         itasc = ob.pose.ik_param | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							|  |  |  |         row.prop(ob.pose, "ik_solver") | 
					
						
							| 
									
										
										
										
											2009-12-26 09:36:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-17 13:14:29 +00:00
										 |  |  |         if itasc: | 
					
						
							|  |  |  |             layout.prop(itasc, "mode", expand=True) | 
					
						
							|  |  |  |             simulation = (itasc.mode == 'SIMULATION') | 
					
						
							|  |  |  |             if simulation: | 
					
						
							|  |  |  |                 layout.label(text="Reiteration:") | 
					
						
							|  |  |  |                 layout.prop(itasc, "reiteration", expand=True) | 
					
						
							| 
									
										
										
										
											2009-12-14 03:01:42 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-17 13:14:29 +00:00
										 |  |  |             split = layout.split() | 
					
						
							|  |  |  |             split.active = not simulation or itasc.reiteration != 'NEVER' | 
					
						
							| 
									
										
										
										
											2009-12-14 03:01:42 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-12-17 13:14:29 +00:00
										 |  |  |             col.prop(itasc, "precision") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-12-17 13:14:29 +00:00
										 |  |  |             col.prop(itasc, "num_iter") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             if simulation: | 
					
						
							|  |  |  |                 layout.prop(itasc, "auto_step") | 
					
						
							|  |  |  |                 row = layout.row() | 
					
						
							|  |  |  |                 if itasc.auto_step: | 
					
						
							|  |  |  |                     row.prop(itasc, "min_step", text="Min") | 
					
						
							|  |  |  |                     row.prop(itasc, "max_step", text="Max") | 
					
						
							|  |  |  |                 else: | 
					
						
							|  |  |  |                     row.prop(itasc, "num_step") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             layout.prop(itasc, "solver") | 
					
						
							|  |  |  |             if simulation: | 
					
						
							|  |  |  |                 layout.prop(itasc, "feedback") | 
					
						
							|  |  |  |                 layout.prop(itasc, "max_velocity") | 
					
						
							|  |  |  |             if itasc.solver == 'DLS': | 
					
						
							|  |  |  |                 row = layout.row() | 
					
						
							|  |  |  |                 row.prop(itasc, "dampmax", text="Damp", slider=True) | 
					
						
							|  |  |  |                 row.prop(itasc, "dampeps", text="Eps", slider=True) | 
					
						
							| 
									
										
										
										
											2009-12-14 03:01:42 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  | from properties_animviz import MotionPathButtonsPanel, OnionSkinButtonsPanel | 
					
						
							| 
									
										
										
										
											2010-02-25 12:01:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  | class DATA_PT_motion_paths(MotionPathButtonsPanel, bpy.types.Panel): | 
					
						
							|  |  |  |     #bl_label = "Bones Motion Paths" | 
					
						
							|  |  |  |     bl_context = "data" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  |         # XXX: include posemode check? | 
					
						
							|  |  |  |         return (context.object) and (context.armature) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         ob = context.object | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         self.draw_settings(context, ob.pose.animation_visualisation, bones=True) | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2010-02-14 11:21:21 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							|  |  |  |         col.operator("pose.paths_calculate", text="Calculate Paths") | 
					
						
							| 
									
										
										
										
											2010-02-25 12:01:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  |         col.operator("pose.paths_clear", text="Clear Paths") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class DATA_PT_onion_skinning(OnionSkinButtonsPanel): #, bpy.types.Panel): # inherit from panel when ready | 
					
						
							|  |  |  |     #bl_label = "Bones Onion Skinning" | 
					
						
							|  |  |  |     bl_context = "data" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  |         # XXX: include posemode check? | 
					
						
							|  |  |  |         return (context.object) and (context.armature) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         ob = context.object | 
					
						
							| 
									
										
										
										
											2010-02-14 11:21:21 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         self.draw_settings(context, ob.pose.animation_visualisation, bones=True) | 
					
						
							| 
									
										
										
										
											2010-02-22 23:32:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-12 19:36:10 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | class DATA_PT_custom_props_arm(ArmatureButtonsPanel, PropertyPanel, bpy.types.Panel): | 
					
						
							|  |  |  |     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} | 
					
						
							|  |  |  |     _context_path = "object.data" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-14 11:21:21 +00:00
										 |  |  | def register(): | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  |     pass | 
					
						
							| 
									
										
										
										
											2010-02-14 11:21:21 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-22 23:32:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-14 11:21:21 +00:00
										 |  |  | def unregister(): | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  |     pass | 
					
						
							| 
									
										
										
										
											2010-02-16 09:55:07 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if __name__ == "__main__": | 
					
						
							|  |  |  |     register() |