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:
authorCampbell Barton <ideasman42@gmail.com>2012-02-17 19:51:48 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-02-17 19:51:48 +0400
commit4c66e696fbcaefe40f0394fea8fc4a55bb7d6994 (patch)
treee8f60920e276ec1fec3c8014b77790a6c790deba /release
parent02987fd5e1fa3715d25bb7b9bd659fd509f40c57 (diff)
parentb7f3887a3a8a66aeba3a16ae5d76b934af3ccc7c (diff)
svn merge ^/trunk/blender -r44136:44189
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/bpy_extras/image_utils.py2
-rw-r--r--release/scripts/startup/bl_ui/space_clip.py2
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py97
3 files changed, 64 insertions, 37 deletions
diff --git a/release/scripts/modules/bpy_extras/image_utils.py b/release/scripts/modules/bpy_extras/image_utils.py
index 7d409510c85..c21b750fd1f 100644
--- a/release/scripts/modules/bpy_extras/image_utils.py
+++ b/release/scripts/modules/bpy_extras/image_utils.py
@@ -97,7 +97,7 @@ def load_image(imagepath,
# image path has been checked so the path could not be read for some
# reason, so be sure to return a placeholder
- if place_holder:
+ if place_holder and image is None:
image = _image_load_placeholder(path)
return image
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index eb97e546379..b8a205dc662 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -684,6 +684,8 @@ class CLIP_PT_stabilization(Panel):
row.active = stab.rotation_track is not None
row.prop(stab, "influence_rotation")
+ layout.prop(stab, "filter_type")
+
class CLIP_PT_marker(Panel):
bl_space_type = 'CLIP_EDITOR'
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 17d75dca41b..5870c9afaea 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Header, Menu, Panel
+from .properties_paint_common import UnifiedPaintPanel
class VIEW3D_HT_header(Header):
@@ -51,6 +52,8 @@ class VIEW3D_HT_header(Header):
elif obj:
if mode_string not in {'PAINT_TEXTURE'}:
sub.menu("VIEW3D_MT_%s" % mode_string.lower())
+ if mode_string in {'SCULPT', 'PAINT_VERTEX', 'PAINT_WEIGHT', 'PAINT_TEXTURE'}:
+ sub.menu("VIEW3D_MT_brush")
else:
sub.menu("VIEW3D_MT_object")
@@ -80,22 +83,23 @@ class VIEW3D_HT_header(Header):
row.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True)
# Snap
- snap_element = toolsettings.snap_element
- row = layout.row(align=True)
- row.prop(toolsettings, "use_snap", text="")
- row.prop(toolsettings, "snap_element", text="", icon_only=True)
- if snap_element != 'INCREMENT':
- row.prop(toolsettings, "snap_target", text="")
- if obj:
- if obj.mode == 'OBJECT':
- row.prop(toolsettings, "use_snap_align_rotation", text="")
- elif obj.mode == 'EDIT':
- row.prop(toolsettings, "use_snap_self", text="")
-
- if snap_element == 'VOLUME':
- row.prop(toolsettings, "use_snap_peel_object", text="")
- elif snap_element == 'FACE':
- row.prop(toolsettings, "use_snap_project", text="")
+ if not obj or obj.mode not in {'SCULPT', 'VERTEX_PAINT', 'WEIGHT_PAINT', 'TEXTURE_PAINT', 'PARTICLE_EDIT'}:
+ snap_element = toolsettings.snap_element
+ row = layout.row(align=True)
+ row.prop(toolsettings, "use_snap", text="")
+ row.prop(toolsettings, "snap_element", text="", icon_only=True)
+ if snap_element != 'INCREMENT':
+ row.prop(toolsettings, "snap_target", text="")
+ if obj:
+ if obj.mode == 'OBJECT':
+ row.prop(toolsettings, "use_snap_align_rotation", text="")
+ elif obj.mode == 'EDIT':
+ row.prop(toolsettings, "use_snap_self", text="")
+
+ if snap_element == 'VOLUME':
+ row.prop(toolsettings, "use_snap_peel_object", text="")
+ elif snap_element == 'FACE':
+ row.prop(toolsettings, "use_snap_project", text="")
# OpenGL render
row = layout.row(align=True)
@@ -1012,6 +1016,45 @@ class VIEW3D_MT_object_game(Menu):
layout.operator("object.game_property_clear")
+
+# ********** Brush menu **********
+class VIEW3D_MT_brush(Menu):
+ bl_label = "Brush"
+
+ def draw(self, context):
+ layout = self.layout
+
+ settings = UnifiedPaintPanel.paint_settings(context)
+ brush = settings.brush
+
+ ups = context.tool_settings.unified_paint_settings
+ layout.prop(ups, "use_unified_size", text="Unified Size")
+ layout.prop(ups, "use_unified_strength", text="Unified Strength")
+
+ # skip if no active brush
+ if not brush:
+ return
+
+ # TODO: still missing a lot of brush options here
+
+ # sculpt options
+ if context.sculpt_object:
+
+ sculpt_tool = brush.sculpt_tool
+
+ layout.separator()
+ layout.operator_menu_enum("brush.curve_preset", "shape", text='Curve Preset')
+ layout.separator()
+
+ if sculpt_tool != 'GRAB':
+ layout.prop_menu_enum(brush, "stroke_method")
+
+ if sculpt_tool in {'DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'}:
+ layout.prop_menu_enum(brush, "direction")
+
+ if sculpt_tool == 'LAYER':
+ layout.prop(brush, "use_persistent")
+ layout.operator("sculpt.set_persistent_base")
# ********** Vertex paint menu **********
@@ -1115,7 +1158,6 @@ class VIEW3D_MT_sculpt(Menu):
toolsettings = context.tool_settings
sculpt = toolsettings.sculpt
- brush = toolsettings.sculpt.brush
layout.operator("ed.undo")
layout.operator("ed.redo")
@@ -1129,30 +1171,13 @@ class VIEW3D_MT_sculpt(Menu):
layout.prop(sculpt, "lock_x")
layout.prop(sculpt, "lock_y")
layout.prop(sculpt, "lock_z")
- layout.separator()
- layout.operator_menu_enum("brush.curve_preset", "shape")
- layout.separator()
-
- if brush is not None: # unlikely but can happen
- sculpt_tool = brush.sculpt_tool
-
- if sculpt_tool != 'GRAB':
- layout.prop_menu_enum(brush, "stroke_method")
-
- if sculpt_tool in {'DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'}:
- layout.prop_menu_enum(brush, "direction")
-
- if sculpt_tool == 'LAYER':
- layout.prop(brush, "use_persistent")
- layout.operator("sculpt.set_persistent_base")
layout.separator()
layout.prop(sculpt, "use_threaded", text="Threaded Sculpt")
+ layout.prop(sculpt, "show_low_resolution")
layout.prop(sculpt, "show_brush")
+ layout.prop(sculpt, "use_deform_only")
- # TODO, make available from paint menu!
- layout.prop(toolsettings, "sculpt_paint_use_unified_size", text="Unify Size")
- layout.prop(toolsettings, "sculpt_paint_use_unified_strength", text="Unify Strength")
# ********** Particle menu **********