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,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# ##### END GPL LICENSE BLOCK #####
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 20:16:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# <pep8 compliant>
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import bpy
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								class View3DPanel(bpy.types.Panel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_space_type = 'VIEW_3D'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_region_type = 'TOOLS'
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# ********** default tools for objectmode ****************
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_objectmode(View3DPanel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_context = "objectmode"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Object Tools"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Transform:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-10 10:36:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.translate")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.rotate")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.resize", text="Scale")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Object:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("object.duplicate_move")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("object.delete")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("object.join")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        active_object = context.active_object
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        if active_object and active_object.type == 'MESH':
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            col.label(text="Shading:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            col.operator("object.shade_smooth", text="Smooth")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            col.operator("object.shade_flat", text="Flat")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Keyframes:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-28 14:37:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("anim.keyframe_insert_menu", text="Insert")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("anim.keyframe_delete_v3d", text="Remove")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Repeat:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("screen.repeat_last")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("screen.repeat_history", text="History...")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Grease Pencil:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-17 12:59:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row = col.row()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Draw").mode = 'DRAW'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# ********** default tools for editmode_mesh ****************
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_meshedit(View3DPanel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_context = "mesh_edit"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Mesh Tools"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Transform:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-10 10:36:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.translate")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.rotate")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.resize", text="Scale")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.shrink_fatten", text="Along Normal")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Deform:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-10 10:36:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.edge_slide")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("mesh.rip_move")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("mesh.vertices_smooth")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Add:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("mesh.extrude_move")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("mesh.subdivide")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-29 02:14:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("mesh.loopcut_slide")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-30 18:26:53 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("mesh.duplicate_move", text="Duplicate")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("mesh.spin")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("mesh.screw")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Remove:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("mesh.delete")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("mesh.merge")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("mesh.remove_doubles")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Normals:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("mesh.normals_make_consistent", text="Recalculate")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("mesh.flip_normals", text="Flip Direction")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="UV Mapping:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("wm.call_menu", text="Unwrap").name = "VIEW3D_MT_uv_map"
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("mesh.mark_seam")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("mesh.mark_seam", text="Clear Seam").clear = True
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-07 22:07:46 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Shading:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("mesh.faces_shade_smooth", text="Smooth")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("mesh.faces_shade_flat", text="Flat")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Repeat:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("screen.repeat_last")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("screen.repeat_history", text="History...")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Grease Pencil:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-17 12:59:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row = col.row()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Draw").mode = 'DRAW'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-20 13:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_meshedit_options(View3DPanel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_context = "mesh_edit"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Mesh Options"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-04 16:26:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        ob = context.active_object
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-19 13:24:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-04 16:26:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        if ob:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            mesh = context.active_object.data
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            col.prop(mesh, "use_mirror_x")
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# ********** default tools for editmode_curve ****************
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_curveedit(View3DPanel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_context = "curve_edit"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Curve Tools"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Transform:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-10 10:36:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.translate")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.rotate")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.resize", text="Scale")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-21 13:01:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-10 10:36:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.transform", text="Tilt").mode = 'TILT'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.transform", text="Shrink/Fatten").mode = 'CURVE_SHRINKFATTEN'
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Curve:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("curve.duplicate")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("curve.delete")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("curve.cyclic_toggle")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("curve.switch_direction")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("curve.spline_type_set")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Handles:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-21 13:01:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row = col.row()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row.operator("curve.handle_type_set", text="Auto").type = 'AUTOMATIC'
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-28 11:32:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row.operator("curve.handle_type_set", text="Vector").type = 'VECTOR'
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-21 13:01:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row = col.row()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-28 11:32:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row.operator("curve.handle_type_set", text="Align").type = 'ALIGN'
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row.operator("curve.handle_type_set", text="Free").type = 'FREE_ALIGN'
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Modeling:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("curve.extrude")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("curve.subdivide")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Repeat:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("screen.repeat_last")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("screen.repeat_history", text="History...")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Grease Pencil:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-17 12:59:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row = col.row()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Draw").mode = 'DRAW'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# ********** default tools for editmode_surface ****************
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_surfaceedit(View3DPanel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_context = "surface_edit"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Surface Tools"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Transform:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-10 10:36:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.translate")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.rotate")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.resize", text="Scale")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Curve:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("curve.duplicate")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("curve.delete")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("curve.cyclic_toggle")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("curve.switch_direction")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Modeling:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("curve.extrude")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("curve.subdivide")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Repeat:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("screen.repeat_last")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("screen.repeat_history", text="History...")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Grease Pencil:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-17 12:59:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row = col.row()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Draw").mode = 'DRAW'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# ********** default tools for editmode_text ****************
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_textedit(View3DPanel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_context = "text_edit"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Text Tools"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Text Edit:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("font.text_copy", text="Copy")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("font.text_cut", text="Cut")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("font.text_paste", text="Paste")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-17 12:59:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Set Case:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("font.case_set", text="To Upper").case = 'UPPER'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("font.case_set", text="To Lower").case = 'LOWER'
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Style:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-28 11:32:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("font.style_toggle", text="Bold").style = 'BOLD'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("font.style_toggle", text="Italic").style = 'ITALIC'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("font.style_toggle", text="Underline").style = 'UNDERLINE'
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Repeat:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("screen.repeat_last")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("screen.repeat_history", text="History...")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-17 12:59:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# ********** default tools for editmode_armature ****************
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_armatureedit(View3DPanel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_context = "armature_edit"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Armature Tools"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Transform:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-10 10:36:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.translate")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.rotate")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.resize", text="Scale")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Bones:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("armature.bone_primitive_add", text="Add")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("armature.duplicate_move", text="Duplicate")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("armature.delete", text="Delete")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Modeling:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("armature.extrude_move")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("armature.subdivide_multi", text="Subdivide")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Repeat:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("screen.repeat_last")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("screen.repeat_history", text="History...")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Grease Pencil:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-17 12:59:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row = col.row()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Draw").mode = 'DRAW'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-27 12:46:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_armatureedit_options(View3DPanel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_context = "armature_edit"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Armature Options"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-27 12:46:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        arm = context.active_object.data
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-27 12:46:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.prop(arm, "x_axis_mirror")
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-24 21:01:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# ********** default tools for editmode_mball ****************
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_mballedit(View3DPanel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_context = "mball_edit"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Meta Tools"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Transform:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-10 10:36:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.translate")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.rotate")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.resize", text="Scale")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Repeat:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("screen.repeat_last")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("screen.repeat_history", text="History...")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Grease Pencil:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-17 12:59:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row = col.row()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Draw").mode = 'DRAW'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# ********** default tools for editmode_lattice ****************
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_latticeedit(View3DPanel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_context = "lattice_edit"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Lattice Tools"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Transform:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-10 10:36:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.translate")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.rotate")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.resize", text="Scale")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("lattice.make_regular")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Repeat:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("screen.repeat_last")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("screen.repeat_history", text="History...")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-17 12:59:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Grease Pencil:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-17 12:59:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row = col.row()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Draw").mode = 'DRAW'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-17 12:59:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# ********** default tools for posemode ****************
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_posemode(View3DPanel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_context = "posemode"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Pose Tools"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Transform:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-10 10:36:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.translate")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.rotate")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("transform.resize", text="Scale")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="In-Between:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-17 22:46:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row = col.row()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row.operator("pose.push", text="Push")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.operator("pose.relax", text="Relax")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("pose.breakdown", text="Breakdowner")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Pose:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-17 12:59:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row = col.row()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row.operator("pose.copy", text="Copy")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.operator("pose.paste", text="Paste")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("poselib.pose_add", text="Add To Library")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Keyframes:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-28 14:37:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.operator("anim.keyframe_insert_menu", text="Insert")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("anim.keyframe_delete_v3d", text="Remove")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Repeat:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("screen.repeat_last")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("screen.repeat_history", text="History...")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Grease Pencil:")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-17 12:59:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row = col.row()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Draw").mode = 'DRAW'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-19 13:24:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_posemode_options(View3DPanel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_context = "posemode"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Pose Options"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-19 13:24:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        arm = context.active_object.data
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-19 13:24:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.prop(arm, "x_axis_mirror")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.prop(arm, "auto_ik")
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-24 11:14:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# ********** default tools for paint modes ****************
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-25 22:31:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class PaintPanel(bpy.types.Panel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_space_type = 'VIEW_3D'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_region_type = 'TOOLS'
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-20 16:39:16 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    def paint_settings(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        ts = context.tool_settings
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-25 22:31:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        if context.sculpt_object:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            return ts.sculpt
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        elif context.vertex_paint_object:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            return ts.vertex_paint
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        elif context.weight_paint_object:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            return ts.weight_paint
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        elif context.texture_paint_object:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            return ts.image_paint
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        elif context.particle_edit_object:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            return ts.particle_edit
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-25 22:31:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        return False
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-20 16:39:16 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-25 22:31:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_brush(PaintPanel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Brush"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def poll(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        return self.paint_settings(context)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        settings = self.paint_settings(context)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        brush = settings.brush
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if not context.particle_edit_object:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            col = layout.split().column()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            row = col.row()
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-29 00:04:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
											 
										 
										
											
												Change to the way brush/tool selection works, as discussed a while ago
Now, there are preset brushes made for each tool type (eg. for sculpt mode, Grab, 
Draw, Inflate, etc), and the recommended method for changing sculpt tools is to 
change between Brushes. The shortcut keys for changing between tools have 
now been changed to change between named brushes - the G key in sculpt 
mode now changes to any brush named 'Grab'.
The advantages of this are:
* Changing between brushes remembers the strength/size/texture etc settings for 
each brush. This means that for example, you can draw with a strong textured 
Clay brush, but then switch quickly to a weaker, untextured Smooth brush, 
without having to re-do your settings each time.
* You can now add your own custom shortcut keys to your own custom brushes - 
just add a keymap entry similar to the existing ones, that references your own 
custom brush names.
To bring over these new default brushes to an existing B.blend setup, just 
append them in from the new B.blend in svn.
											
										 
										
											2009-12-28 01:27:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if context.sculpt_object and brush:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                defaulttools = 8
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            elif context.texture_paint_object and brush:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                defaulttools = 4
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            else:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                defaulttools = 2
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-29 00:04:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
											 
										 
										
											
												Change to the way brush/tool selection works, as discussed a while ago
Now, there are preset brushes made for each tool type (eg. for sculpt mode, Grab, 
Draw, Inflate, etc), and the recommended method for changing sculpt tools is to 
change between Brushes. The shortcut keys for changing between tools have 
now been changed to change between named brushes - the G key in sculpt 
mode now changes to any brush named 'Grab'.
The advantages of this are:
* Changing between brushes remembers the strength/size/texture etc settings for 
each brush. This means that for example, you can draw with a strong textured 
Clay brush, but then switch quickly to a weaker, untextured Smooth brush, 
without having to re-do your settings each time.
* You can now add your own custom shortcut keys to your own custom brushes - 
just add a keymap entry similar to the existing ones, that references your own 
custom brush names.
To bring over these new default brushes to an existing B.blend setup, just 
append them in from the new B.blend in svn.
											
										 
										
											2009-12-28 01:27:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            row.template_list(settings, "brushes", settings, "active_brush_index", rows=2, maxrows=defaulttools)
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            col.template_ID(settings, "brush", new="brush.add")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        # Particle Mode #
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        # XXX This needs a check if psys is editable.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if context.particle_edit_object:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            # XXX Select Particle System
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            layout.column().prop(settings, "tool", expand=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if settings.tool != 'NONE':
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                col = layout.column()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                col.prop(brush, "size", slider=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                col.prop(brush, "strength", slider=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if settings.tool == 'ADD':
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                col = layout.column()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                col.prop(settings, "add_interpolate")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                sub = col.column(align=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                sub.active = settings.add_interpolate
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                sub.prop(brush, "steps", slider=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                sub.prop(settings, "add_keys", slider=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            elif settings.tool == 'LENGTH':
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                layout.prop(brush, "length_mode", expand=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            elif settings.tool == 'PUFF':
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                layout.prop(brush, "puff_mode", expand=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        # Sculpt Mode #
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        elif context.sculpt_object and brush:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            col = layout.column()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            col.separator()
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-29 00:04:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            row = col.row(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            row.prop(brush, "size", slider=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            row.prop(brush, "use_size_pressure", toggle=True, text="")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if brush.sculpt_tool != 'GRAB':
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                row = col.row(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                row.prop(brush, "strength", slider=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                row.prop(brush, "use_strength_pressure", text="")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                # XXX - TODO
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #row = col.row(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #row.prop(brush, "jitter", slider=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #row.prop(brush, "use_jitter_pressure", toggle=True, text="")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                col = layout.column()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if brush.sculpt_tool in ('DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'):
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    col.row().prop(brush, "direction", expand=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-06 16:46:35 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if brush.sculpt_tool in ('DRAW', 'INFLATE', 'LAYER'):
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-25 17:51:16 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    col.prop(brush, "use_accumulate")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-06 16:46:35 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if brush.sculpt_tool == 'LAYER':
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    col.prop(brush, "use_persistent")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    col.operator("sculpt.set_persistent_base")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        # Texture Paint Mode #
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        elif context.texture_paint_object and brush:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            col = layout.column()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            col.prop(brush, "color", text="")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            row = col.row(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            row.prop(brush, "size", slider=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            row.prop(brush, "use_size_pressure", toggle=True, text="")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            row = col.row(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            row.prop(brush, "strength", slider=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            row.prop(brush, "use_strength_pressure", toggle=True, text="")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            row = col.row(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            row.prop(brush, "jitter", slider=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            row.prop(brush, "use_jitter_pressure", toggle=True, text="")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            col.prop(brush, "blend", text="Blend")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        # Weight Paint Mode #
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        elif context.weight_paint_object and brush:
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            layout.prop(context.tool_settings, "vertex_group_weight", text="Weight", slider=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            layout.prop(context.tool_settings, "auto_normalize", text="Auto Normalize")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            col = layout.column()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            row = col.row(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            row.prop(brush, "size", slider=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            row.prop(brush, "use_size_pressure", toggle=True, text="")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            row = col.row(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            row.prop(brush, "strength", slider=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            row.prop(brush, "use_strength_pressure", toggle=True, text="")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            row = col.row(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            row.prop(brush, "jitter", slider=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            row.prop(brush, "use_jitter_pressure", toggle=True, text="")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        # Vertex Paint Mode #
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        elif context.vertex_paint_object and brush:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            col = layout.column()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            col.prop(brush, "color", text="")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            row = col.row(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            row.prop(brush, "size", slider=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            row.prop(brush, "use_size_pressure", toggle=True, text="")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            row = col.row(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            row.prop(brush, "strength", slider=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            row.prop(brush, "use_strength_pressure", toggle=True, text="")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            # XXX - TODO
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            #row = col.row(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #row.prop(brush, "jitter", slider=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            #row.prop(brush, "use_jitter_pressure", toggle=True, text="")
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-25 22:31:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-03 08:37:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_brush_texture(PaintPanel):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Texture"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_default_closed = True
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def poll(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        settings = self.paint_settings(context)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        return (settings and settings.brush and (context.sculpt_object or
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                             context.texture_paint_object))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        settings = self.paint_settings(context)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        brush = settings.brush
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        tex_slot = brush.texture_slot
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.template_ID_preview(brush, "texture", new="texture.new", rows=2, cols=4)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.row().prop(tex_slot, "map_mode", expand=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        
							 | 
						
					
						
							
								
									
										
											 
										 
										
											
												Change to the way brush/tool selection works, as discussed a while ago
Now, there are preset brushes made for each tool type (eg. for sculpt mode, Grab, 
Draw, Inflate, etc), and the recommended method for changing sculpt tools is to 
change between Brushes. The shortcut keys for changing between tools have 
now been changed to change between named brushes - the G key in sculpt 
mode now changes to any brush named 'Grab'.
The advantages of this are:
* Changing between brushes remembers the strength/size/texture etc settings for 
each brush. This means that for example, you can draw with a strong textured 
Clay brush, but then switch quickly to a weaker, untextured Smooth brush, 
without having to re-do your settings each time.
* You can now add your own custom shortcut keys to your own custom brushes - 
just add a keymap entry similar to the existing ones, that references your own 
custom brush names.
To bring over these new default brushes to an existing B.blend setup, just 
append them in from the new B.blend in svn.
											
										 
										
											2009-12-28 01:27:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_brush_tool(PaintPanel):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Tool"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_default_closed = True
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def poll(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        settings = self.paint_settings(context)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        return (settings and settings.brush and (context.sculpt_object or
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                             context.texture_paint_object))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        settings = self.paint_settings(context)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        brush = settings.brush
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        texture_paint = context.texture_paint_object
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        sculpt = context.sculpt_object
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-29 00:04:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
											 
										 
										
											
												Change to the way brush/tool selection works, as discussed a while ago
Now, there are preset brushes made for each tool type (eg. for sculpt mode, Grab, 
Draw, Inflate, etc), and the recommended method for changing sculpt tools is to 
change between Brushes. The shortcut keys for changing between tools have 
now been changed to change between named brushes - the G key in sculpt 
mode now changes to any brush named 'Grab'.
The advantages of this are:
* Changing between brushes remembers the strength/size/texture etc settings for 
each brush. This means that for example, you can draw with a strong textured 
Clay brush, but then switch quickly to a weaker, untextured Smooth brush, 
without having to re-do your settings each time.
* You can now add your own custom shortcut keys to your own custom brushes - 
just add a keymap entry similar to the existing ones, that references your own 
custom brush names.
To bring over these new default brushes to an existing B.blend setup, just 
append them in from the new B.blend in svn.
											
										 
										
											2009-12-28 01:27:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        if context.sculpt_object:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            col.prop(brush, "sculpt_tool", expand=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        elif context.texture_paint_object:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            col.prop_enum(settings, "tool", 'DRAW')
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            col.prop_enum(settings, "tool", 'SOFTEN')
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            col.prop_enum(settings, "tool", 'CLONE')
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            col.prop_enum(settings, "tool", 'SMEAR')
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-18 01:19:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_brush_stroke(PaintPanel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Stroke"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_default_closed = True
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def poll(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        settings = self.paint_settings(context)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        return (settings and settings.brush and (context.sculpt_object or
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                             context.vertex_paint_object or
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                             context.weight_paint_object or
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                             context.texture_paint_object))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        settings = self.paint_settings(context)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        brush = settings.brush
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        texture_paint = context.texture_paint_object
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if context.sculpt_object:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if brush.sculpt_tool != 'LAYER':
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                layout.prop(brush, "use_anchor")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            layout.prop(brush, "use_rake")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        layout.prop(brush, "use_airbrush")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col = layout.column()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.active = brush.use_airbrush
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.prop(brush, "rate", slider=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if not texture_paint:
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            layout.prop(brush, "use_smooth_stroke")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            col = layout.column()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            col.active = brush.use_smooth_stroke
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            col.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            col.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        layout.prop(brush, "use_space")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row = layout.row(align=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.active = brush.use_space
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row.prop(brush, "spacing", text="Distance", slider=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        if texture_paint:
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            row.prop(brush, "use_spacing_pressure", toggle=True, text="")
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-21 00:46:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-25 22:31:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_brush_curve(PaintPanel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Curve"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_default_closed = True
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def poll(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        settings = self.paint_settings(context)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        return (settings and settings.brush and settings.brush.curve)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        settings = self.paint_settings(context)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        brush = settings.brush
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout.template_curve_mapping(brush, "curve")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        layout.operator_menu_enum("brush.curve_preset", property="shape")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-25 22:31:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_sculpt_options(PaintPanel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Options"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def poll(self, context):
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-23 15:51:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        return (context.sculpt_object and context.tool_settings.sculpt)
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        sculpt = context.tool_settings.sculpt
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.prop(sculpt, "show_brush")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-25 17:51:16 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.prop(sculpt, "fast_navigate")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        split = self.layout.split()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = split.column()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Symmetry:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.prop(sculpt, "symmetry_x", text="X")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.prop(sculpt, "symmetry_y", text="Y")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.prop(sculpt, "symmetry_z", text="Z")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = split.column()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Lock:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.prop(sculpt, "lock_x", text="X")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.prop(sculpt, "lock_y", text="Y")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.prop(sculpt, "lock_z", text="Z")
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-24 21:01:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# ********** default tools for weightpaint ****************
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_weightpaint(View3DPanel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_context = "weightpaint"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Weight Tools"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-20 13:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col = layout.column()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        # col.label(text="Blend:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("object.vertex_group_normalize_all", text="Normalize All")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("object.vertex_group_normalize", text="Normalize")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("object.vertex_group_invert", text="Invert")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("object.vertex_group_clean", text="Clean")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.operator("object.vertex_group_levels", text="Levels")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-20 13:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-20 13:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_weightpaint_options(View3DPanel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_context = "weightpaint"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Options"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        wpaint = context.tool_settings.weight_paint
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Blend:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.prop(wpaint, "mode", text="")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.prop(wpaint, "all_faces")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.prop(wpaint, "normals")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.prop(wpaint, "spray")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        data = context.weight_paint_object.data
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if type(data) == bpy.types.Mesh:
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            col.prop(data, "use_mirror_x")
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-24 11:14:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# Commented out because the Apply button isn't an operator yet, making these settings useless
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#		col.label(text="Gamma:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#		col.prop(wpaint, "gamma", text="")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#		col.label(text="Multiply:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#		col.prop(wpaint, "mul", text="")
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-02 16:44:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# Also missing now:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# Soft, Vgroup, X-Mirror and "Clear" Operator.
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# ********** default tools for vertexpaint ****************
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_vertexpaint(View3DPanel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_context = "vertexpaint"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Options"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        vpaint = context.tool_settings.vertex_paint
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Blend:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.prop(vpaint, "mode", text="")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.prop(vpaint, "all_faces")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.prop(vpaint, "normals")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.prop(vpaint, "spray")
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-20 01:39:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-24 11:14:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# Commented out because the Apply button isn't an operator yet, making these settings useless
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#		col.label(text="Gamma:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#		col.prop(vpaint, "gamma", text="")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#		col.label(text="Multiply:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#		col.prop(vpaint, "mul", text="")
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-24 21:01:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-29 15:20:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# ********** default tools for texturepaint ****************
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-08 03:29:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_projectpaint(View3DPanel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_context = "texturepaint"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Project Paint"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def poll(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        return context.tool_settings.image_paint.tool != 'SMEAR'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw_header(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        ipaint = context.tool_settings.image_paint
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        self.layout.prop(ipaint, "use_projection", text="")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        ipaint = context.tool_settings.image_paint
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        settings = context.tool_settings.image_paint
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        use_projection = ipaint.use_projection
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        sub = col.column()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        sub.active = use_projection
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        sub.prop(ipaint, "use_occlude")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        sub.prop(ipaint, "use_backface_cull")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        split = layout.split()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = split.column()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.active = (use_projection)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.prop(ipaint, "use_normal_falloff")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = split.column()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.active = (ipaint.use_normal_falloff and use_projection)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.prop(ipaint, "normal_angle", text="")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-22 10:48:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=False)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row = col.row()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.active = (use_projection)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.prop(ipaint, "use_stencil_layer", text="Stencil")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-22 10:48:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row2 = row.row(align=False)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row2.active = (use_projection and ipaint.use_stencil_layer)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row2.menu("VIEW3D_MT_tools_projectpaint_stencil", text=context.active_object.data.uv_texture_stencil.name)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row2.prop(ipaint, "invert_stencil", text="", icon='IMAGE_ALPHA')
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        sub = col.column()
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-22 10:48:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row = sub.row()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.active = (settings.tool == 'CLONE')
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-26 09:36:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-22 10:48:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        row.prop(ipaint, "use_clone_layer", text="Clone")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        row.menu("VIEW3D_MT_tools_projectpaint_clone", text=context.active_object.data.uv_texture_clone.name)
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        sub = col.column()
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        sub.prop(ipaint, "seam_bleed")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-22 10:48:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    class VIEW3D_MT_tools_projectpaint_clone(bpy.types.Menu):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        bl_label = "Clone Layer"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            for i, tex in enumerate(context.active_object.data.uv_textures):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                prop = layout.operator("wm.context_set_int", text=tex.name)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                prop.path = "active_object.data.uv_texture_clone_index"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                prop.value = i
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    class VIEW3D_MT_tools_projectpaint_stencil(bpy.types.Menu):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        bl_label = "Mask Layer"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            for i, tex in enumerate(context.active_object.data.uv_textures):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                prop = layout.operator("wm.context_set_int", text=tex.name)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                prop.path = "active_object.data.uv_texture_stencil_index"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                prop.value = i
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bpy.types.register(VIEW3D_MT_tools_projectpaint_clone)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bpy.types.register(VIEW3D_MT_tools_projectpaint_stencil)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-25 22:31:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class VIEW3D_PT_tools_particlemode(View3DPanel):
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    '''default tools for particle mode'''
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bl_context = "particlemode"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bl_label = "Options"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    def draw(self, context):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        layout = self.layout
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        pe = context.tool_settings.particle_edit
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        ob = pe.object
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        layout.prop(pe, "type", text="")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-06 12:27:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        ptcache = None
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        if pe.type == 'PARTICLES':
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if ob.particle_systems:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if len(ob.particle_systems) > 1:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    layout.template_list(ob, "particle_systems", ob, "active_particle_system_index", type='ICONS')
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                ptcache = ob.particle_systems[ob.active_particle_system_index].point_cache
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        else:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            for md in ob.modifiers:
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if md.type == pe.type:
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    ptcache = md.point_cache
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if ptcache and len(ptcache.point_cache_list) > 1:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            layout.template_list(ptcache, "point_cache_list", ptcache, "active_point_cache_index", type='ICONS')
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if not pe.editable:
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            layout.label(text="Point cache must be baked")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            layout.label(text="to enable editing!")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if pe.hair:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            col.active = pe.editable
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            col.prop(pe, "emitter_deflect", text="Deflect emitter")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            sub = col.row()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            sub.active = pe.emitter_deflect
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            sub.prop(pe, "emitter_distance", text="Distance")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.active = pe.editable
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Keep:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.prop(pe, "keep_lengths", text="Lenghts")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.prop(pe, "keep_root", text="Root")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        if not pe.hair:
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            col.label(text="Correct:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            col.prop(pe, "auto_velocity", text="Velocity")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col = layout.column(align=True)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.active = pe.editable
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        col.label(text="Draw:")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.prop(pe, "draw_step", text="Path Steps")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        if pe.type == 'PARTICLES':
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            col.prop(pe, "draw_particles", text="Particles")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        col.prop(pe, "fade_time")
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        sub = col.row()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        sub.active = pe.fade_time
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        sub.prop(pe, "fade_frames", slider=True)
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-20 13:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_weightpaint)
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_objectmode)
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_meshedit)
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-20 13:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_meshedit_options)
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_curveedit)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_surfaceedit)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_textedit)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_armatureedit)
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-27 12:46:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_armatureedit_options)
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_mballedit)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_latticeedit)
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-02 11:24:27 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_posemode)
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-19 13:24:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_posemode_options)
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-20 16:39:16 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_brush)
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-03 08:37:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_brush_texture)
							 | 
						
					
						
							
								
									
										
											 
										 
										
											
												Change to the way brush/tool selection works, as discussed a while ago
Now, there are preset brushes made for each tool type (eg. for sculpt mode, Grab, 
Draw, Inflate, etc), and the recommended method for changing sculpt tools is to 
change between Brushes. The shortcut keys for changing between tools have 
now been changed to change between named brushes - the G key in sculpt 
mode now changes to any brush named 'Grab'.
The advantages of this are:
* Changing between brushes remembers the strength/size/texture etc settings for 
each brush. This means that for example, you can draw with a strong textured 
Clay brush, but then switch quickly to a weaker, untextured Smooth brush, 
without having to re-do your settings each time.
* You can now add your own custom shortcut keys to your own custom brushes - 
just add a keymap entry similar to the existing ones, that references your own 
custom brush names.
To bring over these new default brushes to an existing B.blend setup, just 
append them in from the new B.blend in svn.
											
										 
										
											2009-12-28 01:27:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_brush_tool)
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-18 01:19:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_brush_stroke)
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-24 11:14:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_brush_curve)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_sculpt_options)
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_vertexpaint)
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-20 13:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_weightpaint_options)
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-08 03:29:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_projectpaint)
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-15 19:40:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								bpy.types.register(VIEW3D_PT_tools_particlemode)
							 |