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:
Diffstat (limited to 'release/scripts/ui')
-rw-r--r--release/scripts/ui/properties_data_mesh.py25
-rw-r--r--release/scripts/ui/properties_data_modifier.py5
-rw-r--r--release/scripts/ui/properties_texture.py1
-rw-r--r--release/scripts/ui/space_view3d.py23
-rw-r--r--release/scripts/ui/space_view3d_toolbar.py150
5 files changed, 186 insertions, 18 deletions
diff --git a/release/scripts/ui/properties_data_mesh.py b/release/scripts/ui/properties_data_mesh.py
index 38364139147..3af0d6a33ac 100644
--- a/release/scripts/ui/properties_data_mesh.py
+++ b/release/scripts/ui/properties_data_mesh.py
@@ -254,6 +254,27 @@ class DATA_PT_shape_keys(MeshButtonsPanel, bpy.types.Panel):
row.prop(key, "slurph")
+class DATA_PT_ptex(MeshButtonsPanel, bpy.types.Panel):
+ bl_label = "PTex"
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
+
+ def draw(self, context):
+ layout = self.layout
+
+ me = context.mesh
+
+ row = layout.row()
+ row.template_list(me, "ptex_layers", me, "active_ptex_index", rows=2)
+ col = row.column(align=True)
+ col.operator("ptex.layer_remove", icon='ZOOMOUT', text="")
+
+ layout.operator_menu_enum("ptex.layer_convert", "type")
+ layout.operator_menu_enum("ptex.layer_add", "type")
+ row = layout.row()
+ row.operator("ptex.open")
+ row.operator("ptex.layer_save")
+
+
class DATA_PT_uv_texture(MeshButtonsPanel, bpy.types.Panel):
bl_label = "UV Texture"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -344,6 +365,10 @@ class DATA_PT_vertex_colors(MeshButtonsPanel, bpy.types.Panel):
lay = me.vertex_colors.active
if lay:
layout.prop(lay, "name")
+ if lay.multiresolution:
+ layout.operator("mesh.vertex_color_multiresolution_toggle", text="Remove Multires")
+ else:
+ layout.operator("mesh.vertex_color_multiresolution_toggle", text="Add Multires")
class DATA_PT_custom_props_mesh(MeshButtonsPanel, PropertyPanel, bpy.types.Panel):
diff --git a/release/scripts/ui/properties_data_modifier.py b/release/scripts/ui/properties_data_modifier.py
index 8950a017022..e1710f20a5d 100644
--- a/release/scripts/ui/properties_data_modifier.py
+++ b/release/scripts/ui/properties_data_modifier.py
@@ -394,8 +394,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
split = layout.split()
col = split.column()
col.prop(md, "levels", text="Preview")
- col.prop(md, "sculpt_levels", text="Sculpt")
+ col.prop(md, "edit_levels", text="Edit")
col.prop(md, "render_levels", text="Render")
+ col.prop(md, "show_only_control_edges")
col = split.column()
@@ -403,7 +404,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
col.operator("object.multires_subdivide", text="Subdivide")
col.operator("object.multires_higher_levels_delete", text="Delete Higher")
col.operator("object.multires_reshape", text="Reshape")
- col.prop(md, "show_only_control_edges")
+ col.operator("object.multires_base_apply", text="Apply Base")
layout.separator()
diff --git a/release/scripts/ui/properties_texture.py b/release/scripts/ui/properties_texture.py
index bf0c5d56e4c..295078dc1a5 100644
--- a/release/scripts/ui/properties_texture.py
+++ b/release/scripts/ui/properties_texture.py
@@ -30,6 +30,7 @@ class TEXTURE_MT_specials(bpy.types.Menu):
layout.operator("texture.slot_copy", icon='COPYDOWN')
layout.operator("texture.slot_paste", icon='PASTEDOWN')
+ layout.operator("paint.mask_from_texture")
class TEXTURE_MT_envmap_specials(bpy.types.Menu):
diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py
index 02f29c7632c..7df932f6800 100644
--- a/release/scripts/ui/space_view3d.py
+++ b/release/scripts/ui/space_view3d.py
@@ -957,6 +957,23 @@ class VIEW3D_MT_paint_vertex(bpy.types.Menu):
layout.operator("paint.vertex_color_set")
layout.operator("paint.vertex_color_dirt")
+ # hiding
+ prop = layout.operator("ptex.subface_flag_set", text="Hide Selected")
+ prop.flag = 'HIDDEN'
+ prop = layout.operator("ptex.subface_flag_set", text="Show All")
+ prop.flag = 'HIDDEN'
+ prop.set = 0
+ prop.ignore_hidden = 0
+ prop.ignore_unselected = 0
+
+ # masking
+ prop = layout.operator("ptex.subface_flag_set", text="Mask Selected")
+ prop.flag = 'MASKED'
+ prop = layout.operator("ptex.subface_flag_set", text="Unmask Selected")
+ prop.flag = 'MASKED'
+ prop.set = 0
+
+
class VIEW3D_MT_hook(bpy.types.Menu):
bl_label = "Hooks"
@@ -1037,6 +1054,11 @@ class VIEW3D_MT_sculpt(bpy.types.Menu):
sculpt = tool_settings.sculpt
brush = tool_settings.sculpt.brush
+ layout.operator("sculpt.area_hide", text="Show Hidden").show_all = True
+ layout.operator("sculpt.area_hide", text="Hide Exterior Area")
+ layout.operator("sculpt.area_hide", text="Hide Interior Area").hide_inside = True
+ layout.separator()
+
layout.operator("ed.undo")
layout.operator("ed.redo")
@@ -1045,6 +1067,7 @@ class VIEW3D_MT_sculpt(bpy.types.Menu):
layout.prop(sculpt, "use_symmetry_x")
layout.prop(sculpt, "use_symmetry_y")
layout.prop(sculpt, "use_symmetry_z")
+
layout.separator()
layout.prop(sculpt, "lock_x")
layout.prop(sculpt, "lock_y")
diff --git a/release/scripts/ui/space_view3d_toolbar.py b/release/scripts/ui/space_view3d_toolbar.py
index a6f3f7e34c2..ec6f8ed1f3f 100644
--- a/release/scripts/ui/space_view3d_toolbar.py
+++ b/release/scripts/ui/space_view3d_toolbar.py
@@ -475,7 +475,7 @@ class PaintPanel():
if context.sculpt_object:
return ts.sculpt
- elif context.vertex_paint_object:
+ elif context.vertex_paint_object and (not context.vertex_paint_object.data.ptex_edit_mode):
return ts.vertex_paint
elif context.weight_paint_object:
return ts.weight_paint
@@ -487,6 +487,39 @@ class PaintPanel():
return None
+class VIEW3D_PT_tools_masking(PaintPanel, bpy.types.Panel):
+ bl_label = "Masking"
+ bl_default_closed = False
+
+ @classmethod
+ def poll(cls, context):
+ return cls.paint_settings(context) and (context.sculpt_object or context.vertex_paint_object)
+
+ def draw(self, context):
+ layout = self.layout
+
+ settings = self.paint_settings(context)
+ mesh = context.object.data
+
+ row = layout.row()
+
+ col = row.column()
+ col.template_list(mesh, "paint_mask_layers", mesh, "active_paint_mask_index", rows=2)
+
+ col = row.column(align=True)
+ col.operator("paint.mask_layer_add", icon='ZOOMIN', text="")
+ col.operator("paint.mask_layer_remove", icon='ZOOMOUT', text="")
+
+ row = layout.row(align=True)
+ row.active = mesh.active_paint_mask_index != -1
+ row.operator("paint.mask_set", text="Clear").mode = 'CLEAR'
+ row.operator("paint.mask_set", text="Fill").mode = 'FILL'
+ row.operator("paint.mask_set", text="Invert").mode = 'INVERT'
+
+ if row.active:
+ layout.prop(mesh.paint_mask_layers[mesh.active_paint_mask_index], "strength", slider=True)
+
+
class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel):
bl_label = "Brush"
@@ -622,6 +655,8 @@ class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel):
col.prop(brush, "use_accumulate")
+ col.prop(brush, "mask")
+
if brush.sculpt_tool == 'LAYER':
col.separator()
@@ -695,11 +730,17 @@ class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel):
row.prop(brush, "strength", text="Strength", slider=True)
row.prop(brush, "use_pressure_strength", toggle=True, text="")
+ if brush.vertexpaint_tool == 'ALPHA':
+ row = col.row(align=True)
+ row.prop(brush, "direction", expand=True)
+
# XXX - TODO
#row = col.row(align=True)
#row.prop(brush, "jitter", slider=True)
#row.prop(brush, "use_pressure_jitter", toggle=True, text="")
+ col.prop(brush, "mask")
+
class VIEW3D_PT_tools_brush_texture(PaintPanel, bpy.types.Panel):
bl_label = "Texture"
@@ -709,6 +750,7 @@ class VIEW3D_PT_tools_brush_texture(PaintPanel, bpy.types.Panel):
def poll(cls, context):
settings = cls.paint_settings(context)
return (settings and settings.brush and (context.sculpt_object or
+ context.vertex_paint_object or
context.texture_paint_object))
def draw(self, context):
@@ -722,7 +764,7 @@ class VIEW3D_PT_tools_brush_texture(PaintPanel, bpy.types.Panel):
col.template_ID_preview(brush, "texture", new="texture.new", rows=3, cols=8)
- if context.sculpt_object:
+ if context.sculpt_object or context.vertex_paint_object:
#XXX duplicated from properties_texture.py
col.separator()
@@ -854,7 +896,7 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel, bpy.types.Panel):
col = layout.column()
- if context.sculpt_object:
+ if context.sculpt_object or context.vertex_paint_object:
col.label(text="Stroke Method:")
col.prop(brush, "stroke_method", text="")
@@ -944,7 +986,6 @@ class VIEW3D_PT_tools_brush_curve(PaintPanel, bpy.types.Panel):
layout = self.layout
settings = self.paint_settings(context)
-
brush = settings.brush
layout.template_curve_mapping(brush, "curve", brush=True)
@@ -994,20 +1035,23 @@ class VIEW3D_PT_sculpt_options(PaintPanel, bpy.types.Panel):
row.prop(sculpt, "lock_y", text="Y", toggle=True)
row.prop(sculpt, "lock_z", text="Z", toggle=True)
-
-class VIEW3D_PT_sculpt_symmetry(PaintPanel, bpy.types.Panel):
+class VIEW3D_PT_tools_paint_symmetry(PaintPanel, bpy.types.Panel):
bl_label = "Symmetry"
bl_options = {'DEFAULT_CLOSED'}
@classmethod
def poll(cls, context):
- return (context.sculpt_object and context.tool_settings.sculpt)
+ return cls.paint_settings(context) and (context.sculpt_object or context.vertex_paint_object)
def draw(self, context):
layout = self.layout
- sculpt = context.tool_settings.sculpt
+ if context.sculpt_object:
+ paint = context.tool_settings.sculpt
+ elif context.vertex_paint_object:
+ paint = context.tool_settings.vertex_paint
+
settings = __class__.paint_settings(context)
brush = settings.brush
@@ -1016,19 +1060,19 @@ class VIEW3D_PT_sculpt_symmetry(PaintPanel, bpy.types.Panel):
col = split.column()
col.label(text="Mirror:")
- col.prop(sculpt, "use_symmetry_x", text="X")
- col.prop(sculpt, "use_symmetry_y", text="Y")
- col.prop(sculpt, "use_symmetry_z", text="Z")
+ col.prop(paint, "use_symmetry_x", text="X")
+ col.prop(paint, "use_symmetry_y", text="Y")
+ col.prop(paint, "use_symmetry_z", text="Z")
col = split.column()
- col.prop(sculpt, "radial_symmetry", text="Radial")
+ col.prop(paint, "radial_symmetry", text="Radial")
col = layout.column()
col.separator()
- col.prop(sculpt, "use_symmetry_feather", text="Feather")
+ col.prop(paint, "use_symmetry_feather", text="Feather")
class VIEW3D_PT_tools_brush_appearance(PaintPanel, bpy.types.Panel):
@@ -1037,7 +1081,7 @@ class VIEW3D_PT_tools_brush_appearance(PaintPanel, bpy.types.Panel):
@classmethod
def poll(cls, context):
- return (context.sculpt_object and context.tool_settings.sculpt) or (context.vertex_paint_object and context.tool_settings.vertex_paint) or (context.weight_paint_object and context.tool_settings.weight_paint) or (context.texture_paint_object and context.tool_settings.image_paint)
+ return cls.paint_settings(context) and ((context.sculpt_object and context.tool_settings.sculpt) or (context.vertex_paint_object and context.tool_settings.vertex_paint) or (context.weight_paint_object and context.tool_settings.weight_paint) or (context.texture_paint_object and context.tool_settings.image_paint))
def draw(self, context):
layout = self.layout
@@ -1122,10 +1166,14 @@ class VIEW3D_PT_tools_weightpaint_options(View3DPanel, bpy.types.Panel):
# ********** default tools for vertexpaint ****************
-class VIEW3D_PT_tools_vertexpaint(View3DPanel, bpy.types.Panel):
- bl_context = "vertexpaint"
+class VIEW3D_PT_tools_vertexpaint(PaintPanel, bpy.types.Panel):
bl_label = "Options"
+ @classmethod
+ def poll(cls, context):
+ settings = cls.paint_settings(context)
+ return settings and context.vertex_paint_object
+
def draw(self, context):
layout = self.layout
@@ -1138,6 +1186,8 @@ class VIEW3D_PT_tools_vertexpaint(View3DPanel, bpy.types.Panel):
col.prop(vpaint, "use_normal")
col.prop(vpaint, "use_spray")
+ col.prop(vpaint, "fast_navigate")
+
col.label(text="Unified Settings:")
col.prop(tool_settings, "sculpt_paint_use_unified_size", text="Size")
col.prop(tool_settings, "sculpt_paint_use_unified_strength", text="Strength")
@@ -1329,6 +1379,74 @@ class VIEW3D_PT_tools_particlemode(View3DPanel, bpy.types.Panel):
sub.prop(pe, "fade_frames", slider=True)
+class VIEW3D_PT_paint_overlay(PaintPanel, bpy.types.Panel):
+ bl_label = "Source Image"
+ bl_default_closed = True
+
+ @classmethod
+ def poll(cls, context):
+ settings = cls.paint_settings(context)
+ return settings and context.vertex_paint_object
+
+ def draw(self, context):
+ layout = self.layout
+
+ overlay = context.tool_settings.paint_overlay
+
+ layout.prop(overlay, "enabled")
+ layout.template_ID(overlay, "image", open="image.open")
+ layout.prop(overlay, "transparency_color")
+ layout.prop(overlay, "transparency_tolerance")
+
+class VIEW3D_PT_ptex_edit(View3DPanel, bpy.types.Panel):
+ bl_label = "Ptex"
+ bl_default_closed = False
+
+ @classmethod
+ def poll(cls, context):
+ ob = context.vertex_paint_object
+ return ob and ob.data.ptex_edit_mode
+
+ def draw(self, context):
+ layout = self.layout
+
+ mesh = context.active_object.data
+ active_ptex = mesh.active_ptex_index
+
+ if active_ptex != -1:
+ ts = context.tool_settings
+
+ layout.operator("ptex.face_resolution_set", text="Double Selected").operation = 'DOUBLE'
+ layout.operator("ptex.face_resolution_set", text="Half Selected").operation = 'HALF'
+
+ prop = layout.operator("ptex.face_resolution_set")
+ prop.operation = 'NUMERIC'
+ layout.prop(ts, "ptex_u_resolution", text="U")
+ layout.prop(ts, "ptex_v_resolution", text="V")
+
+ active_face = mesh.faces.active
+ active_subface = mesh.faces.active_subface
+
+ # display active [sub]face's resolution
+ if active_face >= 0 and active_subface >= 0:
+ box = layout.box()
+
+ box.label("Current Resolution:")
+
+ ptex_layer = mesh.ptex_layers[active_ptex]
+ ptex = ptex_layer.data[active_face]
+ subface = ptex.subfaces[active_subface]
+
+ ures = subface.resolution[0];
+ vres = subface.resolution[1];
+ if len(ptex.subfaces) == 4:
+ ures *= 2
+ vres *= 2
+
+ box.label(str(ures) + " x " + str(vres))
+
+
+
def register():
pass