diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 108 |
1 files changed, 26 insertions, 82 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index a0051688a8e..0047828a8e2 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -301,6 +301,12 @@ class VIEW3D_MT_transform_object(VIEW3D_MT_transform_base): layout.operator("object.randomize_transform") layout.operator("object.align") + # TODO: there is a strange context bug here. + """ + layout.operator_context = 'INVOKE_REGION_WIN' + layout.operator("object.transform_axis_target") + """ + # Armature EditMode extensions to Transform menu class VIEW3D_MT_transform_armature(VIEW3D_MT_transform_base): @@ -451,7 +457,6 @@ class VIEW3D_MT_view(Menu): layout.operator("view3d.view_selected", text="View Selected (Quad View)").use_all_regions = True layout.operator("view3d.view_all").center = False - layout.operator("view3d.localview", text="View Global/Local") layout.operator("view3d.view_persportho") layout.separator() @@ -664,12 +669,8 @@ class VIEW3D_MT_select_object(Menu): layout.operator("object.select_all").action = 'TOGGLE' layout.operator("object.select_all", text="Inverse").action = 'INVERT' - - layout.separator() - layout.operator("object.select_random", text="Random") layout.operator("object.select_mirror", text="Mirror") - layout.operator("object.select_by_layer", text="Select All by Layer") layout.operator_menu_enum("object.select_by_type", "type", text="Select All by Type...") layout.operator("object.select_camera", text="Select Camera") @@ -1278,6 +1279,17 @@ class INFO_MT_lamp_add(Menu): layout.operator_enum("object.lamp_add", "type") +class INFO_MT_lightprobe_add(Menu): + bl_idname = "INFO_MT_lightprobe_add" + bl_label = "Light Probe" + + def draw(self, context): + layout = self.layout + + layout.operator_context = 'INVOKE_REGION_WIN' + layout.operator_enum("object.lightprobe_add", "type") + + class INFO_MT_camera_add(Menu): bl_idname = "INFO_MT_camera_add" bl_label = "Camera" @@ -1326,6 +1338,8 @@ class INFO_MT_add(Menu): layout.menu("INFO_MT_lamp_add", icon='OUTLINER_OB_LAMP') layout.separator() + layout.menu("INFO_MT_lightprobe_add") + layout.separator() layout.operator_menu_enum("object.effector_add", "type", text="Force Field", icon='OUTLINER_OB_FORCE_FIELD') layout.separator() @@ -1404,15 +1418,6 @@ class VIEW3D_MT_object(Menu): layout.separator() - if is_local_view: - layout.operator_context = 'EXEC_REGION_WIN' - layout.operator("object.move_to_layer", text="Move out of Local View") - layout.operator_context = 'INVOKE_REGION_WIN' - else: - layout.operator("object.move_to_layer", text="Move to Layer...") - - layout.menu("VIEW3D_MT_object_showhide") - layout.operator_menu_enum("object.convert", "target") @@ -1521,8 +1526,9 @@ class VIEW3D_MT_object_specials(Menu): lamp = obj.data layout.operator_context = 'INVOKE_REGION_WIN' + use_shading_nodes = context.view_render.use_shading_nodes - if scene.render.use_shading_nodes: + if use_shading_nodes: try: value = lamp.node_tree.nodes["Emission"].inputs["Strength"].default_value except AttributeError: @@ -1580,7 +1586,7 @@ class VIEW3D_MT_object_specials(Menu): props.input_scale = -0.01 props.header_text = "Spot Blend: %.2f" - if not scene.render.use_shading_nodes: + if not use_shading_nodes: props = layout.operator("wm.context_modal_mouse", text="Clip Start") props.data_path_iter = "selected_editable_objects" props.data_path_item = "data.shadow_buffer_clip_start" @@ -1725,20 +1731,6 @@ class VIEW3D_MT_object_quick_effects(Menu): layout.operator("object.quick_fluid") -class VIEW3D_MT_object_showhide(Menu): - bl_label = "Show/Hide" - - def draw(self, context): - layout = self.layout - - layout.operator("object.hide_view_clear", text="Show Hidden") - - layout.separator() - - layout.operator("object.hide_view_set", text="Hide Selected").unselected = False - layout.operator("object.hide_view_set", text="Hide Unselected").unselected = True - - class VIEW3D_MT_make_single_user(Menu): bl_label = "Make Single User" @@ -3455,6 +3447,9 @@ class VIEW3D_PT_view3d_display(Panel): col.prop(view, "show_only_render") col.prop(view, "show_world") + if context.mode in {'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE'}: + col.prop(view, "show_mode_shade_override") + col = layout.column() display_all = not view.show_only_render col.active = display_all @@ -3538,56 +3533,6 @@ class VIEW3D_PT_view3d_stereo(Panel): 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 - - view = context.space_data - scene = context.scene - gs = scene.game_settings - obj = context.object - - col = layout.column() - - if not scene.render.use_shading_nodes: - col.prop(gs, "material_mode", text="") - - if view.viewport_shade == 'SOLID': - col.prop(view, "show_textured_solid") - col.prop(view, "use_matcap") - if view.use_matcap: - col.template_icon_view(view, "matcap_icon") - if view.viewport_shade == 'TEXTURED' or context.mode == 'PAINT_TEXTURE': - if scene.render.use_shading_nodes or gs.material_mode != 'GLSL': - col.prop(view, "show_textured_shadeless") - - col.prop(view, "show_backface_culling") - - if view.viewport_shade not in {'BOUNDBOX', 'WIREFRAME'}: - if obj and obj.mode == 'EDIT': - col.prop(view, "show_occlude_wire") - - 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 - subcol = col.column(align=True) - subcol.prop(ssao_settings, "factor") - subcol.prop(ssao_settings, "distance_max") - subcol.prop(ssao_settings, "attenuation") - subcol.prop(ssao_settings, "samples") - subcol.prop(ssao_settings, "color") - - class VIEW3D_PT_view3d_motion_tracking(Panel): bl_space_type = 'VIEW_3D' bl_region_type = 'UI' @@ -4030,6 +3975,7 @@ classes = ( INFO_MT_edit_armature_add, INFO_MT_armature_add, INFO_MT_lamp_add, + INFO_MT_lightprobe_add, INFO_MT_camera_add, INFO_MT_add, VIEW3D_MT_object, @@ -4042,7 +3988,6 @@ classes = ( VIEW3D_MT_object_group, VIEW3D_MT_object_constraints, VIEW3D_MT_object_quick_effects, - VIEW3D_MT_object_showhide, VIEW3D_MT_make_single_user, VIEW3D_MT_make_links, VIEW3D_MT_object_game, @@ -4112,7 +4057,6 @@ classes = ( VIEW3D_PT_view3d_name, VIEW3D_PT_view3d_display, VIEW3D_PT_view3d_stereo, - VIEW3D_PT_view3d_shading, VIEW3D_PT_view3d_motion_tracking, VIEW3D_PT_view3d_meshdisplay, VIEW3D_PT_view3d_meshstatvis, |