| 
									
										
										
										
											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 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | from bpy.types import Panel | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-20 18:29:19 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-01-29 15:35:06 +11:00
										 |  |  | class ConstraintButtonsPanel: | 
					
						
							| 
									
										
										
										
											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 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         box = layout.template_constraint(con) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if box: | 
					
						
							|  |  |  |             # match enum type to our functions, avoids a lookup table. | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |             getattr(self, con.type)(context, box, con) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-07 13:23:45 +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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-06-07 17:40:39 +10:00
										 |  |  |     @staticmethod | 
					
						
							|  |  |  |     def space_template(layout, con, 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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             split.label(text="Space:") | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |             row = split.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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |             if target and owner: | 
					
						
							|  |  |  |                 row.label(icon='ARROW_LEFTRIGHT') | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-06-07 17:40:39 +10:00
										 |  |  |     @staticmethod | 
					
						
							|  |  |  |     def target_template(layout, con, subtargets=True): | 
					
						
							| 
									
										
										
										
											2010-09-07 15:17:42 +00:00
										 |  |  |         layout.prop(con, "target")  # XXX limiting settings for only 'curves' or some type of object | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if con.target and subtargets: | 
					
						
							|  |  |  |             if con.target.type == 'ARMATURE': | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |                 layout.prop_search(con, "subtarget", con.target.data, "bones", text="Bone") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-01-02 04:16:19 +00:00
										 |  |  |                 if hasattr(con, "head_tail"): | 
					
						
							| 
									
										
										
										
											2016-05-18 03:19:06 +12:00
										 |  |  |                     row = layout.row(align=True) | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |                     row.label(text="Head/Tail:") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                     row.prop(con, "head_tail", text="") | 
					
						
							| 
									
										
										
										
											2016-05-18 03:19:06 +12:00
										 |  |  |                     row.prop(con, "use_bbone_shape", text="", icon='IPO_BEZIER')  # XXX icon, and only when bone has segments? | 
					
						
							| 
									
										
										
										
											2011-03-07 13:23:45 +00:00
										 |  |  |             elif con.target.type in {'MESH', 'LATTICE'}: | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |                 layout.prop_search(con, "subtarget", con.target, "vertex_groups", text="Vertex Group") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-06-07 17:40:39 +10:00
										 |  |  |     @staticmethod | 
					
						
							| 
									
										
										
										
											2015-07-19 16:25:48 +02:00
										 |  |  |     def ik_template(layout, con): | 
					
						
							| 
									
										
										
										
											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': | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             layout.prop_search(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() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         col.prop(con, "chain_count") | 
					
						
							| 
									
										
										
										
											2009-11-07 22:07:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def CHILD_OF(self, context, layout, con): | 
					
						
							|  |  |  |         self.target_template(layout, con) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-07-08 01:59:43 +12:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							|  |  |  |         col.label(text="Location:") | 
					
						
							|  |  |  |         col.prop(con, "use_location_x", text="X") | 
					
						
							|  |  |  |         col.prop(con, "use_location_y", text="Y") | 
					
						
							|  |  |  |         col.prop(con, "use_location_z", text="Z") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							|  |  |  |         col.label(text="Rotation:") | 
					
						
							|  |  |  |         col.prop(con, "use_rotation_x", text="X") | 
					
						
							|  |  |  |         col.prop(con, "use_rotation_y", text="Y") | 
					
						
							|  |  |  |         col.prop(con, "use_rotation_z", text="Z") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							|  |  |  |         col.label(text="Scale:") | 
					
						
							|  |  |  |         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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-26 16:04:14 +00:00
										 |  |  |         row = layout.row() | 
					
						
							|  |  |  |         row.operator("constraint.childof_set_inverse") | 
					
						
							|  |  |  |         row.operator("constraint.childof_clear_inverse") | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def TRACK_TO(self, context, layout, con): | 
					
						
							|  |  |  |         self.target_template(layout, con) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.label(text="To:") | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         row.prop(con, "track_axis", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-26 16:04:14 +00:00
										 |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.prop(con, "up_axis", text="Up") | 
					
						
							| 
									
										
										
										
											2011-02-26 16:04:14 +00:00
										 |  |  |         row.prop(con, "use_target_z") | 
					
						
							| 
									
										
										
										
											2009-11-07 22:07:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         self.space_template(layout, con) | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def IK(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2011-11-11 03:28:46 +00:00
										 |  |  |         if context.object.pose.ik_solver == 'ITASC': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.prop(con, "ik_type") | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |             getattr(self, 'IK_' + con.ik_type)(context, layout, con) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         else: | 
					
						
							| 
									
										
										
										
											2012-11-24 00:18:34 +00:00
										 |  |  |             # Standard IK constraint | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |             self.target_template(layout, con) | 
					
						
							|  |  |  |             layout.prop(con, "pole_target") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             if con.pole_target and con.pole_target.type == 'ARMATURE': | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |                 layout.prop_search(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.prop(con, "pole_angle") | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +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") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             col.prop(con, "chain_count") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-25 15:00:29 +00:00
										 |  |  |             col.prop(con, "use_tail") | 
					
						
							|  |  |  |             col.prop(con, "use_stretch") | 
					
						
							| 
									
										
										
										
											2012-11-24 00:18:34 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             layout.label(text="Weight:") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             split = layout.split() | 
					
						
							|  |  |  |             col = split.column() | 
					
						
							|  |  |  |             row = col.row(align=True) | 
					
						
							|  |  |  |             row.prop(con, "use_location", text="") | 
					
						
							| 
									
										
										
										
											2013-08-23 20:41:21 +00:00
										 |  |  |             sub = row.row(align=True) | 
					
						
							| 
									
										
										
										
											2012-11-24 00:18:34 +00:00
										 |  |  |             sub.active = con.use_location | 
					
						
							|  |  |  |             sub.prop(con, "weight", text="Position", slider=True) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             col = split.column() | 
					
						
							|  |  |  |             row = col.row(align=True) | 
					
						
							|  |  |  |             row.prop(con, "use_rotation", text="") | 
					
						
							| 
									
										
										
										
											2013-08-23 20:41:21 +00:00
										 |  |  |             sub = row.row(align=True) | 
					
						
							| 
									
										
										
										
											2012-11-24 00:18:34 +00:00
										 |  |  |             sub.active = con.use_rotation | 
					
						
							|  |  |  |             sub.prop(con, "orient_weight", text="Rotation", slider=True) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def IK_COPY_POSE(self, context, layout, con): | 
					
						
							|  |  |  |         self.target_template(layout, con) | 
					
						
							|  |  |  |         self.ik_template(layout, con) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.label(text="Axis Ref:") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         row.prop(con, "reference_axis", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         split = layout.split(percentage=0.33) | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         split.row().prop(con, "use_location") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         row = split.row() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.prop(con, "weight", text="Weight", slider=True) | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         row.active = con.use_location | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         split = layout.split(percentage=0.33) | 
					
						
							|  |  |  |         row = split.row() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.label(text="Lock:") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         row = split.row() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         row.prop(con, "lock_location_x", text="X") | 
					
						
							|  |  |  |         row.prop(con, "lock_location_y", text="Y") | 
					
						
							|  |  |  |         row.prop(con, "lock_location_z", text="Z") | 
					
						
							|  |  |  |         split.active = con.use_location | 
					
						
							| 
									
										
										
										
											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() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +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() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.label(text="Lock:") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         row = split.row() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         row.prop(con, "lock_rotation_x", text="X") | 
					
						
							|  |  |  |         row.prop(con, "lock_rotation_y", text="Y") | 
					
						
							|  |  |  |         row.prop(con, "lock_rotation_z", text="Z") | 
					
						
							| 
									
										
										
										
											2009-11-25 15:00:29 +00:00
										 |  |  |         split.active = con.use_rotation | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def IK_DISTANCE(self, context, layout, con): | 
					
						
							|  |  |  |         self.target_template(layout, con) | 
					
						
							|  |  |  |         self.ik_template(layout, con) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.prop(con, "limit_mode") | 
					
						
							| 
									
										
										
										
											2011-02-26 16:04:14 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def FOLLOW_PATH(self, context, layout, con): | 
					
						
							|  |  |  |         self.target_template(layout, con) | 
					
						
							| 
									
										
										
										
											2012-10-05 14:51:35 +00:00
										 |  |  |         layout.operator("constraint.followpath_path_animate", text="Animate Path", icon='ANIM_DATA') | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         col.prop(con, "use_fixed_location") | 
					
						
							|  |  |  |         if con.use_fixed_location: | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +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() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.label(text="Forward:") | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         row.prop(con, "forward_axis", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.prop(con, "up_axis", text="Up") | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         row.label() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def LIMIT_ROTATION(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											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") | 
					
						
							| 
									
										
										
										
											2013-08-23 20:41:21 +00:00
										 |  |  |         sub = col.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub.active = con.use_limit_x | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         sub.prop(con, "min_x", text="Min") | 
					
						
							|  |  |  |         sub.prop(con, "max_x", text="Max") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "use_limit_y") | 
					
						
							| 
									
										
										
										
											2013-08-23 20:41:21 +00:00
										 |  |  |         sub = col.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub.active = con.use_limit_y | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         sub.prop(con, "min_y", text="Min") | 
					
						
							|  |  |  |         sub.prop(con, "max_y", text="Max") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "use_limit_z") | 
					
						
							| 
									
										
										
										
											2013-08-23 20:41:21 +00:00
										 |  |  |         sub = col.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub.active = con.use_limit_z | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         sub.prop(con, "min_z", text="Min") | 
					
						
							|  |  |  |         sub.prop(con, "max_z", text="Max") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-30 10:44:02 +00:00
										 |  |  |         layout.prop(con, "use_transform_limit") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.label(text="Convert:") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.prop(con, "owner_space", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def LIMIT_LOCATION(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         col.prop(con, "use_min_x") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.active = con.use_min_x | 
					
						
							|  |  |  |         sub.prop(con, "min_x", text="") | 
					
						
							|  |  |  |         col.prop(con, "use_max_x") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.active = con.use_max_x | 
					
						
							|  |  |  |         sub.prop(con, "max_x", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         col.prop(con, "use_min_y") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.active = con.use_min_y | 
					
						
							|  |  |  |         sub.prop(con, "min_y", text="") | 
					
						
							|  |  |  |         col.prop(con, "use_max_y") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.active = con.use_max_y | 
					
						
							|  |  |  |         sub.prop(con, "max_y", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         col.prop(con, "use_min_z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.active = con.use_min_z | 
					
						
							|  |  |  |         sub.prop(con, "min_z", text="") | 
					
						
							|  |  |  |         col.prop(con, "use_max_z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.active = con.use_max_z | 
					
						
							|  |  |  |         sub.prop(con, "max_z", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         row.prop(con, "use_transform_limit") | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         row.label() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.label(text="Convert:") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.prop(con, "owner_space", text="") | 
					
						
							| 
									
										
										
										
											2009-11-07 22:07:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def LIMIT_SCALE(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         col.prop(con, "use_min_x") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.active = con.use_min_x | 
					
						
							|  |  |  |         sub.prop(con, "min_x", text="") | 
					
						
							|  |  |  |         col.prop(con, "use_max_x") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.active = con.use_max_x | 
					
						
							|  |  |  |         sub.prop(con, "max_x", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         col.prop(con, "use_min_y") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.active = con.use_min_y | 
					
						
							|  |  |  |         sub.prop(con, "min_y", text="") | 
					
						
							|  |  |  |         col.prop(con, "use_max_y") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.active = con.use_max_y | 
					
						
							|  |  |  |         sub.prop(con, "max_y", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         col.prop(con, "use_min_z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.active = con.use_min_z | 
					
						
							|  |  |  |         sub.prop(con, "min_z", text="") | 
					
						
							|  |  |  |         col.prop(con, "use_max_z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.active = con.use_max_z | 
					
						
							|  |  |  |         sub.prop(con, "max_z", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         row.prop(con, "use_transform_limit") | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         row.label() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.label(text="Convert:") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.prop(con, "owner_space", text="") | 
					
						
							| 
									
										
										
										
											2009-11-07 22:07:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def COPY_ROTATION(self, context, layout, con): | 
					
						
							|  |  |  |         self.target_template(layout, con) | 
					
						
							| 
									
										
										
										
											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 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +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 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +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 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         self.space_template(layout, con) | 
					
						
							| 
									
										
										
										
											2009-11-07 22:07:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def COPY_LOCATION(self, context, layout, con): | 
					
						
							|  |  |  |         self.target_template(layout, con) | 
					
						
							| 
									
										
										
										
											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 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +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 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +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 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         self.space_template(layout, con) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def COPY_SCALE(self, context, layout, con): | 
					
						
							|  |  |  |         self.target_template(layout, con) | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         self.space_template(layout, con) | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def MAINTAIN_VOLUME(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2010-03-16 12:55:56 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.label(text="Free:") | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         row.prop(con, "free_axis", expand=True) | 
					
						
							| 
									
										
										
										
											2010-03-16 12:55:56 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         layout.prop(con, "volume") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-15 11:15:37 +00:00
										 |  |  |         row = layout.row() | 
					
						
							|  |  |  |         row.label(text="Convert:") | 
					
						
							|  |  |  |         row.prop(con, "owner_space", text="") | 
					
						
							| 
									
										
										
										
											2010-03-16 12:55:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def COPY_TRANSFORMS(self, context, layout, con): | 
					
						
							|  |  |  |         self.target_template(layout, con) | 
					
						
							| 
									
										
										
										
											2010-01-02 04:14:17 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         self.space_template(layout, con) | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-01 00:47:10 +11:00
										 |  |  |     # def SCRIPT(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def ACTION(self, context, layout, con): | 
					
						
							|  |  |  |         self.target_template(layout, con) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2012-02-04 11:10:41 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-27 01:30:58 +00:00
										 |  |  |         col = split.column() | 
					
						
							|  |  |  |         col.label(text="From Target:") | 
					
						
							|  |  |  |         col.prop(con, "transform_channel", text="") | 
					
						
							|  |  |  |         col.prop(con, "target_space", text="") | 
					
						
							| 
									
										
										
										
											2012-02-04 11:10:41 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-27 01:30:58 +00:00
										 |  |  |         col = split.column() | 
					
						
							|  |  |  |         col.label(text="To Action:") | 
					
						
							|  |  |  |         col.prop(con, "action", text="") | 
					
						
							| 
									
										
										
										
											2012-06-12 06:22:23 +00:00
										 |  |  |         col.prop(con, "use_bone_object_action") | 
					
						
							| 
									
										
										
										
											2012-02-04 11:10:41 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-27 01:30:58 +00:00
										 |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2012-02-04 11:10:41 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         col.label(text="Target Range:") | 
					
						
							|  |  |  |         col.prop(con, "min", text="Min") | 
					
						
							|  |  |  |         col.prop(con, "max", text="Max") | 
					
						
							| 
									
										
										
										
											2012-02-04 11:10:41 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-27 01:30:58 +00:00
										 |  |  |         col = split.column(align=True) | 
					
						
							|  |  |  |         col.label(text="Action Range:") | 
					
						
							|  |  |  |         col.prop(con, "frame_start", text="Start") | 
					
						
							|  |  |  |         col.prop(con, "frame_end", text="End") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def LOCKED_TRACK(self, context, layout, con): | 
					
						
							|  |  |  |         self.target_template(layout, con) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.label(text="To:") | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         row.prop(con, "track_axis", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.label(text="Lock:") | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         row.prop(con, "lock_axis", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def LIMIT_DISTANCE(self, context, layout, con): | 
					
						
							|  |  |  |         self.target_template(layout, con) | 
					
						
							| 
									
										
										
										
											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() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.label(text="Clamp Region:") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.prop(con, "limit_mode", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-05-24 12:12:12 +00:00
										 |  |  |         row = layout.row() | 
					
						
							|  |  |  |         row.prop(con, "use_transform_limit") | 
					
						
							|  |  |  |         row.label() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-10-11 08:26:49 +00:00
										 |  |  |         self.space_template(layout, con) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def STRETCH_TO(self, context, layout, con): | 
					
						
							|  |  |  |         self.target_template(layout, con) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-26 16:04:14 +00:00
										 |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.prop(con, "rest_length", text="Rest Length") | 
					
						
							|  |  |  |         row.operator("constraint.stretchto_reset", text="Reset") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.prop(con, "bulge", text="Volume Variation") | 
					
						
							| 
									
										
										
										
											2014-10-13 19:51:46 +02:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  |         col = split.column(align=True) | 
					
						
							|  |  |  |         col.prop(con, "use_bulge_min", text="Volume Min") | 
					
						
							|  |  |  |         sub = col.column() | 
					
						
							|  |  |  |         sub.active = con.use_bulge_min | 
					
						
							|  |  |  |         sub.prop(con, "bulge_min", text="") | 
					
						
							|  |  |  |         col = split.column(align=True) | 
					
						
							|  |  |  |         col.prop(con, "use_bulge_max", text="Volume Max") | 
					
						
							|  |  |  |         sub = col.column() | 
					
						
							|  |  |  |         sub.active = con.use_bulge_max | 
					
						
							|  |  |  |         sub.prop(con, "bulge_max", text="") | 
					
						
							|  |  |  |         col = layout.column() | 
					
						
							|  |  |  |         col.active = con.use_bulge_min or con.use_bulge_max | 
					
						
							|  |  |  |         col.prop(con, "bulge_smooth", text="Smooth") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.label(text="Volume:") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.prop(con, "volume", expand=True) | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.label(text="Plane:") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.prop(con, "keep_axis", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def FLOOR(self, context, layout, con): | 
					
						
							|  |  |  |         self.target_template(layout, con) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-26 16:04:14 +00:00
										 |  |  |         row = layout.row() | 
					
						
							|  |  |  |         row.prop(con, "use_sticky") | 
					
						
							|  |  |  |         row.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() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.label(text="Min/Max:") | 
					
						
							| 
									
										
										
										
											2011-02-27 10:47:32 +00:00
										 |  |  |         row.prop(con, "floor_location", expand=True) | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         self.space_template(layout, con) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def RIGID_BODY_JOINT(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2010-08-22 09:18:26 +00:00
										 |  |  |         self.target_template(layout, con, subtargets=False) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         layout.prop(con, "pivot_type") | 
					
						
							|  |  |  |         layout.prop(con, "child") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-26 16:04:14 +00:00
										 |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.prop(con, "use_linked_collision", text="Linked Collision") | 
					
						
							|  |  |  |         row.prop(con, "show_pivot", text="Display Pivot") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         col.label(text="Pivot:") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         col.label(text="Axis:") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-20 09:48:51 +00:00
										 |  |  |         if con.pivot_type == 'CONE_TWIST': | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             layout.label(text="Limits:") | 
					
						
							| 
									
										
										
										
											2010-11-20 09:48:51 +00:00
										 |  |  |             split = layout.split() | 
					
						
							| 
									
										
										
										
											2011-01-01 07:20:34 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-27 09:21:13 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             col.prop(con, "use_angular_limit_x", text="Angle X") | 
					
						
							| 
									
										
										
										
											2011-02-27 09:36:29 +00:00
										 |  |  |             sub = col.column() | 
					
						
							|  |  |  |             sub.active = con.use_angular_limit_x | 
					
						
							|  |  |  |             sub.prop(con, "limit_angle_max_x", text="") | 
					
						
							| 
									
										
										
										
											2011-01-01 07:20:34 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-20 09:48:51 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             col.prop(con, "use_angular_limit_y", text="Angle Y") | 
					
						
							| 
									
										
										
										
											2011-02-27 09:36:29 +00:00
										 |  |  |             sub = col.column() | 
					
						
							|  |  |  |             sub.active = con.use_angular_limit_y | 
					
						
							|  |  |  |             sub.prop(con, "limit_angle_max_y", text="") | 
					
						
							| 
									
										
										
										
											2011-02-27 09:21:13 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-20 09:48:51 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             col.prop(con, "use_angular_limit_z", text="Angle Z") | 
					
						
							| 
									
										
										
										
											2011-02-27 09:36:29 +00:00
										 |  |  |             sub = col.column() | 
					
						
							|  |  |  |             sub.active = con.use_angular_limit_z | 
					
						
							|  |  |  |             sub.prop(con, "limit_angle_max_z", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-20 09:48:51 +00:00
										 |  |  |         elif con.pivot_type == 'GENERIC_6_DOF': | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             layout.label(text="Limits:") | 
					
						
							| 
									
										
										
										
											2010-11-20 09:48:51 +00:00
										 |  |  |             split = layout.split() | 
					
						
							| 
									
										
										
										
											2011-03-14 23:17:52 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-20 09:48:51 +00:00
										 |  |  |             col = split.column(align=True) | 
					
						
							|  |  |  |             col.prop(con, "use_limit_x", text="X") | 
					
						
							| 
									
										
										
										
											2013-08-23 20:41:21 +00:00
										 |  |  |             sub = col.column(align=True) | 
					
						
							| 
									
										
										
										
											2011-02-27 09:21:13 +00:00
										 |  |  |             sub.active = con.use_limit_x | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             sub.prop(con, "limit_min_x", text="Min") | 
					
						
							|  |  |  |             sub.prop(con, "limit_max_x", text="Max") | 
					
						
							| 
									
										
										
										
											2011-03-14 23:17:52 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-27 09:21:13 +00:00
										 |  |  |             col = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2010-11-20 09:48:51 +00:00
										 |  |  |             col.prop(con, "use_limit_y", text="Y") | 
					
						
							| 
									
										
										
										
											2013-08-23 20:41:21 +00:00
										 |  |  |             sub = col.column(align=True) | 
					
						
							| 
									
										
										
										
											2011-02-27 09:21:13 +00:00
										 |  |  |             sub.active = con.use_limit_y | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             sub.prop(con, "limit_min_y", text="Min") | 
					
						
							|  |  |  |             sub.prop(con, "limit_max_y", text="Max") | 
					
						
							| 
									
										
										
										
											2011-03-14 23:17:52 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-27 09:21:13 +00:00
										 |  |  |             col = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2010-11-20 09:48:51 +00:00
										 |  |  |             col.prop(con, "use_limit_z", text="Z") | 
					
						
							| 
									
										
										
										
											2013-08-23 20:41:21 +00:00
										 |  |  |             sub = col.column(align=True) | 
					
						
							| 
									
										
										
										
											2011-02-27 09:21:13 +00:00
										 |  |  |             sub.active = con.use_limit_z | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             sub.prop(con, "limit_min_z", text="Min") | 
					
						
							|  |  |  |             sub.prop(con, "limit_max_z", text="Max") | 
					
						
							| 
									
										
										
										
											2011-03-14 23:17:52 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-27 09:21:13 +00:00
										 |  |  |             split = layout.split() | 
					
						
							| 
									
										
										
										
											2011-03-14 23:17:52 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-27 09:21:13 +00:00
										 |  |  |             col = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             col.prop(con, "use_angular_limit_x", text="Angle X") | 
					
						
							| 
									
										
										
										
											2013-08-23 20:41:21 +00:00
										 |  |  |             sub = col.column(align=True) | 
					
						
							| 
									
										
										
										
											2011-02-27 09:21:13 +00:00
										 |  |  |             sub.active = con.use_angular_limit_x | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             sub.prop(con, "limit_angle_min_x", text="Min") | 
					
						
							|  |  |  |             sub.prop(con, "limit_angle_max_x", text="Max") | 
					
						
							| 
									
										
										
										
											2011-03-14 23:17:52 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-27 09:21:13 +00:00
										 |  |  |             col = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             col.prop(con, "use_angular_limit_y", text="Angle Y") | 
					
						
							| 
									
										
										
										
											2013-08-23 20:41:21 +00:00
										 |  |  |             sub = col.column(align=True) | 
					
						
							| 
									
										
										
										
											2011-02-27 09:21:13 +00:00
										 |  |  |             sub.active = con.use_angular_limit_y | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             sub.prop(con, "limit_angle_min_y", text="Min") | 
					
						
							|  |  |  |             sub.prop(con, "limit_angle_max_y", text="Max") | 
					
						
							| 
									
										
										
										
											2011-03-14 23:17:52 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-27 09:21:13 +00:00
										 |  |  |             col = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             col.prop(con, "use_angular_limit_z", text="Angle Z") | 
					
						
							| 
									
										
										
										
											2013-08-23 20:41:21 +00:00
										 |  |  |             sub = col.column(align=True) | 
					
						
							| 
									
										
										
										
											2011-02-27 09:21:13 +00:00
										 |  |  |             sub.active = con.use_angular_limit_z | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             sub.prop(con, "limit_angle_min_z", text="Min") | 
					
						
							|  |  |  |             sub.prop(con, "limit_angle_max_z", text="Max") | 
					
						
							| 
									
										
										
										
											2011-01-01 07:20:34 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-27 09:21:13 +00:00
										 |  |  |         elif con.pivot_type == 'HINGE': | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             layout.label(text="Limits:") | 
					
						
							| 
									
										
										
										
											2011-02-27 09:21:13 +00:00
										 |  |  |             split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             row = split.row(align=True) | 
					
						
							|  |  |  |             col = row.column() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             col.prop(con, "use_angular_limit_x", text="Angle X") | 
					
						
							| 
									
										
										
										
											2011-02-27 09:21:13 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             col = row.column() | 
					
						
							|  |  |  |             col.active = con.use_angular_limit_x | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             col.prop(con, "limit_angle_min_x", text="Min") | 
					
						
							| 
									
										
										
										
											2011-02-27 09:21:13 +00:00
										 |  |  |             col = row.column() | 
					
						
							|  |  |  |             col.active = con.use_angular_limit_x | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             col.prop(con, "limit_angle_max_x", text="Max") | 
					
						
							| 
									
										
										
										
											2011-01-01 07:20:34 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def CLAMP_TO(self, context, layout, con): | 
					
						
							|  |  |  |         self.target_template(layout, con) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.label(text="Main Axis:") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.prop(con, "main_axis", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-27 10:47:32 +00:00
										 |  |  |         layout.prop(con, "use_cyclic") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def TRANSFORM(self, context, layout, con): | 
					
						
							|  |  |  |         self.target_template(layout, con) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.prop(con, "use_motion_extrapolate", text="Extrapolate") | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         col = layout.column() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         col.row().label(text="Source:") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         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() | 
					
						
							| 
									
										
										
										
											2014-04-07 12:10:37 +02:00
										 |  |  |         ext = "" if con.map_from == 'LOCATION' else "_rot" if con.map_from == 'ROTATION' else "_scale" | 
					
						
							| 
									
										
										
										
											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:") | 
					
						
							| 
									
										
										
										
											2014-04-07 12:10:37 +02:00
										 |  |  |         sub.prop(con, "from_min_x" + ext, text="Min") | 
					
						
							|  |  |  |         sub.prop(con, "from_max_x" + ext, text="Max") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         sub = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.label(text="Y:") | 
					
						
							| 
									
										
										
										
											2014-04-07 12:10:37 +02:00
										 |  |  |         sub.prop(con, "from_min_y" + ext, text="Min") | 
					
						
							|  |  |  |         sub.prop(con, "from_max_y" + ext, text="Max") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         sub = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.label(text="Z:") | 
					
						
							| 
									
										
										
										
											2014-04-07 12:10:37 +02:00
										 |  |  |         sub.prop(con, "from_min_z" + ext, text="Min") | 
					
						
							|  |  |  |         sub.prop(con, "from_max_z" + ext, text="Max") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-05-20 18:26:44 +00:00
										 |  |  |         col = layout.column() | 
					
						
							|  |  |  |         row = col.row() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.label(text="Source to Destination Mapping:") | 
					
						
							| 
									
										
										
										
											2011-05-20 18:26:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-06-24 03:30:50 +00:00
										 |  |  |         # note: chr(187) is the ASCII arrow ( >> ). Blender Text Editor can't | 
					
						
							| 
									
										
										
										
											2011-10-17 06:58:07 +00:00
										 |  |  |         # open it. Thus we are using the hard-coded value instead. | 
					
						
							| 
									
										
										
										
											2011-05-20 18:26:44 +00:00
										 |  |  |         row = col.row() | 
					
						
							|  |  |  |         row.prop(con, "map_to_x_from", expand=False, text="") | 
					
						
							| 
									
										
										
										
											2011-06-05 23:38:11 +00:00
										 |  |  |         row.label(text=" %s    X" % chr(187)) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-05-20 18:26:44 +00:00
										 |  |  |         row = col.row() | 
					
						
							|  |  |  |         row.prop(con, "map_to_y_from", expand=False, text="") | 
					
						
							| 
									
										
										
										
											2011-06-05 23:38:11 +00:00
										 |  |  |         row.label(text=" %s    Y" % chr(187)) | 
					
						
							| 
									
										
										
										
											2011-05-20 18:26:44 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = col.row() | 
					
						
							|  |  |  |         row.prop(con, "map_to_z_from", expand=False, text="") | 
					
						
							| 
									
										
										
										
											2011-06-05 23:38:11 +00:00
										 |  |  |         row.label(text=" %s    Z" % chr(187)) | 
					
						
							| 
									
										
										
										
											2011-05-26 09:33:51 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-05-20 18:26:44 +00:00
										 |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2011-05-26 09:33:51 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         col.label(text="Destination:") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         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() | 
					
						
							| 
									
										
										
										
											2014-04-07 12:10:37 +02:00
										 |  |  |         ext = "" if con.map_to == 'LOCATION' else "_rot" if con.map_to == 'ROTATION' else "_scale" | 
					
						
							| 
									
										
										
										
											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:") | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         sub = col.column(align=True) | 
					
						
							| 
									
										
										
										
											2014-04-07 12:10:37 +02:00
										 |  |  |         sub.prop(con, "to_min_x" + ext, text="Min") | 
					
						
							|  |  |  |         sub.prop(con, "to_max_x" + ext, text="Max") | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Y:") | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         sub = col.column(align=True) | 
					
						
							| 
									
										
										
										
											2014-04-07 12:10:37 +02:00
										 |  |  |         sub.prop(con, "to_min_y" + ext, text="Min") | 
					
						
							|  |  |  |         sub.prop(con, "to_max_y" + ext, text="Max") | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Z:") | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-17 15:59:54 +00:00
										 |  |  |         sub = col.column(align=True) | 
					
						
							| 
									
										
										
										
											2014-04-07 12:10:37 +02:00
										 |  |  |         sub.prop(con, "to_min_z" + ext, text="Min") | 
					
						
							|  |  |  |         sub.prop(con, "to_max_z" + ext, text="Max") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         self.space_template(layout, con) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def SHRINKWRAP(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2010-11-07 05:59:35 +00:00
										 |  |  |         self.target_template(layout, con, False) | 
					
						
							| 
									
										
										
										
											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) | 
					
						
							| 
									
										
										
										
											2013-09-07 12:59:16 +00:00
										 |  |  |             row.prop(con, "project_axis", expand=True) | 
					
						
							|  |  |  |             split = layout.split(percentage=0.4) | 
					
						
							|  |  |  |             split.label(text="Axis Space:") | 
					
						
							|  |  |  |             rowsub = split.row() | 
					
						
							|  |  |  |             rowsub.prop(con, "project_axis_space", text="") | 
					
						
							|  |  |  |             layout.prop(con, "project_limit") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def DAMPED_TRACK(self, context, layout, con): | 
					
						
							|  |  |  |         self.target_template(layout, con) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         row.label(text="To:") | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         row.prop(con, "track_axis", expand=True) | 
					
						
							| 
									
										
										
										
											2009-11-01 18:07:35 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def SPLINE_IK(self, context, layout, con): | 
					
						
							|  |  |  |         self.target_template(layout, con) | 
					
						
							| 
									
										
										
										
											2009-11-03 07:23:02 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-02 10:04:37 +00:00
										 |  |  |         col = layout.column() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         col.label(text="Spline Fitting:") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         col.prop(con, "chain_count") | 
					
						
							|  |  |  |         col.prop(con, "use_even_divisions") | 
					
						
							|  |  |  |         col.prop(con, "use_chain_offset") | 
					
						
							| 
									
										
										
										
											2009-11-03 07:23:02 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-02 10:04:37 +00:00
										 |  |  |         col = layout.column() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         col.label(text="Chain Scaling:") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         col.prop(con, "use_y_stretch") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(con, "use_curve_radius") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-01-13 18:06:53 +13:00
										 |  |  |         layout.prop(con, "xz_scale_mode") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         if con.xz_scale_mode == 'VOLUME_PRESERVE': | 
					
						
							|  |  |  |             layout.prop(con, "bulge", text="Volume Variation") | 
					
						
							|  |  |  |             split = layout.split() | 
					
						
							|  |  |  |             col = split.column(align=True) | 
					
						
							|  |  |  |             col.prop(con, "use_bulge_min", text="Volume Min") | 
					
						
							|  |  |  |             sub = col.column() | 
					
						
							|  |  |  |             sub.active = con.use_bulge_min | 
					
						
							|  |  |  |             sub.prop(con, "bulge_min", text="") | 
					
						
							|  |  |  |             col = split.column(align=True) | 
					
						
							|  |  |  |             col.prop(con, "use_bulge_max", text="Volume Max") | 
					
						
							|  |  |  |             sub = col.column() | 
					
						
							|  |  |  |             sub.active = con.use_bulge_max | 
					
						
							|  |  |  |             sub.prop(con, "bulge_max", text="") | 
					
						
							|  |  |  |             col = layout.column() | 
					
						
							|  |  |  |             col.active = con.use_bulge_min or con.use_bulge_max | 
					
						
							|  |  |  |             col.prop(con, "bulge_smooth", text="Smooth") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def PIVOT(self, context, layout, con): | 
					
						
							|  |  |  |         self.target_template(layout, con) | 
					
						
							| 
									
										
											  
											
												== Pivot Constraint ==
This constraint allows an object or bone to have their rotations applied as if their origin/pivot-point was located elsewhere. The most obvious uses include foot-roll, see-saws, but could also include more complicated rolling-box examples.  
== Usage Examples ==
=== Foot Roll ===
1. Add 'Pivot' Constraint to the bone without any target.
2. Set the 'Y' value of the offset to the length of the bone. Usually this should be negative (if you rig with feet facing 'forwards' along -Y axis). This gives you a pivot point relative to the bone's (preconstraint) location, which should be at the tip of the bone here. Disabling the 'Use Relative Offset' would make this offset be relative to 0,0,0 instead of to the owner/bone-head.
3. Ensure that the 'Pivot When' setting is set to '-X Rot', (default) which means that the pivot will only used when the rotation on the X-Axis is negative to get tip-toe 'roll'. 
=== See Saw ===
1. Add a 'Pivot' constraint too see-saw plank object, this time with a target that you wish to have as the pivot-point. It's possible to do this without too (as before), but is less intuitive.
2. Optionally, if you want the plank slightly raised, set the z-offset value, which should make the pivot-point used to be relative to the target with the z-offset applied.
3. Ensure that 'Pivot When' is set to 'Always', which means that the pivot will always be used, irrespective of the rotation.
== Notes ==
* The 'Pivot When' setting has been integrated in the constraint, since this is something that will often be required for these setups. Having to set up additional drivers to drive the constraint to do this kindof beats the purpose of providing this.
* The 'Offset' functionality is probably not presented as clearly as it could be. We may need to go over this again.
* For foot-roll - if any scaling of the foot is required, simply set up a driver on the y-offset to make this dynamically respond to the "scale" RNA property of the bones (don't use the "Transform Channel" vartype since that won't work correct here). However, this shouldn't be common enough to warrant special treatment.
											
										 
											2010-05-27 10:50:06 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if con.target: | 
					
						
							|  |  |  |             col = layout.column() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             col.prop(con, "offset", text="Pivot Offset") | 
					
						
							| 
									
										
											  
											
												== Pivot Constraint ==
This constraint allows an object or bone to have their rotations applied as if their origin/pivot-point was located elsewhere. The most obvious uses include foot-roll, see-saws, but could also include more complicated rolling-box examples.  
== Usage Examples ==
=== Foot Roll ===
1. Add 'Pivot' Constraint to the bone without any target.
2. Set the 'Y' value of the offset to the length of the bone. Usually this should be negative (if you rig with feet facing 'forwards' along -Y axis). This gives you a pivot point relative to the bone's (preconstraint) location, which should be at the tip of the bone here. Disabling the 'Use Relative Offset' would make this offset be relative to 0,0,0 instead of to the owner/bone-head.
3. Ensure that the 'Pivot When' setting is set to '-X Rot', (default) which means that the pivot will only used when the rotation on the X-Axis is negative to get tip-toe 'roll'. 
=== See Saw ===
1. Add a 'Pivot' constraint too see-saw plank object, this time with a target that you wish to have as the pivot-point. It's possible to do this without too (as before), but is less intuitive.
2. Optionally, if you want the plank slightly raised, set the z-offset value, which should make the pivot-point used to be relative to the target with the z-offset applied.
3. Ensure that 'Pivot When' is set to 'Always', which means that the pivot will always be used, irrespective of the rotation.
== Notes ==
* The 'Pivot When' setting has been integrated in the constraint, since this is something that will often be required for these setups. Having to set up additional drivers to drive the constraint to do this kindof beats the purpose of providing this.
* The 'Offset' functionality is probably not presented as clearly as it could be. We may need to go over this again.
* For foot-roll - if any scaling of the foot is required, simply set up a driver on the y-offset to make this dynamically respond to the "scale" RNA property of the bones (don't use the "Transform Channel" vartype since that won't work correct here). However, this shouldn't be common enough to warrant special treatment.
											
										 
											2010-05-27 10:50:06 +00:00
										 |  |  |         else: | 
					
						
							|  |  |  |             col = layout.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             col.prop(con, "use_relative_location") | 
					
						
							|  |  |  |             if con.use_relative_location: | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |                 col.prop(con, "offset", text="Relative Pivot Point") | 
					
						
							| 
									
										
											  
											
												== Pivot Constraint ==
This constraint allows an object or bone to have their rotations applied as if their origin/pivot-point was located elsewhere. The most obvious uses include foot-roll, see-saws, but could also include more complicated rolling-box examples.  
== Usage Examples ==
=== Foot Roll ===
1. Add 'Pivot' Constraint to the bone without any target.
2. Set the 'Y' value of the offset to the length of the bone. Usually this should be negative (if you rig with feet facing 'forwards' along -Y axis). This gives you a pivot point relative to the bone's (preconstraint) location, which should be at the tip of the bone here. Disabling the 'Use Relative Offset' would make this offset be relative to 0,0,0 instead of to the owner/bone-head.
3. Ensure that the 'Pivot When' setting is set to '-X Rot', (default) which means that the pivot will only used when the rotation on the X-Axis is negative to get tip-toe 'roll'. 
=== See Saw ===
1. Add a 'Pivot' constraint too see-saw plank object, this time with a target that you wish to have as the pivot-point. It's possible to do this without too (as before), but is less intuitive.
2. Optionally, if you want the plank slightly raised, set the z-offset value, which should make the pivot-point used to be relative to the target with the z-offset applied.
3. Ensure that 'Pivot When' is set to 'Always', which means that the pivot will always be used, irrespective of the rotation.
== Notes ==
* The 'Pivot When' setting has been integrated in the constraint, since this is something that will often be required for these setups. Having to set up additional drivers to drive the constraint to do this kindof beats the purpose of providing this.
* The 'Offset' functionality is probably not presented as clearly as it could be. We may need to go over this again.
* For foot-roll - if any scaling of the foot is required, simply set up a driver on the y-offset to make this dynamically respond to the "scale" RNA property of the bones (don't use the "Transform Channel" vartype since that won't work correct here). However, this shouldn't be common enough to warrant special treatment.
											
										 
											2010-05-27 10:50:06 +00:00
										 |  |  |             else: | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |                 col.prop(con, "offset", text="Absolute Pivot Point") | 
					
						
							| 
									
										
											  
											
												== Pivot Constraint ==
This constraint allows an object or bone to have their rotations applied as if their origin/pivot-point was located elsewhere. The most obvious uses include foot-roll, see-saws, but could also include more complicated rolling-box examples.  
== Usage Examples ==
=== Foot Roll ===
1. Add 'Pivot' Constraint to the bone without any target.
2. Set the 'Y' value of the offset to the length of the bone. Usually this should be negative (if you rig with feet facing 'forwards' along -Y axis). This gives you a pivot point relative to the bone's (preconstraint) location, which should be at the tip of the bone here. Disabling the 'Use Relative Offset' would make this offset be relative to 0,0,0 instead of to the owner/bone-head.
3. Ensure that the 'Pivot When' setting is set to '-X Rot', (default) which means that the pivot will only used when the rotation on the X-Axis is negative to get tip-toe 'roll'. 
=== See Saw ===
1. Add a 'Pivot' constraint too see-saw plank object, this time with a target that you wish to have as the pivot-point. It's possible to do this without too (as before), but is less intuitive.
2. Optionally, if you want the plank slightly raised, set the z-offset value, which should make the pivot-point used to be relative to the target with the z-offset applied.
3. Ensure that 'Pivot When' is set to 'Always', which means that the pivot will always be used, irrespective of the rotation.
== Notes ==
* The 'Pivot When' setting has been integrated in the constraint, since this is something that will often be required for these setups. Having to set up additional drivers to drive the constraint to do this kindof beats the purpose of providing this.
* The 'Offset' functionality is probably not presented as clearly as it could be. We may need to go over this again.
* For foot-roll - if any scaling of the foot is required, simply set up a driver on the y-offset to make this dynamically respond to the "scale" RNA property of the bones (don't use the "Transform Channel" vartype since that won't work correct here). However, this shouldn't be common enough to warrant special treatment.
											
										 
											2010-05-27 10:50:06 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = layout.column() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         col.prop(con, "rotation_range", text="Pivot When") | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-15 16:10:49 +00:00
										 |  |  |     @staticmethod | 
					
						
							|  |  |  |     def _getConstraintClip(context, con): | 
					
						
							|  |  |  |         if not con.use_active_clip: | 
					
						
							|  |  |  |             return con.clip | 
					
						
							|  |  |  |         else: | 
					
						
							|  |  |  |             return context.scene.active_clip | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-07 12:55:18 +00:00
										 |  |  |     def FOLLOW_TRACK(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2011-12-15 16:10:49 +00:00
										 |  |  |         clip = self._getConstraintClip(context, con) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-14 06:41:42 +00:00
										 |  |  |         row = layout.row() | 
					
						
							|  |  |  |         row.prop(con, "use_active_clip") | 
					
						
							|  |  |  |         row.prop(con, "use_3d_position") | 
					
						
							| 
									
										
										
										
											2011-11-07 12:55:18 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-07-24 21:00:35 +06:00
										 |  |  |         sub = row.column() | 
					
						
							|  |  |  |         sub.active = not con.use_3d_position | 
					
						
							|  |  |  |         sub.prop(con, "use_undistorted_position") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-09 16:57:02 +00:00
										 |  |  |         col = layout.column() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-07 12:55:18 +00:00
										 |  |  |         if not con.use_active_clip: | 
					
						
							| 
									
										
										
										
											2012-08-09 16:57:02 +00:00
										 |  |  |             col.prop(con, "clip") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         row = col.row() | 
					
						
							|  |  |  |         row.prop(con, "frame_method", expand=True) | 
					
						
							| 
									
										
										
										
											2011-11-07 12:55:18 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-15 16:10:49 +00:00
										 |  |  |         if clip: | 
					
						
							| 
									
										
										
										
											2012-08-10 08:51:34 +00:00
										 |  |  |             tracking = clip.tracking | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             col.prop_search(con, "object", tracking, "objects", icon='OBJECT_DATA') | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             tracking_object = tracking.objects.get(con.object, tracking.objects[0]) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             col.prop_search(con, "track", tracking_object, "tracks", icon='ANIM_DATA') | 
					
						
							| 
									
										
										
										
											2011-11-07 12:55:18 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-09 16:57:02 +00:00
										 |  |  |         col.prop(con, "camera") | 
					
						
							| 
									
										
										
										
											2011-12-15 20:38:23 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-09 16:57:02 +00:00
										 |  |  |         row = col.row() | 
					
						
							| 
									
										
										
										
											2012-01-04 17:20:08 +00:00
										 |  |  |         row.active = not con.use_3d_position | 
					
						
							|  |  |  |         row.prop(con, "depth_object") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-07 12:55:18 +00:00
										 |  |  |         layout.operator("clip.constraint_to_fcurve") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def CAMERA_SOLVER(self, context, layout, con): | 
					
						
							|  |  |  |         layout.prop(con, "use_active_clip") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         if not con.use_active_clip: | 
					
						
							|  |  |  |             layout.prop(con, "clip") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.operator("clip.constraint_to_fcurve") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-05 18:57:17 +00:00
										 |  |  |     def OBJECT_SOLVER(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2011-12-15 16:10:49 +00:00
										 |  |  |         clip = self._getConstraintClip(context, con) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-05 18:57:17 +00:00
										 |  |  |         layout.prop(con, "use_active_clip") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         if not con.use_active_clip: | 
					
						
							|  |  |  |             layout.prop(con, "clip") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-15 16:10:49 +00:00
										 |  |  |         if clip: | 
					
						
							|  |  |  |             layout.prop_search(con, "object", clip.tracking, "objects", icon='OBJECT_DATA') | 
					
						
							| 
									
										
										
										
											2011-12-05 18:57:17 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-15 20:38:23 +00:00
										 |  |  |         layout.prop(con, "camera") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-15 16:09:57 +00:00
										 |  |  |         row = layout.row() | 
					
						
							|  |  |  |         row.operator("constraint.objectsolver_set_inverse") | 
					
						
							|  |  |  |         row.operator("constraint.objectsolver_clear_inverse") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-05 18:57:17 +00:00
										 |  |  |         layout.operator("clip.constraint_to_fcurve") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-21 07:15:11 +00:00
										 |  |  |     def SCRIPT(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2013-02-28 15:31:20 +00:00
										 |  |  |         layout.label("Blender 2.6 doesn't support python constraints yet") | 
					
						
							| 
									
										
										
										
											2010-08-21 07:15:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class OBJECT_PT_constraints(ConstraintButtonsPanel, Panel): | 
					
						
							| 
									
										
										
										
											2011-09-15 13:20:18 +00:00
										 |  |  |     bl_label = "Object Constraints" | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_context = "constraint" | 
					
						
							| 
									
										
										
										
											2012-03-10 20:08:25 +00:00
										 |  |  |     bl_options = {'HIDE_HEADER'} | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-03-11 02:19:58 +00:00
										 |  |  |         obj = context.object | 
					
						
							| 
									
										
										
										
											2011-01-03 16:22:30 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-04-14 10:29:11 +10:00
										 |  |  |         if obj.type == 'ARMATURE' and obj.mode == 'POSE': | 
					
						
							| 
									
										
										
										
											2011-01-02 23:50:16 +00:00
										 |  |  |             box = layout.box() | 
					
						
							| 
									
										
										
										
											2014-03-10 16:56:31 +13:00
										 |  |  |             box.alert = True  # XXX: this should apply to the box background | 
					
						
							|  |  |  |             box.label(icon='INFO', text="Constraints for active bone do not live here") | 
					
						
							| 
									
										
										
										
											2014-03-19 15:25:10 +01:00
										 |  |  |             box.operator("wm.properties_context_change", icon='CONSTRAINT_BONE', | 
					
						
							|  |  |  |                          text="Go to Bone Constraints tab...").context = 'BONE_CONSTRAINT' | 
					
						
							| 
									
										
										
										
											2011-01-02 23:50:16 +00:00
										 |  |  |         else: | 
					
						
							| 
									
										
										
										
											2013-03-11 01:53:21 +00:00
										 |  |  |             layout.operator_menu_enum("object.constraint_add", "type", text="Add Object Constraint") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-03-11 02:19:58 +00:00
										 |  |  |         for con in obj.constraints: | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             self.draw_constraint(context, con) | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-14 20:56:19 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class BONE_PT_constraints(ConstraintButtonsPanel, Panel): | 
					
						
							| 
									
										
										
										
											2011-09-15 13:20:18 +00:00
										 |  |  |     bl_label = "Bone Constraints" | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_context = "bone_constraint" | 
					
						
							| 
									
										
										
										
											2012-03-10 20:08:25 +00:00
										 |  |  |     bl_options = {'HIDE_HEADER'} | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, 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 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-03-11 01:53:21 +00:00
										 |  |  |         layout.operator_menu_enum("pose.constraint_add", "type", text="Add Bone Constraint") | 
					
						
							| 
									
										
										
										
											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) | 
					
						
							| 
									
										
										
										
											2011-04-04 10:13:04 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if __name__ == "__main__":  # only for live edit. | 
					
						
							|  |  |  |     bpy.utils.register_module(__name__) |