2009-07-02 11:24:27 +00:00
|
|
|
|
|
|
|
import bpy
|
|
|
|
|
|
|
|
# ********** default tools for objectmode ****************
|
|
|
|
|
|
|
|
class View3DPanel(bpy.types.Panel):
|
|
|
|
__space_type__ = "VIEW_3D"
|
|
|
|
__region_type__ = "TOOLS"
|
|
|
|
__context__ = "objectmode"
|
|
|
|
|
|
|
|
class VIEW3D_PT_tools_objectmode(View3DPanel):
|
|
|
|
__label__ = "Object Tools"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-07-24 11:14:59 +00:00
|
|
|
|
|
|
|
layout.itemL(text="Transform:")
|
|
|
|
|
2009-07-24 21:01:41 +00:00
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("tfm.translate")
|
|
|
|
col.itemO("tfm.rotate")
|
|
|
|
col.itemO("tfm.resize", text="Scale")
|
|
|
|
|
|
|
|
layout.itemL(text="Object:")
|
|
|
|
|
2009-07-24 21:01:41 +00:00
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("object.duplicate")
|
|
|
|
col.itemO("object.delete")
|
|
|
|
|
2009-07-27 18:50:10 +00:00
|
|
|
active_object= context.active_object
|
|
|
|
if active_object and active_object.type == 'MESH':
|
2009-07-25 10:42:23 +00:00
|
|
|
layout.itemL(text="Shading:")
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
col.itemO("object.shade_smooth", text="Smooth")
|
|
|
|
col.itemO("object.shade_flat", text="Flat")
|
|
|
|
|
2009-07-24 11:14:59 +00:00
|
|
|
layout.itemL(text="Keyframes:")
|
|
|
|
|
2009-07-24 21:01:41 +00:00
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("anim.insert_keyframe_menu", text="Insert")
|
|
|
|
col.itemO("anim.delete_keyframe_v3d", text="Remove")
|
2009-07-02 11:24:27 +00:00
|
|
|
|
|
|
|
# ********** default tools for editmode_mesh ****************
|
|
|
|
|
|
|
|
class View3DPanel(bpy.types.Panel):
|
|
|
|
__space_type__ = "VIEW_3D"
|
|
|
|
__region_type__ = "TOOLS"
|
|
|
|
__context__ = "editmode_mesh"
|
|
|
|
|
|
|
|
class VIEW3D_PT_tools_editmode_mesh(View3DPanel):
|
|
|
|
__label__ = "Mesh Tools"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-07-24 21:01:41 +00:00
|
|
|
|
2009-07-24 11:14:59 +00:00
|
|
|
layout.itemL(text="Transform:")
|
|
|
|
|
2009-07-24 21:01:41 +00:00
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("tfm.translate")
|
|
|
|
col.itemO("tfm.rotate")
|
|
|
|
col.itemO("tfm.resize", text="Scale")
|
|
|
|
|
|
|
|
layout.itemL(text="Mesh:")
|
2009-07-24 21:01:41 +00:00
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("mesh.duplicate")
|
|
|
|
col.itemO("mesh.delete")
|
|
|
|
|
|
|
|
layout.itemL(text="Modeling:")
|
2009-07-24 21:01:41 +00:00
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("mesh.extrude")
|
|
|
|
col.itemO("mesh.subdivide")
|
|
|
|
col.itemO("mesh.spin")
|
|
|
|
col.itemO("mesh.screw")
|
|
|
|
|
|
|
|
layout.itemL(text="Shading:")
|
|
|
|
|
2009-07-24 21:01:41 +00:00
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("mesh.faces_shade_smooth", text="Smooth")
|
|
|
|
col.itemO("mesh.faces_shade_flat", text="Flat")
|
|
|
|
|
|
|
|
layout.itemL(text="UV Mapping:")
|
|
|
|
|
2009-07-24 21:01:41 +00:00
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("uv.mapping_menu", text="Unwrap")
|
|
|
|
col.itemO("mesh.uvs_rotate")
|
|
|
|
col.itemO("mesh.uvs_mirror")
|
2009-07-02 11:24:27 +00:00
|
|
|
|
|
|
|
# ********** default tools for editmode_curve ****************
|
|
|
|
|
|
|
|
class View3DPanel(bpy.types.Panel):
|
|
|
|
__space_type__ = "VIEW_3D"
|
|
|
|
__region_type__ = "TOOLS"
|
|
|
|
__context__ = "editmode_curve"
|
|
|
|
|
|
|
|
class VIEW3D_PT_tools_editmode_curve(View3DPanel):
|
|
|
|
__label__ = "Curve Tools"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-07-24 21:01:41 +00:00
|
|
|
|
2009-07-24 11:14:59 +00:00
|
|
|
layout.itemL(text="Transform:")
|
|
|
|
|
2009-07-24 21:01:41 +00:00
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("tfm.translate")
|
|
|
|
col.itemO("tfm.rotate")
|
|
|
|
col.itemO("tfm.resize", text="Scale")
|
|
|
|
|
|
|
|
layout.itemL(text="Curve:")
|
2009-07-24 21:01:41 +00:00
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("curve.duplicate")
|
|
|
|
col.itemO("curve.delete")
|
|
|
|
col.itemO("curve.cyclic_toggle")
|
|
|
|
col.itemO("curve.switch_direction")
|
|
|
|
|
|
|
|
layout.itemL(text="Modeling:")
|
2009-07-24 21:01:41 +00:00
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("curve.extrude")
|
|
|
|
col.itemO("curve.subdivide")
|
2009-07-02 11:24:27 +00:00
|
|
|
|
|
|
|
# ********** default tools for editmode_surface ****************
|
|
|
|
|
|
|
|
class View3DPanel(bpy.types.Panel):
|
|
|
|
__space_type__ = "VIEW_3D"
|
|
|
|
__region_type__ = "TOOLS"
|
|
|
|
__context__ = "editmode_surface"
|
|
|
|
|
|
|
|
class VIEW3D_PT_tools_editmode_surface(View3DPanel):
|
|
|
|
__label__ = "Surface Tools"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-07-24 21:01:41 +00:00
|
|
|
|
2009-07-24 11:14:59 +00:00
|
|
|
layout.itemL(text="Transform:")
|
2009-07-24 21:01:41 +00:00
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("tfm.translate")
|
|
|
|
col.itemO("tfm.rotate")
|
|
|
|
col.itemO("tfm.resize", text="Scale")
|
|
|
|
|
|
|
|
layout.itemL(text="Curve:")
|
2009-07-24 21:01:41 +00:00
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("curve.duplicate")
|
|
|
|
col.itemO("curve.delete")
|
|
|
|
col.itemO("curve.cyclic_toggle")
|
|
|
|
col.itemO("curve.switch_direction")
|
|
|
|
|
|
|
|
layout.itemL(text="Modeling:")
|
2009-07-24 21:01:41 +00:00
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("curve.extrude")
|
|
|
|
col.itemO("curve.subdivide")
|
2009-07-02 11:24:27 +00:00
|
|
|
|
|
|
|
# ********** default tools for editmode_text ****************
|
|
|
|
|
|
|
|
class View3DPanel(bpy.types.Panel):
|
|
|
|
__space_type__ = "VIEW_3D"
|
|
|
|
__region_type__ = "TOOLS"
|
|
|
|
__context__ = "editmode_text"
|
|
|
|
|
|
|
|
class VIEW3D_PT_tools_editmode_text(View3DPanel):
|
|
|
|
__label__ = "Text Tools"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2009-07-24 21:01:41 +00:00
|
|
|
col = layout.column(align=True)
|
|
|
|
col.itemO("font.text_copy", text="Copy")
|
|
|
|
col.itemO("font.text_paste", text="Paste")
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.itemO("font.case_set")
|
|
|
|
col.itemO("font.style_toggle")
|
2009-07-02 11:24:27 +00:00
|
|
|
|
|
|
|
# ********** default tools for editmode_armature ****************
|
|
|
|
|
|
|
|
class View3DPanel(bpy.types.Panel):
|
|
|
|
__space_type__ = "VIEW_3D"
|
|
|
|
__region_type__ = "TOOLS"
|
|
|
|
__context__ = "editmode_armature"
|
|
|
|
|
|
|
|
class VIEW3D_PT_tools_editmode_armature(View3DPanel):
|
|
|
|
__label__ = "Armature Tools"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-07-24 21:01:41 +00:00
|
|
|
|
2009-07-24 11:14:59 +00:00
|
|
|
layout.itemL(text="Transform:")
|
2009-07-24 21:01:41 +00:00
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("tfm.translate")
|
|
|
|
col.itemO("tfm.rotate")
|
|
|
|
col.itemO("tfm.resize", text="Scale")
|
|
|
|
|
|
|
|
layout.itemL(text="Bones:")
|
2009-07-24 21:01:41 +00:00
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("armature.bone_primitive_add", text="Add")
|
2009-07-25 05:11:28 +00:00
|
|
|
col.itemO("armature.duplicate", text="Duplicate")
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("armature.delete", text="Delete")
|
|
|
|
|
|
|
|
layout.itemL(text="Modeling:")
|
2009-07-24 21:01:41 +00:00
|
|
|
layout.itemO("armature.extrude")
|
|
|
|
|
2009-07-02 11:24:27 +00:00
|
|
|
# ********** default tools for editmode_mball ****************
|
|
|
|
|
|
|
|
class View3DPanel(bpy.types.Panel):
|
|
|
|
__space_type__ = "VIEW_3D"
|
|
|
|
__region_type__ = "TOOLS"
|
|
|
|
__context__ = "editmode_mball"
|
|
|
|
|
|
|
|
class VIEW3D_PT_tools_editmode_mball(View3DPanel):
|
|
|
|
__label__ = "Meta Tools"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-07-24 21:01:41 +00:00
|
|
|
|
2009-07-24 11:14:59 +00:00
|
|
|
layout.itemL(text="Transform:")
|
2009-07-24 21:01:41 +00:00
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("tfm.translate")
|
|
|
|
col.itemO("tfm.rotate")
|
|
|
|
col.itemO("tfm.resize", text="Scale")
|
2009-07-02 11:24:27 +00:00
|
|
|
|
|
|
|
# ********** default tools for editmode_lattice ****************
|
|
|
|
|
|
|
|
class View3DPanel(bpy.types.Panel):
|
|
|
|
__space_type__ = "VIEW_3D"
|
|
|
|
__region_type__ = "TOOLS"
|
|
|
|
__context__ = "editmode_lattice"
|
|
|
|
|
|
|
|
class VIEW3D_PT_tools_editmode_lattice(View3DPanel):
|
|
|
|
__label__ = "Lattice Tools"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-07-24 21:01:41 +00:00
|
|
|
|
2009-07-24 11:14:59 +00:00
|
|
|
layout.itemL(text="Transform:")
|
2009-07-24 21:01:41 +00:00
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("tfm.translate")
|
|
|
|
col.itemO("tfm.rotate")
|
|
|
|
col.itemO("tfm.resize", text="Scale")
|
2009-07-02 11:24:27 +00:00
|
|
|
|
|
|
|
# ********** default tools for posemode ****************
|
|
|
|
|
|
|
|
class View3DPanel(bpy.types.Panel):
|
|
|
|
__space_type__ = "VIEW_3D"
|
|
|
|
__region_type__ = "TOOLS"
|
|
|
|
__context__ = "posemode"
|
|
|
|
|
|
|
|
class VIEW3D_PT_tools_posemode(View3DPanel):
|
|
|
|
__label__ = "Pose Tools"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-07-24 21:01:41 +00:00
|
|
|
|
2009-07-24 11:14:59 +00:00
|
|
|
layout.itemL(text="Transform:")
|
2009-07-24 21:01:41 +00:00
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("tfm.translate")
|
|
|
|
col.itemO("tfm.rotate")
|
|
|
|
col.itemO("tfm.resize", text="Scale")
|
|
|
|
|
|
|
|
layout.itemL(text="Bones:")
|
2009-07-24 21:01:41 +00:00
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("pose.hide", text="Hide")
|
|
|
|
col.itemO("pose.reveal", text="Reveal")
|
|
|
|
|
|
|
|
layout.itemL(text="Keyframes:")
|
|
|
|
|
2009-07-24 21:01:41 +00:00
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("anim.insert_keyframe_menu", text="Insert")
|
|
|
|
col.itemO("anim.delete_keyframe_v3d", text="Remove")
|
|
|
|
|
|
|
|
layout.itemL(text="Pose:")
|
|
|
|
|
2009-07-24 21:01:41 +00:00
|
|
|
col = layout.column(align=True)
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemO("pose.copy", text="Copy")
|
|
|
|
col.itemO("pose.paste", text="Paste")
|
2009-07-24 21:01:41 +00:00
|
|
|
|
|
|
|
layout.itemL(text="Library:")
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
col.itemO("poselib.pose_add", text="Add")
|
|
|
|
col.itemO("poselib.pose_remove", text="Remove")
|
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-07-25 22:31:02 +00:00
|
|
|
class PaintPanel(bpy.types.Panel):
|
2009-07-20 16:39:16 +00:00
|
|
|
__space_type__ = "VIEW_3D"
|
|
|
|
__region_type__ = "TOOLS"
|
|
|
|
|
2009-07-25 22:31:02 +00:00
|
|
|
def paint_settings(self, context):
|
2009-07-21 00:55:20 +00:00
|
|
|
ts = context.tool_settings
|
2009-07-25 22:31:02 +00:00
|
|
|
|
2009-07-20 16:39:16 +00:00
|
|
|
if context.sculpt_object:
|
|
|
|
return ts.sculpt
|
2009-07-25 22:31:02 +00:00
|
|
|
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-20 16:39:16 +00:00
|
|
|
return False
|
|
|
|
|
2009-07-25 22:31:02 +00:00
|
|
|
class VIEW3D_PT_tools_brush(PaintPanel):
|
|
|
|
__label__ = "Brush"
|
|
|
|
|
2009-07-20 16:39:16 +00:00
|
|
|
def poll(self, context):
|
2009-07-25 22:31:02 +00:00
|
|
|
return self.paint_settings(context)
|
2009-07-02 11:24:27 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
2009-07-26 08:53:23 +00:00
|
|
|
layout = self.layout
|
|
|
|
|
2009-07-25 22:31:02 +00:00
|
|
|
settings = self.paint_settings(context)
|
|
|
|
brush = settings.brush
|
2009-07-02 11:24:27 +00:00
|
|
|
|
2009-07-25 22:31:02 +00:00
|
|
|
if context.particle_edit_object:
|
|
|
|
layout.column().itemR(settings, "tool", expand=True)
|
|
|
|
else:
|
|
|
|
layout.split().row().template_ID(settings, "brush")
|
|
|
|
|
|
|
|
if brush and not context.particle_edit_object:
|
|
|
|
if context.sculpt_object:
|
|
|
|
layout.column().itemR(brush, "sculpt_tool", expand=True)
|
|
|
|
|
|
|
|
elif context.texture_paint_object:
|
|
|
|
col = layout.column(align=True)
|
|
|
|
col.item_enumR(settings, "tool", "DRAW")
|
|
|
|
col.item_enumR(settings, "tool", "SOFTEN")
|
|
|
|
if settings.use_projection:
|
|
|
|
col.item_enumR(settings, "tool", "CLONE")
|
|
|
|
else:
|
|
|
|
col.item_enumR(settings, "tool", "SMEAR")
|
2009-07-24 21:01:41 +00:00
|
|
|
|
2009-07-26 08:53:23 +00:00
|
|
|
col = layout.column()
|
2009-07-24 11:14:59 +00:00
|
|
|
row = col.row(align=True)
|
2009-07-25 22:31:02 +00:00
|
|
|
row.itemR(brush, "size", slider=True)
|
|
|
|
row.itemR(brush, "size_pressure", toggle=True, icon='ICON_BRUSH_DATA', text="")
|
|
|
|
if context.weight_paint_object:
|
|
|
|
col.itemR(context.tool_settings, "vertex_group_weight", text="Weight", slider=True)
|
|
|
|
|
|
|
|
col.itemR(brush, "strength", slider=True)
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.itemR(brush, "falloff", slider=True)
|
|
|
|
row.itemR(brush, "falloff_pressure", toggle=True, icon='ICON_BRUSH_DATA', text="")
|
|
|
|
if context.vertex_paint_object:
|
|
|
|
col.itemR(brush, "color", text="")
|
|
|
|
if context.texture_paint_object:
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.itemR(brush, "clone_opacity", slider=True, text="Opacity")
|
|
|
|
row.itemR(brush, "opacity_pressure", toggle=True, icon='ICON_BRUSH_DATA', text="")
|
|
|
|
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.itemR(brush, "space", text="")
|
|
|
|
rowsub = row.row(align=True)
|
|
|
|
rowsub.active = brush.space
|
|
|
|
rowsub.itemR(brush, "spacing", text="Spacing", slider=True)
|
|
|
|
rowsub.itemR(brush, "spacing_pressure", toggle=True, icon='ICON_BRUSH_DATA', text="")
|
|
|
|
|
2009-07-26 08:53:23 +00:00
|
|
|
col = layout.column()
|
2009-07-25 22:31:02 +00:00
|
|
|
col.itemR(brush, "airbrush")
|
|
|
|
col.itemR(brush, "anchored")
|
|
|
|
col.itemR(brush, "rake")
|
|
|
|
|
|
|
|
class VIEW3D_PT_tools_brush_curve(PaintPanel):
|
2009-07-24 11:14:59 +00:00
|
|
|
__label__ = "Curve"
|
|
|
|
|
|
|
|
def poll(self, context):
|
2009-07-25 22:31:02 +00:00
|
|
|
settings = self.paint_settings(context)
|
|
|
|
return (settings and settings.brush and settings.brush.curve)
|
2009-07-24 11:14:59 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
2009-07-25 22:31:02 +00:00
|
|
|
settings = self.paint_settings(context)
|
|
|
|
brush = settings.brush
|
2009-07-24 11:14:59 +00:00
|
|
|
layout = self.layout
|
2009-07-20 16:39:16 +00:00
|
|
|
|
2009-07-26 08:53:23 +00:00
|
|
|
layout.template_curve_mapping(brush.curve)
|
2009-07-20 16:39:16 +00:00
|
|
|
|
2009-07-25 22:31:02 +00:00
|
|
|
class VIEW3D_PT_sculpt_options(PaintPanel):
|
2009-07-20 16:39:16 +00:00
|
|
|
__label__ = "Options"
|
|
|
|
|
|
|
|
def poll(self, context):
|
|
|
|
return context.sculpt_object
|
|
|
|
|
|
|
|
def draw(self, context):
|
2009-07-24 21:01:41 +00:00
|
|
|
layout = self.layout
|
2009-07-21 00:55:20 +00:00
|
|
|
sculpt = context.tool_settings.sculpt
|
2009-07-20 16:39:16 +00:00
|
|
|
|
2009-07-24 21:01:41 +00:00
|
|
|
col = layout.column()
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemR(sculpt, "partial_redraw", text="Partial Refresh")
|
|
|
|
col.itemR(sculpt, "show_brush")
|
|
|
|
|
2009-07-20 16:39:16 +00:00
|
|
|
split = self.layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemL(text="Symmetry:")
|
|
|
|
col.itemR(sculpt, "symmetry_x", text="X")
|
|
|
|
col.itemR(sculpt, "symmetry_y", text="Y")
|
|
|
|
col.itemR(sculpt, "symmetry_z", text="Z")
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.itemL(text="Lock:")
|
|
|
|
col.itemR(sculpt, "lock_x", text="X")
|
|
|
|
col.itemR(sculpt, "lock_y", text="Y")
|
|
|
|
col.itemR(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 ****************
|
|
|
|
|
|
|
|
class View3DPanel(bpy.types.Panel):
|
|
|
|
__space_type__ = "VIEW_3D"
|
|
|
|
__region_type__ = "TOOLS"
|
2009-07-25 22:31:02 +00:00
|
|
|
__context__ = "weight_paint"
|
2009-07-02 11:24:27 +00:00
|
|
|
|
2009-07-25 22:31:02 +00:00
|
|
|
class VIEW3D_PT_weight_paint_options(View3DPanel):
|
2009-07-24 11:14:59 +00:00
|
|
|
__label__ = "Options"
|
2009-07-02 11:24:27 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-07-25 22:31:02 +00:00
|
|
|
wpaint = context.tool_settings.weight_paint
|
2009-07-24 21:01:41 +00:00
|
|
|
|
|
|
|
col = layout.column()
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemL(text="Blend:")
|
|
|
|
col.itemR(wpaint, "mode", text="")
|
|
|
|
col.itemR(wpaint, "all_faces")
|
|
|
|
col.itemR(wpaint, "normals")
|
|
|
|
col.itemR(wpaint, "spray")
|
|
|
|
col.itemR(wpaint, "vertex_dist", text="Distance")
|
|
|
|
|
|
|
|
# Commented out because the Apply button isn't an operator yet, making these settings useless
|
|
|
|
# col.itemL(text="Gamma:")
|
|
|
|
# col.itemR(wpaint, "gamma", text="")
|
|
|
|
# col.itemL(text="Multiply:")
|
|
|
|
# col.itemR(wpaint, "mul", text="")
|
2009-07-02 11:24:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
# ********** default tools for vertexpaint ****************
|
|
|
|
|
|
|
|
class View3DPanel(bpy.types.Panel):
|
|
|
|
__space_type__ = "VIEW_3D"
|
|
|
|
__region_type__ = "TOOLS"
|
|
|
|
|
2009-07-25 22:31:02 +00:00
|
|
|
class VIEW3D_PT_vertex_paint_options(View3DPanel):
|
|
|
|
__context__ = "vertex_paint"
|
2009-07-24 11:14:59 +00:00
|
|
|
__label__ = "Options"
|
2009-07-02 11:24:27 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-07-25 22:31:02 +00:00
|
|
|
vpaint = context.tool_settings.vertex_paint
|
2009-07-24 21:01:41 +00:00
|
|
|
|
|
|
|
col = layout.column()
|
2009-07-24 11:14:59 +00:00
|
|
|
col.itemL(text="Blend:")
|
|
|
|
col.itemR(vpaint, "mode", text="")
|
|
|
|
col.itemR(vpaint, "all_faces")
|
|
|
|
col.itemR(vpaint, "normals")
|
|
|
|
col.itemR(vpaint, "spray")
|
|
|
|
col.itemR(vpaint, "vertex_dist", text="Distance")
|
|
|
|
# Commented out because the Apply button isn't an operator yet, making these settings useless
|
|
|
|
# col.itemL(text="Gamma:")
|
|
|
|
# col.itemR(vpaint, "gamma", text="")
|
|
|
|
# col.itemL(text="Multiply:")
|
|
|
|
# col.itemR(vpaint, "mul", text="")
|
2009-07-24 21:01:41 +00:00
|
|
|
|
|
|
|
|
2009-07-02 11:24:27 +00:00
|
|
|
# ********** default tools for texturepaint ****************
|
|
|
|
|
|
|
|
class View3DPanel(bpy.types.Panel):
|
|
|
|
__space_type__ = "VIEW_3D"
|
|
|
|
__region_type__ = "TOOLS"
|
2009-07-25 22:31:02 +00:00
|
|
|
__context__ = "texture_paint"
|
2009-07-02 11:24:27 +00:00
|
|
|
|
2009-07-25 22:31:02 +00:00
|
|
|
class VIEW3D_PT_tools_texture_paint(View3DPanel):
|
|
|
|
__label__ = "Options"
|
2009-07-02 11:24:27 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-07-26 03:54:17 +00:00
|
|
|
ipaint = context.tool_settings.image_paint
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.itemR(ipaint, "use_projection")
|
|
|
|
col.itemR(ipaint, "use_occlude")
|
|
|
|
col.itemR(ipaint, "use_backface_cull")
|
|
|
|
col.itemR(ipaint, "use_normal_falloff")
|
|
|
|
col.itemR(ipaint, "invert_stencil")
|
|
|
|
col.itemR(ipaint, "use_clone_layer")
|
|
|
|
col.itemR(ipaint, "use_stencil_layer")
|
|
|
|
|
|
|
|
col.itemR(ipaint, "seam_bleed")
|
|
|
|
col.itemR(ipaint, "normal_angle")
|
2009-07-24 21:01:41 +00:00
|
|
|
|
2009-07-25 22:31:02 +00:00
|
|
|
# ********** default tools for particle mode ****************
|
|
|
|
|
|
|
|
class View3DPanel(bpy.types.Panel):
|
|
|
|
__space_type__ = "VIEW_3D"
|
|
|
|
__region_type__ = "TOOLS"
|
|
|
|
__context__ = "particle_mode"
|
|
|
|
|
|
|
|
class VIEW3D_PT_tools_particle_edit(View3DPanel):
|
|
|
|
__label__ = "Options"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
pe = context.tool_settings.particle_edit
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
|
|
|
|
col.itemR(pe, "emitter_deflect", text="Deflect")
|
|
|
|
sub = col.row()
|
|
|
|
sub.itemR(pe, "emitter_distance", text="Distance")
|
|
|
|
sub.active = pe.emitter_deflect
|
2009-07-02 11:24:27 +00:00
|
|
|
|
|
|
|
bpy.types.register(VIEW3D_PT_tools_objectmode)
|
|
|
|
bpy.types.register(VIEW3D_PT_tools_editmode_mesh)
|
|
|
|
bpy.types.register(VIEW3D_PT_tools_editmode_curve)
|
|
|
|
bpy.types.register(VIEW3D_PT_tools_editmode_surface)
|
|
|
|
bpy.types.register(VIEW3D_PT_tools_editmode_text)
|
|
|
|
bpy.types.register(VIEW3D_PT_tools_editmode_armature)
|
|
|
|
bpy.types.register(VIEW3D_PT_tools_editmode_mball)
|
|
|
|
bpy.types.register(VIEW3D_PT_tools_editmode_lattice)
|
|
|
|
bpy.types.register(VIEW3D_PT_tools_posemode)
|
2009-07-20 16:39:16 +00:00
|
|
|
bpy.types.register(VIEW3D_PT_tools_brush)
|
2009-07-24 11:14:59 +00:00
|
|
|
bpy.types.register(VIEW3D_PT_tools_brush_curve)
|
|
|
|
bpy.types.register(VIEW3D_PT_sculpt_options)
|
2009-07-25 22:31:02 +00:00
|
|
|
bpy.types.register(VIEW3D_PT_vertex_paint_options)
|
|
|
|
bpy.types.register(VIEW3D_PT_weight_paint_options)
|
|
|
|
bpy.types.register(VIEW3D_PT_tools_texture_paint)
|
|
|
|
bpy.types.register(VIEW3D_PT_tools_particle_edit)
|