Sculpt+Paint/2.5:
[blender-staging.git] / release / ui / space_view3d.py
index e194e6f939b4ff8f83f9e1c5102b1832d984d08b..9d4994b9793aa0030e3d13f232c12878328f80db 100644 (file)
@@ -197,10 +197,59 @@ class VIEW3D_PT_sculpt(bpy.types.Panel):
                row.itemR(sculpt, "lock_y", text="Y", toggle=True)
                row.itemR(sculpt, "lock_z", text="Z", toggle=True)
 
+class VIEW3D_PT_brush(bpy.types.Panel):
+       __space_type__ = "VIEW_3D"
+       __region_type__ = "UI"
+       __label__ = "Brush"
+
+       def brush_src(self, context):
+               ts = context.scene.tool_settings
+               if context.sculpt_object:
+                       return ts.sculpt
+               elif context.vpaint_object:
+                       return ts.vpaint
+               elif context.wpaint_object:
+                       return ts.wpaint
+               return False
+
+       def poll(self, context):
+               return self.brush_src(context)
+
+       def draw(self, context):
+               src = self.brush_src(context)
+               brush = src.brush
+               layout = self.layout
+
+               layout.split().row().template_ID(src, "brush")
+
+               split = layout.split()
+               col = split.column(align=True)
+               col.itemR(brush, "size", slider=True)
+               if context.wpaint_object:
+                       col.itemR(context.scene.tool_settings, "vertex_group_weight", text="Weight", slider=True)
+               col.itemR(brush, "strength", slider=True)
+
+               if context.sculpt_object:
+                       layout.split().row().itemR(brush, "sculpt_tool")
+
+               split = layout.split()
+               col = split.column()
+               col.itemR(brush, "airbrush")
+               col.itemR(brush, "anchored")
+               col.itemR(brush, "rake")
+               col = split.column()
+               col.itemR(brush, "space")
+               col.itemR(brush, "spacing")
+
+               split = layout.split()
+               split.template_curve_mapping(brush.curve)
+
 bpy.types.register(VIEW3D_MT_view_navigation)
 bpy.types.register(VIEW3D_MT_view)
 bpy.types.register(VIEW3D_HT_header)
+bpy.types.register(VIEW3D_PT_sculpt)
+bpy.types.register(VIEW3D_PT_brush)
 bpy.types.register(VIEW3D_PT_3dview_properties)
 bpy.types.register(VIEW3D_PT_3dview_display)
 bpy.types.register(VIEW3D_PT_background_image)
-bpy.types.register(VIEW3D_PT_sculpt)
+