Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Bishop <nicholasbishop@gmail.com>2009-07-19 21:44:44 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2009-07-19 21:44:44 +0400
commitd410135408fcce7856cc044ba717297c89302a34 (patch)
treee8f863161288e9b7e02c4b88bc50cae1d18231b5 /release/ui/space_view3d.py
parent8ac67fcd21039676011b5393e22a0fede89c34c9 (diff)
Sculpt+Paint/2.5:
* Moved brush NKEY panel from C to Python. Could use some UI review :) * Added a NULL check in bpy_internal_import.c, was crashing here on Python errors * Added RNA for vpaint brush and for weight paint * Added context for vpaint/wpaint similar to edit_object and sculpt_object
Diffstat (limited to 'release/ui/space_view3d.py')
-rw-r--r--release/ui/space_view3d.py51
1 files changed, 50 insertions, 1 deletions
diff --git a/release/ui/space_view3d.py b/release/ui/space_view3d.py
index e194e6f939b..9d4994b9793 100644
--- a/release/ui/space_view3d.py
+++ b/release/ui/space_view3d.py
@@ -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)
+