| 
									
										
										
										
											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-27 00:03:49 +00:00
										 |  |  | import bpy | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-05-16 10:21:00 +00:00
										 |  |  | narrowui = bpy.context.user_preferences.view.properties_width_check | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | class ConstraintButtonsPanel(bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_space_type = 'PROPERTIES' | 
					
						
							|  |  |  |     bl_region_type = 'WINDOW' | 
					
						
							|  |  |  |     bl_context = "constraint" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw_constraint(self, context, con): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         box = layout.template_constraint(con) | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         wide_ui = context.region.width > narrowui | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if box: | 
					
						
							|  |  |  |             # match enum type to our functions, avoids a lookup table. | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |             getattr(self, con.type)(context, box, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-04-23 05:14:00 +00:00
										 |  |  |             if con.type not in ('RIGID_BODY_JOINT', 'NULL'): | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 box.prop(con, "influence") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def space_template(self, layout, con, wide_ui, target=True, owner=True): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         if target or owner: | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             split = layout.split(percentage=0.2) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |             if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 split.label(text="Space:") | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |                 row = split.row() | 
					
						
							|  |  |  |             else: | 
					
						
							|  |  |  |                 row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             if target: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 row.prop(con, "target_space", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |             if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |                 if target and owner: | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  |                     row.label(icon='ARROW_LEFTRIGHT') | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             else: | 
					
						
							|  |  |  |                 row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             if owner: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 row.prop(con, "owner_space", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def target_template(self, layout, con, wide_ui, subtargets=True): | 
					
						
							|  |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.prop(con, "target") # XXX limiting settings for only 'curves' or some type of object | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         else: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.prop(con, "target", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if con.target and subtargets: | 
					
						
							|  |  |  |             if con.target.type == 'ARMATURE': | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |                 if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 |  |  |                     layout.prop_object(con, "subtarget", con.target.data, "bones", text="Bone") | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |                 else: | 
					
						
							| 
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 |  |  |                     layout.prop_object(con, "subtarget", con.target.data, "bones", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-28 03:45:40 +00:00
										 |  |  |                 if con.type in ('COPY_LOCATION', 'STRETCH_TO', 'TRACK_TO'): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                     row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                     row.label(text="Head/Tail:") | 
					
						
							|  |  |  |                     row.prop(con, "head_tail", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             elif con.target.type in ('MESH', 'LATTICE'): | 
					
						
							| 
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 |  |  |                 layout.prop_object(con, "subtarget", con.target, "vertex_groups", text="Vertex Group") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def ik_template(self, layout, con, wide_ui): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         # only used for iTaSC | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.prop(con, "pole_target") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if con.pole_target and con.pole_target.type == 'ARMATURE': | 
					
						
							| 
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 |  |  |             layout.prop_object(con, "pole_subtarget", con.pole_target.data, "bones", text="Bone") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if con.pole_target: | 
					
						
							|  |  |  |             row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label() | 
					
						
							|  |  |  |             row.prop(con, "pole_angle") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split(percentage=0.33) | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2010-03-07 09:53:59 +00:00
										 |  |  |         col.prop(con, "use_tail") | 
					
						
							|  |  |  |         col.prop(con, "use_stretch") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "chain_length") | 
					
						
							| 
									
										
										
										
											2010-03-07 09:53:59 +00:00
										 |  |  |         col.prop(con, "use_target") | 
					
						
							| 
									
										
										
										
											2009-11-07 22:07:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def CHILD_OF(self, context, layout, con, wide_ui): | 
					
						
							|  |  |  |         self.target_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											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="Location:") | 
					
						
							| 
									
										
										
										
											2009-11-26 18:45:08 +00:00
										 |  |  |         col.prop(con, "use_location_x", text="X") | 
					
						
							|  |  |  |         col.prop(con, "use_location_y", text="Y") | 
					
						
							|  |  |  |         col.prop(con, "use_location_z", text="Z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Rotation:") | 
					
						
							| 
									
										
										
										
											2009-11-26 18:45:08 +00:00
										 |  |  |         col.prop(con, "use_rotation_x", text="X") | 
					
						
							|  |  |  |         col.prop(con, "use_rotation_y", text="Y") | 
					
						
							|  |  |  |         col.prop(con, "use_rotation_z", text="Z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Scale:") | 
					
						
							| 
									
										
										
										
											2009-11-26 18:45:08 +00:00
										 |  |  |         col.prop(con, "use_scale_x", text="X") | 
					
						
							|  |  |  |         col.prop(con, "use_scale_y", text="Y") | 
					
						
							|  |  |  |         col.prop(con, "use_scale_z", text="Z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.operator("constraint.childof_set_inverse") | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.operator("constraint.childof_clear_inverse") | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def TRACK_TO(self, context, layout, con, wide_ui): | 
					
						
							|  |  |  |         self.target_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label(text="To:") | 
					
						
							|  |  |  |         row.prop(con, "track", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "up", text="Up") | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "target_z") | 
					
						
							| 
									
										
										
										
											2009-11-07 22:07:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         self.space_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def IK(self, context, layout, con, wide_ui): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         if context.object.pose.ik_solver == "ITASC": | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.prop(con, "ik_type") | 
					
						
							| 
									
										
										
										
											2009-11-22 22:42:57 +00:00
										 |  |  |             getattr(self, 'IK_' + con.ik_type)(context, layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         else: | 
					
						
							|  |  |  |             # Legacy IK constraint | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |             self.target_template(layout, con, wide_ui) | 
					
						
							|  |  |  |             if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 layout.prop(con, "pole_target") | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             else: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 layout.prop(con, "pole_target", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             if con.pole_target and con.pole_target.type == 'ARMATURE': | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |                 if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 |  |  |                     layout.prop_object(con, "pole_subtarget", con.pole_target.data, "bones", text="Bone") | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |                 else: | 
					
						
							| 
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 |  |  |                     layout.prop_object(con, "pole_subtarget", con.pole_target.data, "bones", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             if con.pole_target: | 
					
						
							|  |  |  |                 row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 row.prop(con, "pole_angle") | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |                 if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                     row.label() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             split = layout.split() | 
					
						
							|  |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(con, "iterations") | 
					
						
							|  |  |  |             col.prop(con, "chain_length") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.label(text="Weight:") | 
					
						
							|  |  |  |             col.prop(con, "weight", text="Position", slider=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             sub = col.column() | 
					
						
							| 
									
										
										
										
											2009-11-25 15:00:29 +00:00
										 |  |  |             sub.active = con.use_rotation | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             sub.prop(con, "orient_weight", text="Rotation", slider=True) | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |             if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |                 col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-25 15:00:29 +00:00
										 |  |  |             col.prop(con, "use_tail") | 
					
						
							|  |  |  |             col.prop(con, "use_stretch") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.separator() | 
					
						
							| 
									
										
										
										
											2009-11-25 15:00:29 +00:00
										 |  |  |             col.prop(con, "use_target") | 
					
						
							|  |  |  |             col.prop(con, "use_rotation") | 
					
						
							| 
									
										
										
										
											2009-11-07 22:07:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def IK_COPY_POSE(self, context, layout, con, wide_ui): | 
					
						
							|  |  |  |         self.target_template(layout, con, wide_ui) | 
					
						
							|  |  |  |         self.ik_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.label(text="Axis Ref:") | 
					
						
							|  |  |  |         row.prop(con, "axis_reference", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         split = layout.split(percentage=0.33) | 
					
						
							| 
									
										
										
										
											2010-03-07 09:53:59 +00:00
										 |  |  |         split.row().prop(con, "use_position") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         row = split.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.prop(con, "weight", text="Weight", slider=True) | 
					
						
							| 
									
										
										
										
											2010-03-07 09:53:59 +00:00
										 |  |  |         row.active = con.use_position | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         split = layout.split(percentage=0.33) | 
					
						
							|  |  |  |         row = split.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.label(text="Lock:") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         row = split.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.prop(con, "pos_lock_x", text="X") | 
					
						
							|  |  |  |         row.prop(con, "pos_lock_y", text="Y") | 
					
						
							|  |  |  |         row.prop(con, "pos_lock_z", text="Z") | 
					
						
							| 
									
										
										
										
											2009-11-25 15:00:29 +00:00
										 |  |  |         split.active = con.use_position | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split(percentage=0.33) | 
					
						
							| 
									
										
										
										
											2010-03-07 09:53:59 +00:00
										 |  |  |         split.row().prop(con, "use_rotation") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         row = split.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.prop(con, "orient_weight", text="Weight", slider=True) | 
					
						
							| 
									
										
										
										
											2009-11-25 15:00:29 +00:00
										 |  |  |         row.active = con.use_rotation | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         split = layout.split(percentage=0.33) | 
					
						
							|  |  |  |         row = split.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.label(text="Lock:") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         row = split.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.prop(con, "rot_lock_x", text="X") | 
					
						
							|  |  |  |         row.prop(con, "rot_lock_y", text="Y") | 
					
						
							|  |  |  |         row.prop(con, "rot_lock_z", text="Z") | 
					
						
							| 
									
										
										
										
											2009-11-25 15:00:29 +00:00
										 |  |  |         split.active = con.use_rotation | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def IK_DISTANCE(self, context, layout, con, wide_ui): | 
					
						
							|  |  |  |         self.target_template(layout, con, wide_ui) | 
					
						
							|  |  |  |         self.ik_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.prop(con, "limit_mode") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.prop(con, "weight", text="Weight", slider=True) | 
					
						
							|  |  |  |         row.prop(con, "distance", text="Distance", slider=True) | 
					
						
							| 
									
										
										
										
											2009-11-07 22:07:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def FOLLOW_PATH(self, context, layout, con, wide_ui): | 
					
						
							|  |  |  |         self.target_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "use_curve_follow") | 
					
						
							|  |  |  |         col.prop(con, "use_curve_radius") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "use_fixed_position") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         if con.use_fixed_position: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(con, "offset_factor", text="Offset") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         else: | 
					
						
							| 
									
										
										
										
											2009-11-29 02:14:34 +00:00
										 |  |  |             col.prop(con, "offset") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label(text="Forward:") | 
					
						
							|  |  |  |         row.prop(con, "forward", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.prop(con, "up", text="Up") | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def LIMIT_ROTATION(self, context, layout, con, wide_ui): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         col = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "use_limit_x") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							|  |  |  |         sub.active = con.use_limit_x | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "minimum_x", text="Min") | 
					
						
							|  |  |  |         sub.prop(con, "maximum_x", text="Max") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             col = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "use_limit_y") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							|  |  |  |         sub.active = con.use_limit_y | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "minimum_y", text="Min") | 
					
						
							|  |  |  |         sub.prop(con, "maximum_y", text="Max") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             col = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "use_limit_z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							|  |  |  |         sub.active = con.use_limit_z | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "minimum_z", text="Min") | 
					
						
							|  |  |  |         sub.prop(con, "maximum_z", text="Max") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.prop(con, "limit_transform") | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label(text="Convert:") | 
					
						
							|  |  |  |         row.prop(con, "owner_space", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def LIMIT_LOCATION(self, context, layout, con, wide_ui): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "use_minimum_x") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							|  |  |  |         sub.active = con.use_minimum_x | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "minimum_x", text="") | 
					
						
							|  |  |  |         col.prop(con, "use_maximum_x") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							|  |  |  |         sub.active = con.use_maximum_x | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "maximum_x", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "use_minimum_y") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							|  |  |  |         sub.active = con.use_minimum_y | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "minimum_y", text="") | 
					
						
							|  |  |  |         col.prop(con, "use_maximum_y") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							|  |  |  |         sub.active = con.use_maximum_y | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "maximum_y", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "use_minimum_z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							|  |  |  |         sub.active = con.use_minimum_z | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "minimum_z", text="") | 
					
						
							|  |  |  |         col.prop(con, "use_maximum_z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							|  |  |  |         sub.active = con.use_maximum_z | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "maximum_z", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.prop(con, "limit_transform") | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label(text="Convert:") | 
					
						
							|  |  |  |         row.prop(con, "owner_space", text="") | 
					
						
							| 
									
										
										
										
											2009-11-07 22:07:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def LIMIT_SCALE(self, context, layout, con, wide_ui): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "use_minimum_x") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							|  |  |  |         sub.active = con.use_minimum_x | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "minimum_x", text="") | 
					
						
							|  |  |  |         col.prop(con, "use_maximum_x") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							|  |  |  |         sub.active = con.use_maximum_x | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "maximum_x", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "use_minimum_y") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							|  |  |  |         sub.active = con.use_minimum_y | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "minimum_y", text="") | 
					
						
							|  |  |  |         col.prop(con, "use_maximum_y") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							|  |  |  |         sub.active = con.use_maximum_y | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "maximum_y", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "use_minimum_z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							|  |  |  |         sub.active = con.use_minimum_z | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "minimum_z", text="") | 
					
						
							|  |  |  |         col.prop(con, "use_maximum_z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							|  |  |  |         sub.active = con.use_maximum_z | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "maximum_z", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.prop(con, "limit_transform") | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label(text="Convert:") | 
					
						
							|  |  |  |         row.prop(con, "owner_space", text="") | 
					
						
							| 
									
										
										
										
											2009-11-07 22:07:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def COPY_ROTATION(self, context, layout, con, wide_ui): | 
					
						
							|  |  |  |         self.target_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-26 17:54:16 +00:00
										 |  |  |         col.prop(con, "use_x", text="X") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2009-11-26 17:54:16 +00:00
										 |  |  |         sub.active = con.use_x | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "invert_x", text="Invert") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-26 17:54:16 +00:00
										 |  |  |         col.prop(con, "use_y", text="Y") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2009-11-26 17:54:16 +00:00
										 |  |  |         sub.active = con.use_y | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "invert_y", text="Invert") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-26 17:54:16 +00:00
										 |  |  |         col.prop(con, "use_z", text="Z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2009-11-26 17:54:16 +00:00
										 |  |  |         sub.active = con.use_z | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "invert_z", text="Invert") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-25 15:00:29 +00:00
										 |  |  |         layout.prop(con, "use_offset") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         self.space_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-11-07 22:07:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def COPY_LOCATION(self, context, layout, con, wide_ui): | 
					
						
							|  |  |  |         self.target_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-26 17:54:16 +00:00
										 |  |  |         col.prop(con, "use_x", text="X") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2009-11-26 17:54:16 +00:00
										 |  |  |         sub.active = con.use_x | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "invert_x", text="Invert") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-26 17:54:16 +00:00
										 |  |  |         col.prop(con, "use_y", text="Y") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2009-11-26 17:54:16 +00:00
										 |  |  |         sub.active = con.use_y | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "invert_y", text="Invert") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-26 17:54:16 +00:00
										 |  |  |         col.prop(con, "use_z", text="Z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2009-11-26 17:54:16 +00:00
										 |  |  |         sub.active = con.use_z | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "invert_z", text="Invert") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-25 15:00:29 +00:00
										 |  |  |         layout.prop(con, "use_offset") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         self.space_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def COPY_SCALE(self, context, layout, con, wide_ui): | 
					
						
							|  |  |  |         self.target_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-26 17:54:16 +00:00
										 |  |  |         row.prop(con, "use_x", text="X") | 
					
						
							|  |  |  |         row.prop(con, "use_y", text="Y") | 
					
						
							|  |  |  |         row.prop(con, "use_z", text="Z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-25 15:00:29 +00:00
										 |  |  |         layout.prop(con, "use_offset") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         self.space_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-03-16 12:55:56 +00:00
										 |  |  |     def MAINTAIN_VOLUME(self, context, layout, con, wide_ui): | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							|  |  |  |         if wide_ui: | 
					
						
							|  |  |  |             row.label(text="Free:") | 
					
						
							|  |  |  |         row.prop(con, "axis", expand=True) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.prop(con, "volume") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         self.space_template(layout, con, wide_ui) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-02 04:14:17 +00:00
										 |  |  |     def COPY_TRANSFORMS(self, context, layout, con, wide_ui): | 
					
						
							|  |  |  |         self.target_template(layout, con, wide_ui) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         self.space_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     #def SCRIPT(self, context, layout, con): | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def ACTION(self, context, layout, con, wide_ui): | 
					
						
							|  |  |  |         self.target_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.prop(con, "action") | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         else: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.prop(con, "action", text="") | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.prop(con, "transform_channel") | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         else: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.prop(con, "transform_channel", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Action Length:") | 
					
						
							| 
									
										
										
										
											2010-04-01 21:44:56 +00:00
										 |  |  |         col.prop(con, "frame_start", text="Start") | 
					
						
							|  |  |  |         col.prop(con, "frame_end", text="End") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             col = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Target Range:") | 
					
						
							|  |  |  |         col.prop(con, "minimum", text="Min") | 
					
						
							|  |  |  |         col.prop(con, "maximum", text="Max") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label(text="Convert:") | 
					
						
							|  |  |  |         row.prop(con, "target_space", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def LOCKED_TRACK(self, context, layout, con, wide_ui): | 
					
						
							|  |  |  |         self.target_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label(text="To:") | 
					
						
							|  |  |  |         row.prop(con, "track", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label(text="Lock:") | 
					
						
							|  |  |  |         row.prop(con, "locked", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def LIMIT_DISTANCE(self, context, layout, con, wide_ui): | 
					
						
							|  |  |  |         self.target_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |         col = layout.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "distance") | 
					
						
							|  |  |  |         col.operator("constraint.limitdistance_reset") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.label(text="Clamp Region:") | 
					
						
							|  |  |  |         row.prop(con, "limit_mode", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def STRETCH_TO(self, context, layout, con, wide_ui): | 
					
						
							|  |  |  |         self.target_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "original_length", text="Rest Length") | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.operator("constraint.stretchto_reset", text="Reset") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = layout.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "bulge", text="Volume Variation") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label(text="Volume:") | 
					
						
							|  |  |  |         row.prop(con, "volume", expand=True) | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if not wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.label(text="Plane:") | 
					
						
							|  |  |  |         row.prop(con, "keep_axis", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def FLOOR(self, context, layout, con, wide_ui): | 
					
						
							|  |  |  |         self.target_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "sticky") | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "use_rotation") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.prop(con, "offset") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label(text="Min/Max:") | 
					
						
							|  |  |  |         row.prop(con, "floor_location", expand=True) | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-30 10:29:26 +00:00
										 |  |  |         self.space_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def RIGID_BODY_JOINT(self, context, layout, con, wide_ui): | 
					
						
							|  |  |  |         self.target_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.prop(con, "pivot_type") | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         else: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.prop(con, "pivot_type", text="") | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.prop(con, "child") | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         else: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.prop(con, "child", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "disable_linked_collision", text="No Collision") | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "draw_pivot", text="Display Pivot") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Pivot:") | 
					
						
							|  |  |  |         col.prop(con, "pivot_x", text="X") | 
					
						
							|  |  |  |         col.prop(con, "pivot_y", text="Y") | 
					
						
							|  |  |  |         col.prop(con, "pivot_z", text="Z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             col = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Axis:") | 
					
						
							|  |  |  |         col.prop(con, "axis_x", text="X") | 
					
						
							|  |  |  |         col.prop(con, "axis_y", text="Y") | 
					
						
							|  |  |  |         col.prop(con, "axis_z", text="Z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         #Missing: Limit arrays (not wrapped in RNA yet) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def CLAMP_TO(self, context, layout, con, wide_ui): | 
					
						
							|  |  |  |         self.target_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label(text="Main Axis:") | 
					
						
							|  |  |  |         row.prop(con, "main_axis", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.prop(con, "cyclic") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def TRANSFORM(self, context, layout, con, wide_ui): | 
					
						
							|  |  |  |         self.target_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.prop(con, "extrapolate_motion", text="Extrapolate") | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         col = layout.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.row().label(text="Source:") | 
					
						
							|  |  |  |         col.row().prop(con, "map_from", expand=True) | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         sub = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.label(text="X:") | 
					
						
							|  |  |  |         sub.prop(con, "from_min_x", text="Min") | 
					
						
							|  |  |  |         sub.prop(con, "from_max_x", text="Max") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             sub = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.label(text="Y:") | 
					
						
							|  |  |  |         sub.prop(con, "from_min_y", text="Min") | 
					
						
							|  |  |  |         sub.prop(con, "from_max_y", text="Max") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             sub = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.label(text="Z:") | 
					
						
							|  |  |  |         sub.prop(con, "from_min_z", text="Min") | 
					
						
							|  |  |  |         sub.prop(con, "from_max_z", text="Max") | 
					
						
							| 
									
										
										
										
											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="Destination:") | 
					
						
							|  |  |  |         col.row().prop(con, "map_to", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="X:") | 
					
						
							|  |  |  |         col.row().prop(con, "map_to_x_from", expand=True) | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         sub = col.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "to_min_x", text="Min") | 
					
						
							|  |  |  |         sub.prop(con, "to_max_x", text="Max") | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Y:") | 
					
						
							|  |  |  |         col.row().prop(con, "map_to_y_from", expand=True) | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         sub = col.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "to_min_y", text="Min") | 
					
						
							|  |  |  |         sub.prop(con, "to_max_y", text="Max") | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Z:") | 
					
						
							|  |  |  |         col.row().prop(con, "map_to_z_from", expand=True) | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         sub = col.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(con, "to_min_z", text="Min") | 
					
						
							|  |  |  |         sub.prop(con, "to_max_z", text="Max") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         self.space_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def SHRINKWRAP(self, context, layout, con, wide_ui): | 
					
						
							|  |  |  |         self.target_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.prop(con, "distance") | 
					
						
							|  |  |  |         layout.prop(con, "shrinkwrap_type") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if con.shrinkwrap_type == 'PROJECT': | 
					
						
							|  |  |  |             row = layout.row(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-26 18:45:08 +00:00
										 |  |  |             row.prop(con, "use_x") | 
					
						
							|  |  |  |             row.prop(con, "use_y") | 
					
						
							|  |  |  |             row.prop(con, "use_z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def DAMPED_TRACK(self, context, layout, con, wide_ui): | 
					
						
							|  |  |  |         self.target_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label(text="To:") | 
					
						
							|  |  |  |         row.prop(con, "track", expand=True) | 
					
						
							| 
									
										
										
										
											2009-11-01 18:07:35 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |     def SPLINE_IK(self, context, layout, con, wide_ui): | 
					
						
							|  |  |  |         self.target_template(layout, con, wide_ui) | 
					
						
							| 
									
										
										
										
											2009-11-03 07:23:02 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-02 10:04:37 +00:00
										 |  |  |         col = layout.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Spline Fitting:") | 
					
						
							|  |  |  |         col.prop(con, "chain_length") | 
					
						
							|  |  |  |         col.prop(con, "even_divisions") | 
					
						
							|  |  |  |         col.prop(con, "chain_offset") | 
					
						
							| 
									
										
										
										
											2009-11-03 07:23:02 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-02 10:04:37 +00:00
										 |  |  |         col = layout.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Chain Scaling:") | 
					
						
							|  |  |  |         col.prop(con, "y_stretch") | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(con, "xz_scaling_mode") | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         else: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(con, "xz_scaling_mode", text="") | 
					
						
							|  |  |  |         col.prop(con, "use_curve_radius") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | class OBJECT_PT_constraints(ConstraintButtonsPanel): | 
					
						
							| 
									
										
										
										
											2009-11-02 11:36:45 +00:00
										 |  |  |     bl_label = "Object Constraints" | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_context = "constraint" | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     def poll(self, context): | 
					
						
							|  |  |  |         return (context.object) | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2010-01-30 08:45:31 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         ob = context.object | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-30 08:45:31 +00:00
										 |  |  |         layout.operator_menu_enum("object.constraint_add", "type") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         for con in ob.constraints: | 
					
						
							|  |  |  |             self.draw_constraint(context, con) | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-14 20:56:19 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | class BONE_PT_constraints(ConstraintButtonsPanel): | 
					
						
							| 
									
										
										
										
											2009-11-02 11:36:45 +00:00
										 |  |  |     bl_label = "Bone Constraints" | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_context = "bone_constraint" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def poll(self, context): | 
					
						
							| 
									
										
										
										
											2010-01-30 23:48:49 +00:00
										 |  |  |         return (context.pose_bone) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-30 08:45:31 +00:00
										 |  |  |         layout.operator_menu_enum("pose.constraint_add", "type") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-30 23:48:49 +00:00
										 |  |  |         for con in context.pose_bone.constraints: | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             self.draw_constraint(context, con) | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-14 11:21:21 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | classes = [ | 
					
						
							|  |  |  |     OBJECT_PT_constraints, | 
					
						
							|  |  |  |     BONE_PT_constraints] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def register(): | 
					
						
							|  |  |  |     register = bpy.types.register | 
					
						
							|  |  |  |     for cls in classes: | 
					
						
							|  |  |  |         register(cls) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-22 23:32:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-14 11:21:21 +00:00
										 |  |  | def unregister(): | 
					
						
							|  |  |  |     unregister = bpy.types.unregister | 
					
						
							|  |  |  |     for cls in classes: | 
					
						
							|  |  |  |         unregister(cls) | 
					
						
							| 
									
										
										
										
											2010-02-16 09:55:07 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if __name__ == "__main__": | 
					
						
							|  |  |  |     register() |