diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 125 |
1 files changed, 101 insertions, 24 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 128e24a6d68..1047d12fa5b 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -86,7 +86,7 @@ class VIEW3D_HT_header(Header): row = layout.row(align=True) row.prop(toolsettings, "use_snap", text="") row.prop(toolsettings, "snap_element", icon_only=True) - if snap_element != 'INCREMENT': + if snap_element not in {'INCREMENT', 'GRID'}: row.prop(toolsettings, "snap_target", text="") if obj: if mode in {'OBJECT', 'POSE'} and snap_element != 'VOLUME': @@ -158,7 +158,7 @@ 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'}: layout.menu("VIEW3D_MT_brush") @@ -208,8 +208,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 @@ -935,7 +937,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 +1045,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 +1088,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') @@ -1654,10 +1667,10 @@ class VIEW3D_MT_paint_weight(Menu): layout.operator("object.vertex_group_clean", text="Clean") 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' + layout.operator("object.vertex_group_smooth", text="Smooth") + 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") @@ -1933,6 +1946,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,10 +2279,10 @@ 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.operator("mesh.mark_sharp", text="Mark Sharp Edges").use_verts = True + props = layout.operator("mesh.mark_sharp", text="Clear Sharp Edges") + props.use_verts = True + props.clear = True layout.separator() @@ -2276,7 +2293,7 @@ class VIEW3D_MT_edit_mesh_vertices(Menu): layout.operator("mesh.blend_from_shape") - layout.operator("object.vertex_group_blend") + layout.operator("object.vertex_group_smooth") layout.operator("mesh.shape_propagate_to_all") layout.separator() @@ -2419,6 +2436,7 @@ class VIEW3D_MT_edit_mesh_clean(Menu): layout.operator("mesh.dissolve_degenerate") layout.operator("mesh.dissolve_limited") + layout.operator("mesh.face_make_planar") layout.operator("mesh.vert_connect_nonplanar") layout.operator("mesh.vert_connect_concave") layout.operator("mesh.fill_holes") @@ -2467,6 +2485,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 +2587,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" @@ -2774,6 +2789,20 @@ class VIEW3D_MT_edit_armature_roll(Menu): layout.operator("transform.transform", text="Set Roll").mode = 'BONE_ROLL' + +class VIEW3D_MT_edit_armature_delete(Menu): + bl_label = "Delete" + + def draw(self, context): + layout = self.layout + + layout.operator("armature.delete", text="Delete Bones") + + layout.separator() + + layout.operator("armature.dissolve", text="Dissolve") + + # ********** Panel ********** @@ -2936,16 +2965,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 @@ -2975,12 +3038,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 @@ -3173,6 +3236,7 @@ class VIEW3D_PT_background_image(Panel): layout = self.layout view = context.space_data + use_multiview = context.scene.render.use_multiview col = layout.column() col.operator("view3d.background_image_add", text="Add Image") @@ -3210,6 +3274,19 @@ class VIEW3D_PT_background_image(Panel): box.template_image(bg, "image", bg.image_user, compact=True) has_bg = True + if use_multiview and bg.view_axis in {'CAMERA','ALL'}: + box.prop(bg.image, "use_multiview") + + column = box.column() + column.active = bg.image.use_multiview + + column.label(text="Views Format:") + column.row().prop(bg.image, "views_format", expand=True) + + sub = column.box() + sub.active = bg.image.views_format == 'STEREO_3D' + sub.template_image_stereo_3d(bg.image.stereo_3d_format) + elif bg.source == 'MOVIE_CLIP': box.prop(bg, "use_camera_clip") |