| 
									
										
										
										
											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-08 18:17:57 +00:00
										 |  |  | import bpy | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  | class ModifierButtonsPanel(): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_space_type = 'PROPERTIES' | 
					
						
							|  |  |  |     bl_region_type = 'WINDOW' | 
					
						
							|  |  |  |     bl_context = "modifier" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  | class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Modifiers" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         ob = context.object | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-30 08:45:31 +00:00
										 |  |  |         layout.operator_menu_enum("object.modifier_add", "type") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         for md in ob.modifiers: | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |             box = layout.template_modifier(md) | 
					
						
							| 
									
										
										
										
											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, md.type)(box, ob, md) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     # the mt.type enum is (ab)used for a lookup on function names | 
					
						
							|  |  |  |     # ...to avoid lengthy if statements | 
					
						
							|  |  |  |     # so each type must have a function here. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def ARMATURE(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Object:") | 
					
						
							|  |  |  |         col.prop(md, "object", text="") | 
					
						
							| 
									
										
										
										
											2010-11-19 03:09:51 +00:00
										 |  |  |         col.prop(md, "use_deform_preserve_volume") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Bind To:") | 
					
						
							|  |  |  |         col.prop(md, "use_vertex_groups", text="Vertex Groups") | 
					
						
							|  |  |  |         col.prop(md, "use_bone_envelopes", text="Bone Envelopes") | 
					
						
							| 
									
										
										
										
											2011-02-26 16:27:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-26 16:04:14 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2011-02-26 16:27:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-26 16:04:14 +00:00
										 |  |  |         row = layout.row() | 
					
						
							|  |  |  |         row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") | 
					
						
							|  |  |  |         sub = row.row() | 
					
						
							| 
									
										
										
										
											2010-12-31 11:51:00 +00:00
										 |  |  |         sub.active = bool(md.vertex_group) | 
					
						
							|  |  |  |         sub.prop(md, "invert_vertex_group") | 
					
						
							| 
									
										
										
										
											2011-01-01 07:20:34 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-26 16:04:14 +00:00
										 |  |  |         layout.prop(md, "use_multi_modifier") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def ARRAY(self, layout, ob, md): | 
					
						
							|  |  |  |         layout.prop(md, "fit_type") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if md.fit_type == 'FIXED_COUNT': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.prop(md, "count") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         elif md.fit_type == 'FIT_LENGTH': | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |             layout.prop(md, "fit_length") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         elif md.fit_type == 'FIT_CURVE': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.prop(md, "curve") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         col.prop(md, "use_constant_offset") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.active = md.use_constant_offset | 
					
						
							|  |  |  |         sub.prop(md, "constant_offset_displace", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.separator() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         col.prop(md, "use_merge_vertices", text="Merge") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.active = md.use_merge_vertices | 
					
						
							|  |  |  |         sub.prop(md, "use_merge_vertices_cap", text="First Last") | 
					
						
							|  |  |  |         sub.prop(md, "merge_threshold", text="Distance") | 
					
						
							| 
									
										
										
										
											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(md, "use_relative_offset") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.active = md.use_relative_offset | 
					
						
							|  |  |  |         sub.prop(md, "relative_offset_displace", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.separator() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         col.prop(md, "use_object_offset") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.active = md.use_object_offset | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(md, "offset_object", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-26 16:04:14 +00:00
										 |  |  |         layout.prop(md, "start_cap") | 
					
						
							|  |  |  |         layout.prop(md, "end_cap") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def BEVEL(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2009-11-16 16:07:22 +00:00
										 |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-04-24 20:59:19 +00:00
										 |  |  |         split.prop(md, "width") | 
					
						
							|  |  |  |         split.prop(md, "use_only_vertices") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.label(text="Limit Method:") | 
					
						
							|  |  |  |         layout.row().prop(md, "limit_method", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         if md.limit_method == 'ANGLE': | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |             layout.prop(md, "angle_limit") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         elif md.limit_method == 'WEIGHT': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.row().prop(md, "edge_weight_method", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def BOOLEAN(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Operation:") | 
					
						
							|  |  |  |         col.prop(md, "operation", text="") | 
					
						
							| 
									
										
										
										
											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="Object:") | 
					
						
							|  |  |  |         col.prop(md, "object", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def BUILD(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2010-04-22 17:35:00 +00:00
										 |  |  |         col.prop(md, "frame_start") | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         col.prop(md, "frame_duration") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         col.prop(md, "use_random_order") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         sub.active = md.use_random_order | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(md, "seed") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def CAST(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  |         split = layout.split(percentage=0.25) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         split.label(text="Cast Type:") | 
					
						
							|  |  |  |         split.prop(md, "cast_type", text="") | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split(percentage=0.25) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-16 16:07:22 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         col.prop(md, "use_x") | 
					
						
							|  |  |  |         col.prop(md, "use_y") | 
					
						
							|  |  |  |         col.prop(md, "use_z") | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(md, "factor") | 
					
						
							|  |  |  |         col.prop(md, "radius") | 
					
						
							|  |  |  |         col.prop(md, "size") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         col.prop(md, "use_radius_as_size") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Vertex Group:") | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Control Object:") | 
					
						
							|  |  |  |         col.prop(md, "object", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         if md.object: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(md, "use_transform") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def CLOTH(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2011-04-24 20:59:19 +00:00
										 |  |  |         layout.label(text="Settings can be found inside the Physics context") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def COLLISION(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2011-04-24 20:59:19 +00:00
										 |  |  |         layout.label(text="Settings can be found inside the Physics context") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def CURVE(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Object:") | 
					
						
							|  |  |  |         col.prop(md, "object", text="") | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Vertex Group:") | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.label(text="Deformation Axis:") | 
					
						
							|  |  |  |         layout.row().prop(md, "deform_axis", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def DECIMATE(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.prop(md, "ratio") | 
					
						
							| 
									
										
										
										
											2010-05-17 13:48:09 +00:00
										 |  |  |         layout.label(text="Face Count: %s" % str(md.face_count)) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def DISPLACE(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2009-11-16 16:07:22 +00:00
										 |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-16 16:07:22 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Texture:") | 
					
						
							| 
									
										
										
										
											2011-02-16 10:23:27 +00:00
										 |  |  |         col.template_ID(md, "texture", new="texture.new") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Vertex Group:") | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Direction:") | 
					
						
							|  |  |  |         col.prop(md, "direction", text="") | 
					
						
							|  |  |  |         col.label(text="Texture Coordinates:") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         col.prop(md, "texture_coords", text="") | 
					
						
							|  |  |  |         if md.texture_coords == 'OBJECT': | 
					
						
							| 
									
										
										
										
											2011-05-16 05:50:04 +00:00
										 |  |  |             layout.prop(md, "texture_coords_object", text="Object") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         elif md.texture_coords == 'UV' and ob.type == 'MESH': | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |             layout.prop_search(md, "uv_layer", ob.data, "uv_textures") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-26 16:04:14 +00:00
										 |  |  |         row = layout.row() | 
					
						
							|  |  |  |         row.prop(md, "mid_level") | 
					
						
							|  |  |  |         row.prop(md, "strength") | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def EDGE_SPLIT(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(md, "use_edge_angle", text="Edge Angle") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							|  |  |  |         sub.active = md.use_edge_angle | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(md, "split_angle") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-26 16:04:14 +00:00
										 |  |  |         split.prop(md, "use_edge_sharp", text="Sharp Edges") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def EXPLODE(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2009-11-16 16:07:22 +00:00
										 |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Vertex group:") | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") | 
					
						
							| 
									
										
										
										
											2009-11-20 20:40:29 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 09:28:42 +00:00
										 |  |  |         sub.active = bool(md.vertex_group) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(md, "protect") | 
					
						
							| 
									
										
										
										
											2011-02-23 19:29:59 +00:00
										 |  |  |         col.label(text="Particle UV") | 
					
						
							|  |  |  |         col.prop_search(md, "particle_uv", ob.data, "uv_textures", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2011-02-23 19:29:59 +00:00
										 |  |  |         col.prop(md, "use_edge_cut") | 
					
						
							| 
									
										
										
										
											2010-08-17 17:03:52 +00:00
										 |  |  |         col.prop(md, "show_unborn") | 
					
						
							|  |  |  |         col.prop(md, "show_alive") | 
					
						
							|  |  |  |         col.prop(md, "show_dead") | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         col.prop(md, "use_size") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("object.explode_refresh", text="Refresh") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def FLUID_SIMULATION(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2011-04-24 20:59:19 +00:00
										 |  |  |         layout.label(text="Settings can be found inside the Physics context") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def HOOK(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Object:") | 
					
						
							|  |  |  |         col.prop(md, "object", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         if md.object and md.object.type == 'ARMATURE': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.label(text="Bone:") | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |             col.prop_search(md, "subtarget", md.object.data, "bones", text="") | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Vertex Group:") | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-16 16:07:22 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(md, "falloff") | 
					
						
							|  |  |  |         col.prop(md, "force", slider=True) | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.operator("object.hook_reset", text="Reset") | 
					
						
							|  |  |  |         col.operator("object.hook_recenter", text="Recenter") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if ob.mode == 'EDIT': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.separator() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.operator("object.hook_select", text="Select") | 
					
						
							|  |  |  |             row.operator("object.hook_assign", text="Assign") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def LATTICE(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Object:") | 
					
						
							|  |  |  |         col.prop(md, "object", text="") | 
					
						
							| 
									
										
										
										
											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="Vertex Group:") | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def MASK(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Mode:") | 
					
						
							|  |  |  |         col.prop(md, "mode", text="") | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         if md.mode == 'ARMATURE': | 
					
						
							| 
									
										
										
										
											2010-01-20 00:31:34 +00:00
										 |  |  |             col.label(text="Armature:") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(md, "armature", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         elif md.mode == 'VERTEX_GROUP': | 
					
						
							| 
									
										
										
										
											2010-01-20 00:31:34 +00:00
										 |  |  |             col.label(text="Vertex Group:") | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |             col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 09:28:42 +00:00
										 |  |  |         sub.active = bool(md.vertex_group) | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         sub.prop(md, "invert_vertex_group") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def MESH_DEFORM(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2011-02-26 16:27:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-28 13:33:17 +00:00
										 |  |  |         sub = col.column() | 
					
						
							|  |  |  |         sub.label(text="Object:") | 
					
						
							|  |  |  |         sub.prop(md, "object", text="") | 
					
						
							|  |  |  |         sub.active = not md.is_bound | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Vertex Group:") | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 09:28:42 +00:00
										 |  |  |         sub.active = bool(md.vertex_group) | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         sub.prop(md, "invert_vertex_group") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if md.is_bound: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.operator("object.meshdeform_bind", text="Unbind") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         else: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.operator("object.meshdeform_bind", text="Bind") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-26 16:04:14 +00:00
										 |  |  |             row = layout.row() | 
					
						
							|  |  |  |             row.prop(md, "precision") | 
					
						
							|  |  |  |             row.prop(md, "use_dynamic_bind") | 
					
						
							| 
									
										
										
										
											2009-11-16 16:07:22 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def MIRROR(self, layout, ob, md): | 
					
						
							|  |  |  |         split = layout.split(percentage=0.25) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Axis:") | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         col.prop(md, "use_x") | 
					
						
							|  |  |  |         col.prop(md, "use_y") | 
					
						
							|  |  |  |         col.prop(md, "use_z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Options:") | 
					
						
							| 
									
										
										
										
											2011-02-10 00:05:03 +00:00
										 |  |  |         col.prop(md, "use_mirror_merge", text="Merge") | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         col.prop(md, "use_clip", text="Clipping") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         col.prop(md, "use_mirror_vertex_groups", text="Vertex Groups") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Textures:") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         col.prop(md, "use_mirror_u", text="U") | 
					
						
							|  |  |  |         col.prop(md, "use_mirror_v", text="V") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  |         col = layout.column() | 
					
						
							| 
									
										
										
										
											2011-02-16 02:25:03 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-10 00:05:03 +00:00
										 |  |  |         if md.use_mirror_merge == True: | 
					
						
							|  |  |  |             col.prop(md, "merge_threshold") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Mirror Object:") | 
					
						
							|  |  |  |         col.prop(md, "mirror_object", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def MULTIRES(self, layout, ob, md): | 
					
						
							|  |  |  |         layout.row().prop(md, "subdivision_type", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-25 14:10:45 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-25 17:51:16 +00:00
										 |  |  |         col.prop(md, "levels", text="Preview") | 
					
						
							|  |  |  |         col.prop(md, "sculpt_levels", text="Sculpt") | 
					
						
							|  |  |  |         col.prop(md, "render_levels", text="Render") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-25 17:51:16 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-07 19:11:37 +00:00
										 |  |  |         col.enabled = ob.mode != 'EDIT' | 
					
						
							| 
									
										
										
										
											2009-11-25 17:51:16 +00:00
										 |  |  |         col.operator("object.multires_subdivide", text="Subdivide") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.operator("object.multires_higher_levels_delete", text="Delete Higher") | 
					
						
							| 
									
										
										
										
											2009-12-21 15:55:10 +00:00
										 |  |  |         col.operator("object.multires_reshape", text="Reshape") | 
					
						
							| 
									
										
										
										
											2011-01-07 21:12:47 +00:00
										 |  |  |         col.operator("object.multires_base_apply", text="Apply Base") | 
					
						
							| 
									
										
										
										
											2010-08-17 17:03:52 +00:00
										 |  |  |         col.prop(md, "show_only_control_edges") | 
					
						
							| 
									
										
										
										
											2009-12-10 14:26:06 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = layout.column() | 
					
						
							| 
									
										
										
										
											2009-11-25 14:27:50 +00:00
										 |  |  |         row = col.row() | 
					
						
							| 
									
										
										
										
											2010-08-19 12:51:31 +00:00
										 |  |  |         if md.is_external: | 
					
						
							| 
									
										
										
										
											2010-06-09 14:04:34 +00:00
										 |  |  |             row.operator("object.multires_external_pack", text="Pack External") | 
					
						
							| 
									
										
										
										
											2009-12-10 14:26:06 +00:00
										 |  |  |             row.label() | 
					
						
							|  |  |  |             row = col.row() | 
					
						
							| 
									
										
										
										
											2010-06-02 17:58:28 +00:00
										 |  |  |             row.prop(md, "filepath", text="") | 
					
						
							| 
									
										
										
										
											2009-12-10 14:26:06 +00:00
										 |  |  |         else: | 
					
						
							| 
									
										
										
										
											2010-06-09 14:04:34 +00:00
										 |  |  |             row.operator("object.multires_external_save", text="Save External...") | 
					
						
							| 
									
										
										
										
											2009-12-10 14:26:06 +00:00
										 |  |  |             row.label() | 
					
						
							| 
									
										
										
										
											2009-11-16 16:07:22 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def PARTICLE_INSTANCE(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.prop(md, "object") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         layout.prop(md, "particle_system_index", text="Particle System") | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-16 16:07:22 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Create From:") | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         col.prop(md, "use_normal") | 
					
						
							|  |  |  |         col.prop(md, "use_children") | 
					
						
							|  |  |  |         col.prop(md, "use_size") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Show Particles When:") | 
					
						
							| 
									
										
										
										
											2010-08-17 17:03:52 +00:00
										 |  |  |         col.prop(md, "show_alive") | 
					
						
							|  |  |  |         col.prop(md, "show_unborn") | 
					
						
							|  |  |  |         col.prop(md, "show_dead") | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-06-14 03:52:10 +00:00
										 |  |  |         layout.prop(md, "use_path", text="Create Along Paths") | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-16 16:07:22 +00:00
										 |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2010-06-14 03:52:10 +00:00
										 |  |  |         split.active = md.use_path | 
					
						
							| 
									
										
										
										
											2009-11-16 16:07:22 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.row().prop(md, "axis", expand=True) | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         col.prop(md, "use_preserve_shape") | 
					
						
							| 
									
										
										
										
											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.prop(md, "position", slider=True) | 
					
						
							|  |  |  |         col.prop(md, "random_position", text="Random", slider=True) | 
					
						
							| 
									
										
										
										
											2009-11-16 16:07:22 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def PARTICLE_SYSTEM(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2011-04-24 20:59:19 +00:00
										 |  |  |         layout.label(text="Settings can be found inside the Particle context") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def SCREW(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2010-03-22 00:22:52 +00:00
										 |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2010-04-04 14:52:15 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-03-22 00:22:52 +00:00
										 |  |  |         col = split.column() | 
					
						
							|  |  |  |         col.prop(md, "axis") | 
					
						
							|  |  |  |         col.prop(md, "object", text="AxisOb") | 
					
						
							|  |  |  |         col.prop(md, "angle") | 
					
						
							|  |  |  |         col.prop(md, "steps") | 
					
						
							|  |  |  |         col.prop(md, "render_steps") | 
					
						
							| 
									
										
										
										
											2010-04-04 14:52:15 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2010-03-22 00:22:52 +00:00
										 |  |  |         row = col.row() | 
					
						
							|  |  |  |         row.active = (md.object is None or md.use_object_screw_offset == False) | 
					
						
							|  |  |  |         row.prop(md, "screw_offset") | 
					
						
							|  |  |  |         row = col.row() | 
					
						
							|  |  |  |         row.active = (md.object is not None) | 
					
						
							|  |  |  |         row.prop(md, "use_object_screw_offset") | 
					
						
							|  |  |  |         col.prop(md, "use_normal_calculate") | 
					
						
							|  |  |  |         col.prop(md, "use_normal_flip") | 
					
						
							|  |  |  |         col.prop(md, "iterations") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def SHRINKWRAP(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2009-11-16 16:07:22 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Target:") | 
					
						
							|  |  |  |         col.prop(md, "target", text="") | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Vertex Group:") | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") | 
					
						
							| 
									
										
										
										
											2009-11-20 20:40:29 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(md, "offset") | 
					
						
							|  |  |  |         col.prop(md, "subsurf_levels") | 
					
						
							| 
									
										
										
										
											2009-11-20 20:40:29 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							|  |  |  |         col.label(text="Mode:") | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         col.prop(md, "wrap_method", text="") | 
					
						
							| 
									
										
										
										
											2009-11-20 20:40:29 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-21 07:15:11 +00:00
										 |  |  |         if md.wrap_method == 'PROJECT': | 
					
						
							| 
									
										
										
										
											2011-06-10 20:41:22 +00:00
										 |  |  |             split = layout.split(percentage=0.25) | 
					
						
							| 
									
										
										
										
											2011-06-21 17:17:51 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-06-10 20:41:22 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.label(text="Axis:") | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |             col.prop(md, "use_project_x") | 
					
						
							|  |  |  |             col.prop(md, "use_project_y") | 
					
						
							|  |  |  |             col.prop(md, "use_project_z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-16 16:07:22 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.label(text="Direction:") | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |             col.prop(md, "use_negative_direction") | 
					
						
							|  |  |  |             col.prop(md, "use_positive_direction") | 
					
						
							| 
									
										
										
										
											2009-11-20 20:40:29 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.label(text="Cull Faces:") | 
					
						
							| 
									
										
										
										
											2011-02-19 09:53:38 +00:00
										 |  |  |             col.prop(md, "cull_face", expand=True) | 
					
						
							| 
									
										
										
										
											2009-11-20 20:40:29 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.label(text="Auxiliary Target:") | 
					
						
							|  |  |  |             layout.prop(md, "auxiliary_target", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-21 07:15:11 +00:00
										 |  |  |         elif md.wrap_method == 'NEAREST_SURFACEPOINT': | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             layout.prop(md, "use_keep_above_surface") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def SIMPLE_DEFORM(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Mode:") | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         col.prop(md, "deform_method", text="") | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Vertex Group:") | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Origin:") | 
					
						
							|  |  |  |         col.prop(md, "origin", text="") | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         sub.active = (md.origin is not None) | 
					
						
							|  |  |  |         sub.prop(md, "use_relative") | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Deform:") | 
					
						
							|  |  |  |         col.prop(md, "factor") | 
					
						
							|  |  |  |         col.prop(md, "limits", slider=True) | 
					
						
							| 
									
										
										
										
											2011-03-07 13:23:45 +00:00
										 |  |  |         if md.deform_method in {'TAPER', 'STRETCH'}: | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             col.prop(md, "lock_x") | 
					
						
							|  |  |  |             col.prop(md, "lock_y") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def SMOKE(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2011-04-24 20:59:19 +00:00
										 |  |  |         layout.label(text="Settings can be found inside the Physics context") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def SMOOTH(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2009-11-20 18:01:39 +00:00
										 |  |  |         split = layout.split(percentage=0.25) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Axis:") | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         col.prop(md, "use_x") | 
					
						
							|  |  |  |         col.prop(md, "use_y") | 
					
						
							|  |  |  |         col.prop(md, "use_z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(md, "factor") | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         col.prop(md, "iterations") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Vertex Group:") | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def SOFT_BODY(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2011-04-24 20:59:19 +00:00
										 |  |  |         layout.label(text="Settings can be found inside the Physics context") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def SOLIDIFY(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2009-12-21 01:02:08 +00:00
										 |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-21 01:02:08 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2010-03-31 07:28:23 +00:00
										 |  |  |         col.prop(md, "thickness") | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") | 
					
						
							| 
									
										
										
										
											2010-03-31 07:28:23 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-29 12:04:37 +00:00
										 |  |  |         col.label(text="Crease:") | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  |         col.prop(md, "edge_crease_inner", text="Inner") | 
					
						
							| 
									
										
										
										
											2009-12-29 12:04:37 +00:00
										 |  |  |         col.prop(md, "edge_crease_outer", text="Outer") | 
					
						
							|  |  |  |         col.prop(md, "edge_crease_rim", text="Rim") | 
					
						
							| 
									
										
										
										
											2011-03-03 05:09:07 +00:00
										 |  |  |         col.label(text="Material Index Offset:") | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2010-03-31 07:28:23 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col.prop(md, "offset") | 
					
						
							| 
									
										
										
										
											2011-04-24 20:59:19 +00:00
										 |  |  |         sub = col.column() | 
					
						
							|  |  |  |         sub.active = bool(md.vertex_group) | 
					
						
							|  |  |  |         sub.prop(md, "invert_vertex_group", text="Invert") | 
					
						
							| 
									
										
										
										
											2010-03-31 07:28:23 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-21 01:02:08 +00:00
										 |  |  |         col.prop(md, "use_even_offset") | 
					
						
							|  |  |  |         col.prop(md, "use_quality_normals") | 
					
						
							| 
									
										
										
										
											2010-06-13 13:56:13 +00:00
										 |  |  |         col.prop(md, "use_rim") | 
					
						
							| 
									
										
										
										
											2011-05-02 17:29:30 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-04-24 20:59:19 +00:00
										 |  |  |         sub = col.column() | 
					
						
							|  |  |  |         sub.label() | 
					
						
							|  |  |  |         row = sub.split(align=True, percentage=0.4) | 
					
						
							|  |  |  |         row.prop(md, "material_offset", text="") | 
					
						
							|  |  |  |         row = row.row() | 
					
						
							|  |  |  |         row.active = md.use_rim | 
					
						
							|  |  |  |         row.prop(md, "material_offset_rim", text="Rim") | 
					
						
							| 
									
										
										
										
											2010-06-13 13:56:13 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def SUBSURF(self, layout, ob, md): | 
					
						
							|  |  |  |         layout.row().prop(md, "subdivision_type", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-16 16:07:22 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Subdivisions:") | 
					
						
							|  |  |  |         col.prop(md, "levels", text="View") | 
					
						
							|  |  |  |         col.prop(md, "render_levels", text="Render") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Options:") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         col.prop(md, "use_subsurf_uv") | 
					
						
							| 
									
										
										
										
											2010-08-17 17:03:52 +00:00
										 |  |  |         col.prop(md, "show_only_control_edges") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def SURFACE(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2011-04-24 20:59:19 +00:00
										 |  |  |         layout.label(text="Settings can be found inside the Physics context") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def UV_PROJECT(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         if ob.type == 'MESH': | 
					
						
							|  |  |  |             split = layout.split() | 
					
						
							| 
									
										
										
										
											2009-12-29 12:53:30 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-12-29 12:53:30 +00:00
										 |  |  |             col.label(text="Image:") | 
					
						
							|  |  |  |             col.prop(md, "image", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-12-29 12:53:30 +00:00
										 |  |  |             col.label(text="UV Layer:") | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |             col.prop_search(md, "uv_layer", ob.data, "uv_textures", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  |             split = layout.split() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             col.prop(md, "use_image_override") | 
					
						
							|  |  |  |             col.prop(md, "projector_count", text="Projectors") | 
					
						
							| 
									
										
										
										
											2009-11-16 16:07:22 +00:00
										 |  |  |             for proj in md.projectors: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 col.prop(proj, "object", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             sub = col.column(align=True) | 
					
						
							| 
									
										
										
											
												* Multiply for panorama cameras
* Some cases of struct name being set where it shouldnt have been.
* Spelling: wich --> which
* Copy and initialize uv modifier scale, remove unneeded enum.
* Ability to pin any object into the context.
* Update uv window while transforming (useful when used with UVProject modifier)
* Patch by Wahooney, so new template's are internal text and dont get saved over
  by mistake.
* Fix for https://bugzilla.redhat.com/show_bug.cgi?id=572186
  Bug 572186 - [abrt] crash in blender-2.49b-5.fc12: Process
  /usr/bin/blender.bin was killed by signal 6 (SIGABRT). Original fix submitted
  by Jochen Schmitt.
* [#21816] bpy.data.add_image has stopped working on Windows. moved to
  bpy.data.images.load(), missed this call.
(commits 27726,27825,27828,27831,27832,27833,27834,27836,27837,27838,27839,27858 by Campbell from render25 branch)
											
										 
											2010-03-30 12:15:16 +00:00
										 |  |  |             sub.prop(md, "aspect_x", text="Aspect X") | 
					
						
							|  |  |  |             sub.prop(md, "aspect_y", text="Aspect Y") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             sub = col.column(align=True) | 
					
						
							|  |  |  |             sub.prop(md, "scale_x", text="Scale X") | 
					
						
							|  |  |  |             sub.prop(md, "scale_y", text="Scale Y") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-05-01 15:16:59 +00:00
										 |  |  |     def WARP(self, layout, ob, md): | 
					
						
							|  |  |  |         use_falloff = (md.falloff_type != 'NONE') | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							|  |  |  |         col.label(text="From:") | 
					
						
							|  |  |  |         col.prop(md, "object_from", text="") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col.prop(md, "use_volume_preserve") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							|  |  |  |         col.label(text="To:") | 
					
						
							|  |  |  |         col.prop(md, "object_to", text="") | 
					
						
							|  |  |  |         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = layout.column() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         row = col.row(align=True) | 
					
						
							|  |  |  |         row.prop(md, "strength") | 
					
						
							|  |  |  |         if use_falloff: | 
					
						
							|  |  |  |             row.prop(md, "falloff_radius") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col.prop(md, "falloff_type") | 
					
						
							|  |  |  |         if use_falloff: | 
					
						
							|  |  |  |             if md.falloff_type == 'CURVE': | 
					
						
							|  |  |  |                 col.template_curve_mapping(md, "falloff_curve") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         # 2 new columns | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							|  |  |  |         col.label(text="Texture:") | 
					
						
							|  |  |  |         col.prop(md, "texture", text="") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							|  |  |  |         col.label(text="Texture Coordinates:") | 
					
						
							|  |  |  |         col.prop(md, "texture_coords", text="") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         if md.texture_coords == 'OBJECT': | 
					
						
							| 
									
										
										
										
											2011-05-16 05:50:04 +00:00
										 |  |  |             layout.prop(md, "texture_coords_object", text="Object") | 
					
						
							| 
									
										
										
										
											2011-05-01 15:16:59 +00:00
										 |  |  |         elif md.texture_coords == 'UV' and ob.type == 'MESH': | 
					
						
							| 
									
										
										
										
											2011-05-06 23:54:40 +00:00
										 |  |  |             layout.prop_search(md, "uv_layer", ob.data, "uv_textures") | 
					
						
							| 
									
										
										
										
											2011-05-01 15:16:59 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |     def WAVE(self, layout, ob, md): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Motion:") | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         col.prop(md, "use_x") | 
					
						
							|  |  |  |         col.prop(md, "use_y") | 
					
						
							|  |  |  |         col.prop(md, "use_cyclic") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         col.prop(md, "use_normal") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2010-08-21 07:15:11 +00:00
										 |  |  |         sub.active = md.use_normal | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.prop(md, "use_normal_x", text="X") | 
					
						
							|  |  |  |         sub.prop(md, "use_normal_y", text="Y") | 
					
						
							|  |  |  |         sub.prop(md, "use_normal_z", text="Z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Time:") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(md, "time_offset", text="Offset") | 
					
						
							|  |  |  |         sub.prop(md, "lifetime", text="Life") | 
					
						
							|  |  |  |         col.prop(md, "damping_time", text="Damping") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Position:") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(md, "start_position_x", text="X") | 
					
						
							|  |  |  |         sub.prop(md, "start_position_y", text="Y") | 
					
						
							|  |  |  |         col.prop(md, "falloff_radius", text="Falloff") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.prop(md, "start_position_object") | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |         layout.prop_search(md, "vertex_group", ob, "vertex_groups") | 
					
						
							| 
									
										
										
										
											2011-02-16 10:23:27 +00:00
										 |  |  |         split = layout.split(percentage=0.33) | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							|  |  |  |         col.label(text="Texture") | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							|  |  |  |         col.template_ID(md, "texture", new="texture.new") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         layout.prop(md, "texture_coords") | 
					
						
							|  |  |  |         if md.texture_coords == 'MAP_UV' and ob.type == 'MESH': | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |             layout.prop_search(md, "uv_layer", ob.data, "uv_textures") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         elif md.texture_coords == 'OBJECT': | 
					
						
							| 
									
										
										
										
											2011-05-16 05:50:04 +00:00
										 |  |  |             layout.prop(md, "texture_coords_object") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-16 16:07:22 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(md, "speed", slider=True) | 
					
						
							|  |  |  |         col.prop(md, "height", slider=True) | 
					
						
							| 
									
										
										
										
											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.prop(md, "width", slider=True) | 
					
						
							|  |  |  |         col.prop(md, "narrowness", slider=True) | 
					
						
							| 
									
										
										
										
											2011-04-04 10:13:04 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-07-25 15:27:01 +00:00
										 |  |  |     @staticmethod | 
					
						
							|  |  |  |     def weight_vg_mask(layout, ob, md): | 
					
						
							|  |  |  |         layout.label(text="Influence/Mask Options:") | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  |         col1 = split.column() | 
					
						
							|  |  |  |         col2 = split.column() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col1.label(text="Global Influence:") | 
					
						
							|  |  |  |         col2.prop(md, "mask_constant", text="") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         if not md.mask_texture: | 
					
						
							|  |  |  |             col1.label(text="Vertex Group Mask:") | 
					
						
							|  |  |  |             col2.prop_search(md, "mask_vertex_group", ob, "vertex_groups", text="") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         if not md.mask_vertex_group: | 
					
						
							|  |  |  |             col1.label(text="Texture Mask:") | 
					
						
							|  |  |  |             col2.template_ID(md, "mask_texture", new="texture.new") | 
					
						
							|  |  |  |             if md.mask_texture: | 
					
						
							|  |  |  |                 split = layout.split() | 
					
						
							|  |  |  |                 col = split.column() | 
					
						
							|  |  |  |                 col.label(text="Texture Coordinates:") | 
					
						
							|  |  |  |                 col.prop(md, "mask_tex_mapping", text="") | 
					
						
							|  |  |  |                 col = split.column() | 
					
						
							|  |  |  |                 col.label(text="Use Channel:") | 
					
						
							|  |  |  |                 col.prop(md, "mask_tex_use_channel", text="") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                 if md.mask_tex_mapping == 'OBJECT': | 
					
						
							|  |  |  |                     layout.prop(md, "mask_tex_map_obj", text="Object") | 
					
						
							|  |  |  |                 elif md.mask_tex_mapping == 'UV' and ob.type == 'MESH': | 
					
						
							|  |  |  |                     layout.prop_search(md, "mask_tex_uv_layer", ob.data, "uv_textures") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def WEIGHT_VGEDIT(self, layout, ob, md): | 
					
						
							|  |  |  |         if ob.type == 'MESH': | 
					
						
							|  |  |  |             split = layout.split() | 
					
						
							|  |  |  |             col = split.column() | 
					
						
							|  |  |  |             col.label(text="Vertex Group:") | 
					
						
							|  |  |  |             col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             col = split.column() | 
					
						
							|  |  |  |             col.label(text="Default Weight:") | 
					
						
							|  |  |  |             col.prop(md, "default_weight", text="") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             layout.prop(md, "flag_map") | 
					
						
							|  |  |  |             if md.flag_map: | 
					
						
							|  |  |  |                 split = layout.split() | 
					
						
							|  |  |  |                 col = split.column() | 
					
						
							|  |  |  |                 col.label("Input:") | 
					
						
							|  |  |  |                 col.label("Output:") | 
					
						
							|  |  |  |                 col = split.column() | 
					
						
							|  |  |  |                 col.prop(md, "map_input_low", text="Min") | 
					
						
							|  |  |  |                 col.prop(md, "map_output_low", text="Min") | 
					
						
							|  |  |  |                 col = split.column() | 
					
						
							|  |  |  |                 col.prop(md, "map_input_high", text="Max") | 
					
						
							|  |  |  |                 col.prop(md, "map_output_high", text="Max") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             layout.prop(md, "flag_curve_map") | 
					
						
							|  |  |  |             if md.flag_curve_map: | 
					
						
							|  |  |  |                 row = layout.row() | 
					
						
							|  |  |  |                 row.template_curve_mapping(md, "cmap_curve") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             layout.prop(md, "flag_reverse") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             layout.prop(md, "flag_clamp") | 
					
						
							|  |  |  |             if md.flag_clamp: | 
					
						
							|  |  |  |                 row = layout.row() | 
					
						
							|  |  |  |                 row.prop(md, "clamp_min_weight") | 
					
						
							|  |  |  |                 row.prop(md, "clamp_max_weight") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             row = layout.row() | 
					
						
							|  |  |  |             row.prop(md, "flag_add2vg") | 
					
						
							|  |  |  |             row.prop(md, "flag_remfvg") | 
					
						
							|  |  |  |             row = layout.row() | 
					
						
							|  |  |  |             if md.flag_add2vg: | 
					
						
							|  |  |  |                 row.prop(md, "add_threshold") | 
					
						
							|  |  |  |             if md.flag_remfvg: | 
					
						
							|  |  |  |                 row.prop(md, "rem_threshold") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             # Common mask options… | 
					
						
							|  |  |  |             layout.separator() | 
					
						
							|  |  |  |             self.weight_vg_mask(layout, ob, md) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def WEIGHT_VGMIX(self, layout, ob, md): | 
					
						
							|  |  |  |         if ob.type == 'MESH': | 
					
						
							|  |  |  |             split = layout.split() | 
					
						
							|  |  |  |             col = split.column() | 
					
						
							|  |  |  |             col.label(text="Vertex Group 1:") | 
					
						
							|  |  |  |             col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") | 
					
						
							|  |  |  |             col.label(text="Default Weight 1:") | 
					
						
							|  |  |  |             col.prop(md, "default_weight", text="") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             col.label(text="Mix Mode:") | 
					
						
							|  |  |  |             col.prop(md, "mix_mode", text="") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             col = split.column() | 
					
						
							|  |  |  |             col.label(text="Vertex Group 2:") | 
					
						
							|  |  |  |             col.prop_search(md, "vertex_group2", ob, "vertex_groups", text="") | 
					
						
							|  |  |  |             col.label(text="Default Weight 2:") | 
					
						
							|  |  |  |             col.prop(md, "default_weight2", text="") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             col.label(text="Mix Set:") | 
					
						
							|  |  |  |             col.prop(md, "mix_set", text="") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             # Common mask options… | 
					
						
							|  |  |  |             layout.separator() | 
					
						
							|  |  |  |             self.weight_vg_mask(layout, ob, md) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def WEIGHT_VGPROXIMITY(self, layout, ob, md): | 
					
						
							|  |  |  |         if ob.type == 'MESH': | 
					
						
							|  |  |  |             split = layout.split() | 
					
						
							|  |  |  |             col = split.column() | 
					
						
							|  |  |  |             col.label(text="Vertex Group:") | 
					
						
							|  |  |  |             col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             col = split.column() | 
					
						
							|  |  |  |             col.label(text="Target Object:") | 
					
						
							|  |  |  |             col.prop(md, "ob_target", text="") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             row = layout.row() | 
					
						
							|  |  |  |             row.prop(md, "proximity_mode", expand=True) | 
					
						
							|  |  |  |             if md.proximity_mode == 'OBJ2VERTDIST': | 
					
						
							|  |  |  |                 row = layout.row() | 
					
						
							|  |  |  |                 row.prop(md, "obj2vert_verts") | 
					
						
							|  |  |  |                 row.prop(md, "obj2vert_edges") | 
					
						
							|  |  |  |                 row.prop(md, "obj2vert_faces") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             # Common mask options… | 
					
						
							|  |  |  |             layout.separator() | 
					
						
							|  |  |  |             self.weight_vg_mask(layout, ob, md) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-04-04 10:13:04 +00:00
										 |  |  | if __name__ == "__main__":  # only for live edit. | 
					
						
							|  |  |  |     bpy.utils.register_module(__name__) |