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/startup/bl_ui/space_view3d.py')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py163
1 files changed, 133 insertions, 30 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index e2af544a317..d005b84f59d 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -50,6 +50,8 @@ class VIEW3D_HT_header(Header):
# Particle edit
if mode == 'PARTICLE_EDIT':
row.prop(toolsettings.particle_edit, "select_mode", text="", expand=True)
+ elif mode == 'HAIR_EDIT':
+ row.prop(toolsettings.hair_edit, "select_mode", text="", expand=True)
# Occlude geometry
if ((view.viewport_shade not in {'BOUNDBOX', 'WIREFRAME'} and (mode == 'PARTICLE_EDIT' or (mode == 'EDIT' and obj.type == 'MESH'))) or
@@ -142,7 +144,7 @@ class VIEW3D_MT_editor_menus(Menu):
layout.menu("VIEW3D_MT_select_paint_mask")
elif mesh.use_paint_mask_vertex and mode_string == 'PAINT_WEIGHT':
layout.menu("VIEW3D_MT_select_paint_mask_vertex")
- elif mode_string != 'SCULPT':
+ elif mode_string not in {'SCULPT'}:
layout.menu("VIEW3D_MT_select_%s" % mode_string.lower())
if mode_string == 'OBJECT':
@@ -161,9 +163,9 @@ class VIEW3D_MT_editor_menus(Menu):
if edit_object:
layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())
elif obj:
- if mode_string not in {'PAINT_TEXTURE'}:
+ if mode_string != 'PAINT_TEXTURE':
layout.menu("VIEW3D_MT_%s" % mode_string.lower())
- if mode_string in {'SCULPT', 'PAINT_VERTEX', 'PAINT_WEIGHT', 'PAINT_TEXTURE'}:
+ if mode_string in {'SCULPT', 'PAINT_VERTEX', 'PAINT_WEIGHT', 'PAINT_TEXTURE', 'HAIR'}:
layout.menu("VIEW3D_MT_brush")
if mode_string == 'SCULPT':
layout.menu("VIEW3D_MT_hide_mask")
@@ -211,8 +213,10 @@ class VIEW3D_MT_transform_base(Menu):
layout.operator("transform.shear", text="Shear")
layout.operator("transform.bend", text="Bend")
layout.operator("transform.push_pull", text="Push/Pull")
- layout.operator("object.vertex_warp", text="Warp")
- layout.operator("object.vertex_random", text="Randomize")
+
+ if context.mode != 'OBJECT':
+ layout.operator("transform.vertex_warp", text="Warp")
+ layout.operator("transform.vertex_random", text="Randomize")
# Generic transform menu - geometry types
@@ -449,6 +453,9 @@ class VIEW3D_MT_view_navigation(Menu):
layout = self.layout
layout.operator_enum("view3d.view_orbit", "type")
+ props = layout.operator("view3d.view_orbit", "Orbit Opposite")
+ props.type = 'ORBITRIGHT'
+ props.angle = pi
layout.separator()
@@ -915,6 +922,13 @@ class VIEW3D_MT_select_paint_mask_vertex(Menu):
layout.operator("paint.vert_select_ungrouped", text="Ungrouped Verts")
+class VIEW3D_MT_select_hair(Menu):
+ bl_label = "Select"
+
+ def draw(self, context):
+ layout = self.layout
+
+
class VIEW3D_MT_angle_control(Menu):
bl_label = "Angle Control"
@@ -935,7 +949,7 @@ class VIEW3D_MT_angle_control(Menu):
settings = UnifiedPaintPanel.paint_settings(context)
brush = settings.brush
- sculpt = (context.sculpt_object != None)
+ sculpt = (context.sculpt_object is not None)
tex_slot = brush.texture_slot
@@ -1043,6 +1057,17 @@ class INFO_MT_armature_add(Menu):
layout.operator("object.armature_add", text="Single Bone", icon='BONE_DATA')
+class INFO_MT_lamp_add(Menu):
+ bl_idname = "INFO_MT_lamp_add"
+ bl_label = "Lamp"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator_context = 'INVOKE_REGION_WIN'
+ layout.operator_enum("object.lamp_add", "type")
+
+
class INFO_MT_add(Menu):
bl_label = "Add"
@@ -1075,7 +1100,7 @@ class INFO_MT_add(Menu):
layout.separator()
layout.operator("object.camera_add", text="Camera", icon='OUTLINER_OB_CAMERA')
- layout.operator_menu_enum("object.lamp_add", "type", text="Lamp", icon='OUTLINER_OB_LAMP')
+ layout.menu("INFO_MT_lamp_add", icon='OUTLINER_OB_LAMP')
layout.separator()
layout.operator_menu_enum("object.effector_add", "type", text="Force Field", icon='OUTLINER_OB_EMPTY')
@@ -1130,6 +1155,7 @@ class VIEW3D_MT_object(Menu):
layout.menu("VIEW3D_MT_object_parent")
layout.menu("VIEW3D_MT_object_track")
layout.menu("VIEW3D_MT_object_group")
+ layout.menu("VIEW3D_MT_object_cachelib")
layout.menu("VIEW3D_MT_object_constraints")
layout.separator()
@@ -1396,6 +1422,29 @@ class VIEW3D_MT_object_group(Menu):
layout.operator("group.objects_remove_active")
+class VIEW3D_MT_object_cachelib(Menu):
+ bl_label = "Cache Library"
+
+ @classmethod
+ def poll(cls, context):
+ ob = context.active_object
+ if not (ob and ob.cache_library):
+ return False
+ return True
+
+ def draw(self, context):
+ layout = self.layout
+ scene = context.scene
+ ob = context.active_object
+ cachelib = ob.cache_library
+
+ layout.operator("cachelibrary.bake", text="Bake")
+ props = layout.operator("cachelibrary.archive_slice", text="Slice")
+ props.input_filepath = cachelib.input_filepath
+ props.start_frame = scene.frame_start
+ props.end_frame = scene.frame_end
+
+
class VIEW3D_MT_object_constraints(Menu):
bl_label = "Constraints"
@@ -1514,7 +1563,7 @@ class VIEW3D_MT_brush(Menu):
layout.separator()
# brush paint modes
- layout.menu("VIEW3D_MT_brush_paint_modes")
+ layout.menu("VIEW3D_MT_brush_object_modes")
# brush tool
if context.sculpt_object:
@@ -1524,6 +1573,8 @@ class VIEW3D_MT_brush(Menu):
layout.prop_menu_enum(brush, "image_tool")
elif context.vertex_paint_object or context.weight_paint_object:
layout.prop_menu_enum(brush, "vertex_tool")
+ elif context.hair_edit_object:
+ layout.prop_menu_enum(brush, "hair_tool")
# skip if no active brush
if not brush:
@@ -1551,7 +1602,7 @@ class VIEW3D_MT_brush(Menu):
layout.operator("sculpt.set_persistent_base")
-class VIEW3D_MT_brush_paint_modes(Menu):
+class VIEW3D_MT_brush_object_modes(Menu):
bl_label = "Enabled Modes"
def draw(self, context):
@@ -1564,6 +1615,7 @@ class VIEW3D_MT_brush_paint_modes(Menu):
layout.prop(brush, "use_paint_vertex", text="Vertex Paint")
layout.prop(brush, "use_paint_weight", text="Weight Paint")
layout.prop(brush, "use_paint_image", text="Texture Paint")
+ layout.prop(brush, "use_hair_edit", text="Hair Edit")
# ********** Vertex paint menu **********
@@ -1655,9 +1707,9 @@ class VIEW3D_MT_paint_weight(Menu):
layout.operator("object.vertex_group_quantize", text="Quantize")
layout.operator("object.vertex_group_levels", text="Levels")
layout.operator("object.vertex_group_blend", text="Blend")
- prop = layout.operator("object.data_transfer", text="Transfer Weights")
- prop.use_reverse_transfer = True
- prop.data_type = 'VGROUP_WEIGHTS'
+ props = layout.operator("object.data_transfer", text="Transfer Weights")
+ props.use_reverse_transfer = True
+ props.data_type = 'VGROUP_WEIGHTS'
layout.operator("object.vertex_group_limit_total", text="Limit Total")
layout.operator("object.vertex_group_fix", text="Fix Deforms")
@@ -1791,6 +1843,9 @@ class VIEW3D_MT_particle_specials(Menu):
layout.separator()
layout.operator("particle.mirror")
+ layout.separator()
+
+ layout.operator("particle.shape_propagate_to_all")
if particle_edit.select_mode == 'POINT':
layout.separator()
@@ -1816,6 +1871,14 @@ class VIEW3D_MT_particle_specials(Menu):
class VIEW3D_MT_particle_showhide(ShowHideMenu, Menu):
_operator_name = "particle"
+# ********** Hair menu **********
+
+class VIEW3D_MT_hair(Menu):
+ bl_label = "Hair"
+
+ def draw(self, context):
+ layout = self.layout
+
# ********** Pose Menu **********
@@ -1933,6 +1996,10 @@ class VIEW3D_MT_pose_propagate(Menu):
layout.separator()
+ layout.operator("pose.propagate", text="On Selected Keyframes").mode = 'SELECTED_KEYS'
+
+ layout.separator()
+
layout.operator("pose.propagate", text="On Selected Markers").mode = 'SELECTED_MARKERS'
@@ -2262,13 +2329,6 @@ class VIEW3D_MT_edit_mesh_vertices(Menu):
layout.separator()
- op = layout.operator("mesh.mark_sharp", text="Shade Smooth")
- op.use_verts = True
- op.clear = True
- layout.operator("mesh.mark_sharp", text="Shade Sharp").use_verts = True
-
- layout.separator()
-
layout.operator("mesh.bevel").vertex_only = True
layout.operator("mesh.convex_hull")
layout.operator("mesh.vertices_smooth")
@@ -2291,6 +2351,8 @@ class VIEW3D_MT_edit_mesh_edges(Menu):
def draw(self, context):
layout = self.layout
+ toolsettings = context.tool_settings
+
with_freestyle = bpy.app.build_options.freestyle
layout.operator_context = 'INVOKE_REGION_WIN'
@@ -2311,8 +2373,16 @@ class VIEW3D_MT_edit_mesh_edges(Menu):
layout.separator()
- layout.operator("mesh.mark_sharp")
- layout.operator("mesh.mark_sharp", text="Clear Sharp").clear = True
+ if not toolsettings.mesh_select_mode[0]:
+ # edge mode
+ layout.operator("mesh.mark_sharp")
+ layout.operator("mesh.mark_sharp", text="Clear Sharp").clear = True
+ else:
+ # vert mode
+ layout.operator("mesh.mark_sharp").use_verts = True
+ props = layout.operator("mesh.mark_sharp", text="Clear Sharp")
+ props.use_verts = True
+ props.clear = True
layout.separator()
@@ -2467,6 +2537,7 @@ def draw_curve(self, context):
layout.separator()
layout.operator("curve.extrude_move")
+ layout.operator("curve.spin")
layout.operator("curve.duplicate_move")
layout.operator("curve.split")
layout.operator("curve.separate")
@@ -2568,10 +2639,6 @@ class VIEW3D_MT_edit_font(Menu):
layout.operator("font.style_toggle", text="Toggle Underline").style = 'UNDERLINE'
layout.operator("font.style_toggle", text="Toggle Small Caps").style = 'SMALL_CAPS'
- layout.separator()
-
- layout.operator("font.insert_lorem")
-
class VIEW3D_MT_edit_text_chars(Menu):
bl_label = "Special Characters"
@@ -2710,6 +2777,7 @@ class VIEW3D_MT_edit_armature(Menu):
layout.separator()
layout.operator_context = 'EXEC_AREA'
+ layout.operator("armature.symmetrize")
layout.operator("armature.autoside_names", text="AutoName Left/Right").type = 'XAXIS'
layout.operator("armature.autoside_names", text="AutoName Front/Back").type = 'YAXIS'
layout.operator("armature.autoside_names", text="AutoName Top/Bottom").type = 'ZAXIS'
@@ -2748,6 +2816,7 @@ class VIEW3D_MT_armature_specials(Menu):
layout.operator("armature.autoside_names", text="AutoName Front/Back").type = 'YAXIS'
layout.operator("armature.autoside_names", text="AutoName Top/Bottom").type = 'ZAXIS'
layout.operator("armature.flip_names", text="Flip Names")
+ layout.operator("armature.symmetrize")
class VIEW3D_MT_edit_armature_parent(Menu):
@@ -2941,16 +3010,50 @@ class VIEW3D_PT_view3d_display(Panel):
row.prop(region, "use_box_clip")
-class VIEW3D_PT_view3d_shading(Panel):
+class VIEW3D_PT_view3d_stereo(Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
- bl_label = "Shading"
+ bl_label = "Stereoscopy"
bl_options = {'DEFAULT_CLOSED'}
@classmethod
def poll(cls, context):
+ scene = context.scene
+
+ multiview = scene.render.use_multiview
+ return context.space_data and multiview
+
+ def draw(self, context):
+ layout = self.layout
view = context.space_data
- return (view)
+
+ basic_stereo = context.scene.render.views_format == 'STEREO_3D'
+
+ col = layout.column()
+ col.row().prop(view, "stereo_3d_camera", expand=True)
+
+ col.label(text="Display:")
+ row = col.row()
+ row.active = basic_stereo
+ row.prop(view, "show_stereo_3d_cameras")
+ row = col.row()
+ row.active = basic_stereo
+ split = row.split()
+ split.prop(view, "show_stereo_3d_convergence_plane")
+ split = row.split()
+ split.prop(view, "stereo_3d_convergence_plane_alpha", text="Alpha")
+ split.active = view.show_stereo_3d_convergence_plane
+ row = col.row()
+ split = row.split()
+ split.prop(view, "show_stereo_3d_volume")
+ split = row.split()
+ split.prop(view, "stereo_3d_volume_alpha", text="Alpha")
+
+
+class VIEW3D_PT_view3d_shading(Panel):
+ bl_space_type = 'VIEW_3D'
+ bl_region_type = 'UI'
+ bl_label = "Shading"
def draw(self, context):
layout = self.layout
@@ -2983,12 +3086,12 @@ class VIEW3D_PT_view3d_shading(Panel):
if obj and obj.mode == 'EDIT':
col.prop(view, "show_occlude_wire")
- fx_settings = view.fx_settings
+ fx_settings = view.fx_settings
+ if view.viewport_shade not in {'BOUNDBOX', 'WIREFRAME'}:
sub = col.column()
sub.active = view.region_3d.view_perspective == 'CAMERA'
sub.prop(fx_settings, "use_dof")
-
col.prop(fx_settings, "use_ssao", text="Ambient Occlusion")
if fx_settings.use_ssao:
ssao_settings = fx_settings.ssao