| 
									
										
										
										
											2009-05-27 00:03:49 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | import bpy | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | class ConstraintButtonsPanel(bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-08-22 08:48:01 +00:00
										 |  |  | 	__space_type__ = 'PROPERTIES' | 
					
						
							|  |  |  | 	__region_type__ = 'WINDOW' | 
					
						
							| 
									
										
										
										
											2009-06-06 22:14:45 +00:00
										 |  |  | 	__context__ = "constraint" | 
					
						
							| 
									
										
										
										
											2009-05-27 00:03:49 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 	def draw_constraint(self, context, con): | 
					
						
							| 
									
										
										
										
											2009-05-27 00:03:49 +00:00
										 |  |  | 		layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 		box = layout.template_constraint(con) | 
					
						
							| 
									
										
										
										
											2009-05-27 00:03:49 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 		if box: | 
					
						
							| 
									
										
										
										
											2009-08-06 18:31:25 +00:00
										 |  |  | 			# match enum type to our functions, avoids a lookup table. | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 			getattr(self, con.type)(context, box, con) | 
					
						
							| 
									
										
										
										
											2009-08-06 18:31:25 +00:00
										 |  |  | 	 | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 			# show/key buttons here are most likely obsolete now, with | 
					
						
							|  |  |  | 			# keyframing functionality being part of every button | 
					
						
							| 
									
										
										
										
											2009-08-07 01:05:33 +00:00
										 |  |  | 			if con.type not in ('RIGID_BODY_JOINT', 'NULL'): | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 				box.itemR(con, "influence") | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	def space_template(self, layout, con, target=True, owner=True): | 
					
						
							|  |  |  | 		if target or owner: | 
					
						
							|  |  |  | 			row = layout.row() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 			row.itemL(text="Convert:") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 			if target: | 
					
						
							|  |  |  | 				row.itemR(con, "target_space", text="") | 
					
						
							| 
									
										
										
										
											2009-05-27 00:03:49 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 			if target and owner: | 
					
						
							| 
									
										
										
										
											2009-08-07 01:05:33 +00:00
										 |  |  | 				row.itemL(icon='ICON_ARROW_LEFTRIGHT') | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 			if owner: | 
					
						
							|  |  |  | 				row.itemR(con, "owner_space", text="") | 
					
						
							|  |  |  | 			 | 
					
						
							| 
									
										
										
										
											2009-05-27 07:28:51 +00:00
										 |  |  | 	def target_template(self, layout, con, subtargets=True): | 
					
						
							|  |  |  | 		layout.itemR(con, "target") # XXX limiting settings for only 'curves' or some type of object | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		if con.target and subtargets: | 
					
						
							| 
									
										
										
										
											2009-08-22 08:48:01 +00:00
										 |  |  | 			if con.target.type == 'ARMATURE': | 
					
						
							| 
									
										
										
										
											2009-06-27 01:15:31 +00:00
										 |  |  | 				layout.item_pointerR(con, "subtarget", con.target.data, "bones", text="Bone") | 
					
						
							| 
									
										
										
										
											2009-05-27 07:28:51 +00:00
										 |  |  | 				 | 
					
						
							| 
									
										
										
										
											2009-06-27 01:15:31 +00:00
										 |  |  | 				if con.type == 'COPY_LOCATION': | 
					
						
							|  |  |  | 					row = layout.row() | 
					
						
							|  |  |  | 					row.itemL(text="Head/Tail:") | 
					
						
							|  |  |  | 					row.itemR(con, "head_tail", text="") | 
					
						
							| 
									
										
										
										
											2009-08-07 01:05:33 +00:00
										 |  |  | 			elif con.target.type in ('MESH', 'LATTICE'): | 
					
						
							| 
									
										
										
										
											2009-06-27 01:15:31 +00:00
										 |  |  | 				layout.item_pointerR(con, "subtarget", con.target, "vertex_groups", text="Vertex Group") | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	def ik_template(self, layout, con): | 
					
						
							|  |  |  | 		layout.itemR(con, "pole_target") | 
					
						
							| 
									
										
										
										
											2009-05-27 07:28:51 +00:00
										 |  |  | 	 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 		if con.pole_target and con.pole_target.type == 'ARMATURE': | 
					
						
							|  |  |  | 			layout.item_pointerR(con, "pole_subtarget", con.pole_target.data, "bones", text="Bone") | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		if con.pole_target: | 
					
						
							|  |  |  | 			row = layout.row() | 
					
						
							|  |  |  | 			row.itemL() | 
					
						
							|  |  |  | 			row.itemR(con, "pole_angle") | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		split = layout.split() | 
					
						
							|  |  |  | 		col = split.column() | 
					
						
							|  |  |  | 		col.itemR(con, "tail") | 
					
						
							|  |  |  | 		col.itemR(con, "stretch") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		col = split.column() | 
					
						
							|  |  |  | 		col.itemR(con, "iterations") | 
					
						
							|  |  |  | 		col.itemR(con, "chain_length") | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-05-27 07:28:51 +00:00
										 |  |  | 	 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 	def CHILD_OF(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		self.target_template(layout, con) | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 		split = layout.split() | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		col = split.column() | 
					
						
							|  |  |  | 		col.itemL(text="Location:") | 
					
						
							|  |  |  | 		col.itemR(con, "locationx", text="X") | 
					
						
							|  |  |  | 		col.itemR(con, "locationy", text="Y") | 
					
						
							|  |  |  | 		col.itemR(con, "locationz", text="Z") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		col = split.column() | 
					
						
							|  |  |  | 		col.itemL(text="Rotation:") | 
					
						
							|  |  |  | 		col.itemR(con, "rotationx", text="X") | 
					
						
							|  |  |  | 		col.itemR(con, "rotationy", text="Y") | 
					
						
							|  |  |  | 		col.itemR(con, "rotationz", text="Z") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		col = split.column() | 
					
						
							|  |  |  | 		col.itemL(text="Scale:") | 
					
						
							|  |  |  | 		col.itemR(con, "sizex", text="X") | 
					
						
							|  |  |  | 		col.itemR(con, "sizey", text="Y") | 
					
						
							|  |  |  | 		col.itemR(con, "sizez", text="Z") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-07-17 12:26:40 +00:00
										 |  |  | 		row.itemO("constraint.childof_set_inverse") | 
					
						
							|  |  |  | 		row.itemO("constraint.childof_clear_inverse") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 	def TRACK_TO(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		self.target_template(layout, con) | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							|  |  |  | 		row.itemL(text="To:") | 
					
						
							|  |  |  | 		row.itemR(con, "track", expand=True) | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-07-11 12:54:17 +00:00
										 |  |  | 		#row.itemR(con, "up", text="Up", expand=True) # XXX: up and expand don't play nice together | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		row.itemR(con, "up", text="Up") | 
					
						
							|  |  |  | 		row.itemR(con, "target_z") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		self.space_template(layout, con) | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 	def IK(self, context, layout, con): | 
					
						
							|  |  |  | 		if context.object.pose.ik_solver == "ITASC": | 
					
						
							|  |  |  | 			layout.itemR(con, "ik_type") | 
					
						
							|  |  |  | 			getattr(self, "IK_"+con.ik_type)(context, layout, con) | 
					
						
							|  |  |  | 		else: | 
					
						
							|  |  |  | 			self.IK_COPY_POSE(context, layout, con) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	def IK_COPY_POSE(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-06-02 09:40:24 +00:00
										 |  |  | 		self.target_template(layout, con) | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 		self.ik_template(layout, con) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-10 12:17:12 +00:00
										 |  |  | 		split = layout.split() | 
					
						
							|  |  |  | 		col = split.column() | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 		col.itemL() | 
					
						
							| 
									
										
										
										
											2009-06-02 09:40:24 +00:00
										 |  |  | 		col.itemR(con, "targetless") | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 		col.itemR(con, "rotation") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		col = split.column() | 
					
						
							| 
									
										
										
										
											2009-08-10 12:17:12 +00:00
										 |  |  | 		col.itemL(text="Weight:") | 
					
						
							|  |  |  | 		col.itemR(con, "weight", text="Position", slider=True) | 
					
						
							|  |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.rotation | 
					
						
							|  |  |  | 		sub.itemR(con, "orient_weight", text="Rotation", slider=True) | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 	def IK_DISTANCE(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		self.target_template(layout, con) | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 		self.ik_template(layout, con) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		layout.itemR(con, "limit_mode") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 		row.itemR(con, "weight", text="Weight", slider=True) | 
					
						
							|  |  |  | 		row.itemR(con, "distance", text="Distance", slider=True) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	def FOLLOW_PATH(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		self.target_template(layout, con) | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-09-08 09:41:15 +00:00
										 |  |  | 		split = layout.split() | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		col = split.column() | 
					
						
							| 
									
										
										
										
											2009-09-12 16:25:49 +00:00
										 |  |  | 		col.itemR(con, "use_curve_follow") | 
					
						
							|  |  |  | 		col.itemR(con, "use_curve_radius") | 
					
						
							| 
									
										
										
										
											2009-09-08 09:41:15 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		col = split.column() | 
					
						
							| 
									
										
										
										
											2009-09-12 16:25:49 +00:00
										 |  |  | 		col.itemR(con, "use_fixed_position") | 
					
						
							|  |  |  | 		if con.use_fixed_position: | 
					
						
							| 
									
										
										
										
											2009-09-21 21:19:58 +00:00
										 |  |  | 			col.itemR(con, "offset_factor", text="Offset") | 
					
						
							| 
									
										
										
										
											2009-09-08 09:41:15 +00:00
										 |  |  | 		else: | 
					
						
							|  |  |  | 			col.itemR(con, "offset") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							|  |  |  | 		row.itemL(text="Forward:") | 
					
						
							|  |  |  | 		row.itemR(con, "forward", expand=True) | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							|  |  |  | 		row.itemR(con, "up", text="Up") | 
					
						
							|  |  |  | 		row.itemL() | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 	def LIMIT_ROTATION(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		split = layout.split() | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		col = split.column() | 
					
						
							|  |  |  | 		col.itemR(con, "use_limit_x") | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.use_limit_x | 
					
						
							|  |  |  | 		sub.itemR(con, "minimum_x", text="Min") | 
					
						
							|  |  |  | 		sub.itemR(con, "maximum_x", text="Max") | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		col = split.column() | 
					
						
							|  |  |  | 		col.itemR(con, "use_limit_y") | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.use_limit_y | 
					
						
							|  |  |  | 		sub.itemR(con, "minimum_y", text="Min") | 
					
						
							|  |  |  | 		sub.itemR(con, "maximum_y", text="Max") | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		col = split.column() | 
					
						
							|  |  |  | 		col.itemR(con, "use_limit_z") | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.use_limit_z | 
					
						
							|  |  |  | 		sub.itemR(con, "minimum_z", text="Min") | 
					
						
							|  |  |  | 		sub.itemR(con, "maximum_z", text="Max") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		row.itemR(con, "limit_transform") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		row.itemL() | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							|  |  |  | 		row.itemL(text="Convert:") | 
					
						
							|  |  |  | 		row.itemR(con, "owner_space", text="") | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 	def LIMIT_LOCATION(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		split = layout.split() | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		col = split.column() | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		col.itemR(con, "use_minimum_x") | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.use_minimum_x | 
					
						
							|  |  |  | 		sub.itemR(con, "minimum_x", text="") | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		col.itemR(con, "use_maximum_x") | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.use_maximum_x | 
					
						
							|  |  |  | 		sub.itemR(con, "maximum_x", text="") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		col = split.column() | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		col.itemR(con, "use_minimum_y") | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.use_minimum_y | 
					
						
							|  |  |  | 		sub.itemR(con, "minimum_y", text="") | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		col.itemR(con, "use_maximum_y") | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.use_maximum_y | 
					
						
							|  |  |  | 		sub.itemR(con, "maximum_y", text="") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		col = split.column() | 
					
						
							|  |  |  | 		col.itemR(con, "use_minimum_z") | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.use_minimum_z | 
					
						
							|  |  |  | 		sub.itemR(con, "minimum_z", text="") | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		col.itemR(con, "use_maximum_z") | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.use_maximum_z | 
					
						
							|  |  |  | 		sub.itemR(con, "maximum_z", text="") | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 	 | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		row.itemR(con, "limit_transform") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		row.itemL() | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							|  |  |  | 		row.itemL(text="Convert:") | 
					
						
							|  |  |  | 		row.itemR(con, "owner_space", text="") | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 	def LIMIT_SCALE(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		split = layout.split() | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 		col = split.column() | 
					
						
							|  |  |  | 		col.itemR(con, "use_minimum_x") | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.use_minimum_x | 
					
						
							|  |  |  | 		sub.itemR(con, "minimum_x", text="") | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		col.itemR(con, "use_maximum_x") | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.use_maximum_x | 
					
						
							|  |  |  | 		sub.itemR(con, "maximum_x", text="") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		col = split.column() | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		col.itemR(con, "use_minimum_y") | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.use_minimum_y | 
					
						
							|  |  |  | 		sub.itemR(con, "minimum_y", text="") | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		col.itemR(con, "use_maximum_y") | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.use_maximum_y | 
					
						
							|  |  |  | 		sub.itemR(con, "maximum_y", text="") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		col = split.column() | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		col.itemR(con, "use_minimum_z") | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.use_minimum_z | 
					
						
							|  |  |  | 		sub.itemR(con, "minimum_z", text="") | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		col.itemR(con, "use_maximum_z") | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.use_maximum_z | 
					
						
							|  |  |  | 		sub.itemR(con, "maximum_z", text="") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		row.itemR(con, "limit_transform") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		row.itemL() | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							|  |  |  | 		row.itemL(text="Convert:") | 
					
						
							|  |  |  | 		row.itemR(con, "owner_space", text="") | 
					
						
							|  |  |  | 	 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 	def COPY_ROTATION(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		self.target_template(layout, con) | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		split = layout.split() | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		col = split.column() | 
					
						
							|  |  |  | 		col.itemR(con, "rotate_like_x", text="X") | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.rotate_like_x | 
					
						
							|  |  |  | 		sub.itemR(con, "invert_x", text="Invert") | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		col = split.column() | 
					
						
							|  |  |  | 		col.itemR(con, "rotate_like_y", text="Y") | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.rotate_like_y | 
					
						
							|  |  |  | 		sub.itemR(con, "invert_y", text="Invert") | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		col = split.column() | 
					
						
							|  |  |  | 		col.itemR(con, "rotate_like_z", text="Z") | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.rotate_like_z | 
					
						
							|  |  |  | 		sub.itemR(con, "invert_z", text="Invert") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		layout.itemR(con, "offset") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		self.space_template(layout, con) | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 	def COPY_LOCATION(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-05-27 07:28:51 +00:00
										 |  |  | 		self.target_template(layout, con) | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		split = layout.split() | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		col = split.column() | 
					
						
							|  |  |  | 		col.itemR(con, "locate_like_x", text="X") | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.locate_like_x | 
					
						
							|  |  |  | 		sub.itemR(con, "invert_x", text="Invert") | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		col = split.column() | 
					
						
							|  |  |  | 		col.itemR(con, "locate_like_y", text="Y") | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.locate_like_y | 
					
						
							|  |  |  | 		sub.itemR(con, "invert_y", text="Invert") | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		col = split.column() | 
					
						
							|  |  |  | 		col.itemR(con, "locate_like_z", text="Z") | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		sub = col.column() | 
					
						
							|  |  |  | 		sub.active = con.locate_like_z | 
					
						
							|  |  |  | 		sub.itemR(con, "invert_z", text="Invert") | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 		layout.itemR(con, "offset") | 
					
						
							|  |  |  | 			 | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		self.space_template(layout, con) | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 	def COPY_SCALE(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		self.target_template(layout, con) | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		row = layout.row(align=True) | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		row.itemR(con, "size_like_x", text="X") | 
					
						
							|  |  |  | 		row.itemR(con, "size_like_y", text="Y") | 
					
						
							|  |  |  | 		row.itemR(con, "size_like_z", text="Z") | 
					
						
							| 
									
										
										
										
											2009-05-27 00:03:49 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		layout.itemR(con, "offset") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 		self.space_template(layout, con) | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 	#def SCRIPT(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 	 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 	def ACTION(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		self.target_template(layout, con) | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		layout.itemR(con, "action") | 
					
						
							|  |  |  | 		layout.itemR(con, "transform_channel") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		split = layout.split() | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 		col = split.column(align=True) | 
					
						
							|  |  |  | 		col.itemR(con, "start_frame", text="Start") | 
					
						
							|  |  |  | 		col.itemR(con, "end_frame", text="End") | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		col = split.column(align=True) | 
					
						
							|  |  |  | 		col.itemR(con, "minimum", text="Min") | 
					
						
							|  |  |  | 		col.itemR(con, "maximum", text="Max") | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							|  |  |  | 		row.itemL(text="Convert:") | 
					
						
							|  |  |  | 		row.itemR(con, "owner_space", text="") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 	 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 	def LOCKED_TRACK(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		self.target_template(layout, con) | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							|  |  |  | 		row.itemL(text="To:") | 
					
						
							|  |  |  | 		row.itemR(con, "track", expand=True) | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		row.itemL(text="Lock:") | 
					
						
							|  |  |  | 		row.itemR(con, "locked", expand=True) | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 	def LIMIT_DISTANCE(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		self.target_template(layout, con) | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-07-26 11:57:27 +00:00
										 |  |  | 		col = layout.column(align=True); | 
					
						
							|  |  |  | 		col.itemR(con, "distance") | 
					
						
							|  |  |  | 		col.itemO("constraint.limitdistance_reset") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							|  |  |  | 		row.itemL(text="Clamp Region:") | 
					
						
							|  |  |  | 		row.itemR(con, "limit_mode", text="") | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 	def STRETCH_TO(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		self.target_template(layout, con) | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-08-12 22:16:47 +00:00
										 |  |  | 		row = layout.row() | 
					
						
							|  |  |  | 		row.itemR(con, "original_length", text="Rest Length") | 
					
						
							|  |  |  | 		row.itemO("constraint.stretchto_reset", text="Reset") | 
					
						
							| 
									
										
										
										
											2009-07-26 11:57:27 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		col = layout.column() | 
					
						
							|  |  |  | 		col.itemR(con, "bulge", text="Volume Variation") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							|  |  |  | 		row.itemL(text="Volume:") | 
					
						
							|  |  |  | 		row.itemR(con, "volume", expand=True) | 
					
						
							|  |  |  | 		row.itemL(text="Plane:") | 
					
						
							|  |  |  | 		row.itemR(con, "keep_axis", expand=True) | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 	def FLOOR(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		self.target_template(layout, con) | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		row.itemR(con, "sticky") | 
					
						
							|  |  |  | 		row.itemR(con, "use_rotation") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		layout.itemR(con, "offset") | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							|  |  |  | 		row.itemL(text="Min/Max:") | 
					
						
							|  |  |  | 		row.itemR(con, "floor_location", expand=True) | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 	def RIGID_BODY_JOINT(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-06-02 09:40:24 +00:00
										 |  |  | 		self.target_template(layout, con) | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		layout.itemR(con, "pivot_type") | 
					
						
							|  |  |  | 		layout.itemR(con, "child") | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							|  |  |  | 		row.itemR(con, "disable_linked_collision", text="No Collision") | 
					
						
							| 
									
										
										
										
											2009-08-12 22:16:47 +00:00
										 |  |  | 		row.itemR(con, "draw_pivot", text="Display Pivot") | 
					
						
							| 
									
										
										
										
											2009-06-02 09:40:24 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		split = layout.split() | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-08-12 22:16:47 +00:00
										 |  |  | 		col = split.column(align=True) | 
					
						
							|  |  |  | 		col.itemL(text="Pivot:") | 
					
						
							|  |  |  | 		col.itemR(con, "pivot_x", text="X") | 
					
						
							|  |  |  | 		col.itemR(con, "pivot_y", text="Y") | 
					
						
							|  |  |  | 		col.itemR(con, "pivot_z", text="Z") | 
					
						
							| 
									
										
										
										
											2009-06-02 09:40:24 +00:00
										 |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-08-12 22:16:47 +00:00
										 |  |  | 		col = split.column(align=True) | 
					
						
							|  |  |  | 		col.itemL(text="Axis:") | 
					
						
							|  |  |  | 		col.itemR(con, "axis_x", text="X") | 
					
						
							|  |  |  | 		col.itemR(con, "axis_y", text="Y") | 
					
						
							|  |  |  | 		col.itemR(con, "axis_z", text="Z") | 
					
						
							| 
									
										
										
										
											2009-06-02 09:40:24 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		#Missing: Limit arrays (not wrapped in RNA yet)  | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 	 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 	def CLAMP_TO(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		self.target_template(layout, con) | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							|  |  |  | 		row.itemL(text="Main Axis:") | 
					
						
							|  |  |  | 		row.itemR(con, "main_axis", expand=True) | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		row.itemR(con, "cyclic") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 	def TRANSFORM(self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		self.target_template(layout, con) | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		layout.itemR(con, "extrapolate_motion", text="Extrapolate") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		split = layout.split() | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		col = split.column() | 
					
						
							|  |  |  | 		col.itemL(text="Source:") | 
					
						
							|  |  |  | 		col.row().itemR(con, "map_from", expand=True) | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		sub = col.row(align=True) | 
					
						
							|  |  |  | 		sub.itemL(text="X:") | 
					
						
							|  |  |  | 		sub.itemR(con, "from_min_x", text="") | 
					
						
							|  |  |  | 		sub.itemR(con, "from_max_x", text="") | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		sub = col.row(align=True) | 
					
						
							|  |  |  | 		sub.itemL(text="Y:") | 
					
						
							|  |  |  | 		sub.itemR(con, "from_min_y", text="") | 
					
						
							|  |  |  | 		sub.itemR(con, "from_max_y", text="") | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		sub = col.row(align=True) | 
					
						
							|  |  |  | 		sub.itemL(text="Z:") | 
					
						
							|  |  |  | 		sub.itemR(con, "from_min_z", text="") | 
					
						
							|  |  |  | 		sub.itemR(con, "from_max_z", text="") | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 		split = layout.split() | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		col = split.column() | 
					
						
							|  |  |  | 		col.itemL(text="Destination:") | 
					
						
							|  |  |  | 		col.row().itemR(con, "map_to", expand=True) | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		sub = col.row(align=True) | 
					
						
							|  |  |  | 		sub.itemR(con, "map_to_x_from", text="") | 
					
						
							|  |  |  | 		sub.itemR(con, "to_min_x", text="") | 
					
						
							|  |  |  | 		sub.itemR(con, "to_max_x", text="") | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		sub = col.row(align=True) | 
					
						
							|  |  |  | 		sub.itemR(con, "map_to_y_from", text="") | 
					
						
							|  |  |  | 		sub.itemR(con, "to_min_y", text="") | 
					
						
							|  |  |  | 		sub.itemR(con, "to_max_y", text="") | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		sub = col.row(align=True) | 
					
						
							|  |  |  | 		sub.itemR(con, "map_to_z_from", text="") | 
					
						
							|  |  |  | 		sub.itemR(con, "to_min_z", text="") | 
					
						
							|  |  |  | 		sub.itemR(con, "to_max_z", text="") | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		self.space_template(layout, con) | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 	def SHRINKWRAP (self, context, layout, con): | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		self.target_template(layout, con) | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		layout.itemR(con, "distance") | 
					
						
							|  |  |  | 		layout.itemR(con, "shrinkwrap_type") | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-08-22 08:48:01 +00:00
										 |  |  | 		if con.shrinkwrap_type == 'PROJECT': | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 			row = layout.row(align=True) | 
					
						
							| 
									
										
										
										
											2009-05-31 11:47:45 +00:00
										 |  |  | 			row.itemR(con, "axis_x") | 
					
						
							|  |  |  | 			row.itemR(con, "axis_y") | 
					
						
							|  |  |  | 			row.itemR(con, "axis_z") | 
					
						
							| 
									
										
										
										
											2009-05-30 23:31:10 +00:00
										 |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | class OBJECT_PT_constraints(ConstraintButtonsPanel): | 
					
						
							|  |  |  | 	__label__ = "Constraints" | 
					
						
							| 
									
										
										
										
											2009-06-06 22:14:45 +00:00
										 |  |  | 	__context__ = "constraint" | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	def poll(self, context): | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		return (context.object) | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 	def draw(self, context): | 
					
						
							|  |  |  | 		layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		ob = context.object | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-07-19 13:06:18 +00:00
										 |  |  | 		row.item_menu_enumO("object.constraint_add", "type") | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 		row.itemL(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		for con in ob.constraints: | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 			self.draw_constraint(context, con) | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | class BONE_PT_constraints(ConstraintButtonsPanel): | 
					
						
							| 
									
										
										
										
											2009-07-14 20:27:28 +00:00
										 |  |  | 	__label__ = "Constraints" | 
					
						
							| 
									
										
										
										
											2009-09-19 19:40:38 +00:00
										 |  |  | 	__context__ = "bone_constraint" | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	def poll(self, context): | 
					
						
							| 
									
										
										
										
											2009-06-03 00:17:35 +00:00
										 |  |  | 		ob = context.object | 
					
						
							| 
									
										
										
										
											2009-08-07 01:05:33 +00:00
										 |  |  | 		return (ob and ob.type == 'ARMATURE' and context.bone) | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 	def draw(self, context): | 
					
						
							| 
									
										
										
										
											2009-07-30 10:11:19 +00:00
										 |  |  | 		layout = self.layout | 
					
						
							|  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-06-03 00:17:35 +00:00
										 |  |  | 		ob = context.object | 
					
						
							| 
									
										
										
										
											2009-06-27 14:07:17 +00:00
										 |  |  | 		pchan = ob.pose.pose_channels[context.bone.name] | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-06-27 14:07:17 +00:00
										 |  |  | 		row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-07-17 12:26:40 +00:00
										 |  |  | 		row.item_menu_enumO("pose.constraint_add", "type") | 
					
						
							| 
									
										
										
										
											2009-06-27 14:07:17 +00:00
										 |  |  | 		row.itemL(); | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 		for con in pchan.constraints: | 
					
						
							| 
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 |  |  | 			self.draw_constraint(context, con) | 
					
						
							| 
									
										
										
										
											2009-05-28 23:45:50 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | bpy.types.register(OBJECT_PT_constraints) | 
					
						
							| 
									
										
										
										
											2009-06-21 00:17:45 +00:00
										 |  |  | bpy.types.register(BONE_PT_constraints) |