| 
									
										
										
										
											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-07-11 13:32:20 +00:00
										 |  |  | import bpy | 
					
						
							| 
									
										
										
										
											2011-09-22 19:50:41 +00:00
										 |  |  | from bpy.types import Header, Menu, Panel | 
					
						
							| 
									
										
										
										
											2012-02-16 18:06:38 +00:00
										 |  |  | from .properties_paint_common import UnifiedPaintPanel | 
					
						
							| 
									
										
										
										
											2009-10-12 21:06:03 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-07-24 22:09:30 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_HT_header(Header): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_space_type = 'VIEW_3D' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-29 02:42:47 +00:00
										 |  |  |         view = context.space_data | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         mode_string = context.mode | 
					
						
							|  |  |  |         edit_object = context.edit_object | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  |         obj = context.active_object | 
					
						
							| 
									
										
										
										
											2010-01-16 14:31:21 +00:00
										 |  |  |         toolsettings = context.tool_settings | 
					
						
							| 
									
										
										
										
											2009-12-04 17:54:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-05-20 03:52:35 +00:00
										 |  |  |         row = layout.row(align=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         row.template_header() | 
					
						
							| 
									
										
										
										
											2009-12-04 17:54:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         # Menus | 
					
						
							|  |  |  |         if context.area.show_menus: | 
					
						
							| 
									
										
										
										
											2010-05-20 03:52:35 +00:00
										 |  |  |             sub = row.row(align=True) | 
					
						
							| 
									
										
										
										
											2010-06-09 19:12:03 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             sub.menu("VIEW3D_MT_view") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             # Select Menu | 
					
						
							| 
									
										
										
										
											2011-03-07 13:23:45 +00:00
										 |  |  |             if mode_string not in {'EDIT_TEXT', 'SCULPT', 'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE'}: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 sub.menu("VIEW3D_MT_select_%s" % mode_string.lower()) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             if edit_object: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 sub.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower()) | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  |             elif obj: | 
					
						
							| 
									
										
										
										
											2011-03-07 13:23:45 +00:00
										 |  |  |                 if mode_string not in {'PAINT_TEXTURE'}: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                     sub.menu("VIEW3D_MT_%s" % mode_string.lower()) | 
					
						
							| 
									
										
										
										
											2012-02-16 18:06:38 +00:00
										 |  |  |                 if mode_string in {'SCULPT', 'PAINT_VERTEX', 'PAINT_WEIGHT', 'PAINT_TEXTURE'}: | 
					
						
							|  |  |  |                     sub.menu("VIEW3D_MT_brush") | 
					
						
							| 
									
										
										
										
											2012-03-14 06:32:43 +00:00
										 |  |  |                 if mode_string == 'SCULPT': | 
					
						
							|  |  |  |                     sub.menu("VIEW3D_MT_hide") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             else: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 sub.menu("VIEW3D_MT_object") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-07-23 22:08:37 +00:00
										 |  |  |         # Contains buttons like Mode, Pivot, Manipulator, Layer, Mesh Select Mode... | 
					
						
							| 
									
										
										
										
											2011-11-15 19:25:28 +00:00
										 |  |  |         row = layout | 
					
						
							|  |  |  |         layout.template_header_3D() | 
					
						
							| 
									
										
										
										
											2011-10-23 00:53:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-12 11:34:25 +00:00
										 |  |  |         if obj: | 
					
						
							|  |  |  |             # Particle edit | 
					
						
							|  |  |  |             if obj.mode == 'PARTICLE_EDIT': | 
					
						
							| 
									
										
										
										
											2011-07-23 15:36:51 +00:00
										 |  |  |                 row.prop(toolsettings.particle_edit, "select_mode", text="", expand=True) | 
					
						
							| 
									
										
										
										
											2010-02-12 11:34:25 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             # Occlude geometry | 
					
						
							| 
									
										
										
										
											2011-03-07 13:23:45 +00:00
										 |  |  |             if view.viewport_shade in {'SOLID', 'SHADED', 'TEXTURED'} and (obj.mode == 'PARTICLE_EDIT' or (obj.mode == 'EDIT' and obj.type == 'MESH')): | 
					
						
							| 
									
										
										
										
											2010-08-17 07:49:53 +00:00
										 |  |  |                 row.prop(view, "use_occlude_geometry", text="") | 
					
						
							| 
									
										
										
										
											2010-02-12 11:34:25 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             # Proportional editing | 
					
						
							| 
									
										
										
										
											2011-03-07 13:23:45 +00:00
										 |  |  |             if obj.mode in {'EDIT', 'PARTICLE_EDIT'}: | 
					
						
							| 
									
										
										
										
											2010-02-12 11:34:25 +00:00
										 |  |  |                 row = layout.row(align=True) | 
					
						
							| 
									
										
										
										
											2010-08-18 03:24:52 +00:00
										 |  |  |                 row.prop(toolsettings, "proportional_edit", text="", icon_only=True) | 
					
						
							|  |  |  |                 if toolsettings.proportional_edit != 'DISABLED': | 
					
						
							|  |  |  |                     row.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True) | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  |             elif obj.mode == 'OBJECT': | 
					
						
							|  |  |  |                 row = layout.row(align=True) | 
					
						
							| 
									
										
										
										
											2010-08-18 03:24:52 +00:00
										 |  |  |                 row.prop(toolsettings, "use_proportional_edit_objects", text="", icon_only=True) | 
					
						
							|  |  |  |                 if toolsettings.use_proportional_edit_objects: | 
					
						
							|  |  |  |                     row.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True) | 
					
						
							| 
									
										
										
										
											2010-02-22 23:32:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-28 22:35:56 +00:00
										 |  |  |         # Snap | 
					
						
							| 
									
										
										
										
											2012-02-17 17:25:51 +00:00
										 |  |  |         if not obj or obj.mode not in {'SCULPT', 'VERTEX_PAINT', 'WEIGHT_PAINT', 'TEXTURE_PAINT'}: | 
					
						
							| 
									
										
										
										
											2012-02-17 06:59:32 +00:00
										 |  |  |             snap_element = toolsettings.snap_element | 
					
						
							|  |  |  |             row = layout.row(align=True) | 
					
						
							|  |  |  |             row.prop(toolsettings, "use_snap", text="") | 
					
						
							|  |  |  |             row.prop(toolsettings, "snap_element", text="", icon_only=True) | 
					
						
							| 
									
										
										
										
											2012-03-10 21:40:35 +00:00
										 |  |  |             if snap_element != 'INCREMENT': | 
					
						
							| 
									
										
										
										
											2012-02-17 06:59:32 +00:00
										 |  |  |                 row.prop(toolsettings, "snap_target", text="") | 
					
						
							|  |  |  |                 if obj: | 
					
						
							| 
									
										
										
										
											2012-03-10 21:40:35 +00:00
										 |  |  |                     if obj.mode == 'OBJECT' and snap_element != 'VOLUME': | 
					
						
							| 
									
										
										
										
											2012-02-17 06:59:32 +00:00
										 |  |  |                         row.prop(toolsettings, "use_snap_align_rotation", text="") | 
					
						
							|  |  |  |                     elif obj.mode == 'EDIT': | 
					
						
							|  |  |  |                         row.prop(toolsettings, "use_snap_self", text="") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             if snap_element == 'VOLUME': | 
					
						
							|  |  |  |                 row.prop(toolsettings, "use_snap_peel_object", text="") | 
					
						
							|  |  |  |             elif snap_element == 'FACE': | 
					
						
							|  |  |  |                 row.prop(toolsettings, "use_snap_project", text="") | 
					
						
							| 
									
										
										
										
											2009-11-28 22:35:56 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         # OpenGL render | 
					
						
							|  |  |  |         row = layout.row(align=True) | 
					
						
							| 
									
										
										
										
											2010-03-08 16:36:53 +00:00
										 |  |  |         row.operator("render.opengl", text="", icon='RENDER_STILL') | 
					
						
							|  |  |  |         props = row.operator("render.opengl", text="", icon='RENDER_ANIMATION') | 
					
						
							| 
									
										
										
										
											2009-11-28 22:35:56 +00:00
										 |  |  |         props.animation = True | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         # Pose | 
					
						
							| 
									
										
										
										
											2009-11-29 02:42:47 +00:00
										 |  |  |         if obj and obj.mode == 'POSE': | 
					
						
							| 
									
										
										
										
											2009-11-28 22:35:56 +00:00
										 |  |  |             row = layout.row(align=True) | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  |             row.operator("pose.copy", text="", icon='COPYDOWN') | 
					
						
							|  |  |  |             row.operator("pose.paste", text="", icon='PASTEDOWN') | 
					
						
							|  |  |  |             props = row.operator("pose.paste", text="", icon='PASTEFLIPDOWN') | 
					
						
							| 
									
										
										
										
											2009-11-28 22:35:56 +00:00
										 |  |  |             props.flipped = 1 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-15 20:21:49 +00:00
										 |  |  | # ********** Menu ********** | 
					
						
							| 
									
										
										
										
											2009-07-24 22:09:30 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-23 22:13:56 +00:00
										 |  |  | # ********** Utilities ********** | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  | class ShowHideMenu(): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Show/Hide" | 
					
						
							|  |  |  |     _operator_name = "" | 
					
						
							| 
									
										
										
										
											2009-08-23 22:13:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("%s.reveal" % self._operator_name, text="Show Hidden") | 
					
						
							|  |  |  |         layout.operator("%s.hide" % self._operator_name, text="Hide Selected") | 
					
						
							|  |  |  |         layout.operator("%s.hide" % self._operator_name, text="Hide Unselected").unselected = True | 
					
						
							| 
									
										
										
										
											2009-08-23 22:13:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_transform(Menu): | 
					
						
							| 
									
										
										
										
											2009-11-22 06:19:30 +00:00
										 |  |  |     bl_label = "Transform" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     # TODO: get rid of the custom text strings? | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-10 10:36:32 +00:00
										 |  |  |         layout.operator("transform.translate", text="Grab/Move") | 
					
						
							| 
									
										
										
										
											2009-11-22 06:19:30 +00:00
										 |  |  |         # TODO: sub-menu for grab per axis | 
					
						
							| 
									
										
										
										
											2009-12-10 10:36:32 +00:00
										 |  |  |         layout.operator("transform.rotate", text="Rotate") | 
					
						
							| 
									
										
										
										
											2009-11-22 06:19:30 +00:00
										 |  |  |         # TODO: sub-menu for rot per axis | 
					
						
							| 
									
										
										
										
											2009-12-10 10:36:32 +00:00
										 |  |  |         layout.operator("transform.resize", text="Scale") | 
					
						
							| 
									
										
										
										
											2009-11-22 06:19:30 +00:00
										 |  |  |         # TODO: sub-menu for scale per axis | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("transform.tosphere", text="To Sphere") | 
					
						
							|  |  |  |         layout.operator("transform.shear", text="Shear") | 
					
						
							|  |  |  |         layout.operator("transform.warp", text="Warp") | 
					
						
							|  |  |  |         layout.operator("transform.push_pull", text="Push/Pull") | 
					
						
							| 
									
										
										
										
											2010-09-16 07:14:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-01-05 17:27:26 +00:00
										 |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("transform.translate", text="Move Texture Space").texture_space = True | 
					
						
							|  |  |  |         layout.operator("transform.resize", text="Scale Texture Space").texture_space = True | 
					
						
							| 
									
										
										
										
											2011-01-05 17:27:26 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-16 07:14:48 +00:00
										 |  |  |         obj = context.object | 
					
						
							| 
									
										
										
										
											2011-03-07 13:23:45 +00:00
										 |  |  |         if obj.type == 'ARMATURE' and obj.mode in {'EDIT', 'POSE'} and obj.data.draw_type in {'BBONE', 'ENVELOPE'}: | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             layout.operator("transform.transform", text="Scale Envelope/BBone").mode = 'BONE_SIZE' | 
					
						
							| 
									
										
										
										
											2010-09-16 07:14:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-22 06:19:30 +00:00
										 |  |  |         if context.edit_object and context.edit_object.type == 'ARMATURE': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.operator("armature.align") | 
					
						
							| 
									
										
										
										
											2009-11-22 06:19:30 +00:00
										 |  |  |         else: | 
					
						
							| 
									
										
										
										
											2009-12-02 19:59:57 +00:00
										 |  |  |             layout.operator_context = 'EXEC_REGION_WIN' | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             layout.operator("transform.transform", text="Align to Transform Orientation").mode = 'ALIGN'  # XXX see alignmenu() in edit.c of b2.4x to get this working | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-22 06:19:30 +00:00
										 |  |  |         layout.operator_context = 'EXEC_AREA' | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("object.origin_set", text="Geometry to Origin").type = 'GEOMETRY_ORIGIN' | 
					
						
							|  |  |  |         layout.operator("object.origin_set", text="Origin to Geometry").type = 'ORIGIN_GEOMETRY' | 
					
						
							|  |  |  |         layout.operator("object.origin_set", text="Origin to 3D Cursor").type = 'ORIGIN_CURSOR' | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-04-12 15:12:05 +00:00
										 |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.operator("object.randomize_transform") | 
					
						
							|  |  |  |         layout.operator("object.align") | 
					
						
							| 
									
										
										
										
											2011-08-30 10:49:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-05-24 11:15:21 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2011-08-30 10:49:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-05-24 11:15:21 +00:00
										 |  |  |         layout.operator("object.anim_transforms_to_deltas") | 
					
						
							| 
									
										
										
										
											2011-04-12 15:12:05 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_mirror(Menu): | 
					
						
							| 
									
										
										
										
											2009-11-22 06:19:30 +00:00
										 |  |  |     bl_label = "Mirror" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("transform.mirror", text="Interactive Mirror") | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-27 00:34:46 +00:00
										 |  |  |         layout.operator_context = 'INVOKE_REGION_WIN' | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         props = layout.operator("transform.mirror", text="X Global") | 
					
						
							| 
									
										
										
										
											2009-11-22 06:19:30 +00:00
										 |  |  |         props.constraint_axis = (True, False, False) | 
					
						
							|  |  |  |         props.constraint_orientation = 'GLOBAL' | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         props = layout.operator("transform.mirror", text="Y Global") | 
					
						
							| 
									
										
										
										
											2009-11-22 06:19:30 +00:00
										 |  |  |         props.constraint_axis = (False, True, False) | 
					
						
							|  |  |  |         props.constraint_orientation = 'GLOBAL' | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         props = layout.operator("transform.mirror", text="Z Global") | 
					
						
							| 
									
										
										
										
											2009-11-22 06:19:30 +00:00
										 |  |  |         props.constraint_axis = (False, False, True) | 
					
						
							|  |  |  |         props.constraint_orientation = 'GLOBAL' | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-22 06:19:30 +00:00
										 |  |  |         if context.edit_object: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.separator() | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             props = layout.operator("transform.mirror", text="X Local") | 
					
						
							| 
									
										
										
										
											2009-11-22 06:19:30 +00:00
										 |  |  |             props.constraint_axis = (True, False, False) | 
					
						
							|  |  |  |             props.constraint_orientation = 'LOCAL' | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             props = layout.operator("transform.mirror", text="Y Local") | 
					
						
							| 
									
										
										
										
											2009-11-22 06:19:30 +00:00
										 |  |  |             props.constraint_axis = (False, True, False) | 
					
						
							|  |  |  |             props.constraint_orientation = 'LOCAL' | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             props = layout.operator("transform.mirror", text="Z Local") | 
					
						
							| 
									
										
										
										
											2009-11-22 06:19:30 +00:00
										 |  |  |             props.constraint_axis = (False, False, True) | 
					
						
							|  |  |  |             props.constraint_orientation = 'LOCAL' | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-15 17:28:00 +00:00
										 |  |  |             layout.operator("object.vertex_group_mirror") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_snap(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Snap" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("view3d.snap_selected_to_grid", text="Selection to Grid") | 
					
						
							|  |  |  |         layout.operator("view3d.snap_selected_to_cursor", text="Selection to Cursor") | 
					
						
							| 
									
										
										
										
											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-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("view3d.snap_cursor_to_selected", text="Cursor to Selected") | 
					
						
							|  |  |  |         layout.operator("view3d.snap_cursor_to_center", text="Cursor to Center") | 
					
						
							|  |  |  |         layout.operator("view3d.snap_cursor_to_grid", text="Cursor to Grid") | 
					
						
							|  |  |  |         layout.operator("view3d.snap_cursor_to_active", text="Cursor to Active") | 
					
						
							| 
									
										
										
										
											2009-08-23 22:13:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_uv_map(Menu): | 
					
						
							| 
									
										
										
										
											2009-11-03 18:20:03 +00:00
										 |  |  |     bl_label = "UV Mapping" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("uv.unwrap") | 
					
						
							| 
									
										
										
										
											2011-03-31 08:46:41 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         layout.operator_context = 'INVOKE_DEFAULT' | 
					
						
							| 
									
										
										
										
											2011-03-29 14:13:11 +00:00
										 |  |  |         layout.operator("uv.smart_project") | 
					
						
							|  |  |  |         layout.operator("uv.lightmap_pack") | 
					
						
							|  |  |  |         layout.operator("uv.follow_active_quads") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-07 11:22:29 +00:00
										 |  |  |         layout.operator_context = 'EXEC_REGION_WIN' | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("uv.cube_project") | 
					
						
							|  |  |  |         layout.operator("uv.cylinder_project") | 
					
						
							|  |  |  |         layout.operator("uv.sphere_project") | 
					
						
							| 
									
										
										
										
											2011-03-29 14:13:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-22 12:18:15 +00:00
										 |  |  |         layout.operator_context = 'EXEC_REGION_WIN' | 
					
						
							| 
									
										
										
										
											2012-01-14 06:30:27 +00:00
										 |  |  |         layout.operator("uv.project_from_view").scale_to_bounds = False | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("uv.project_from_view", text="Project from View (Bounds)").scale_to_bounds = True | 
					
						
							| 
									
										
										
										
											2009-11-03 18:20:03 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-11-03 18:20:03 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("uv.reset") | 
					
						
							| 
									
										
										
										
											2009-11-03 18:20:03 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-15 20:21:49 +00:00
										 |  |  | # ********** View menus ********** | 
					
						
							| 
									
										
										
										
											2009-07-11 13:32:20 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_view(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "View" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  |         layout.operator("view3d.properties", icon='MENU_PANEL') | 
					
						
							| 
									
										
										
										
											2010-01-12 07:50:14 +00:00
										 |  |  |         layout.operator("view3d.toolshelf", icon='MENU_PANEL') | 
					
						
							| 
									
										
										
										
											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-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("view3d.viewnumpad", text="Camera").type = 'CAMERA' | 
					
						
							|  |  |  |         layout.operator("view3d.viewnumpad", text="Top").type = 'TOP' | 
					
						
							|  |  |  |         layout.operator("view3d.viewnumpad", text="Bottom").type = 'BOTTOM' | 
					
						
							|  |  |  |         layout.operator("view3d.viewnumpad", text="Front").type = 'FRONT' | 
					
						
							|  |  |  |         layout.operator("view3d.viewnumpad", text="Back").type = 'BACK' | 
					
						
							|  |  |  |         layout.operator("view3d.viewnumpad", text="Right").type = 'RIGHT' | 
					
						
							|  |  |  |         layout.operator("view3d.viewnumpad", text="Left").type = 'LEFT' | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_view_cameras", text="Cameras") | 
					
						
							| 
									
										
										
										
											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-28 13:39:35 +00:00
										 |  |  |         layout.operator("view3d.view_persportho") | 
					
						
							| 
									
										
										
										
											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.menu("VIEW3D_MT_view_navigation") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_view_align") | 
					
						
							| 
									
										
										
										
											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 13:59:27 +00:00
										 |  |  |         layout.operator_context = 'INVOKE_REGION_WIN' | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("view3d.clip_border", text="Clipping Border...") | 
					
						
							|  |  |  |         layout.operator("view3d.zoom_border", text="Zoom Border...") | 
					
						
							| 
									
										
										
										
											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-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("view3d.layers", text="Show All Layers").nr = 0 | 
					
						
							| 
									
										
										
										
											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-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("view3d.localview", text="View Global/Local") | 
					
						
							| 
									
										
										
										
											2010-01-14 02:51:17 +00:00
										 |  |  |         layout.operator("view3d.view_selected") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("view3d.view_all") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-12-04 17:54:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("screen.animation_play", text="Playback Animation") | 
					
						
							| 
									
										
										
										
											2009-12-04 17:54:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-12-04 17:54:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-03 16:28:50 +00:00
										 |  |  |         layout.operator("screen.area_dupli") | 
					
						
							| 
									
										
										
										
											2009-12-04 00:49:02 +00:00
										 |  |  |         layout.operator("screen.region_quadview") | 
					
						
							| 
									
										
										
										
											2009-12-03 16:28:50 +00:00
										 |  |  |         layout.operator("screen.screen_full_area") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_view_navigation(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Navigation" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-18 06:07:41 +00:00
										 |  |  |         layout.operator_enum("view3d.view_orbit", "type") | 
					
						
							| 
									
										
										
										
											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-18 06:07:41 +00:00
										 |  |  |         layout.operator_enum("view3d.view_pan", "type") | 
					
						
							| 
									
										
										
										
											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-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("view3d.zoom", text="Zoom In").delta = 1 | 
					
						
							|  |  |  |         layout.operator("view3d.zoom", text="Zoom Out").delta = -1 | 
					
						
							|  |  |  |         layout.operator("view3d.zoom_camera_1_to_1", text="Zoom Camera 1:1") | 
					
						
							| 
									
										
										
										
											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.operator("view3d.fly") | 
					
						
							| 
									
										
										
										
											2009-08-15 20:21:49 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_view_align(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Align View" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_view_align_selected") | 
					
						
							| 
									
										
										
										
											2009-11-06 21:10:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-11-06 21:10:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("view3d.view_all", text="Center Cursor and View All").center = True | 
					
						
							|  |  |  |         layout.operator("view3d.camera_to_view", text="Align Active Camera to View") | 
					
						
							| 
									
										
										
										
											2011-11-14 03:54:23 +00:00
										 |  |  |         layout.operator("view3d.camera_to_view_selected", text="Align Active Camera to Selected") | 
					
						
							| 
									
										
										
										
											2010-01-14 02:51:17 +00:00
										 |  |  |         layout.operator("view3d.view_selected") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("view3d.view_center_cursor") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_view_align_selected(Menu): | 
					
						
							| 
									
										
										
										
											2009-11-06 21:10:45 +00:00
										 |  |  |     bl_label = "Align View to Selected" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         props = layout.operator("view3d.viewnumpad", text="Top") | 
					
						
							| 
									
										
										
										
											2009-11-06 21:10:45 +00:00
										 |  |  |         props.align_active = True | 
					
						
							|  |  |  |         props.type = 'TOP' | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         props = layout.operator("view3d.viewnumpad", text="Bottom") | 
					
						
							| 
									
										
										
										
											2009-11-06 21:10:45 +00:00
										 |  |  |         props.align_active = True | 
					
						
							|  |  |  |         props.type = 'BOTTOM' | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         props = layout.operator("view3d.viewnumpad", text="Front") | 
					
						
							| 
									
										
										
										
											2009-11-06 21:10:45 +00:00
										 |  |  |         props.align_active = True | 
					
						
							|  |  |  |         props.type = 'FRONT' | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         props = layout.operator("view3d.viewnumpad", text="Back") | 
					
						
							| 
									
										
										
										
											2009-11-06 21:10:45 +00:00
										 |  |  |         props.align_active = True | 
					
						
							|  |  |  |         props.type = 'BACK' | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         props = layout.operator("view3d.viewnumpad", text="Right") | 
					
						
							| 
									
										
										
										
											2009-11-06 21:10:45 +00:00
										 |  |  |         props.align_active = True | 
					
						
							|  |  |  |         props.type = 'RIGHT' | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         props = layout.operator("view3d.viewnumpad", text="Left") | 
					
						
							| 
									
										
										
										
											2009-11-06 21:10:45 +00:00
										 |  |  |         props.align_active = True | 
					
						
							|  |  |  |         props.type = 'LEFT' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_view_cameras(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Cameras" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-08-23 22:13:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("view3d.object_as_camera") | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("view3d.viewnumpad", text="Active Camera").type = 'CAMERA' | 
					
						
							| 
									
										
										
										
											2009-08-23 22:13:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-16 03:40:00 +00:00
										 |  |  | # ********** Select menus, suffix from context.mode ********** | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_select_object(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Select" | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("view3d.select_border") | 
					
						
							|  |  |  |         layout.operator("view3d.select_circle") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-14 06:30:27 +00:00
										 |  |  |         layout.operator("object.select_all", text="Select/Deselect All").action = 'TOGGLE' | 
					
						
							|  |  |  |         layout.operator("object.select_all", text="Inverse").action = 'INVERT' | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("object.select_random", text="Random") | 
					
						
							|  |  |  |         layout.operator("object.select_mirror", text="Mirror") | 
					
						
							|  |  |  |         layout.operator("object.select_by_layer", text="Select All by Layer") | 
					
						
							|  |  |  |         layout.operator_menu_enum("object.select_by_type", "type", text="Select All by Type...") | 
					
						
							|  |  |  |         layout.operator("object.select_camera", text="Select Camera") | 
					
						
							| 
									
										
										
										
											2009-11-03 07:23:02 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-11-03 07:23:02 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator_menu_enum("object.select_grouped", "type", text="Grouped") | 
					
						
							|  |  |  |         layout.operator_menu_enum("object.select_linked", "type", text="Linked") | 
					
						
							|  |  |  |         layout.operator("object.select_pattern", text="Select Pattern...") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_select_pose(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Select" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("view3d.select_border") | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-14 06:30:27 +00:00
										 |  |  |         layout.operator("pose.select_all", text="Select/Deselect All").action = 'TOGGLE' | 
					
						
							|  |  |  |         layout.operator("pose.select_all", text="Inverse").action = 'INVERT' | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("pose.select_flip_active", text="Flip Active") | 
					
						
							|  |  |  |         layout.operator("pose.select_constraint_target", text="Constraint Target") | 
					
						
							|  |  |  |         layout.operator("pose.select_linked", text="Linked") | 
					
						
							| 
									
										
										
										
											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-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("pose.select_hierarchy", text="Parent").direction = 'PARENT' | 
					
						
							|  |  |  |         layout.operator("pose.select_hierarchy", text="Child").direction = 'CHILD' | 
					
						
							| 
									
										
										
										
											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-09-21 15:18:38 +00:00
										 |  |  |         props = layout.operator("pose.select_hierarchy", text="Extend Parent") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         props.extend = True | 
					
						
							|  |  |  |         props.direction = 'PARENT' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         props = layout.operator("pose.select_hierarchy", text="Extend Child") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         props.extend = True | 
					
						
							|  |  |  |         props.direction = 'CHILD' | 
					
						
							| 
									
										
										
										
											2009-12-04 17:54:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-25 10:16:36 +00:00
										 |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator_menu_enum("pose.select_grouped", "type", text="Grouped") | 
					
						
							|  |  |  |         layout.operator("object.select_pattern", text="Select Pattern...") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_select_particle(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Select" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("view3d.select_border") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-14 06:30:27 +00:00
										 |  |  |         layout.operator("particle.select_all", text="Select/Deselect All").action = 'TOGGLE' | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("particle.select_linked") | 
					
						
							| 
									
										
										
										
											2012-01-14 06:58:03 +00:00
										 |  |  |         layout.operator("particle.select_all").action = 'INVERT' | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +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.operator("particle.select_more") | 
					
						
							|  |  |  |         layout.operator("particle.select_less") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-11-09 08:51:34 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("particle.select_roots", text="Roots") | 
					
						
							|  |  |  |         layout.operator("particle.select_tips", text="Tips") | 
					
						
							| 
									
										
										
										
											2009-11-09 08:51:34 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_select_edit_mesh(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Select" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("view3d.select_border") | 
					
						
							|  |  |  |         layout.operator("view3d.select_circle") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-14 06:30:27 +00:00
										 |  |  |         layout.operator("mesh.select_all", text="Select/Deselect All").action = 'TOGGLE' | 
					
						
							|  |  |  |         layout.operator("mesh.select_all", text="Inverse").action = 'INVERT' | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("mesh.select_random", text="Random") | 
					
						
							|  |  |  |         layout.operator("mesh.select_nth", text="Every N Number of Verts") | 
					
						
							|  |  |  |         layout.operator("mesh.edges_select_sharp", text="Sharp Edges") | 
					
						
							|  |  |  |         layout.operator("mesh.faces_select_linked_flat", text="Linked Flat Faces") | 
					
						
							| 
									
										
										
										
											2012-02-19 20:27:30 +00:00
										 |  |  |         layout.operator("mesh.select_interior_faces", text="Interior Faces") | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("mesh.select_axis", text="Side of Active") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-03-08 05:36:05 +00:00
										 |  |  |         layout.operator("mesh.select_by_number_vertices", text="By Number of Verts") | 
					
						
							| 
									
										
										
										
											2010-08-18 03:24:52 +00:00
										 |  |  |         if context.scene.tool_settings.mesh_select_mode[2] == False: | 
					
						
							| 
									
										
										
										
											2011-11-19 16:17:35 +00:00
										 |  |  |             layout.operator("mesh.select_non_manifold", text="Non Manifold") | 
					
						
							| 
									
										
										
										
											2012-03-08 05:36:05 +00:00
										 |  |  |         layout.operator("mesh.select_loose_verts", text="Loose Verts/Edges") | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("mesh.select_similar", text="Similar") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("mesh.select_less", text="Less") | 
					
						
							|  |  |  |         layout.operator("mesh.select_more", text="More") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("mesh.select_mirror", text="Mirror") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("mesh.select_linked", text="Linked") | 
					
						
							|  |  |  |         layout.operator("mesh.select_vertex_path", text="Vertex Path") | 
					
						
							| 
									
										
										
										
											2012-01-14 06:30:27 +00:00
										 |  |  |         layout.operator("mesh.loop_multi_select", text="Edge Loop").ring = False | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("mesh.loop_multi_select", text="Edge Ring").ring = True | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("mesh.loop_to_region") | 
					
						
							|  |  |  |         layout.operator("mesh.region_to_loop") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_select_edit_curve(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Select" | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("view3d.select_border") | 
					
						
							|  |  |  |         layout.operator("view3d.select_circle") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-14 06:30:27 +00:00
										 |  |  |         layout.operator("curve.select_all", text="Select/Deselect All").action = 'TOGGLE' | 
					
						
							|  |  |  |         layout.operator("curve.select_all", text="Inverse").action = 'INVERT' | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("curve.select_random") | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("curve.select_nth", text="Every Nth Number of Points") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +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.operator("curve.de_select_first") | 
					
						
							|  |  |  |         layout.operator("curve.de_select_last") | 
					
						
							|  |  |  |         layout.operator("curve.select_next") | 
					
						
							|  |  |  |         layout.operator("curve.select_previous") | 
					
						
							| 
									
										
										
										
											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.operator("curve.select_more") | 
					
						
							|  |  |  |         layout.operator("curve.select_less") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_select_edit_surface(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Select" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("view3d.select_border") | 
					
						
							|  |  |  |         layout.operator("view3d.select_circle") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-14 06:30:27 +00:00
										 |  |  |         layout.operator("curve.select_all", text="Select/Deselect All").action = 'TOGGLE' | 
					
						
							|  |  |  |         layout.operator("curve.select_all", text="Inverse").action = 'INVERT' | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("curve.select_random") | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("curve.select_nth", text="Every Nth Number of Points") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("curve.select_row") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +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.operator("curve.select_more") | 
					
						
							|  |  |  |         layout.operator("curve.select_less") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_select_edit_metaball(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Select" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("view3d.select_border") | 
					
						
							| 
									
										
										
										
											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-01-04 13:10:46 +00:00
										 |  |  |         layout.operator("mball.select_all").action = 'TOGGLE' | 
					
						
							| 
									
										
										
										
											2012-01-14 06:30:27 +00:00
										 |  |  |         layout.operator("mball.select_all").action = 'INVERT' | 
					
						
							| 
									
										
										
										
											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.operator("mball.select_random_metaelems") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_select_edit_lattice(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Select" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("view3d.select_border") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("lattice.select_all", text="Select/Deselect All") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_select_edit_armature(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Select" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("view3d.select_border") | 
					
						
							| 
									
										
										
										
											2009-11-03 07:23:02 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-14 21:41:13 +00:00
										 |  |  |         layout.operator("armature.select_all", text="Select/Deselect All").action = 'TOGGLE' | 
					
						
							|  |  |  |         layout.operator("armature.select_all", text="Inverse").action = 'INVERT' | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("armature.select_hierarchy", text="Parent").direction = 'PARENT' | 
					
						
							|  |  |  |         layout.operator("armature.select_hierarchy", text="Child").direction = 'CHILD' | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-08-21 12:57:47 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         props = layout.operator("armature.select_hierarchy", text="Extend Parent") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         props.extend = True | 
					
						
							|  |  |  |         props.direction = 'PARENT' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         props = layout.operator("armature.select_hierarchy", text="Extend Child") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         props.extend = True | 
					
						
							|  |  |  |         props.direction = 'CHILD' | 
					
						
							| 
									
										
										
										
											2009-12-04 17:54:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("object.select_pattern", text="Select Pattern...") | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_select_face(Menu):  # XXX no matching enum | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Select" | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     def draw(self, context): | 
					
						
							| 
									
										
										
										
											2011-02-17 04:35:41 +00:00
										 |  |  |         # layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-22 10:02:32 +00:00
										 |  |  |         # TODO | 
					
						
							|  |  |  |         # see view3d_select_faceselmenu | 
					
						
							| 
									
										
										
										
											2011-02-17 04:35:41 +00:00
										 |  |  |         pass | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-15 22:28:48 +00:00
										 |  |  | # ********** Object menu ********** | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-01-01 07:20:34 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_object(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_context = "objectmode" | 
					
						
							|  |  |  |     bl_label = "Object" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-18 16:17:32 +00:00
										 |  |  |         layout.operator("ed.undo") | 
					
						
							|  |  |  |         layout.operator("ed.redo") | 
					
						
							| 
									
										
										
											
												Code holiday commit:
- fix: user pref, window title was reset to 'Blender' on tab usage
- Undo history menu back:
  - name "Undo History"
  - hotkey alt+ctrl+z (alt+apple+z for mac)
  - works like 2.4x, only for global undo, editmode and particle edit.
- Menu scroll
  - for small windows or screens, popup menus now allow to display
    all items, using internal scrolling
  - works with a timer, scrolling 10 items per second when mouse 
    is over the top or bottom arrow
  - if menu is too big to display, it now draws to top or bottom, 
    based on largest available space.
  - also works for hotkey driven pop up menus.
- User pref "DPI" follows widget/layout size
  - widgets & headers now become bigger and smaller, to match 
    'dpi' font sizes. Works well to match UI to monitor size.
  - note that icons can get fuzzy, we need better mipmaps for it
											
										 
											2011-06-04 17:03:46 +00:00
										 |  |  |         layout.operator("ed.undo_history") | 
					
						
							| 
									
										
										
										
											2010-09-18 16:17:32 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_transform") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_mirror") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_object_clear") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_object_apply") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_snap") | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-18 16:17:32 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_object_animation") | 
					
						
							| 
									
										
										
										
											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.operator("object.duplicate_move") | 
					
						
							| 
									
										
										
										
											2010-01-14 04:36:27 +00:00
										 |  |  |         layout.operator("object.duplicate_move_linked") | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("object.delete", text="Delete...") | 
					
						
							|  |  |  |         layout.operator("object.proxy_make", text="Make Proxy...") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_make_links", text="Make Links...") | 
					
						
							| 
									
										
										
										
											2010-12-19 07:14:42 +00:00
										 |  |  |         layout.operator("object.make_dupli_face") | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator_menu_enum("object.make_local", "type", text="Make Local...") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_make_single_user") | 
					
						
							| 
									
										
										
										
											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.menu("VIEW3D_MT_object_parent") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_object_track") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_object_group") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_object_constraints") | 
					
						
							| 
									
										
										
										
											2010-06-03 06:41:24 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-10-06 05:45:06 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_object_quick_effects") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-18 16:17:32 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_object_game") | 
					
						
							| 
									
										
										
										
											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.operator("object.join") | 
					
						
							| 
									
										
										
										
											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-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("object.move_to_layer", text="Move to Layer...") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_object_showhide") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator_menu_enum("object.convert", "target") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_object_animation(Menu): | 
					
						
							| 
									
										
										
										
											2010-09-18 16:17:32 +00:00
										 |  |  |     bl_label = "Animation" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("anim.keyframe_insert_menu", text="Insert Keyframe...") | 
					
						
							|  |  |  |         layout.operator("anim.keyframe_delete_v3d", text="Delete Keyframe...") | 
					
						
							|  |  |  |         layout.operator("anim.keying_set_active_set", text="Change Keying Set...") | 
					
						
							| 
									
										
										
										
											2010-09-18 16:17:32 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-02-08 14:01:47 +00:00
										 |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.operator("nla.bake", text="Bake Action...") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-18 16:17:32 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_object_clear(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Clear" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("object.location_clear", text="Location") | 
					
						
							|  |  |  |         layout.operator("object.rotation_clear", text="Rotation") | 
					
						
							|  |  |  |         layout.operator("object.scale_clear", text="Scale") | 
					
						
							| 
									
										
										
										
											2012-01-17 17:57:20 +00:00
										 |  |  |         layout.operator("object.origin_clear", text="Origin") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_object_specials(Menu): | 
					
						
							| 
									
										
										
										
											2010-02-21 14:05:02 +00:00
										 |  |  |     bl_label = "Specials" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2010-02-21 14:05:02 +00:00
										 |  |  |         # add more special types | 
					
						
							| 
									
										
										
										
											2010-05-20 15:30:28 +00:00
										 |  |  |         return context.object | 
					
						
							| 
									
										
										
										
											2010-02-21 14:05:02 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         obj = context.object | 
					
						
							| 
									
										
										
										
											2010-06-26 19:00:44 +00:00
										 |  |  |         if obj.type == 'CAMERA': | 
					
						
							| 
									
										
										
										
											2010-02-21 14:05:02 +00:00
										 |  |  |             layout.operator_context = 'INVOKE_REGION_WIN' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-06-24 03:41:07 +00:00
										 |  |  |             if obj.data.type == 'PERSP': | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |                 props = layout.operator("wm.context_modal_mouse", text="Camera Lens Angle") | 
					
						
							| 
									
										
										
										
											2011-06-24 03:41:07 +00:00
										 |  |  |                 props.data_path_iter = "selected_editable_objects" | 
					
						
							|  |  |  |                 props.data_path_item = "data.lens" | 
					
						
							|  |  |  |                 props.input_scale = 0.1 | 
					
						
							| 
									
										
										
										
											2012-02-25 19:49:23 +00:00
										 |  |  |                 if obj.data.lens_unit == 'MILLIMETERS': | 
					
						
							|  |  |  |                     props.header_text = "Camera Lens Angle: %.1fmm" | 
					
						
							|  |  |  |                 else: | 
					
						
							|  |  |  |                     props.header_text = "Camera Lens Angle: %.1f\u00B0" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-06-24 03:41:07 +00:00
										 |  |  |             else: | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |                 props = layout.operator("wm.context_modal_mouse", text="Camera Lens Scale") | 
					
						
							| 
									
										
										
										
											2011-06-24 03:41:07 +00:00
										 |  |  |                 props.data_path_iter = "selected_editable_objects" | 
					
						
							|  |  |  |                 props.data_path_item = "data.ortho_scale" | 
					
						
							|  |  |  |                 props.input_scale = 0.01 | 
					
						
							| 
									
										
										
										
											2012-02-25 19:49:23 +00:00
										 |  |  |                 props.header_text = "Camera Lens Scale: %.3f" | 
					
						
							| 
									
										
										
										
											2010-06-26 19:00:44 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             if not obj.data.dof_object: | 
					
						
							|  |  |  |                 #layout.label(text="Test Has DOF obj"); | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |                 props = layout.operator("wm.context_modal_mouse", text="DOF Distance") | 
					
						
							| 
									
										
										
										
											2010-06-26 19:00:44 +00:00
										 |  |  |                 props.data_path_iter = "selected_editable_objects" | 
					
						
							|  |  |  |                 props.data_path_item = "data.dof_distance" | 
					
						
							|  |  |  |                 props.input_scale = 0.02 | 
					
						
							| 
									
										
										
										
											2012-02-25 19:49:23 +00:00
										 |  |  |                 props.header_text = "DOF Distance: %.3f" | 
					
						
							| 
									
										
										
										
											2010-06-26 19:00:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-07 13:23:45 +00:00
										 |  |  |         if obj.type in {'CURVE', 'FONT'}: | 
					
						
							| 
									
										
										
										
											2010-06-26 19:00:44 +00:00
										 |  |  |             layout.operator_context = 'INVOKE_REGION_WIN' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             props = layout.operator("wm.context_modal_mouse", text="Extrude Size") | 
					
						
							| 
									
										
										
										
											2010-06-26 19:00:44 +00:00
										 |  |  |             props.data_path_iter = "selected_editable_objects" | 
					
						
							|  |  |  |             props.data_path_item = "data.extrude" | 
					
						
							| 
									
										
										
										
											2010-02-21 14:05:02 +00:00
										 |  |  |             props.input_scale = 0.01 | 
					
						
							| 
									
										
										
										
											2012-02-25 19:49:23 +00:00
										 |  |  |             props.header_text = "Extrude Size: %.3f" | 
					
						
							| 
									
										
										
										
											2010-02-22 23:32:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             props = layout.operator("wm.context_modal_mouse", text="Width Size") | 
					
						
							| 
									
										
										
										
											2010-06-14 03:52:10 +00:00
										 |  |  |             props.data_path_iter = "selected_editable_objects" | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             props.data_path_item = "data.offset" | 
					
						
							| 
									
										
										
										
											2010-06-26 19:00:44 +00:00
										 |  |  |             props.input_scale = 0.01 | 
					
						
							| 
									
										
										
										
											2012-02-25 19:49:23 +00:00
										 |  |  |             props.header_text = "Width Size: %.3f" | 
					
						
							| 
									
										
										
										
											2010-06-26 19:00:44 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if obj.type == 'EMPTY': | 
					
						
							|  |  |  |             layout.operator_context = 'INVOKE_REGION_WIN' | 
					
						
							| 
									
										
										
										
											2010-02-22 23:32:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             props = layout.operator("wm.context_modal_mouse", text="Empty Draw Size") | 
					
						
							| 
									
										
										
										
											2010-06-14 03:52:10 +00:00
										 |  |  |             props.data_path_iter = "selected_editable_objects" | 
					
						
							| 
									
										
										
										
											2010-06-26 19:00:44 +00:00
										 |  |  |             props.data_path_item = "empty_draw_size" | 
					
						
							|  |  |  |             props.input_scale = 0.01 | 
					
						
							| 
									
										
										
										
											2012-02-25 19:49:23 +00:00
										 |  |  |             props.header_text = "Empty Draw Size: %.3f" | 
					
						
							| 
									
										
										
										
											2010-06-26 19:00:44 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if obj.type == 'LAMP': | 
					
						
							|  |  |  |             layout.operator_context = 'INVOKE_REGION_WIN' | 
					
						
							| 
									
										
										
										
											2010-02-22 23:32:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             props = layout.operator("wm.context_modal_mouse", text="Energy") | 
					
						
							| 
									
										
										
										
											2010-06-14 03:52:10 +00:00
										 |  |  |             props.data_path_iter = "selected_editable_objects" | 
					
						
							| 
									
										
										
										
											2010-06-26 19:00:44 +00:00
										 |  |  |             props.data_path_item = "data.energy" | 
					
						
							| 
									
										
										
										
											2012-02-25 19:49:23 +00:00
										 |  |  |             props.header_text = "Lamp Energy: %.3f" | 
					
						
							| 
									
										
										
										
											2010-02-21 14:05:02 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-07 13:23:45 +00:00
										 |  |  |             if obj.data.type in {'SPOT', 'AREA', 'POINT'}: | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |                 props = layout.operator("wm.context_modal_mouse", text="Falloff Distance") | 
					
						
							| 
									
										
										
										
											2010-06-26 19:00:44 +00:00
										 |  |  |                 props.data_path_iter = "selected_editable_objects" | 
					
						
							|  |  |  |                 props.data_path_item = "data.distance" | 
					
						
							|  |  |  |                 props.input_scale = 0.1 | 
					
						
							| 
									
										
										
										
											2012-02-25 19:49:23 +00:00
										 |  |  |                 props.header_text = "Lamp Falloff Distance: %.1f" | 
					
						
							| 
									
										
										
										
											2010-06-26 19:00:44 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             if obj.data.type == 'SPOT': | 
					
						
							|  |  |  |                 layout.separator() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |                 props = layout.operator("wm.context_modal_mouse", text="Spot Size") | 
					
						
							| 
									
										
										
										
											2010-06-26 19:00:44 +00:00
										 |  |  |                 props.data_path_iter = "selected_editable_objects" | 
					
						
							|  |  |  |                 props.data_path_item = "data.spot_size" | 
					
						
							|  |  |  |                 props.input_scale = 0.01 | 
					
						
							| 
									
										
										
										
											2012-02-25 19:49:23 +00:00
										 |  |  |                 props.header_text = "Spot Size: %.2f" | 
					
						
							| 
									
										
										
										
											2010-06-26 19:00:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |                 props = layout.operator("wm.context_modal_mouse", text="Spot Blend") | 
					
						
							| 
									
										
										
										
											2010-06-26 19:00:44 +00:00
										 |  |  |                 props.data_path_iter = "selected_editable_objects" | 
					
						
							|  |  |  |                 props.data_path_item = "data.spot_blend" | 
					
						
							|  |  |  |                 props.input_scale = -0.01 | 
					
						
							| 
									
										
										
										
											2012-02-25 19:49:23 +00:00
										 |  |  |                 props.header_text = "Spot Blend: %.2f" | 
					
						
							| 
									
										
										
										
											2010-06-26 19:00:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |                 props = layout.operator("wm.context_modal_mouse", text="Clip Start") | 
					
						
							| 
									
										
										
										
											2010-06-26 19:00:44 +00:00
										 |  |  |                 props.data_path_iter = "selected_editable_objects" | 
					
						
							|  |  |  |                 props.data_path_item = "data.shadow_buffer_clip_start" | 
					
						
							|  |  |  |                 props.input_scale = 0.05 | 
					
						
							| 
									
										
										
										
											2012-02-25 19:49:23 +00:00
										 |  |  |                 props.header_text = "Clip Start: %.2f" | 
					
						
							| 
									
										
										
										
											2010-06-26 19:00:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |                 props = layout.operator("wm.context_modal_mouse", text="Clip End") | 
					
						
							| 
									
										
										
										
											2010-06-26 19:00:44 +00:00
										 |  |  |                 props.data_path_iter = "selected_editable_objects" | 
					
						
							|  |  |  |                 props.data_path_item = "data.shadow_buffer_clip_end" | 
					
						
							|  |  |  |                 props.input_scale = 0.05 | 
					
						
							| 
									
										
										
										
											2012-02-25 19:49:23 +00:00
										 |  |  |                 props.header_text = "Clip End: %.2f" | 
					
						
							| 
									
										
										
										
											2010-06-26 19:00:44 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2010-05-20 15:30:28 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         props = layout.operator("object.isolate_type_render") | 
					
						
							| 
									
										
										
										
											2010-07-30 23:25:26 +00:00
										 |  |  |         props = layout.operator("object.hide_render_clear_all") | 
					
						
							| 
									
										
										
										
											2010-02-21 14:05:02 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-07 15:17:42 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_object_apply(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Apply" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-14 06:30:27 +00:00
										 |  |  |         props = layout.operator("object.transform_apply", text="Location") | 
					
						
							|  |  |  |         props.location, props.rotation, props.scale = True, False, False | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         props = layout.operator("object.transform_apply", text="Rotation") | 
					
						
							|  |  |  |         props.location, props.rotation, props.scale = False, True, False | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         props = layout.operator("object.transform_apply", text="Scale") | 
					
						
							|  |  |  |         props.location, props.rotation, props.scale = False, False, True | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         props = layout.operator("object.transform_apply", text="Rotation & Scale") | 
					
						
							| 
									
										
										
										
											2012-01-14 06:30:27 +00:00
										 |  |  |         props.location, props.rotation, props.scale = False, True, True | 
					
						
							| 
									
										
										
										
											2011-05-03 07:09:02 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2011-05-03 07:09:02 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("object.visual_transform_apply", text="Visual Transform") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("object.duplicates_make_real") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-15 20:15:21 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_object_parent(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Parent" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-10-06 05:45:06 +00:00
										 |  |  |         layout.operator_menu_enum("object.parent_set", "type", text="Set") | 
					
						
							|  |  |  |         layout.operator_menu_enum("object.parent_clear", "type", text="Clear") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_object_track(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Track" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-10-06 05:45:06 +00:00
										 |  |  |         layout.operator_menu_enum("object.track_set", "type", text="Set") | 
					
						
							|  |  |  |         layout.operator_menu_enum("object.track_clear", "type", text="Clear") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_object_group(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Group" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("group.create") | 
					
						
							|  |  |  |         layout.operator("group.objects_remove") | 
					
						
							| 
									
										
										
										
											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.operator("group.objects_add_active") | 
					
						
							|  |  |  |         layout.operator("group.objects_remove_active") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_object_constraints(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Constraints" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("object.constraint_add_with_targets") | 
					
						
							| 
									
										
										
										
											2010-05-27 11:56:31 +00:00
										 |  |  |         layout.operator("object.constraints_copy") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("object.constraints_clear") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-10-06 05:45:06 +00:00
										 |  |  | class VIEW3D_MT_object_quick_effects(Menu): | 
					
						
							|  |  |  |     bl_label = "Quick Effects" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.operator("object.quick_fur") | 
					
						
							|  |  |  |         layout.operator("object.quick_explode") | 
					
						
							|  |  |  |         layout.operator("object.quick_smoke") | 
					
						
							|  |  |  |         layout.operator("object.quick_fluid") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_object_showhide(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Show/Hide" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-08-15 22:28:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("object.hide_view_clear", text="Show Hidden") | 
					
						
							| 
									
										
										
										
											2012-01-14 06:30:27 +00:00
										 |  |  |         layout.operator("object.hide_view_set", text="Hide Selected").unselected = False | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("object.hide_view_set", text="Hide Unselected").unselected = True | 
					
						
							| 
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_make_single_user(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Make Single User" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         props = layout.operator("object.make_single_user", text="Object") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         props.object = True | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         props = layout.operator("object.make_single_user", text="Object & Data") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         props.object = props.obdata = True | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         props = layout.operator("object.make_single_user", text="Object & Data & Materials+Tex") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         props.object = props.obdata = props.material = props.texture = True | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         props = layout.operator("object.make_single_user", text="Materials+Tex") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         props.material = props.texture = True | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         props = layout.operator("object.make_single_user", text="Object Animation") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         props.animation = True | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-04 10:25:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_make_links(Menu): | 
					
						
							| 
									
										
										
										
											2009-11-04 10:25:57 +00:00
										 |  |  |     bl_label = "Make Links" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-11-07 22:07:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-12-02 22:58:23 +00:00
										 |  |  |         if(len(bpy.data.scenes) > 10): | 
					
						
							|  |  |  |             layout.operator_context = 'INVOKE_DEFAULT' | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             layout.operator("object.make_links_scene", text="Objects to Scene...", icon='OUTLINER_OB_EMPTY') | 
					
						
							| 
									
										
										
										
											2010-12-02 22:58:23 +00:00
										 |  |  |         else: | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             layout.operator_menu_enum("object.make_links_scene", "scene", text="Objects to Scene...") | 
					
						
							| 
									
										
										
										
											2010-12-02 22:58:23 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-18 06:07:41 +00:00
										 |  |  |         layout.operator_enum("object.make_links_data", "type")  # inline | 
					
						
							| 
									
										
										
										
											2009-11-04 10:25:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-10-06 05:45:06 +00:00
										 |  |  |         layout.operator("object.join_uvs")  # stupid place to add this! | 
					
						
							| 
									
										
										
										
											2009-11-04 10:25:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-10-15 05:01:47 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_object_game(Menu): | 
					
						
							| 
									
										
										
										
											2010-09-18 16:17:32 +00:00
										 |  |  |     bl_label = "Game" | 
					
						
							| 
									
										
										
										
											2010-05-25 06:24:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("object.logic_bricks_copy", text="Copy Logic Bricks") | 
					
						
							| 
									
										
										
										
											2011-12-21 02:41:27 +00:00
										 |  |  |         layout.operator("object.game_physics_copy", text="Copy Physics Properties") | 
					
						
							| 
									
										
										
										
											2010-09-18 16:17:32 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-06-03 06:41:24 +00:00
										 |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("object.game_property_copy", text="Replace Properties").operation = 'REPLACE' | 
					
						
							|  |  |  |         layout.operator("object.game_property_copy", text="Merge Properties").operation = 'MERGE' | 
					
						
							|  |  |  |         layout.operator_menu_enum("object.game_property_copy", "property", text="Copy Properties...") | 
					
						
							| 
									
										
										
										
											2010-06-03 06:41:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-18 16:17:32 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2010-06-03 06:41:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-18 16:17:32 +00:00
										 |  |  |         layout.operator("object.game_property_clear") | 
					
						
							| 
									
										
										
										
											2010-06-03 06:41:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-03-08 05:36:05 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-02-16 18:06:38 +00:00
										 |  |  | # ********** Brush menu ********** | 
					
						
							|  |  |  | class VIEW3D_MT_brush(Menu): | 
					
						
							|  |  |  |     bl_label = "Brush" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         settings = UnifiedPaintPanel.paint_settings(context) | 
					
						
							|  |  |  |         brush = settings.brush | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         ups = context.tool_settings.unified_paint_settings | 
					
						
							|  |  |  |         layout.prop(ups, "use_unified_size", text="Unified Size") | 
					
						
							|  |  |  |         layout.prop(ups, "use_unified_strength", text="Unified Strength") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         # skip if no active brush | 
					
						
							|  |  |  |         if not brush: | 
					
						
							|  |  |  |             return | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         # TODO: still missing a lot of brush options here | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         # sculpt options | 
					
						
							|  |  |  |         if context.sculpt_object: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             sculpt_tool = brush.sculpt_tool | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             layout.separator() | 
					
						
							|  |  |  |             layout.operator_menu_enum("brush.curve_preset", "shape", text='Curve Preset') | 
					
						
							|  |  |  |             layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             if sculpt_tool != 'GRAB': | 
					
						
							|  |  |  |                 layout.prop_menu_enum(brush, "stroke_method") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                 if sculpt_tool in {'DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'}: | 
					
						
							|  |  |  |                     layout.prop_menu_enum(brush, "direction") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                 if sculpt_tool == 'LAYER': | 
					
						
							|  |  |  |                     layout.prop(brush, "use_persistent") | 
					
						
							|  |  |  |                     layout.operator("sculpt.set_persistent_base") | 
					
						
							| 
									
										
										
										
											2010-05-25 06:24:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | # ********** Vertex paint menu ********** | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_paint_vertex(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Paint" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-08-22 02:27:37 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-18 16:17:32 +00:00
										 |  |  |         layout.operator("ed.undo") | 
					
						
							|  |  |  |         layout.operator("ed.redo") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("paint.vertex_color_set") | 
					
						
							| 
									
										
										
										
											2010-04-21 16:22:37 +00:00
										 |  |  |         layout.operator("paint.vertex_color_dirt") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-16 13:59:27 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_hook(Menu): | 
					
						
							| 
									
										
										
										
											2009-11-16 13:59:27 +00:00
										 |  |  |     bl_label = "Hooks" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  |         layout.operator_context = 'EXEC_AREA' | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("object.hook_add_newob") | 
					
						
							|  |  |  |         layout.operator("object.hook_add_selob") | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-22 06:20:56 +00:00
										 |  |  |         if [mod.type == 'HOOK' for mod in context.active_object.modifiers]: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.separator() | 
					
						
							|  |  |  |             layout.operator_menu_enum("object.hook_assign", "modifier") | 
					
						
							|  |  |  |             layout.operator_menu_enum("object.hook_remove", "modifier") | 
					
						
							|  |  |  |             layout.separator() | 
					
						
							|  |  |  |             layout.operator_menu_enum("object.hook_select", "modifier") | 
					
						
							|  |  |  |             layout.operator_menu_enum("object.hook_reset", "modifier") | 
					
						
							|  |  |  |             layout.operator_menu_enum("object.hook_recenter", "modifier") | 
					
						
							| 
									
										
										
										
											2009-11-22 06:20:56 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_vertex_group(Menu): | 
					
						
							| 
									
										
										
										
											2009-11-22 06:20:56 +00:00
										 |  |  |     bl_label = "Vertex Groups" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  |         layout.operator_context = 'EXEC_AREA' | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("object.vertex_group_assign", text="Assign to New Group").new = True | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-22 06:20:56 +00:00
										 |  |  |         ob = context.active_object | 
					
						
							| 
									
										
										
										
											2012-01-02 16:59:46 +00:00
										 |  |  |         if ob.mode == 'EDIT' or (ob.mode == 'WEIGHT_PAINT' and ob.type == 'MESH' and ob.data.use_paint_mask_vertex): | 
					
						
							| 
									
										
										
										
											2010-08-24 04:02:50 +00:00
										 |  |  |             if ob.vertex_groups.active: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 layout.separator() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |                 layout.operator("object.vertex_group_assign", text="Assign to Active Group") | 
					
						
							| 
									
										
										
										
											2012-01-14 06:30:27 +00:00
										 |  |  |                 layout.operator("object.vertex_group_remove_from", text="Remove from Active Group").all = False | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |                 layout.operator("object.vertex_group_remove_from", text="Remove from All").all = True | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 layout.separator() | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-24 04:02:50 +00:00
										 |  |  |         if ob.vertex_groups.active: | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             layout.operator_menu_enum("object.vertex_group_set_active", "group", text="Set Active Group") | 
					
						
							| 
									
										
										
										
											2012-01-14 06:30:27 +00:00
										 |  |  |             layout.operator("object.vertex_group_remove", text="Remove Active Group").all = False | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             layout.operator("object.vertex_group_remove", text="Remove All Groups").all = True | 
					
						
							| 
									
										
										
										
											2009-11-16 13:59:27 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-26 11:11:53 +00:00
										 |  |  | # ********** Weight paint menu ********** | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_paint_weight(Menu): | 
					
						
							| 
									
										
										
										
											2010-01-26 11:11:53 +00:00
										 |  |  |     bl_label = "Weights" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-18 16:17:32 +00:00
										 |  |  |         layout.operator("ed.undo") | 
					
						
							|  |  |  |         layout.operator("ed.redo") | 
					
						
							| 
									
										
										
											
												Code holiday commit:
- fix: user pref, window title was reset to 'Blender' on tab usage
- Undo history menu back:
  - name "Undo History"
  - hotkey alt+ctrl+z (alt+apple+z for mac)
  - works like 2.4x, only for global undo, editmode and particle edit.
- Menu scroll
  - for small windows or screens, popup menus now allow to display
    all items, using internal scrolling
  - works with a timer, scrolling 10 items per second when mouse 
    is over the top or bottom arrow
  - if menu is too big to display, it now draws to top or bottom, 
    based on largest available space.
  - also works for hotkey driven pop up menus.
- User pref "DPI" follows widget/layout size
  - widgets & headers now become bigger and smaller, to match 
    'dpi' font sizes. Works well to match UI to monitor size.
  - note that icons can get fuzzy, we need better mipmaps for it
											
										 
											2011-06-04 17:03:46 +00:00
										 |  |  |         layout.operator("ed.undo_history") | 
					
						
							| 
									
										
										
										
											2010-09-18 16:17:32 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("paint.weight_from_bones", text="Assign Automatic From Bones").type = 'AUTOMATIC' | 
					
						
							|  |  |  |         layout.operator("paint.weight_from_bones", text="Assign From Bone Envelopes").type = 'ENVELOPES' | 
					
						
							| 
									
										
										
										
											2010-01-26 11:11:53 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("object.vertex_group_normalize_all", text="Normalize All") | 
					
						
							|  |  |  |         layout.operator("object.vertex_group_normalize", text="Normalize") | 
					
						
							| 
									
										
										
										
											2011-11-01 08:11:55 +00:00
										 |  |  |         layout.operator("object.vertex_group_mirror", text="Mirror") | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("object.vertex_group_invert", text="Invert") | 
					
						
							|  |  |  |         layout.operator("object.vertex_group_clean", text="Clean") | 
					
						
							|  |  |  |         layout.operator("object.vertex_group_levels", text="Levels") | 
					
						
							| 
									
										
										
										
											2011-07-29 17:36:49 +00:00
										 |  |  |         layout.operator("object.vertex_group_fix", text="Fix Deforms") | 
					
						
							| 
									
										
										
										
											2009-11-16 13:59:27 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-04-01 22:19:03 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2011-04-04 22:42:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-04-01 22:19:03 +00:00
										 |  |  |         layout.operator("paint.weight_set") | 
					
						
							| 
									
										
										
										
											2009-11-16 13:59:27 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | # ********** Sculpt menu ********** | 
					
						
							| 
									
										
										
										
											2009-08-22 02:27:37 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_sculpt(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Sculpt" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-17 17:57:20 +00:00
										 |  |  |         toolsettings = context.tool_settings | 
					
						
							|  |  |  |         sculpt = toolsettings.sculpt | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-18 16:17:32 +00:00
										 |  |  |         layout.operator("ed.undo") | 
					
						
							|  |  |  |         layout.operator("ed.redo") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-19 17:46:00 +00:00
										 |  |  |         layout.prop(sculpt, "use_symmetry_x") | 
					
						
							|  |  |  |         layout.prop(sculpt, "use_symmetry_y") | 
					
						
							|  |  |  |         layout.prop(sculpt, "use_symmetry_z") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							|  |  |  |         layout.prop(sculpt, "lock_x") | 
					
						
							|  |  |  |         layout.prop(sculpt, "lock_y") | 
					
						
							|  |  |  |         layout.prop(sculpt, "lock_z") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-26 23:49:23 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.prop(sculpt, "use_threaded", text="Threaded Sculpt") | 
					
						
							| 
									
										
										
										
											2012-02-16 16:38:05 +00:00
										 |  |  |         layout.prop(sculpt, "show_low_resolution") | 
					
						
							| 
									
										
										
										
											2010-07-26 23:49:23 +00:00
										 |  |  |         layout.prop(sculpt, "show_brush") | 
					
						
							| 
									
										
										
										
											2012-02-16 16:38:05 +00:00
										 |  |  |         layout.prop(sculpt, "use_deform_only") | 
					
						
							| 
									
										
										
										
											2010-07-26 23:49:23 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-03-14 06:32:43 +00:00
										 |  |  | class VIEW3D_MT_hide(Menu): | 
					
						
							|  |  |  |     bl_label = "Hide" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         op = layout.operator("paint.hide_show", text="Show All") | 
					
						
							|  |  |  |         op.action = 'SHOW' | 
					
						
							|  |  |  |         op.area = 'ALL' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         op = layout.operator("paint.hide_show", text="Hide Bounding Box") | 
					
						
							|  |  |  |         op.action = 'HIDE' | 
					
						
							|  |  |  |         op.area = 'INSIDE' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         op = layout.operator("paint.hide_show", text="Show Bounding Box") | 
					
						
							|  |  |  |         op.action = 'SHOW' | 
					
						
							|  |  |  |         op.area = 'INSIDE' | 
					
						
							|  |  |  |      | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | # ********** Particle menu ********** | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_particle(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Particle" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         particle_edit = context.tool_settings.particle_edit | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-18 16:17:32 +00:00
										 |  |  |         layout.operator("ed.undo") | 
					
						
							|  |  |  |         layout.operator("ed.redo") | 
					
						
							| 
									
										
										
											
												Code holiday commit:
- fix: user pref, window title was reset to 'Blender' on tab usage
- Undo history menu back:
  - name "Undo History"
  - hotkey alt+ctrl+z (alt+apple+z for mac)
  - works like 2.4x, only for global undo, editmode and particle edit.
- Menu scroll
  - for small windows or screens, popup menus now allow to display
    all items, using internal scrolling
  - works with a timer, scrolling 10 items per second when mouse 
    is over the top or bottom arrow
  - if menu is too big to display, it now draws to top or bottom, 
    based on largest available space.
  - also works for hotkey driven pop up menus.
- User pref "DPI" follows widget/layout size
  - widgets & headers now become bigger and smaller, to match 
    'dpi' font sizes. Works well to match UI to monitor size.
  - note that icons can get fuzzy, we need better mipmaps for it
											
										 
											2011-06-04 17:03:46 +00:00
										 |  |  |         layout.operator("ed.undo_history") | 
					
						
							| 
									
										
										
										
											2010-09-18 16:17:32 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("particle.mirror") | 
					
						
							| 
									
										
										
										
											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.operator("particle.remove_doubles") | 
					
						
							|  |  |  |         layout.operator("particle.delete") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         if particle_edit.select_mode == 'POINT': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.operator("particle.subdivide") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("particle.rekey") | 
					
						
							| 
									
										
										
										
											2010-01-15 17:28:00 +00:00
										 |  |  |         layout.operator("particle.weight_set") | 
					
						
							| 
									
										
										
										
											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.menu("VIEW3D_MT_particle_showhide") | 
					
						
							| 
									
										
										
										
											2009-08-23 22:13:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_particle_specials(Menu): | 
					
						
							| 
									
										
										
										
											2009-12-24 10:39:30 +00:00
										 |  |  |     bl_label = "Specials" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  |         particle_edit = context.tool_settings.particle_edit | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.operator("particle.rekey") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         if particle_edit.select_mode == 'POINT': | 
					
						
							| 
									
										
										
										
											2009-12-24 10:39:30 +00:00
										 |  |  |             layout.operator("particle.subdivide") | 
					
						
							| 
									
										
										
										
											2010-05-03 07:42:40 +00:00
										 |  |  |             layout.operator("particle.select_roots") | 
					
						
							|  |  |  |             layout.operator("particle.select_tips") | 
					
						
							| 
									
										
										
										
											2009-12-24 10:39:30 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         layout.operator("particle.remove_doubles") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_particle_showhide(ShowHideMenu, Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     _operator_name = "particle" | 
					
						
							| 
									
										
										
										
											2009-08-23 22:13:56 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | # ********** Pose Menu ********** | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_pose(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Pose" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-18 16:17:32 +00:00
										 |  |  |         layout.operator("ed.undo") | 
					
						
							|  |  |  |         layout.operator("ed.redo") | 
					
						
							| 
									
										
										
											
												Code holiday commit:
- fix: user pref, window title was reset to 'Blender' on tab usage
- Undo history menu back:
  - name "Undo History"
  - hotkey alt+ctrl+z (alt+apple+z for mac)
  - works like 2.4x, only for global undo, editmode and particle edit.
- Menu scroll
  - for small windows or screens, popup menus now allow to display
    all items, using internal scrolling
  - works with a timer, scrolling 10 items per second when mouse 
    is over the top or bottom arrow
  - if menu is too big to display, it now draws to top or bottom, 
    based on largest available space.
  - also works for hotkey driven pop up menus.
- User pref "DPI" follows widget/layout size
  - widgets & headers now become bigger and smaller, to match 
    'dpi' font sizes. Works well to match UI to monitor size.
  - note that icons can get fuzzy, we need better mipmaps for it
											
										 
											2011-06-04 17:03:46 +00:00
										 |  |  |         layout.operator("ed.undo_history") | 
					
						
							| 
									
										
										
										
											2010-09-18 16:17:32 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_transform") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_pose_transform") | 
					
						
							| 
									
										
										
										
											2011-03-27 05:23:14 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_pose_apply") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-24 03:02:34 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_snap") | 
					
						
							| 
									
										
										
										
											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-03-24 03:23:30 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_object_animation") | 
					
						
							| 
									
										
										
										
											2010-02-25 15:10:27 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-24 03:02:34 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_pose_slide") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_pose_propagate") | 
					
						
							| 
									
										
										
										
											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.operator("pose.copy") | 
					
						
							|  |  |  |         layout.operator("pose.paste") | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("pose.paste", text="Paste X-Flipped Pose").flipped = True | 
					
						
							| 
									
										
										
										
											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-03-24 03:02:34 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_pose_library") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_pose_motion") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_pose_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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-25 02:56:37 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_object_parent") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_pose_ik") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_pose_constraints") | 
					
						
							| 
									
										
										
										
											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 13:59:27 +00:00
										 |  |  |         layout.operator_context = 'EXEC_AREA' | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("pose.autoside_names", text="AutoName Left/Right").axis = 'XAXIS' | 
					
						
							|  |  |  |         layout.operator("pose.autoside_names", text="AutoName Front/Back").axis = 'YAXIS' | 
					
						
							|  |  |  |         layout.operator("pose.autoside_names", text="AutoName Top/Bottom").axis = 'ZAXIS' | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("pose.flip_names") | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-25 10:16:36 +00:00
										 |  |  |         layout.operator("pose.quaternions_flip") | 
					
						
							| 
									
										
										
										
											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 13:59:27 +00:00
										 |  |  |         layout.operator_context = 'INVOKE_AREA' | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("pose.armature_layers", text="Change Armature Layers...") | 
					
						
							|  |  |  |         layout.operator("pose.bone_layers", text="Change Bone Layers...") | 
					
						
							| 
									
										
										
										
											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.menu("VIEW3D_MT_pose_showhide") | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_bone_options_toggle", text="Bone Settings") | 
					
						
							| 
									
										
										
										
											2009-08-23 22:13:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_pose_transform(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Clear Transform" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("pose.transforms_clear", text="All") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-15 13:24:53 +00:00
										 |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("pose.loc_clear", text="Location") | 
					
						
							|  |  |  |         layout.operator("pose.rot_clear", text="Rotation") | 
					
						
							|  |  |  |         layout.operator("pose.scale_clear", text="Scale") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-15 13:24:53 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("pose.user_transforms_clear", text="Reset unkeyed") | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-30 10:49:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_pose_slide(Menu): | 
					
						
							| 
									
										
										
										
											2011-03-24 03:02:34 +00:00
										 |  |  |     bl_label = "In-Betweens" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.operator("pose.push") | 
					
						
							|  |  |  |         layout.operator("pose.relax") | 
					
						
							|  |  |  |         layout.operator("pose.breakdown") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_pose_propagate(Menu): | 
					
						
							| 
									
										
										
										
											2011-03-24 03:02:34 +00:00
										 |  |  |     bl_label = "Propagate" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-14 06:30:27 +00:00
										 |  |  |         layout.operator("pose.propagate").mode = 'WHILE_HELD' | 
					
						
							| 
									
										
										
										
											2011-03-31 01:37:42 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("pose.propagate", text="To Next Keyframe").mode = 'NEXT_KEY' | 
					
						
							|  |  |  |         layout.operator("pose.propagate", text="To Last Keyframe (Make Cyclic)").mode = 'LAST_KEY' | 
					
						
							| 
									
										
										
										
											2011-03-24 03:02:34 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-31 01:37:42 +00:00
										 |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("pose.propagate", text="On Selected Markers").mode = 'SELECTED_MARKERS' | 
					
						
							| 
									
										
										
										
											2011-03-31 01:37:42 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-24 03:02:34 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_pose_library(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Pose Library" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("poselib.browse_interactive", text="Browse Poses...") | 
					
						
							| 
									
										
										
										
											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-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("poselib.pose_add", text="Add Pose...") | 
					
						
							|  |  |  |         layout.operator("poselib.pose_rename", text="Rename Pose...") | 
					
						
							|  |  |  |         layout.operator("poselib.pose_remove", text="Remove Pose...") | 
					
						
							| 
									
										
										
										
											2009-08-23 22:13:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_pose_motion(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Motion Paths" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("pose.paths_calculate", text="Calculate") | 
					
						
							|  |  |  |         layout.operator("pose.paths_clear", text="Clear") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_pose_group(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Bone Groups" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("pose.group_add") | 
					
						
							|  |  |  |         layout.operator("pose.group_remove") | 
					
						
							| 
									
										
										
										
											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.operator("pose.group_assign") | 
					
						
							|  |  |  |         layout.operator("pose.group_unassign") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_pose_ik(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Inverse Kinematics" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("pose.ik_add") | 
					
						
							|  |  |  |         layout.operator("pose.ik_clear") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_pose_constraints(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Constraints" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("pose.constraint_add_with_targets", text="Add (With Targets)...") | 
					
						
							| 
									
										
										
										
											2010-05-27 11:56:31 +00:00
										 |  |  |         layout.operator("pose.constraints_copy") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("pose.constraints_clear") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_pose_showhide(ShowHideMenu, Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     _operator_name = "pose" | 
					
						
							| 
									
										
										
										
											2009-08-23 22:13:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-19 15:34:26 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_pose_apply(Menu): | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |     bl_label = "Apply" | 
					
						
							| 
									
										
										
										
											2010-02-19 15:34:26 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.operator("pose.armature_apply") | 
					
						
							|  |  |  |         layout.operator("pose.visual_transform_apply") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-06-27 07:51:52 +00:00
										 |  |  | class BoneOptions: | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         options = [ | 
					
						
							|  |  |  |             "show_wire", | 
					
						
							|  |  |  |             "use_deform", | 
					
						
							|  |  |  |             "use_envelope_multiply", | 
					
						
							|  |  |  |             "use_inherit_rotation", | 
					
						
							|  |  |  |             "use_inherit_scale", | 
					
						
							|  |  |  |         ] | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-06-27 11:40:15 +00:00
										 |  |  |         if context.mode == 'EDIT_ARMATURE': | 
					
						
							|  |  |  |             bone_props = bpy.types.EditBone.bl_rna.properties | 
					
						
							| 
									
										
										
										
											2011-06-27 07:51:52 +00:00
										 |  |  |             data_path_iter = "selected_bones" | 
					
						
							|  |  |  |             opt_suffix = "" | 
					
						
							| 
									
										
										
										
											2011-06-27 11:40:15 +00:00
										 |  |  |             options.append("lock") | 
					
						
							| 
									
										
										
										
											2011-10-17 06:58:07 +00:00
										 |  |  |         else:  # pose-mode | 
					
						
							| 
									
										
										
										
											2011-06-27 11:40:15 +00:00
										 |  |  |             bone_props = bpy.types.Bone.bl_rna.properties | 
					
						
							|  |  |  |             data_path_iter = "selected_pose_bones" | 
					
						
							|  |  |  |             opt_suffix = "bone." | 
					
						
							| 
									
										
										
										
											2011-06-27 07:51:52 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         for opt in options: | 
					
						
							|  |  |  |             props = layout.operator("wm.context_collection_boolean_set", text=bone_props[opt].name) | 
					
						
							|  |  |  |             props.data_path_iter = data_path_iter | 
					
						
							|  |  |  |             props.data_path_item = opt_suffix + opt | 
					
						
							|  |  |  |             props.type = self.type | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_bone_options_toggle(Menu, BoneOptions): | 
					
						
							| 
									
										
										
										
											2011-06-27 11:40:15 +00:00
										 |  |  |     bl_label = "Toggle Bone Options" | 
					
						
							| 
									
										
										
										
											2011-06-27 07:51:52 +00:00
										 |  |  |     type = 'TOGGLE' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_bone_options_enable(Menu, BoneOptions): | 
					
						
							| 
									
										
										
										
											2011-06-27 11:40:15 +00:00
										 |  |  |     bl_label = "Enable Bone Options" | 
					
						
							| 
									
										
										
										
											2011-06-27 07:51:52 +00:00
										 |  |  |     type = 'ENABLE' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_bone_options_disable(Menu, BoneOptions): | 
					
						
							| 
									
										
										
										
											2011-06-27 11:40:15 +00:00
										 |  |  |     bl_label = "Disable Bone Options" | 
					
						
							| 
									
										
										
										
											2011-06-27 07:51:52 +00:00
										 |  |  |     type = 'DISABLE' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-23 22:13:56 +00:00
										 |  |  | # ********** Edit Menus, suffix from ob.type ********** | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_mesh(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Mesh" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-17 17:57:20 +00:00
										 |  |  |         toolsettings = context.tool_settings | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("ed.undo") | 
					
						
							|  |  |  |         layout.operator("ed.redo") | 
					
						
							| 
									
										
										
											
												Code holiday commit:
- fix: user pref, window title was reset to 'Blender' on tab usage
- Undo history menu back:
  - name "Undo History"
  - hotkey alt+ctrl+z (alt+apple+z for mac)
  - works like 2.4x, only for global undo, editmode and particle edit.
- Menu scroll
  - for small windows or screens, popup menus now allow to display
    all items, using internal scrolling
  - works with a timer, scrolling 10 items per second when mouse 
    is over the top or bottom arrow
  - if menu is too big to display, it now draws to top or bottom, 
    based on largest available space.
  - also works for hotkey driven pop up menus.
- User pref "DPI" follows widget/layout size
  - widgets & headers now become bigger and smaller, to match 
    'dpi' font sizes. Works well to match UI to monitor size.
  - note that icons can get fuzzy, we need better mipmaps for it
											
										 
											2011-06-04 17:03:46 +00:00
										 |  |  |         layout.operator("ed.undo_history") | 
					
						
							| 
									
										
										
										
											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.menu("VIEW3D_MT_transform") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_mirror") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_snap") | 
					
						
							| 
									
										
										
										
											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-09-21 15:18:38 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_uv_map", text="UV Unwrap...") | 
					
						
							| 
									
										
										
										
											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-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("view3d.edit_mesh_extrude_move_normal", text="Extrude Region") | 
					
						
							|  |  |  |         layout.operator("view3d.edit_mesh_extrude_individual_move", text="Extrude Individual") | 
					
						
							| 
									
										
										
										
											2012-02-19 20:27:30 +00:00
										 |  |  |         layout.operator("mesh.dissolve_limited") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("mesh.duplicate_move") | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("mesh.delete", text="Delete...") | 
					
						
							| 
									
										
										
										
											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.menu("VIEW3D_MT_edit_mesh_vertices") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_edit_mesh_edges") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_edit_mesh_faces") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_edit_mesh_normals") | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-17 17:57:20 +00:00
										 |  |  |         layout.prop(toolsettings, "use_mesh_automerge") | 
					
						
							|  |  |  |         layout.prop_menu_enum(toolsettings, "proportional_edit") | 
					
						
							|  |  |  |         layout.prop_menu_enum(toolsettings, "proportional_edit_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.menu("VIEW3D_MT_edit_mesh_showhide") | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_mesh_specials(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Specials" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.operator_context = 'INVOKE_REGION_WIN' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-14 06:30:27 +00:00
										 |  |  |         layout.operator("mesh.subdivide", text="Subdivide").smoothness = 0.0 | 
					
						
							| 
									
										
										
										
											2011-09-23 13:31:48 +00:00
										 |  |  |         """
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("mesh.subdivide", text="Subdivide Smooth").smoothness = 1.0 | 
					
						
							| 
									
										
										
										
											2011-09-23 13:31:48 +00:00
										 |  |  |         """
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("mesh.merge", text="Merge...") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("mesh.remove_doubles") | 
					
						
							| 
									
										
										
										
											2012-02-19 20:27:30 +00:00
										 |  |  |         layout.operator("mesh.dissolve_limited") | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("mesh.hide", text="Hide") | 
					
						
							|  |  |  |         layout.operator("mesh.reveal", text="Reveal") | 
					
						
							| 
									
										
										
										
											2012-01-14 06:58:03 +00:00
										 |  |  |         layout.operator("mesh.select_all").action = 'INVERT' | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("mesh.flip_normals") | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("mesh.vertices_smooth", text="Smooth") | 
					
						
							| 
									
										
										
										
											2011-04-15 01:19:13 +00:00
										 |  |  |         layout.operator("mesh.bevel", text="Bevel") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("mesh.faces_shade_smooth") | 
					
						
							|  |  |  |         layout.operator("mesh.faces_shade_flat") | 
					
						
							|  |  |  |         layout.operator("mesh.blend_from_shape") | 
					
						
							|  |  |  |         layout.operator("mesh.shape_propagate_to_all") | 
					
						
							|  |  |  |         layout.operator("mesh.select_vertex_path") | 
					
						
							| 
									
										
										
										
											2009-10-12 21:06:03 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_mesh_select_mode(Menu): | 
					
						
							| 
									
										
										
										
											2009-12-22 16:11:11 +00:00
										 |  |  |     bl_label = "Mesh Select Mode" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.operator_context = 'INVOKE_REGION_WIN' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-01 13:09:58 +00:00
										 |  |  |         props = layout.operator("wm.context_set_value", text="Vertex", icon='VERTEXSEL') | 
					
						
							|  |  |  |         props.value = "(True, False, False)" | 
					
						
							|  |  |  |         props.data_path = "tool_settings.mesh_select_mode" | 
					
						
							| 
									
										
										
										
											2009-12-22 16:11:11 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-01 13:09:58 +00:00
										 |  |  |         props = layout.operator("wm.context_set_value", text="Edge", icon='EDGESEL') | 
					
						
							|  |  |  |         props.value = "(False, True, False)" | 
					
						
							|  |  |  |         props.data_path = "tool_settings.mesh_select_mode" | 
					
						
							| 
									
										
										
										
											2009-12-22 16:11:11 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-01 13:09:58 +00:00
										 |  |  |         props = layout.operator("wm.context_set_value", text="Face", icon='FACESEL') | 
					
						
							|  |  |  |         props.value = "(False, False, True)" | 
					
						
							|  |  |  |         props.data_path = "tool_settings.mesh_select_mode" | 
					
						
							| 
									
										
										
										
											2009-12-22 16:11:11 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-12 22:13:47 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_mesh_extrude(Menu): | 
					
						
							| 
									
										
										
										
											2010-02-01 18:30:00 +00:00
										 |  |  |     bl_label = "Extrude" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-08 01:32:34 +00:00
										 |  |  |     _extrude_funcs = { | 
					
						
							| 
									
										
										
										
											2011-11-11 03:28:46 +00:00
										 |  |  |         'VERT': lambda layout: layout.operator("mesh.extrude_vertices_move", text="Vertices Only"), | 
					
						
							|  |  |  |         'EDGE': lambda layout: layout.operator("mesh.extrude_edges_move", text="Edges Only"), | 
					
						
							|  |  |  |         'FACE': lambda layout: layout.operator("mesh.extrude_faces_move", text="Individual Faces"), | 
					
						
							|  |  |  |         'REGION': lambda layout: layout.operator("view3d.edit_mesh_extrude_move_normal", text="Region"), | 
					
						
							| 
									
										
										
										
											2010-10-11 02:05:44 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-12 22:13:47 +00:00
										 |  |  |     @staticmethod | 
					
						
							|  |  |  |     def extrude_options(context): | 
					
						
							|  |  |  |         mesh = context.object.data | 
					
						
							| 
									
										
										
										
											2010-10-05 15:29:06 +00:00
										 |  |  |         select_mode = context.tool_settings.mesh_select_mode | 
					
						
							| 
									
										
										
										
											2010-02-12 22:13:47 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-10-11 02:05:44 +00:00
										 |  |  |         menu = [] | 
					
						
							|  |  |  |         if mesh.total_face_sel: | 
					
						
							| 
									
										
										
										
											2011-11-11 03:28:46 +00:00
										 |  |  |             menu += ['REGION', 'FACE'] | 
					
						
							| 
									
										
										
										
											2010-10-11 02:05:44 +00:00
										 |  |  |         if mesh.total_edge_sel and (select_mode[0] or select_mode[1]): | 
					
						
							| 
									
										
										
										
											2011-11-11 03:28:46 +00:00
										 |  |  |             menu += ['EDGE'] | 
					
						
							| 
									
										
										
										
											2010-10-11 02:05:44 +00:00
										 |  |  |         if mesh.total_vert_sel and select_mode[0]: | 
					
						
							| 
									
										
										
										
											2011-11-11 03:28:46 +00:00
										 |  |  |             menu += ['VERT'] | 
					
						
							| 
									
										
										
										
											2010-02-22 23:32:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-12 22:13:47 +00:00
										 |  |  |         # should never get here | 
					
						
							| 
									
										
										
										
											2010-10-11 02:05:44 +00:00
										 |  |  |         return menu | 
					
						
							| 
									
										
										
										
											2010-02-12 22:13:47 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-01 18:30:00 +00:00
										 |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  |         layout.operator_context = 'INVOKE_REGION_WIN' | 
					
						
							| 
									
										
										
										
											2010-02-22 23:32:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-10-11 02:05:44 +00:00
										 |  |  |         for menu_id in self.extrude_options(context): | 
					
						
							|  |  |  |             self._extrude_funcs[menu_id](layout) | 
					
						
							| 
									
										
										
										
											2010-02-12 22:13:47 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-22 23:32:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_mesh_vertices(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Vertices" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  |         layout.operator_context = 'INVOKE_REGION_WIN' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("mesh.merge") | 
					
						
							| 
									
										
										
										
											2010-09-16 20:16:20 +00:00
										 |  |  |         layout.operator("mesh.rip_move") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("mesh.split") | 
					
						
							|  |  |  |         layout.operator("mesh.separate") | 
					
						
							| 
									
										
										
										
											2011-12-11 16:56:09 +00:00
										 |  |  |         layout.operator("mesh.vert_connect") | 
					
						
							| 
									
										
										
										
											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.operator("mesh.vertices_smooth") | 
					
						
							|  |  |  |         layout.operator("mesh.remove_doubles") | 
					
						
							| 
									
										
										
										
											2011-02-23 05:17:29 +00:00
										 |  |  |         layout.operator("mesh.vertices_sort") | 
					
						
							|  |  |  |         layout.operator("mesh.vertices_randomize") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("mesh.select_vertex_path") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("mesh.blend_from_shape") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("object.vertex_group_blend") | 
					
						
							|  |  |  |         layout.operator("mesh.shape_propagate_to_all") | 
					
						
							| 
									
										
										
										
											2009-08-23 22:13:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-11-16 13:59:27 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_vertex_group") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_hook") | 
					
						
							| 
									
										
										
										
											2009-11-16 13:59:27 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_mesh_edges(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Edges" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  |         layout.operator_context = 'INVOKE_REGION_WIN' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("mesh.edge_face_add") | 
					
						
							|  |  |  |         layout.operator("mesh.subdivide") | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-14 06:30:27 +00:00
										 |  |  |         layout.operator("mesh.mark_seam").clear = False | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("mesh.mark_seam", text="Clear Seam").clear = True | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-14 06:30:27 +00:00
										 |  |  |         layout.operator("mesh.mark_sharp").clear = False | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("mesh.mark_sharp", text="Clear Sharp").clear = True | 
					
						
							| 
									
										
										
										
											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-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("mesh.edge_rotate", text="Rotate Edge CW").direction = 'CW' | 
					
						
							|  |  |  |         layout.operator("mesh.edge_rotate", text="Rotate Edge CCW").direction = 'CCW' | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-15 23:38:51 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-15 23:38:51 +00:00
										 |  |  |         layout.operator("mesh.bridge_edge_loops", text="Bridge Two Edge Loops") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-09 20:42:35 +00:00
										 |  |  |         layout.operator("TRANSFORM_OT_edge_slide") | 
					
						
							|  |  |  |         layout.operator("TRANSFORM_OT_edge_crease") | 
					
						
							| 
									
										
										
										
											2012-01-14 06:30:27 +00:00
										 |  |  |         layout.operator("mesh.loop_multi_select", text="Edge Loop").ring = False | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-02-08 04:37:37 +00:00
										 |  |  |         #~ uiItemO(layout, "Loopcut", 0, "mesh.loop_cut"); // CutEdgeloop(em, 1); | 
					
						
							|  |  |  |         #~ uiItemO(layout, "Edge Slide", 0, "mesh.edge_slide"); // EdgeSlide(em, 0,0.0); | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("mesh.loop_multi_select", text="Edge Ring").ring = True | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("mesh.loop_to_region") | 
					
						
							|  |  |  |         layout.operator("mesh.region_to_loop") | 
					
						
							| 
									
										
										
										
											2009-10-12 21:06:03 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_mesh_faces(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Faces" | 
					
						
							|  |  |  |     bl_idname = "VIEW3D_MT_edit_mesh_faces" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  |         layout.operator_context = 'INVOKE_REGION_WIN' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-10 11:38:40 +00:00
										 |  |  |         layout.operator("mesh.flip_normals") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         # layout.operator("mesh.bevel") | 
					
						
							|  |  |  |         # layout.operator("mesh.bevel") | 
					
						
							|  |  |  |         layout.operator("mesh.edge_face_add") | 
					
						
							|  |  |  |         layout.operator("mesh.fill") | 
					
						
							| 
									
										
										
										
											2010-01-26 11:14:44 +00:00
										 |  |  |         layout.operator("mesh.beautify_fill") | 
					
						
							| 
									
										
										
										
											2009-12-14 23:35:13 +00:00
										 |  |  |         layout.operator("mesh.solidify") | 
					
						
							| 
									
										
										
										
											2010-07-06 19:26:38 +00:00
										 |  |  |         layout.operator("mesh.sort_faces") | 
					
						
							| 
									
										
										
										
											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.operator("mesh.quads_convert_to_tris") | 
					
						
							|  |  |  |         layout.operator("mesh.tris_convert_to_quads") | 
					
						
							| 
									
										
										
										
											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.operator("mesh.faces_shade_smooth") | 
					
						
							|  |  |  |         layout.operator("mesh.faces_shade_flat") | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							|  |  |  |         # uiItemO(layout, NULL, 0, "mesh.face_mode"); // mesh_set_face_flags(em, 1); | 
					
						
							|  |  |  |         # uiItemBooleanO(layout, NULL, 0, "mesh.face_mode", "clear", 1); // mesh_set_face_flags(em, 0); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("mesh.edge_rotate", text="Rotate Edge CW").direction = 'CW' | 
					
						
							| 
									
										
										
										
											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.operator_menu_enum("mesh.uvs_rotate", "direction") | 
					
						
							| 
									
										
										
										
											2011-12-02 17:17:40 +00:00
										 |  |  |         layout.operator("mesh.uvs_reverse") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator_menu_enum("mesh.colors_rotate", "direction") | 
					
						
							| 
									
										
										
										
											2011-12-02 17:17:40 +00:00
										 |  |  |         layout.operator("mesh.colors_reverse") | 
					
						
							| 
									
										
										
										
											2009-10-12 21:06:03 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_mesh_normals(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Normals" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-14 06:30:27 +00:00
										 |  |  |         layout.operator("mesh.normals_make_consistent", text="Recalculate Outside").inside = False | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("mesh.normals_make_consistent", text="Recalculate Inside").inside = True | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +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.operator("mesh.flip_normals") | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_mesh_showhide(ShowHideMenu, Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     _operator_name = "mesh" | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-15 10:23:44 +00:00
										 |  |  | # Edit Curve | 
					
						
							|  |  |  | # draw_curve is used by VIEW3D_MT_edit_curve and VIEW3D_MT_edit_surface | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-15 10:23:44 +00:00
										 |  |  | def draw_curve(self, context): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-17 17:57:20 +00:00
										 |  |  |     toolsettings = context.tool_settings | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |     layout.menu("VIEW3D_MT_transform") | 
					
						
							|  |  |  |     layout.menu("VIEW3D_MT_mirror") | 
					
						
							|  |  |  |     layout.menu("VIEW3D_MT_snap") | 
					
						
							| 
									
										
										
										
											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.operator("curve.extrude") | 
					
						
							|  |  |  |     layout.operator("curve.duplicate") | 
					
						
							|  |  |  |     layout.operator("curve.separate") | 
					
						
							|  |  |  |     layout.operator("curve.make_segment") | 
					
						
							|  |  |  |     layout.operator("curve.cyclic_toggle") | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |     layout.operator("curve.delete", text="Delete...") | 
					
						
							| 
									
										
										
										
											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.menu("VIEW3D_MT_edit_curve_ctrlpoints") | 
					
						
							|  |  |  |     layout.menu("VIEW3D_MT_edit_curve_segments") | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-17 17:57:20 +00:00
										 |  |  |     layout.prop_menu_enum(toolsettings, "proportional_edit") | 
					
						
							|  |  |  |     layout.prop_menu_enum(toolsettings, "proportional_edit_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.menu("VIEW3D_MT_edit_curve_showhide") | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_curve(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Curve" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     draw = draw_curve | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_curve_ctrlpoints(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Control Points" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         edit_object = context.edit_object | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         if edit_object.type == 'CURVE': | 
					
						
							| 
									
										
										
										
											2011-11-25 09:22:36 +00:00
										 |  |  |             layout.operator("transform.tilt") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.operator("curve.tilt_clear") | 
					
						
							|  |  |  |             layout.operator("curve.separate") | 
					
						
							| 
									
										
										
										
											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.operator_menu_enum("curve.handle_type_set", "type") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.separator() | 
					
						
							| 
									
										
										
										
											2009-11-16 13:59:27 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.menu("VIEW3D_MT_hook") | 
					
						
							| 
									
										
										
										
											2009-11-16 13:59:27 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_curve_segments(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Segments" | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("curve.subdivide") | 
					
						
							|  |  |  |         layout.operator("curve.switch_direction") | 
					
						
							| 
									
										
										
										
											2009-12-26 09:36:50 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_curve_specials(Menu): | 
					
						
							| 
									
										
										
										
											2009-12-24 10:39:30 +00:00
										 |  |  |     bl_label = "Specials" | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-24 10:39:30 +00:00
										 |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.operator("curve.subdivide") | 
					
						
							|  |  |  |         layout.operator("curve.switch_direction") | 
					
						
							|  |  |  |         layout.operator("curve.spline_weight_set") | 
					
						
							|  |  |  |         layout.operator("curve.radius_set") | 
					
						
							|  |  |  |         layout.operator("curve.smooth") | 
					
						
							|  |  |  |         layout.operator("curve.smooth_radius") | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-26 09:36:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_curve_showhide(ShowHideMenu, Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     _operator_name = "curve" | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_surface(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Surface" | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     draw = draw_curve | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_font(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Text" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("font.file_paste") | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +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.menu("VIEW3D_MT_edit_text_chars") | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-13 23:51:21 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2010-09-07 15:17:42 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("font.style_toggle", text="Toggle Bold").style = 'BOLD' | 
					
						
							|  |  |  |         layout.operator("font.style_toggle", text="Toggle Italic").style = 'ITALIC' | 
					
						
							|  |  |  |         layout.operator("font.style_toggle", text="Toggle Underline").style = 'UNDERLINE' | 
					
						
							|  |  |  |         layout.operator("font.style_toggle", text="Toggle Small Caps").style = 'SMALL_CAPS' | 
					
						
							| 
									
										
										
										
											2010-07-13 23:51:21 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_text_chars(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Special Characters" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-17 04:05:54 +00:00
										 |  |  |         layout.operator("font.text_insert", text="Copyright|Alt C").text = "\u00A9" | 
					
						
							|  |  |  |         layout.operator("font.text_insert", text="Registered Trademark|Alt R").text = "\u00AE" | 
					
						
							| 
									
										
										
										
											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-11-17 04:05:54 +00:00
										 |  |  |         layout.operator("font.text_insert", text="Degree Sign|Alt G").text = "\u00B0" | 
					
						
							|  |  |  |         layout.operator("font.text_insert", text="Multiplication Sign|Alt x").text = "\u00D7" | 
					
						
							|  |  |  |         layout.operator("font.text_insert", text="Circle|Alt .").text = "\u008A" | 
					
						
							|  |  |  |         layout.operator("font.text_insert", text="Superscript 1|Alt 1").text = "\u00B9" | 
					
						
							|  |  |  |         layout.operator("font.text_insert", text="Superscript 2|Alt 2").text = "\u00B2" | 
					
						
							|  |  |  |         layout.operator("font.text_insert", text="Superscript 3|Alt 3").text = "\u00B3" | 
					
						
							|  |  |  |         layout.operator("font.text_insert", text="Double >>|Alt >").text = "\u00BB" | 
					
						
							|  |  |  |         layout.operator("font.text_insert", text="Double <<|Alt <").text = "\u00AB" | 
					
						
							|  |  |  |         layout.operator("font.text_insert", text="Promillage|Alt %").text = "\u2030" | 
					
						
							| 
									
										
										
										
											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-11-17 04:05:54 +00:00
										 |  |  |         layout.operator("font.text_insert", text="Dutch Florin|Alt F").text = "\u00A4" | 
					
						
							|  |  |  |         layout.operator("font.text_insert", text="British Pound|Alt L").text = "\u00A3" | 
					
						
							|  |  |  |         layout.operator("font.text_insert", text="Japanese Yen|Alt Y").text = "\u00A5" | 
					
						
							| 
									
										
										
										
											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-11-17 04:05:54 +00:00
										 |  |  |         layout.operator("font.text_insert", text="German S|Alt S").text = "\u00DF" | 
					
						
							|  |  |  |         layout.operator("font.text_insert", text="Spanish Question Mark|Alt ?").text = "\u00BF" | 
					
						
							|  |  |  |         layout.operator("font.text_insert", text="Spanish Exclamation Mark|Alt !").text = "\u00A1" | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_meta(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Metaball" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-17 17:57:20 +00:00
										 |  |  |         toolsettings = context.tool_settings | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("ed.undo") | 
					
						
							|  |  |  |         layout.operator("ed.redo") | 
					
						
							| 
									
										
										
											
												Code holiday commit:
- fix: user pref, window title was reset to 'Blender' on tab usage
- Undo history menu back:
  - name "Undo History"
  - hotkey alt+ctrl+z (alt+apple+z for mac)
  - works like 2.4x, only for global undo, editmode and particle edit.
- Menu scroll
  - for small windows or screens, popup menus now allow to display
    all items, using internal scrolling
  - works with a timer, scrolling 10 items per second when mouse 
    is over the top or bottom arrow
  - if menu is too big to display, it now draws to top or bottom, 
    based on largest available space.
  - also works for hotkey driven pop up menus.
- User pref "DPI" follows widget/layout size
  - widgets & headers now become bigger and smaller, to match 
    'dpi' font sizes. Works well to match UI to monitor size.
  - note that icons can get fuzzy, we need better mipmaps for it
											
										 
											2011-06-04 17:03:46 +00:00
										 |  |  |         layout.operator("ed.undo_history") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_transform") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_mirror") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_snap") | 
					
						
							| 
									
										
										
										
											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-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("mball.delete_metaelems", text="Delete...") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("mball.duplicate_metaelems") | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-17 17:57:20 +00:00
										 |  |  |         layout.prop_menu_enum(toolsettings, "proportional_edit") | 
					
						
							|  |  |  |         layout.prop_menu_enum(toolsettings, "proportional_edit_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.menu("VIEW3D_MT_edit_meta_showhide") | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_meta_showhide(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Show/Hide" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("mball.reveal_metaelems", text="Show Hidden") | 
					
						
							|  |  |  |         layout.operator("mball.hide_metaelems", text="Hide Selected") | 
					
						
							|  |  |  |         layout.operator("mball.hide_metaelems", text="Hide Unselected").unselected = True | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_lattice(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Lattice" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-17 17:57:20 +00:00
										 |  |  |         toolsettings = context.tool_settings | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_transform") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_mirror") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_snap") | 
					
						
							| 
									
										
										
										
											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.operator("lattice.make_regular") | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-17 17:57:20 +00:00
										 |  |  |         layout.prop_menu_enum(toolsettings, "proportional_edit") | 
					
						
							|  |  |  |         layout.prop_menu_enum(toolsettings, "proportional_edit_falloff") | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_armature(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Armature" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         edit_object = context.edit_object | 
					
						
							|  |  |  |         arm = edit_object.data | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_transform") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_mirror") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_snap") | 
					
						
							|  |  |  |         layout.menu("VIEW3D_MT_edit_armature_roll") | 
					
						
							| 
									
										
										
										
											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.operator("armature.extrude_move") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         if arm.use_mirror_x: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.operator("armature.extrude_forked") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("armature.duplicate_move") | 
					
						
							|  |  |  |         layout.operator("armature.merge") | 
					
						
							|  |  |  |         layout.operator("armature.fill") | 
					
						
							|  |  |  |         layout.operator("armature.delete") | 
					
						
							|  |  |  |         layout.operator("armature.separate") | 
					
						
							| 
									
										
										
										
											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-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("armature.subdivide", text="Subdivide") | 
					
						
							|  |  |  |         layout.operator("armature.switch_direction", text="Switch Direction") | 
					
						
							| 
									
										
										
										
											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 13:59:27 +00:00
										 |  |  |         layout.operator_context = 'EXEC_AREA' | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("armature.autoside_names", text="AutoName Left/Right").type = 'XAXIS' | 
					
						
							|  |  |  |         layout.operator("armature.autoside_names", text="AutoName Front/Back").type = 'YAXIS' | 
					
						
							|  |  |  |         layout.operator("armature.autoside_names", text="AutoName Top/Bottom").type = 'ZAXIS' | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("armature.flip_names") | 
					
						
							| 
									
										
										
										
											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 13:59:27 +00:00
										 |  |  |         layout.operator_context = 'INVOKE_DEFAULT' | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("armature.armature_layers") | 
					
						
							|  |  |  |         layout.operator("armature.bone_layers") | 
					
						
							| 
									
										
										
										
											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.menu("VIEW3D_MT_edit_armature_parent") | 
					
						
							| 
									
										
										
										
											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-09-21 15:18:38 +00:00
										 |  |  |         layout.menu("VIEW3D_MT_bone_options_toggle", text="Bone Settings") | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_armature_specials(Menu): | 
					
						
							| 
									
										
										
										
											2009-11-20 11:49:47 +00:00
										 |  |  |     bl_label = "Specials" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-20 11:49:47 +00:00
										 |  |  |         layout.operator_context = 'INVOKE_REGION_WIN' | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("armature.subdivide", text="Subdivide") | 
					
						
							|  |  |  |         layout.operator("armature.switch_direction", text="Switch Direction") | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-20 11:49:47 +00:00
										 |  |  |         layout.operator_context = 'EXEC_REGION_WIN' | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("armature.autoside_names", text="AutoName Left/Right").type = 'XAXIS' | 
					
						
							|  |  |  |         layout.operator("armature.autoside_names", text="AutoName Front/Back").type = 'YAXIS' | 
					
						
							|  |  |  |         layout.operator("armature.autoside_names", text="AutoName Top/Bottom").type = 'ZAXIS' | 
					
						
							|  |  |  |         layout.operator("armature.flip_names", text="Flip Names") | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_armature_parent(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Parent" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("armature.parent_set", text="Make") | 
					
						
							|  |  |  |         layout.operator("armature.parent_clear", text="Clear") | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_MT_edit_armature_roll(Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Bone Roll" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-16 02:25:03 +00:00
										 |  |  |         layout.operator_menu_enum("armature.calculate_roll", "type") | 
					
						
							| 
									
										
										
										
											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-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("transform.transform", text="Set Roll").mode = 'BONE_ROLL' | 
					
						
							| 
									
										
										
										
											2009-08-17 10:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-15 20:21:49 +00:00
										 |  |  | # ********** Panel ********** | 
					
						
							| 
									
										
										
										
											2009-07-11 13:32:20 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_PT_view3d_properties(Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_space_type = 'VIEW_3D' | 
					
						
							|  |  |  |     bl_region_type = 'UI' | 
					
						
							|  |  |  |     bl_label = "View" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         view = context.space_data | 
					
						
							|  |  |  |         return (view) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         view = context.space_data | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = layout.column() | 
					
						
							| 
									
										
										
										
											2010-06-07 03:44:54 +00:00
										 |  |  |         col.active = view.region_3d.view_perspective != 'CAMERA' | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(view, "lens") | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         col.label(text="Lock to Object:") | 
					
						
							| 
									
										
										
										
											2009-11-28 13:39:35 +00:00
										 |  |  |         col.prop(view, "lock_object", text="") | 
					
						
							| 
									
										
										
										
											2011-08-23 19:58:15 +00:00
										 |  |  |         lock_object = view.lock_object | 
					
						
							|  |  |  |         if lock_object: | 
					
						
							|  |  |  |             if lock_object.type == 'ARMATURE': | 
					
						
							|  |  |  |                 col.prop_search(view, "lock_bone", lock_object.data, "edit_bones" if lock_object.mode == 'EDIT' else "bones", text="") | 
					
						
							|  |  |  |         else: | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             col.prop(view, "lock_cursor", text="Lock to Cursor") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-05-14 17:50:33 +00:00
										 |  |  |         col = layout.column() | 
					
						
							|  |  |  |         col.prop(view, "lock_camera") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         col = layout.column(align=True) | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         col.label(text="Clip:") | 
					
						
							|  |  |  |         col.prop(view, "clip_start", text="Start") | 
					
						
							|  |  |  |         col.prop(view, "clip_end", text="End") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-04-27 06:47:12 +00:00
										 |  |  |         subcol = col.column() | 
					
						
							|  |  |  |         subcol.enabled = not view.lock_camera_and_layers | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         subcol.label(text="Local Camera:") | 
					
						
							| 
									
										
										
										
											2010-04-27 06:47:12 +00:00
										 |  |  |         subcol.prop(view, "camera", text="") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-06 06:19:00 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | class VIEW3D_PT_view3d_cursor(Panel): | 
					
						
							|  |  |  |     bl_space_type = 'VIEW_3D' | 
					
						
							|  |  |  |     bl_region_type = 'UI' | 
					
						
							|  |  |  |     bl_label = "3D Cursor" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							|  |  |  |         view = context.space_data | 
					
						
							|  |  |  |         return (view) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         view = context.space_data | 
					
						
							|  |  |  |         layout.column().prop(view, "cursor_location", text="Location") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_PT_view3d_name(Panel): | 
					
						
							| 
									
										
										
										
											2009-11-05 17:22:11 +00:00
										 |  |  |     bl_space_type = 'VIEW_3D' | 
					
						
							|  |  |  |     bl_region_type = 'UI' | 
					
						
							|  |  |  |     bl_label = "Item" | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2009-11-19 18:48:31 +00:00
										 |  |  |         return (context.space_data and context.active_object) | 
					
						
							| 
									
										
										
										
											2009-11-07 22:07:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-05 17:22:11 +00:00
										 |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-11-07 22:07:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-11 10:07:52 +00:00
										 |  |  |         ob = context.active_object | 
					
						
							| 
									
										
										
										
											2009-11-05 17:22:11 +00:00
										 |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  |         row.label(text="", icon='OBJECT_DATA') | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.prop(ob, "name", text="") | 
					
						
							| 
									
										
										
										
											2009-11-07 22:07:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-07 13:23:45 +00:00
										 |  |  |         if ob.type == 'ARMATURE' and ob.mode in {'EDIT', 'POSE'}: | 
					
						
							| 
									
										
										
										
											2009-11-05 17:22:11 +00:00
										 |  |  |             bone = context.active_bone | 
					
						
							| 
									
										
										
										
											2009-11-11 10:07:52 +00:00
										 |  |  |             if bone: | 
					
						
							|  |  |  |                 row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  |                 row.label(text="", icon='BONE_DATA') | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 row.prop(bone, "name", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_PT_view3d_display(Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_space_type = 'VIEW_3D' | 
					
						
							|  |  |  |     bl_region_type = 'UI' | 
					
						
							|  |  |  |     bl_label = "Display" | 
					
						
							| 
									
										
										
										
											2010-08-26 01:05:37 +00:00
										 |  |  |     bl_options = {'DEFAULT_CLOSED'} | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         view = context.space_data | 
					
						
							|  |  |  |         return (view) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         view = context.space_data | 
					
						
							| 
									
										
										
										
											2010-11-23 14:14:06 +00:00
										 |  |  |         scene = context.scene | 
					
						
							|  |  |  |         gs = scene.game_settings | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         ob = context.object | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         col = layout.column() | 
					
						
							| 
									
										
										
										
											2010-08-17 07:49:53 +00:00
										 |  |  |         col.prop(view, "show_only_render") | 
					
						
							| 
									
										
										
										
											2010-03-16 17:49:31 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = layout.column() | 
					
						
							| 
									
										
										
										
											2010-08-17 07:49:53 +00:00
										 |  |  |         display_all = not view.show_only_render | 
					
						
							| 
									
										
										
										
											2010-03-16 17:49:31 +00:00
										 |  |  |         col.active = display_all | 
					
						
							| 
									
										
										
										
											2010-08-17 07:49:53 +00:00
										 |  |  |         col.prop(view, "show_outline_selected") | 
					
						
							|  |  |  |         col.prop(view, "show_all_objects_origin") | 
					
						
							|  |  |  |         col.prop(view, "show_relationship_lines") | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |         if ob and ob.type == 'MESH': | 
					
						
							| 
									
										
										
										
											2009-11-02 16:07:49 +00:00
										 |  |  |             mesh = ob.data | 
					
						
							| 
									
										
										
										
											2010-08-17 17:03:52 +00:00
										 |  |  |             col.prop(mesh, "show_all_edges") | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-28 13:39:35 +00:00
										 |  |  |         col = layout.column() | 
					
						
							| 
									
										
										
										
											2010-03-16 17:49:31 +00:00
										 |  |  |         col.active = display_all | 
					
						
							|  |  |  |         split = col.split(percentage=0.55) | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         split.prop(view, "show_floor", text="Grid Floor") | 
					
						
							| 
									
										
										
										
											2010-04-04 14:52:15 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-03-16 17:49:31 +00:00
										 |  |  |         row = split.row(align=True) | 
					
						
							| 
									
										
										
										
											2010-08-17 07:49:53 +00:00
										 |  |  |         row.prop(view, "show_axis_x", text="X", toggle=True) | 
					
						
							|  |  |  |         row.prop(view, "show_axis_y", text="Y", toggle=True) | 
					
						
							|  |  |  |         row.prop(view, "show_axis_z", text="Z", toggle=True) | 
					
						
							| 
									
										
										
										
											2010-04-04 14:52:15 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-28 13:39:35 +00:00
										 |  |  |         sub = col.column(align=True) | 
					
						
							| 
									
										
										
										
											2010-08-17 07:49:53 +00:00
										 |  |  |         sub.active = (display_all and view.show_floor) | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         sub.prop(view, "grid_lines", text="Lines") | 
					
						
							|  |  |  |         sub.prop(view, "grid_scale", text="Scale") | 
					
						
							| 
									
										
										
										
											2010-11-23 14:14:06 +00:00
										 |  |  |         subsub = sub.column(align=True) | 
					
						
							|  |  |  |         subsub.active = scene.unit_settings.system == 'NONE' | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         subsub.prop(view, "grid_subdivisions", text="Subdivisions") | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-02 19:24:30 +00:00
										 |  |  |         if not scene.render.use_shading_nodes: | 
					
						
							|  |  |  |             col = layout.column() | 
					
						
							|  |  |  |             col.label(text="Shading:") | 
					
						
							|  |  |  |             col.prop(gs, "material_mode", text="") | 
					
						
							|  |  |  |             col.prop(view, "show_textured_solid") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-30 03:22:22 +00:00
										 |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         region = view.region_quadview | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         layout.operator("screen.region_quadview", text="Toggle Quad View") | 
					
						
							| 
									
										
										
										
											2009-08-22 11:51:26 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-30 03:22:22 +00:00
										 |  |  |         if region: | 
					
						
							|  |  |  |             col = layout.column() | 
					
						
							|  |  |  |             col.prop(region, "lock_rotation") | 
					
						
							|  |  |  |             row = col.row() | 
					
						
							|  |  |  |             row.enabled = region.lock_rotation | 
					
						
							| 
									
										
										
										
											2010-08-17 17:03:52 +00:00
										 |  |  |             row.prop(region, "show_sync_view") | 
					
						
							| 
									
										
										
										
											2010-01-30 03:22:22 +00:00
										 |  |  |             row = col.row() | 
					
						
							| 
									
										
										
										
											2010-08-17 17:03:52 +00:00
										 |  |  |             row.enabled = region.lock_rotation and region.show_sync_view | 
					
						
							| 
									
										
										
										
											2010-08-19 17:46:00 +00:00
										 |  |  |             row.prop(region, "use_box_clip") | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-14 06:41:42 +00:00
										 |  |  | class VIEW3D_PT_view3d_motion_tracking(Panel): | 
					
						
							|  |  |  |     bl_space_type = 'VIEW_3D' | 
					
						
							|  |  |  |     bl_region_type = 'UI' | 
					
						
							|  |  |  |     bl_label = "Motion Tracking" | 
					
						
							|  |  |  |     bl_options = {'DEFAULT_CLOSED'} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							|  |  |  |         view = context.space_data | 
					
						
							|  |  |  |         return (view) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw_header(self, context): | 
					
						
							|  |  |  |         view = context.space_data | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-20 00:32:39 +00:00
										 |  |  |         self.layout.prop(view, "show_reconstruction", text="") | 
					
						
							| 
									
										
										
										
											2011-11-14 06:41:42 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         view = context.space_data | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = layout.column() | 
					
						
							|  |  |  |         col.active = view.show_reconstruction | 
					
						
							| 
									
										
										
										
											2011-11-21 17:05:27 +00:00
										 |  |  |         col.prop(view, "show_bundle_names") | 
					
						
							| 
									
										
										
										
											2011-11-14 06:41:42 +00:00
										 |  |  |         col.prop(view, "show_camera_path") | 
					
						
							|  |  |  |         col.label(text="Tracks:") | 
					
						
							|  |  |  |         col.prop(view, "tracks_draw_type", text="") | 
					
						
							|  |  |  |         col.prop(view, "tracks_draw_size", text="Size") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_PT_view3d_meshdisplay(Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_space_type = 'VIEW_3D' | 
					
						
							|  |  |  |     bl_region_type = 'UI' | 
					
						
							|  |  |  |     bl_label = "Mesh Display" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2011-10-17 06:58:07 +00:00
										 |  |  |         # The active object check is needed because of local-mode | 
					
						
							| 
									
										
										
										
											2009-11-04 16:26:08 +00:00
										 |  |  |         return (context.active_object and (context.mode == 'EDIT_MESH')) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         mesh = context.active_object.data | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = layout.column() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         col.label(text="Overlays:") | 
					
						
							|  |  |  |         col.prop(mesh, "show_edges", text="Edges") | 
					
						
							|  |  |  |         col.prop(mesh, "show_faces", text="Faces") | 
					
						
							|  |  |  |         col.prop(mesh, "show_edge_crease", text="Creases") | 
					
						
							|  |  |  |         col.prop(mesh, "show_edge_bevel_weight", text="Bevel Weights") | 
					
						
							|  |  |  |         col.prop(mesh, "show_edge_seams", text="Seams") | 
					
						
							|  |  |  |         col.prop(mesh, "show_edge_sharp", text="Sharp") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col.separator() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         col.label(text="Normals:") | 
					
						
							|  |  |  |         col.prop(mesh, "show_normal_face", text="Face") | 
					
						
							|  |  |  |         col.prop(mesh, "show_normal_vertex", text="Vertex") | 
					
						
							|  |  |  |         col.prop(context.scene.tool_settings, "normal_size", text="Normal Size") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col.separator() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         col.label(text="Numerics:") | 
					
						
							| 
									
										
										
										
											2010-08-17 17:03:52 +00:00
										 |  |  |         col.prop(mesh, "show_extra_edge_length") | 
					
						
							| 
									
										
										
										
											2011-01-11 07:40:31 +00:00
										 |  |  |         col.prop(mesh, "show_extra_face_angle") | 
					
						
							| 
									
										
										
										
											2010-08-17 17:03:52 +00:00
										 |  |  |         col.prop(mesh, "show_extra_face_area") | 
					
						
							| 
									
										
										
										
											2011-12-22 05:39:23 +00:00
										 |  |  |         if bpy.app.debug: | 
					
						
							| 
									
										
										
										
											2012-01-01 08:52:54 +00:00
										 |  |  |             col.prop(mesh, "show_extra_indices") | 
					
						
							| 
									
										
										
										
											2009-09-08 07:35:07 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_PT_view3d_curvedisplay(Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_space_type = 'VIEW_3D' | 
					
						
							|  |  |  |     bl_region_type = 'UI' | 
					
						
							|  |  |  |     bl_label = "Curve Display" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         editmesh = context.mode == 'EDIT_CURVE' | 
					
						
							|  |  |  |         return (editmesh) | 
					
						
							| 
									
										
										
										
											2009-09-08 07:35:07 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-09-08 07:35:07 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         curve = context.active_object.data | 
					
						
							| 
									
										
										
										
											2009-09-08 07:35:07 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         col = layout.column() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         col.label(text="Overlays:") | 
					
						
							|  |  |  |         col.prop(curve, "show_handles", text="Handles") | 
					
						
							|  |  |  |         col.prop(curve, "show_normal_face", text="Normals") | 
					
						
							|  |  |  |         col.prop(context.scene.tool_settings, "normal_size", text="Normal Size") | 
					
						
							| 
									
										
										
										
											2009-10-13 17:49:05 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_PT_background_image(Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_space_type = 'VIEW_3D' | 
					
						
							|  |  |  |     bl_region_type = 'UI' | 
					
						
							| 
									
										
										
										
											2010-01-19 22:44:43 +00:00
										 |  |  |     bl_label = "Background Images" | 
					
						
							| 
									
										
										
										
											2010-08-26 01:05:37 +00:00
										 |  |  |     bl_options = {'DEFAULT_CLOSED'} | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw_header(self, context): | 
					
						
							|  |  |  |         view = context.space_data | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-20 00:32:39 +00:00
										 |  |  |         self.layout.prop(view, "show_background_images", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         view = context.space_data | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-19 22:44:43 +00:00
										 |  |  |         col = layout.column() | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         col.operator("view3d.background_image_add", text="Add Image") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-19 22:44:43 +00:00
										 |  |  |         for i, bg in enumerate(view.background_images): | 
					
						
							| 
									
										
										
										
											2010-08-17 07:49:53 +00:00
										 |  |  |             layout.active = view.show_background_images | 
					
						
							| 
									
										
										
										
											2010-01-14 02:16:45 +00:00
										 |  |  |             box = layout.box() | 
					
						
							| 
									
										
										
										
											2010-01-19 22:44:43 +00:00
										 |  |  |             row = box.row(align=True) | 
					
						
							| 
									
										
										
										
											2010-06-26 20:00:45 +00:00
										 |  |  |             row.prop(bg, "show_expanded", text="", emboss=False) | 
					
						
							| 
									
										
										
										
											2011-11-07 12:55:18 +00:00
										 |  |  |             if bg.source == 'IMAGE' and bg.image: | 
					
						
							| 
									
										
										
										
											2010-09-06 22:00:15 +00:00
										 |  |  |                 row.prop(bg.image, "name", text="", emboss=False) | 
					
						
							| 
									
										
										
										
											2011-11-30 05:34:32 +00:00
										 |  |  |             elif bg.source == 'MOVIE_CLIP' and bg.clip: | 
					
						
							| 
									
										
										
										
											2011-11-07 12:55:18 +00:00
										 |  |  |                 row.prop(bg.clip, "name", text="", emboss=False) | 
					
						
							| 
									
										
										
										
											2010-09-06 22:00:15 +00:00
										 |  |  |             else: | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |                 row.label(text="Not Set") | 
					
						
							| 
									
										
										
										
											2011-11-29 21:05:18 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             if bg.show_background_image: | 
					
						
							|  |  |  |                 row.prop(bg, "show_background_image", text="", emboss=False, icon='RESTRICT_VIEW_OFF') | 
					
						
							|  |  |  |             else: | 
					
						
							|  |  |  |                 row.prop(bg, "show_background_image", text="", emboss=False, icon='RESTRICT_VIEW_ON') | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-12-08 11:42:11 +00:00
										 |  |  |             row.operator("view3d.background_image_remove", text="", emboss=False, icon='X').index = i | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |             box.prop(bg, "view_axis", text="Axis") | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-19 22:44:43 +00:00
										 |  |  |             if bg.show_expanded: | 
					
						
							|  |  |  |                 row = box.row() | 
					
						
							| 
									
										
										
										
											2011-11-07 12:55:18 +00:00
										 |  |  |                 row.prop(bg, "source", expand=True) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-16 16:38:37 +00:00
										 |  |  |                 has_bg = False | 
					
						
							| 
									
										
										
										
											2011-11-07 12:55:18 +00:00
										 |  |  |                 if bg.source == 'IMAGE': | 
					
						
							|  |  |  |                     row = box.row() | 
					
						
							|  |  |  |                     row.template_ID(bg, "image", open="image.open") | 
					
						
							|  |  |  |                     if (bg.image): | 
					
						
							|  |  |  |                         box.template_image(bg, "image", bg.image_user, compact=True) | 
					
						
							| 
									
										
										
										
											2011-11-16 16:38:37 +00:00
										 |  |  |                         has_bg = True | 
					
						
							| 
									
										
										
										
											2011-11-07 12:55:18 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-30 05:34:32 +00:00
										 |  |  |                 elif bg.source == 'MOVIE_CLIP': | 
					
						
							| 
									
										
										
										
											2011-11-07 12:55:18 +00:00
										 |  |  |                     box.prop(bg, 'use_camera_clip') | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                     column = box.column() | 
					
						
							|  |  |  |                     column.active = not bg.use_camera_clip | 
					
						
							|  |  |  |                     column.template_ID(bg, "clip", open="clip.open") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                     if bg.clip: | 
					
						
							|  |  |  |                         column.template_movieclip(bg, "clip", compact=True) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                     if bg.use_camera_clip or bg.clip: | 
					
						
							| 
									
										
										
										
											2011-11-16 16:38:37 +00:00
										 |  |  |                         has_bg = True | 
					
						
							| 
									
										
										
										
											2011-11-07 12:55:18 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |                     column = box.column() | 
					
						
							| 
									
										
										
										
											2011-11-16 16:38:37 +00:00
										 |  |  |                     column.active = has_bg | 
					
						
							| 
									
										
										
										
											2011-11-07 12:55:18 +00:00
										 |  |  |                     column.prop(bg.clip_user, "proxy_render_size", text="") | 
					
						
							|  |  |  |                     column.prop(bg.clip_user, "use_render_undistorted") | 
					
						
							| 
									
										
										
										
											2010-01-19 22:44:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-16 16:38:37 +00:00
										 |  |  |                 if has_bg: | 
					
						
							| 
									
										
										
										
											2010-11-06 21:40:09 +00:00
										 |  |  |                     box.prop(bg, "opacity", slider=True) | 
					
						
							| 
									
										
										
										
											2010-07-20 12:20:55 +00:00
										 |  |  |                     if bg.view_axis != 'CAMERA': | 
					
						
							|  |  |  |                         box.prop(bg, "size") | 
					
						
							|  |  |  |                         row = box.row(align=True) | 
					
						
							|  |  |  |                         row.prop(bg, "offset_x", text="X") | 
					
						
							|  |  |  |                         row.prop(bg, "offset_y", text="Y") | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-07-14 12:32:19 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_PT_transform_orientations(Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_space_type = 'VIEW_3D' | 
					
						
							|  |  |  |     bl_region_type = 'UI' | 
					
						
							|  |  |  |     bl_label = "Transform Orientations" | 
					
						
							| 
									
										
										
										
											2010-08-26 01:05:37 +00:00
										 |  |  |     bl_options = {'DEFAULT_CLOSED'} | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         view = context.space_data | 
					
						
							|  |  |  |         return (view) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         view = context.space_data | 
					
						
							| 
									
										
										
										
											2011-11-20 00:32:39 +00:00
										 |  |  |         orientation = view.current_orientation | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-06 01:14:57 +00:00
										 |  |  |         row = layout.row(align=True) | 
					
						
							|  |  |  |         row.prop(view, "transform_orientation", text="") | 
					
						
							|  |  |  |         row.operator("transform.create_orientation", text="", icon='ZOOMIN') | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if orientation: | 
					
						
							| 
									
										
										
										
											2012-01-06 01:14:57 +00:00
										 |  |  |             row = layout.row(align=True) | 
					
						
							|  |  |  |             row.prop(orientation, "name", text="") | 
					
						
							|  |  |  |             row.operator("transform.delete_orientation", text="", icon="X") | 
					
						
							| 
									
										
										
										
											2009-10-08 07:54:20 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_PT_etch_a_ton(Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_space_type = 'VIEW_3D' | 
					
						
							|  |  |  |     bl_region_type = 'UI' | 
					
						
							|  |  |  |     bl_label = "Skeleton Sketching" | 
					
						
							| 
									
										
										
										
											2010-08-26 01:05:37 +00:00
										 |  |  |     bl_options = {'DEFAULT_CLOSED'} | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         scene = context.space_data | 
					
						
							|  |  |  |         ob = context.active_object | 
					
						
							|  |  |  |         return scene and ob and ob.type == 'ARMATURE' and ob.mode == 'EDIT' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw_header(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  |         toolsettings = context.scene.tool_settings | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-18 03:24:52 +00:00
										 |  |  |         layout.prop(toolsettings, "use_bone_sketching", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  |         toolsettings = context.scene.tool_settings | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = layout.column() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-18 03:24:52 +00:00
										 |  |  |         col.prop(toolsettings, "use_etch_quick") | 
					
						
							|  |  |  |         col.prop(toolsettings, "use_etch_overdraw") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(toolsettings, "etch_convert_mode") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-07 22:12:03 +00:00
										 |  |  |         if toolsettings.etch_convert_mode == 'LENGTH': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(toolsettings, "etch_length_limit") | 
					
						
							| 
									
										
										
										
											2009-11-07 22:12:03 +00:00
										 |  |  |         elif toolsettings.etch_convert_mode == 'ADAPTIVE': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(toolsettings, "etch_adaptive_limit") | 
					
						
							| 
									
										
										
										
											2009-11-07 22:12:03 +00:00
										 |  |  |         elif toolsettings.etch_convert_mode == 'FIXED': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(toolsettings, "etch_subdivision_number") | 
					
						
							| 
									
										
										
										
											2009-11-07 22:12:03 +00:00
										 |  |  |         elif toolsettings.etch_convert_mode == 'RETARGET': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(toolsettings, "etch_template") | 
					
						
							|  |  |  |             col.prop(toolsettings, "etch_roll_mode") | 
					
						
							| 
									
										
										
										
											2010-08-18 03:24:52 +00:00
										 |  |  |             col.prop(toolsettings, "use_etch_autoname") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(toolsettings, "etch_number") | 
					
						
							|  |  |  |             col.prop(toolsettings, "etch_side") | 
					
						
							| 
									
										
										
										
											2011-05-29 16:04:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-21 15:18:38 +00:00
										 |  |  |         col.operator("sketch.convert", text="Convert") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:57:00 +00:00
										 |  |  | class VIEW3D_PT_context_properties(Panel): | 
					
						
							| 
									
										
										
										
											2009-11-18 20:01:35 +00:00
										 |  |  |     bl_space_type = 'VIEW_3D' | 
					
						
							|  |  |  |     bl_region_type = 'UI' | 
					
						
							|  |  |  |     bl_label = "Properties" | 
					
						
							| 
									
										
										
										
											2010-08-26 01:05:37 +00:00
										 |  |  |     bl_options = {'DEFAULT_CLOSED'} | 
					
						
							| 
									
										
										
										
											2009-11-18 20:01:35 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-05 21:58:57 +00:00
										 |  |  |     def _active_context_member(context): | 
					
						
							| 
									
										
										
										
											2009-11-18 20:01:35 +00:00
										 |  |  |         obj = context.object | 
					
						
							|  |  |  |         if obj: | 
					
						
							|  |  |  |             mode = obj.mode | 
					
						
							|  |  |  |             if mode == 'POSE': | 
					
						
							| 
									
										
										
										
											2009-11-24 17:12:32 +00:00
										 |  |  |                 return "active_pose_bone" | 
					
						
							| 
									
										
										
										
											2009-11-18 20:01:35 +00:00
										 |  |  |             elif mode == 'EDIT' and obj.type == 'ARMATURE': | 
					
						
							| 
									
										
										
										
											2009-11-23 13:06:26 +00:00
										 |  |  |                 return "active_bone" | 
					
						
							| 
									
										
										
										
											2009-11-18 20:01:35 +00:00
										 |  |  |             else: | 
					
						
							| 
									
										
										
										
											2009-11-23 13:06:26 +00:00
										 |  |  |                 return "object" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         return "" | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							|  |  |  |         member = cls._active_context_member(context) | 
					
						
							| 
									
										
										
										
											2009-11-23 13:06:26 +00:00
										 |  |  |         if member: | 
					
						
							| 
									
										
										
										
											2009-11-23 15:19:30 +00:00
										 |  |  |             context_member = getattr(context, member) | 
					
						
							|  |  |  |             return context_member and context_member.keys() | 
					
						
							| 
									
										
										
										
											2009-11-23 13:06:26 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         return False | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         import rna_prop_ui | 
					
						
							| 
									
										
										
										
											2011-07-11 05:50:49 +00:00
										 |  |  |         member = VIEW3D_PT_context_properties._active_context_member(context) | 
					
						
							| 
									
										
										
										
											2009-11-18 20:01:35 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 13:06:26 +00:00
										 |  |  |         if member: | 
					
						
							| 
									
										
										
										
											2009-11-18 20:01:35 +00:00
										 |  |  |             # Draw with no edit button | 
					
						
							| 
									
										
										
										
											2010-12-19 13:04:14 +00:00
										 |  |  |             rna_prop_ui.draw(self.layout, context, member, object, False) | 
					
						
							| 
									
										
										
										
											2009-11-18 20:01:35 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-14 11:21:21 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | def register(): | 
					
						
							| 
									
										
										
										
											2011-02-10 23:48:22 +00:00
										 |  |  |     bpy.utils.register_module(__name__) | 
					
						
							| 
									
										
										
										
											2010-02-14 11:21:21 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-22 23:32:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-14 11:21:21 +00:00
										 |  |  | def unregister(): | 
					
						
							| 
									
										
										
										
											2011-02-10 23:48:22 +00:00
										 |  |  |     bpy.utils.unregister_module(__name__) | 
					
						
							| 
									
										
										
										
											2010-02-16 09:55:07 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if __name__ == "__main__": | 
					
						
							| 
									
										
										
										
											2010-08-04 15:59:15 +00:00
										 |  |  |     register() | 
					
						
							| 
									
										
										
										
											2011-04-04 10:13:04 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if __name__ == "__main__":  # only for live edit. | 
					
						
							|  |  |  |     bpy.utils.register_module(__name__) |