diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2018-11-23 00:03:35 +0300 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2018-11-23 00:03:35 +0300 |
commit | 5df55e184ec2965af9387519e3051ab109a27437 (patch) | |
tree | fc5acd02e57f4d11cf518fe6b523c45631748a40 /release/scripts/startup/bl_ui | |
parent | 76a18d555ce6a2af319b40a8131845f9123f7d31 (diff) | |
parent | 3fb77591f4d7cd31cfc4410b18d9d5e9ad135394 (diff) |
Merge remote-tracking branch 'origin/blender2.8' into collada2.8
Diffstat (limited to 'release/scripts/startup/bl_ui')
16 files changed, 278 insertions, 485 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_empty.py b/release/scripts/startup/bl_ui/properties_data_empty.py index f3a176a52fc..d72089c8a9a 100644 --- a/release/scripts/startup/bl_ui/properties_data_empty.py +++ b/release/scripts/startup/bl_ui/properties_data_empty.py @@ -54,9 +54,11 @@ class DATA_PT_empty(DataButtonsPanel, Panel): col.prop(ob, "empty_image_offset", text="Offset X", index=0) col.prop(ob, "empty_image_offset", text="Y", index=1) - layout.prop(ob, "empty_image_depth", text="Depth", expand=True) - layout.prop(ob, "show_empty_image_orthographic", text="Display Orthographic") - layout.prop(ob, "show_empty_image_perspective", text="Display Perspective") + col = layout.column() + col.row().prop(ob, "empty_image_depth", text="Depth", expand=True) + col.prop(ob, "show_empty_image_orthographic", text="Display Orthographic") + col.prop(ob, "show_empty_image_perspective", text="Display Perspective") + col.prop(ob, "show_empty_image_backside", text="Display Backside") classes = ( diff --git a/release/scripts/startup/bl_ui/properties_data_lightprobe.py b/release/scripts/startup/bl_ui/properties_data_lightprobe.py index 2ca7e1723b6..20ac2d52ad9 100644 --- a/release/scripts/startup/bl_ui/properties_data_lightprobe.py +++ b/release/scripts/startup/bl_ui/properties_data_lightprobe.py @@ -77,6 +77,7 @@ class DATA_PT_lightprobe(DataButtonsPanel, Panel): elif probe.type == 'PLANAR': col = layout.column() col.prop(probe, "influence_distance", text="Distance") + col.prop(probe, "falloff") else: col = layout.column() col.prop(probe, "influence_type") @@ -91,7 +92,10 @@ class DATA_PT_lightprobe(DataButtonsPanel, Panel): col = layout.column() sub = col.column() - sub.prop(probe, "clip_start", text="Clipping Start") + if probe.type != 'PLANAR': + sub.prop(probe, "clip_start", text="Clipping Start") + else: + sub.prop(probe, "clip_start", text="Clipping Offset") if probe.type != 'PLANAR': sub.prop(probe, "clip_end", text="End") diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 172fe07eab3..82685e15913 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -569,24 +569,59 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): layout.operator("object.meshdeform_bind", text="Bind") def MIRROR(self, layout, ob, md): - split = layout.split(factor=0.25) + axis_text = "XYZ" + split = layout.split(factor=0.33) col = split.column() col.label(text="Axis:") - col.prop(md, "use_x") - col.prop(md, "use_y") - col.prop(md, "use_z") + for i, text in enumerate(axis_text): + col.prop(md, "use_axis", text=text, index=i) col = split.column() - col.label(text="Options:") - col.prop(md, "use_mirror_merge", text="Merge") - col.prop(md, "use_clip", text="Clipping") - col.prop(md, "use_mirror_vertex_groups", text="Vertex Groups") + col.label(text="Bisect:") + for i, text in enumerate(axis_text): + colsub = col.column() + colsub.prop(md, "use_bisect_axis", text=text, index=i) + colsub.active = md.use_axis[i] col = split.column() + col.label(text="Flip:") + for i, text in enumerate(axis_text): + colsub = col.column() + colsub.prop(md, "use_bisect_flip_axis", text=text, index=i) + colsub.active = md.use_axis[i] and md.use_bisect_axis[i] + + layout.separator() + + col = layout.column() + col.label(text="Mirror Object:") + col.prop(md, "mirror_object", text="") + + layout.separator() + + col = layout.column() + col.label(text="Options:") + + row = layout.row() + row.prop(md, "use_mirror_vertex_groups", text="Vertex Groups") + row.prop(md, "use_clip", text="Clipping") + row = layout.row() + row.prop(md, "use_mirror_merge", text="Merge") + + col = layout.column() + if md.use_mirror_merge is True: + col.prop(md, "merge_threshold") + + layout.separator() + col = layout.column() + + + flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) + col.label(text="Textures:") - col.prop(md, "use_mirror_u", text="Flip U") - col.prop(md, "use_mirror_v", text="Flip V") + row = layout.row() + row.prop(md, "use_mirror_u", text="Flip U") + row.prop(md, "use_mirror_v", text="Flip V") col = layout.column(align=True) @@ -600,12 +635,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.prop(md, "offset_u") col.prop(md, "offset_v") - col = layout.column() - - if md.use_mirror_merge is True: - col.prop(md, "merge_threshold") - col.label(text="Mirror Object:") - col.prop(md, "mirror_object", text="") def MULTIRES(self, layout, ob, md): layout.row().prop(md, "subdivision_type", expand=True) diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index ff92b3731c3..296e05a709d 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -140,7 +140,7 @@ class AnnotationDrawingToolsPanel: layout.separator() col = layout.column(align=True) - col.prop(gpd, "use_stroke_edit_mode", text="Enable Editing", icon='EDIT', toggle=True) + col.prop(gpd, "use_stroke_edit_mode", text="Enable Editing", toggle=True) # was: icon='EDIT' class GreasePencilStrokeEditPanel: @@ -573,7 +573,7 @@ class GPENCIL_MT_pie_sculpt(Menu): col = pie.column() # col.label(text="Tool:") col.prop(settings, "sculpt_tool", text="") - col.operator("gpencil.brush_paint", text="Sculpt", icon='SCULPTMODE_HLT') + col.operator("gpencil.sculpt_paint", text="Sculpt", icon='SCULPTMODE_HLT') # E - Common Settings col = pie.column(align=True) diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index 18be337c204..026b306b49e 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -262,7 +262,7 @@ class RENDER_PT_eevee_volumetric(RenderButtonsPanel, Panel): col = layout.column() col.prop(props, "volumetric_tile_size") col.prop(props, "volumetric_samples") - col.prop(props, "volumetric_sample_distribution") + col.prop(props, "volumetric_sample_distribution", text="Distribution") class RENDER_PT_eevee_volumetric_lighting(RenderButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 50cf4bf9c0d..5870d344a7d 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -689,6 +689,7 @@ class CLIP_PT_tools_object(CLIP_PT_reconstruction_panel, Panel): class CLIP_PT_objects(CLIP_PT_clip_view_panel, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' + bl_category = "Track" bl_label = "Objects" bl_options = {'DEFAULT_CLOSED'} @@ -711,6 +712,7 @@ class CLIP_PT_objects(CLIP_PT_clip_view_panel, Panel): class CLIP_PT_track(CLIP_PT_tracking_panel, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' + bl_category = "Track" bl_label = "Track" def draw(self, context): @@ -775,6 +777,7 @@ class CLIP_PT_track(CLIP_PT_tracking_panel, Panel): class CLIP_PT_plane_track(CLIP_PT_tracking_panel, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' + bl_category = "Track" bl_label = "Plane Track" bl_options = {'DEFAULT_CLOSED'} @@ -802,6 +805,7 @@ class CLIP_PT_plane_track(CLIP_PT_tracking_panel, Panel): class CLIP_PT_track_settings(CLIP_PT_tracking_panel, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' + bl_category = "Track" bl_label = "Tracking Settings" bl_options = {'DEFAULT_CLOSED'} @@ -826,6 +830,7 @@ class CLIP_PT_track_settings(CLIP_PT_tracking_panel, Panel): class CLIP_PT_track_settings_extras(CLIP_PT_tracking_panel, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' + bl_category = "Track" bl_label = "Tracking Settings Extras" bl_parent_id = 'CLIP_PT_track_settings' bl_options = {'DEFAULT_CLOSED'} @@ -852,6 +857,7 @@ class CLIP_PT_track_settings_extras(CLIP_PT_tracking_panel, Panel): class CLIP_PT_tracking_camera(Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' + bl_category = "Track" bl_label = "Camera" bl_options = {'DEFAULT_CLOSED'} @@ -887,6 +893,7 @@ class CLIP_PT_tracking_camera(Panel): class CLIP_PT_tracking_lens(Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' + bl_category = "Track" bl_label = "Lens" bl_options = {'DEFAULT_CLOSED'} @@ -932,6 +939,7 @@ class CLIP_PT_tracking_lens(Panel): class CLIP_PT_marker(CLIP_PT_tracking_panel, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' + bl_category = "Track" bl_label = "Marker" bl_options = {'DEFAULT_CLOSED'} @@ -1054,6 +1062,7 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel): class CLIP_PT_proxy(CLIP_PT_clip_view_panel, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' + bl_category = "Footage" bl_label = "Proxy/Timecode" bl_options = {'DEFAULT_CLOSED'} @@ -1127,31 +1136,37 @@ from .properties_mask_common import ( class CLIP_PT_mask_layers(MASK_PT_layers, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' + bl_category = "Mask" class CLIP_PT_mask_display(MASK_PT_display, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'HEADER' + bl_category = "Mask" class CLIP_PT_active_mask_spline(MASK_PT_spline, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' + bl_category = "Mask" class CLIP_PT_active_mask_point(MASK_PT_point, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' + bl_category = "Mask" class CLIP_PT_mask(MASK_PT_mask, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' + bl_category = "Mask" class CLIP_PT_tools_mask_transforms(MASK_PT_transforms, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'TOOLS' + bl_category = "Mask" # --- end mask --- @@ -1160,6 +1175,7 @@ class CLIP_PT_tools_mask_transforms(MASK_PT_transforms, Panel): class CLIP_PT_footage(CLIP_PT_clip_view_panel, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' + bl_category = "Footage" bl_label = "Footage Settings" bl_options = {'DEFAULT_CLOSED'} @@ -1203,6 +1219,7 @@ class CLIP_PT_tools_scenesetup(Panel): class CLIP_PT_grease_pencil(AnnotationDataPanel, CLIP_PT_clip_view_panel, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' + bl_category = "Track" bl_options = {'DEFAULT_CLOSED'} # NOTE: this is just a wrapper around the generic GP Panel diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index b3daba47a13..836e15ef07b 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -653,26 +653,31 @@ from .properties_mask_common import ( class IMAGE_PT_mask(MASK_PT_mask, Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'UI' + bl_category = "Image" class IMAGE_PT_mask_layers(MASK_PT_layers, Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'UI' + bl_category = "Image" class IMAGE_PT_mask_display(MASK_PT_display, Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'UI' + bl_category = "Image" class IMAGE_PT_active_mask_spline(MASK_PT_spline, Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'UI' + bl_category = "Image" class IMAGE_PT_active_mask_point(MASK_PT_point, Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'UI' + bl_category = "Image" # --- end mask --- @@ -681,6 +686,7 @@ class IMAGE_PT_active_mask_point(MASK_PT_point, Panel): class IMAGE_PT_image_properties(Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'UI' + bl_category = "Image" bl_label = "Image" @classmethod @@ -802,6 +808,7 @@ class IMAGE_UL_render_slots(UIList): class IMAGE_PT_render_slots(Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'UI' + bl_category = "Image" bl_label = "Render Slots" @classmethod @@ -1187,6 +1194,7 @@ class ImageScopesPanel: class IMAGE_PT_view_scopes(ImageScopesPanel, Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'UI' + bl_category = "Image" bl_label = "Scopes" def draw(self, layout): @@ -1196,6 +1204,7 @@ class IMAGE_PT_view_scopes(ImageScopesPanel, Panel): class IMAGE_PT_view_histogram(ImageScopesPanel, Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'UI' + bl_category = "Image" bl_label = "Histogram" bl_parent_id = 'IMAGE_PT_view_scopes' @@ -1215,6 +1224,7 @@ class IMAGE_PT_view_histogram(ImageScopesPanel, Panel): class IMAGE_PT_view_waveform(ImageScopesPanel, Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'UI' + bl_category = "Image" bl_label = "Waveform" bl_parent_id = 'IMAGE_PT_view_scopes' bl_options = {'DEFAULT_CLOSED'} @@ -1233,6 +1243,7 @@ class IMAGE_PT_view_waveform(ImageScopesPanel, Panel): class IMAGE_PT_view_vectorscope(ImageScopesPanel, Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'UI' + bl_category = "Image" bl_label = "Vectorscope" bl_parent_id = 'IMAGE_PT_view_scopes' bl_options = {'DEFAULT_CLOSED'} @@ -1248,6 +1259,7 @@ class IMAGE_PT_view_vectorscope(ImageScopesPanel, Panel): class IMAGE_PT_sample_line(ImageScopesPanel, Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'UI' + bl_category = "Image" bl_label = "Sample Line" bl_parent_id = 'IMAGE_PT_view_scopes' bl_options = {'DEFAULT_CLOSED'} @@ -1269,6 +1281,7 @@ class IMAGE_PT_sample_line(ImageScopesPanel, Panel): class IMAGE_PT_scope_sample(ImageScopesPanel, Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'UI' + bl_category = "Image" bl_label = "Samples" bl_parent_id = 'IMAGE_PT_view_scopes' bl_options = {'DEFAULT_CLOSED'} @@ -1292,6 +1305,7 @@ class IMAGE_PT_scope_sample(ImageScopesPanel, Panel): class IMAGE_PT_grease_pencil(AnnotationDataPanel, Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'UI' + bl_category = "Image" # NOTE: this is just a wrapper around the generic GP Panel. diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py index 829ccd706b9..49c55410f53 100644 --- a/release/scripts/startup/bl_ui/space_info.py +++ b/release/scripts/startup/bl_ui/space_info.py @@ -43,8 +43,15 @@ class INFO_MT_area(Menu): layout.operator("screen.region_quadview") layout.separator() + layout.operator("screen.area_split", text="Horizontal Split").direction = 'HORIZONTAL' + layout.operator("screen.area_split", text="Vertical Split").direction = 'VERTICAL' + + layout.separator() + layout.operator("screen.area_dupli", icon='DUPLICATE') + layout.separator() + layout.operator("screen.screen_full_area") layout.operator("screen.screen_full_area", text="Toggle Fullscreen Area", icon='FULLSCREEN_ENTER').use_hide_panels = True diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 26b52617616..a15bb24d100 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -180,9 +180,11 @@ class NODE_MT_add(bpy.types.Menu): layout = self.layout layout.operator_context = 'INVOKE_DEFAULT' - props = layout.operator("node.add_search", text="Search ...") + props = layout.operator("node.add_search", text="Search...", icon="VIEWZOOM") props.use_transform = True + layout.separator() + # actual node submenus are defined by draw functions from node categories nodeitems_utils.draw_node_categories_menu(self, context) @@ -358,6 +360,7 @@ class NODE_MT_specials(Menu): class NODE_PT_active_node_generic(Panel): bl_space_type = 'NODE_EDITOR' bl_region_type = 'UI' + bl_category = "Node" bl_label = "Node" @classmethod @@ -375,6 +378,7 @@ class NODE_PT_active_node_generic(Panel): class NODE_PT_active_node_color(Panel): bl_space_type = 'NODE_EDITOR' bl_region_type = 'UI' + bl_category = "Node" bl_label = "Color" bl_options = {'DEFAULT_CLOSED'} bl_parent_id = 'NODE_PT_active_node_generic' @@ -404,6 +408,7 @@ class NODE_PT_active_node_color(Panel): class NODE_PT_active_node_properties(Panel): bl_space_type = 'NODE_EDITOR' bl_region_type = 'UI' + bl_category = "Node" bl_label = "Properties" bl_options = {'DEFAULT_CLOSED'} bl_parent_id = 'NODE_PT_active_node_generic' @@ -437,6 +442,7 @@ class NODE_PT_active_node_properties(Panel): class NODE_PT_backdrop(Panel): bl_space_type = 'NODE_EDITOR' bl_region_type = 'UI' + bl_category = "Node" bl_label = "Backdrop" @classmethod @@ -471,6 +477,7 @@ class NODE_PT_backdrop(Panel): class NODE_PT_quality(bpy.types.Panel): bl_space_type = 'NODE_EDITOR' bl_region_type = 'UI' + bl_category = "Node" bl_label = "Performance" @classmethod @@ -524,6 +531,7 @@ class NODE_UL_interface_sockets(bpy.types.UIList): class NODE_PT_grease_pencil(AnnotationDataPanel, Panel): bl_space_type = 'NODE_EDITOR' bl_region_type = 'UI' + bl_category = "Node" bl_options = {'DEFAULT_CLOSED'} # NOTE: this is just a wrapper around the generic GP Panel @@ -537,6 +545,7 @@ class NODE_PT_grease_pencil(AnnotationDataPanel, Panel): class NODE_PT_grease_pencil_tools(GreasePencilToolsPanel, Panel): bl_space_type = 'NODE_EDITOR' bl_region_type = 'UI' + bl_category = "Node" bl_options = {'DEFAULT_CLOSED'} # NOTE: this is just a wrapper around the generic GP tools panel diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 402913ab642..46b0e26cda2 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -476,14 +476,14 @@ class SEQUENCER_MT_strip_lock_mute(Menu): def draw(self, context): layout = self.layout - layout.operator("sequencer.lock", icon='LOCK') + layout.operator("sequencer.lock", icon='LOCKED') layout.operator("sequencer.unlock") layout.separator() layout.operator("sequencer.mute").unselected = False layout.operator("sequencer.unmute").unselected = False - layout.operator("sequencer.mute", text="Mute Deselected Strips").unselected = True + layout.operator("sequencer.mute", text="Mute Unselected Strips").unselected = True class SEQUENCER_MT_strip(Menu): @@ -1185,6 +1185,7 @@ class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel): bl_label = "Scene Preview/Render" bl_space_type = 'SEQUENCE_EDITOR' bl_region_type = 'UI' + bl_category = "Strip" def draw(self, context): layout = self.layout @@ -1203,6 +1204,7 @@ class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel): class SEQUENCER_PT_view(SequencerButtonsPanel_Output, Panel): bl_label = "View Settings" + bl_category = "Strip" def draw(self, context): layout = self.layout @@ -1224,6 +1226,7 @@ class SEQUENCER_PT_view(SequencerButtonsPanel_Output, Panel): class SEQUENCER_PT_view_safe_areas(SequencerButtonsPanel_Output, Panel): bl_label = "Safe Areas" + bl_category = "Strip" bl_options = {'DEFAULT_CLOSED'} @classmethod @@ -1326,6 +1329,7 @@ class SEQUENCER_PT_modifiers(SequencerButtonsPanel, Panel): class SEQUENCER_PT_grease_pencil(AnnotationDataPanel, SequencerButtonsPanel_Output, Panel): bl_space_type = 'SEQUENCE_EDITOR' bl_region_type = 'UI' + bl_category = "Strip" # NOTE: this is just a wrapper around the generic GP Panel # But, it should only show up when there are images in the preview region @@ -1334,6 +1338,7 @@ class SEQUENCER_PT_grease_pencil(AnnotationDataPanel, SequencerButtonsPanel_Outp class SEQUENCER_PT_grease_pencil_tools(GreasePencilToolsPanel, SequencerButtonsPanel_Output, Panel): bl_space_type = 'SEQUENCE_EDITOR' bl_region_type = 'UI' + bl_category = "Strip" # NOTE: this is just a wrapper around the generic GP tools panel # It contains access to some essential tools usually found only in diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py index 9ef165a36a6..12ba1c31cd5 100644 --- a/release/scripts/startup/bl_ui/space_text.py +++ b/release/scripts/startup/bl_ui/space_text.py @@ -111,6 +111,7 @@ class TEXT_MT_editor_menus(Menu): class TEXT_PT_properties(Panel): bl_space_type = 'TEXT_EDITOR' bl_region_type = 'UI' + bl_category = "Text" bl_label = "Properties" def draw(self, context): @@ -142,6 +143,7 @@ class TEXT_PT_properties(Panel): class TEXT_PT_find(Panel): bl_space_type = 'TEXT_EDITOR' bl_region_type = 'UI' + bl_category = "Text" bl_label = "Find" def draw(self, context): diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py index e06224b8924..2ff5c9692ec 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_common.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py @@ -29,7 +29,6 @@ __all__ = ( "activate_by_name_or_cycle", "description_from_name", "keymap_from_name", - "keymap_from_context", ) # Support reloading icons. @@ -49,8 +48,8 @@ def _keymap_fn_from_seq(keymap_data): def keymap_fn(km): if keymap_fn.keymap_data: - from bpy_extras.keyconfig_utils import keymap_items_from_data - keymap_items_from_data(km, keymap_fn.keymap_data) + from bl_keymap_utils.io import keymap_init_from_data + keymap_init_from_data(km, keymap_fn.keymap_data) keymap_fn.keymap_data = keymap_data return keymap_fn @@ -307,7 +306,7 @@ class ToolSelectPanelHelper: if km is None: km = kc.keymaps.new(km_idname, space_type=cls.bl_space_type, region_type='WINDOW', tool=True) keymap_fn[0](km) - keymap_fn[0] = km + keymap_fn[0] = km.name # Special internal function, gives use items that contain keymaps. @staticmethod @@ -355,9 +354,9 @@ class ToolSelectPanelHelper: for context_mode_test, tools in cls.tools_all(): if context_mode_test == context_mode: for item in cls._tools_flatten_with_keymap(tools): - km = item.keymap[0] + km_name = item.keymap[0] # print((km.name, cls.bl_space_type, 'WINDOW', [])) - yield (km.name, cls.bl_space_type, 'WINDOW', []) + yield (km_name, cls.bl_space_type, 'WINDOW', []) # ------------------------------------------------------------------------- # Layout Generators @@ -605,7 +604,7 @@ def _activate_by_item(context, space_type, item, index): tool = ToolSelectPanelHelper._tool_active_from_context(context, space_type, create=True) tool.setup( name=item.text, - keymap=item.keymap[0].name if item.keymap is not None else "", + keymap=item.keymap[0] if item.keymap is not None else "", cursor=item.cursor or 'DEFAULT', gizmo_group=item.widget or "", data_block=item.data_block or "", @@ -688,7 +687,14 @@ def description_from_name(context, space_type, text, *, use_operator=True): if operator is None: if item.keymap is not None: - operator = item.keymap[0].keymap_items[0].idname + wm = context.window_manager + keyconf = wm.keyconfigs.active + km = keyconf.keymaps.get(item.keymap[0]) + if km is not None: + for kmi in km.keymap_items: + if kmi.active: + operator = kmi.idname + break if operator is not None: import _bpy @@ -709,325 +715,6 @@ def keymap_from_name(context, space_type, text): return "" -def keymap_from_context(context, space_type): - """ - Keymap for popup toolbar, currently generated each time. - """ - - def modifier_keywords_from_item(kmi): - kw = {} - for (attr, default) in ( - ("any", False), - ("shift", False), - ("ctrl", False), - ("alt", False), - ("oskey", False), - ("key_modifier", 'NONE'), - ): - val = getattr(kmi, attr) - if val != default: - kw[attr] = val - return kw - - def dict_as_tuple(d): - return tuple((k, v) for (k, v) in sorted(d.items())) - - use_simple_keymap = False - - # Press the toolbar popup key again to set the default tool, - # this is useful because the cursor tool is useful as a way - # to 'drop' currently active tools (it's basically a 'none' tool). - # so this allows us to quickly go back to a state that allows - # a shortcut based workflow (before the tool system was added). - use_tap_reset = True - # TODO: support other tools for modes which don't use the cursor. - tap_reset_tool = "Cursor" - # Check the tool is available in the current context. - if ToolSelectPanelHelper._tool_get_by_name(context, space_type, tap_reset_tool)[1] is None: - use_tap_reset = False - - from bl_operators.wm import use_toolbar_release_hack - - # Pie-menu style release to activate. - use_release_confirm = True - - # Generate items when no keys are mapped. - use_auto_keymap = True - - # Temporary, only create so we can pass 'properties' to find_item_from_operator. - use_hack_properties = True - - km_name = "Toolbar Popup" - wm = context.window_manager - keyconf = wm.keyconfigs.active - keymap = keyconf.keymaps.get(km_name) - if keymap is None: - keymap = keyconf.keymaps.new(km_name, space_type='EMPTY', region_type='TEMPORARY', tool=True) - for kmi in keymap.keymap_items: - keymap.keymap_items.remove(kmi) - - kmi_unique_args = set() - - cls = ToolSelectPanelHelper._tool_class_from_space_type(space_type) - - items_all = [ - # 0: tool - # 1: keymap item (direct access) - # 2: keymap item (newly calculated for toolbar) - [item, None, None] - for item in ToolSelectPanelHelper._tools_flatten(cls.tools_from_context(context)) - if item is not None - ] - - if use_hack_properties: - kmi_hack = keymap.keymap_items.new("wm.tool_set_by_name", 'A', 'PRESS') - kmi_hack_properties = kmi_hack.properties - - kmi_hack_brush_select = keymap.keymap_items.new("paint.brush_select", 'A', 'PRESS') - kmi_hack_brush_select_properties = kmi_hack_brush_select.properties - - if use_release_confirm or use_tap_reset: - kmi_toolbar = wm.keyconfigs.find_item_from_operator(idname="wm.toolbar")[1] - kmi_toolbar_type = None if not kmi_toolbar else kmi_toolbar.type - if use_tap_reset and kmi_toolbar_type is not None: - kmi_toolbar_args = { - "type": kmi_toolbar_type, - **modifier_keywords_from_item(kmi_toolbar), - } - else: - use_tap_reset = False - del kmi_toolbar - - if use_tap_reset: - kmi_found = None - if use_hack_properties: - # First check for direct assignment, if this tool already has a key, no need to add a new one. - kmi_hack_properties.name = tap_reset_tool - kmi_found = wm.keyconfigs.find_item_from_operator( - idname="wm.tool_set_by_name", - context='INVOKE_REGION_WIN', - # properties={"name": item.text}, - properties=kmi_hack_properties, - )[1] - if kmi_found: - use_tap_reset = False - del kmi_found - - if use_tap_reset: - kmi_toolbar_tuple = dict_as_tuple(kmi_toolbar_args) - if kmi_toolbar_tuple not in kmi_unique_args: - kmi = keymap.keymap_items.new( - "wm.tool_set_by_name", - value='PRESS' if use_toolbar_release_hack else 'DOUBLE_CLICK', - **kmi_toolbar_args, - ) - kmi.properties.name = tap_reset_tool - kmi_unique_args.add(kmi_toolbar_tuple) - del kmi_toolbar_tuple - - if use_simple_keymap: - # Simply assign a key from A-Z. - for i, (item, _, _) in enumerate(items_all): - key = chr(ord('A') + i) - kmi = keymap.keymap_items.new("wm.tool_set_by_name", key, 'PRESS') - kmi.properties.name = item.text - else: - for item_container in items_all: - item = item_container[0] - # Only check the first item in the tools key-map (a little arbitrary). - - if use_hack_properties: - # First check for direct assignment. - kmi_hack_properties.name = item.text - kmi_found = wm.keyconfigs.find_item_from_operator( - idname="wm.tool_set_by_name", - context='INVOKE_REGION_WIN', - # properties={"name": item.text}, - properties=kmi_hack_properties, - )[1] - - if kmi_found is None: - if item.data_block: - # PAINT_OT_brush_select - mode = context.active_object.mode - # See: BKE_paint_get_tool_prop_id_from_paintmode - attr = { - 'SCULPT': "sculpt_tool", - 'VERTEX_PAINT': "vertex_tool", - 'WEIGHT_PAINT': "weight_tool", - 'TEXTURE_PAINT': "image_tool", - 'GPENCIL_PAINT': "gpencil_tool", - }.get(mode, None) - if attr is not None: - setattr(kmi_hack_brush_select_properties, attr, item.data_block) - kmi_found = wm.keyconfigs.find_item_from_operator( - idname="paint.brush_select", - context='INVOKE_REGION_WIN', - properties=kmi_hack_brush_select_properties, - )[1] - else: - print("Unsupported mode:", mode) - del mode, attr - - else: - kmi_found = None - - if kmi_found is not None: - pass - elif item.operator is not None: - kmi_found = wm.keyconfigs.find_item_from_operator( - idname=item.operator, - context='INVOKE_REGION_WIN', - )[1] - elif item.keymap is not None: - kmi_first = item.keymap[0].keymap_items[0] - kmi_found = wm.keyconfigs.find_item_from_operator( - idname=kmi_first.idname, - # properties=kmi_first.properties, # prevents matches, don't use. - context='INVOKE_REGION_WIN', - )[1] - del kmi_first - else: - kmi_found = None - item_container[1] = kmi_found - - # More complex multi-pass test. - for item_container in items_all: - item, kmi_found = item_container[:2] - if kmi_found is None: - continue - kmi_found_type = kmi_found.type - - # Only for single keys. - if ( - (len(kmi_found_type) == 1) or - # When a tool is being activated instead of running an operator, just copy the shortcut. - (kmi_found.idname in {"wm.tool_set_by_name", "WM_OT_tool_set_by_name"}) - ): - kmi_args = {"type": kmi_found_type, **modifier_keywords_from_item(kmi_found)} - kmi = keymap.keymap_items.new(idname="wm.tool_set_by_name", value='PRESS', **kmi_args) - kmi.properties.name = item.text - item_container[2] = kmi - if use_auto_keymap: - kmi_unique_args.add(dict_as_tuple(kmi_args)) - - # Test for key_modifier, where alpha key is used as a 'key_modifier' - # (grease pencil holding 'D' for example). - for item_container in items_all: - item, kmi_found, kmi_exist = item_container - if kmi_found is None or kmi_exist: - continue - - kmi_found_type = kmi_found.type - if kmi_found_type in { - 'LEFTMOUSE', - 'RIGHTMOUSE', - 'MIDDLEMOUSE', - 'BUTTON4MOUSE', - 'BUTTON5MOUSE', - 'BUTTON6MOUSE', - 'BUTTON7MOUSE', - 'ACTIONMOUSE', - 'SELECTMOUSE', - }: - kmi_found_type = kmi_found.key_modifier - # excludes 'NONE' - if len(kmi_found_type) == 1: - kmi_args = {"type": kmi_found_type, **modifier_keywords_from_item(kmi_found)} - del kmi_args["key_modifier"] - kmi_tuple = dict_as_tuple(kmi_args) - if kmi_tuple in kmi_unique_args: - continue - kmi = keymap.keymap_items.new(idname="wm.tool_set_by_name", value='PRESS', **kmi_args) - kmi.properties.name = item.text - item_container[2] = kmi - if use_auto_keymap: - kmi_unique_args.add(kmi_tuple) - - if use_auto_keymap: - # Map all unmapped keys to numbers, - # while this is a bit strange it means users will not confuse regular key bindings to ordered bindings. - - # Free events (last used first). - kmi_type_auto = ('ONE', 'TWO', 'THREE', 'FOUR', 'FIVE', 'SIX', 'SEVEN', 'EIGHT', 'NINE', 'ZERO') - # Map both numbers and num-pad. - kmi_type_dupe = { - 'ONE': 'NUMPAD_1', - 'TWO': 'NUMPAD_2', - 'THREE': 'NUMPAD_3', - 'FOUR': 'NUMPAD_4', - 'FIVE': 'NUMPAD_5', - 'SIX': 'NUMPAD_6', - 'SEVEN': 'NUMPAD_7', - 'EIGHT': 'NUMPAD_8', - 'NINE': 'NUMPAD_9', - 'ZERO': 'NUMPAD_0', - } - - def iter_free_events(): - for mod in ({}, {"shift": True}, {"ctrl": True}, {"alt": True}): - for e in kmi_type_auto: - yield (e, mod) - - iter_events = iter(iter_free_events()) - - for item_container in items_all: - item, kmi_found, kmi_exist = item_container - if kmi_exist: - continue - kmi_args = None - while True: - key, mod = next(iter_events, (None, None)) - if key is None: - break - kmi_args = {"type": key, **mod} - kmi_tuple = dict_as_tuple(kmi_args) - if kmi_tuple in kmi_unique_args: - kmi_args = None - else: - break - - if kmi_args is not None: - kmi = keymap.keymap_items.new(idname="wm.tool_set_by_name", value='PRESS', **kmi_args) - kmi.properties.name = item.text - item_container[2] = kmi - if use_auto_keymap: - kmi_unique_args.add(kmi_tuple) - - key = kmi_type_dupe.get(kmi_args["type"]) - if key is not None: - kmi_args["type"] = key - kmi_tuple = dict_as_tuple(kmi_args) - if not kmi_tuple in kmi_unique_args: - kmi = keymap.keymap_items.new(idname="wm.tool_set_by_name", value='PRESS', **kmi_args) - kmi.properties.name = item.text - if use_auto_keymap: - kmi_unique_args.add(kmi_tuple) - - if use_hack_properties: - keymap.keymap_items.remove(kmi_hack) - - if use_release_confirm: - kmi = keymap.keymap_items.new( - "ui.button_execute", - type=kmi_toolbar_type, - value='RELEASE', - ) - kmi.properties.skip_depressed = True - - if use_toolbar_release_hack: - # ... or pass through to let the toolbar know we're released. - # Let the operator know we're released. - kmi = keymap.keymap_items.new( - "wm.tool_set_by_name", - type=kmi_toolbar_type, - value='RELEASE', - ) - - wm.keyconfigs.update() - return keymap - - classes = ( WM_MT_toolsystem_submenu, ) diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index e681b794f66..fab001cdb5c 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -63,6 +63,15 @@ def generate_from_enum_ex( return tuple(tool_defs) +# Use for shared widget data. +class _template_widget: + class VIEW3D_GGT_xform_extrude: + @staticmethod + def draw_settings(context, layout, tool): + props = tool.gizmo_group_properties("VIEW3D_GGT_xform_extrude") + layout.prop(props, "axis_type", expand=True) + + class _defs_view3d_generic: @ToolDef.from_fn def cursor(): @@ -76,6 +85,7 @@ class _defs_view3d_generic: "Set the cursor location, drag to transform" ), icon="ops.generic.cursor", + keymap=(), draw_settings=draw_settings, ) @@ -354,8 +364,9 @@ class _defs_edit_armature: return dict( text="Extrude", icon="ops.armature.extrude_move", - widget=None, + widget="VIEW3D_GGT_xform_extrude", keymap=(), + draw_settings=_template_widget.VIEW3D_GGT_xform_extrude.draw_settings, ) @ToolDef.from_fn @@ -508,9 +519,6 @@ class _defs_edit_mesh: @ToolDef.from_fn def extrude(): - def draw_settings(context, layout, tool): - props = tool.gizmo_group_properties("MESH_GGT_extrude") - layout.prop(props, "axis_type", expand=True) return dict( text="Extrude Region", # The operator description isn't useful in this case, give our own. @@ -518,11 +526,11 @@ class _defs_edit_mesh: "Extrude freely or along an axis" ), icon="ops.mesh.extrude_region_move", - widget="MESH_GGT_extrude", + widget="VIEW3D_GGT_xform_extrude", # Important to use same operator as 'E' key. operator="view3d.edit_mesh_extrude_move_normal", keymap=(), - draw_settings=draw_settings, + draw_settings=_template_widget.VIEW3D_GGT_xform_extrude.draw_settings, ) @ToolDef.from_fn @@ -732,8 +740,9 @@ class _defs_edit_curve: return dict( text="Extrude", icon="ops.curve.extrude_move", - widget=None, + widget="VIEW3D_GGT_xform_extrude", keymap=(), + draw_settings=_template_widget.VIEW3D_GGT_xform_extrude.draw_settings, ) @ToolDef.from_fn @@ -993,7 +1002,7 @@ class _defs_image_uv_sculpt: return generate_from_enum_ex( context, icon_prefix="brush.uv_sculpt.", - data=context.tool_settings, + type=bpy.types.ToolSettings, attr="uv_sculpt_tool", ) @@ -1017,6 +1026,7 @@ class _defs_gpencil_paint: return dict( text="Line", icon="ops.gpencil.primitive_line", + cursor='CROSSHAIR', widget=None, keymap=(), ) @@ -1026,6 +1036,7 @@ class _defs_gpencil_paint: return dict( text="Box", icon="ops.gpencil.primitive_box", + cursor='CROSSHAIR', widget=None, keymap=(), ) @@ -1035,6 +1046,7 @@ class _defs_gpencil_paint: return dict( text="Circle", icon="ops.gpencil.primitive_circle", + cursor='CROSSHAIR', widget=None, keymap=(), ) @@ -1226,8 +1238,8 @@ class IMAGE_PT_tools_active(ToolSelectPanelHelper, Panel): 'VIEW': [ ], 'UV': [ - _defs_image_generic.cursor, *_tools_select, + _defs_image_generic.cursor, None, *_tools_transform, None, @@ -1316,16 +1328,16 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel): # End group. ], 'OBJECT': [ - _defs_view3d_generic.cursor, *_tools_select, + _defs_view3d_generic.cursor, None, *_tools_transform, None, *_tools_annotate, ], 'POSE': [ - _defs_view3d_generic.cursor, *_tools_select, + _defs_view3d_generic.cursor, None, *_tools_transform, None, @@ -1338,8 +1350,8 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel): ), ], 'EDIT_ARMATURE': [ - _defs_view3d_generic.cursor, *_tools_select, + _defs_view3d_generic.cursor, None, *_tools_transform, None, @@ -1356,8 +1368,8 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel): ), ], 'EDIT_MESH': [ - _defs_view3d_generic.cursor, *_tools_select, + _defs_view3d_generic.cursor, None, *_tools_transform, None, @@ -1408,8 +1420,8 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel): ), ], 'EDIT_CURVE': [ - _defs_view3d_generic.cursor, *_tools_select, + _defs_view3d_generic.cursor, None, *_tools_transform, None, @@ -1422,6 +1434,24 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel): _defs_edit_curve.extrude_cursor, ), ], + 'EDIT_METABALL': [ + *_tools_select, + _defs_view3d_generic.cursor, + None, + *_tools_transform, + None, + *_tools_annotate, + None, + ], + 'EDIT_LATTICE': [ + *_tools_select, + _defs_view3d_generic.cursor, + None, + *_tools_transform, + None, + *_tools_annotate, + None, + ], 'PARTICLE': [ _defs_view3d_generic.cursor, _defs_particle.generate_from_brushes, @@ -1470,8 +1500,8 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel): _defs_gpencil_paint.circle, ], 'GPENCIL_EDIT': [ - _defs_view3d_generic.cursor, *_tools_gpencil_select, + _defs_view3d_generic.cursor, None, *_tools_transform, None, diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index 6fffba1fe39..8b9c47839e9 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -408,6 +408,8 @@ class _draw_left_context_mode: row.prop(brush, "strength", slider=True) row.prop(brush, "use_pressure_strength", text="") + layout.prop(brush, "target_weight", slider=True) + @staticmethod def PARTICLE(context, layout, tool): # See: 'VIEW3D_PT_tools_brush', basically a duplicate diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 149206fc151..954326f8899 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -73,25 +73,6 @@ class USERPREF_PT_tabs(Panel): layout.row().prop(userpref, "active_section", expand=True) -class USERPREF_MT_interaction_presets(Menu): - bl_label = "Presets" - preset_subdir = "interaction" - preset_operator = "script.execute_preset" - draw = Menu.draw_preset - - -class USERPREF_MT_appconfigs(Menu): - bl_label = "AppPresets" - preset_subdir = "keyconfig" - preset_operator = "wm.appconfig_activate" - - def draw(self, context): - self.layout.operator("wm.appconfig_default", text="Blender (default)") - - # now draw the presets - Menu.draw_preset(self, context) - - class USERPREF_PT_interface(Panel): bl_space_type = 'USER_PREFERENCES' bl_label = "Interface" @@ -483,14 +464,15 @@ class USERPREF_PT_system(Panel): if bpy.app.build_options.international: column.prop(system, "use_international_fonts") - if system.use_international_fonts: - column.prop(system, "language") - row = column.row() - row.label(text="Translate:", text_ctxt=i18n_contexts.id_windowmanager) - row = column.row(align=True) - row.prop(system, "use_translate_interface", text="Interface", toggle=True) - row.prop(system, "use_translate_tooltips", text="Tooltips", toggle=True) - row.prop(system, "use_translate_new_dataname", text="New Data", toggle=True) + sub_col = column.column() + sub_col.active = system.use_international_fonts + sub_col.prop(system, "language") + row = sub_col.row() + row.label(text="Translate:", text_ctxt=i18n_contexts.id_windowmanager) + row = sub_col.row(align=True) + row.prop(system, "use_translate_tooltips", text="Tooltips", toggle=True) + row.prop(system, "use_translate_interface", text="Interface", toggle=True) + row.prop(system, "use_translate_new_dataname", text="New Data", toggle=True) class USERPREF_MT_interface_theme_presets(Menu): @@ -1074,30 +1056,15 @@ class USERPREF_PT_input(Panel): import sys # General settings - row = layout.row() - col = row.column() - - sub = col.column() - sub.label(text="Presets:") - subrow = sub.row(align=True) - - subrow.menu("USERPREF_MT_interaction_presets", text=bpy.types.USERPREF_MT_interaction_presets.bl_label) - subrow.operator("wm.interaction_preset_add", text="", icon='ADD') - subrow.operator("wm.interaction_preset_add", text="", icon='REMOVE').remove_active = True - sub.separator() + sub = layout.column() sub.label(text="Mouse:") - sub1 = sub.column() - sub1.active = (inputs.select_mouse == 'RIGHT') - sub1.prop(inputs, "use_mouse_emulate_3_button") + sub.prop(inputs, "use_mouse_emulate_3_button") sub.prop(inputs, "use_mouse_continuous") sub.prop(inputs, "drag_threshold") sub.prop(inputs, "tweak_threshold") - sub.label(text="Select With:") - sub.row().prop(inputs, "select_mouse", expand=True) - - sub = col.column() + sub = layout.column() sub.label(text="Double Click:") sub.prop(inputs, "mouse_double_click_time", text="Speed") @@ -1120,18 +1087,18 @@ class USERPREF_PT_input(Panel): #sub.prop(inputs, "use_mouse_mmb_paste") - # col.separator() + # layout.separator() - sub = col.column() + sub = layout.column() sub.prop(inputs, "invert_zoom_wheel", text="Invert Wheel Zoom Direction") #sub.prop(view, "wheel_scroll_lines", text="Scroll Lines") if sys.platform == "darwin": - sub = col.column() + sub = layout.column() sub.prop(inputs, "use_trackpad_natural", text="Natural Trackpad Direction") - col.separator() - sub = col.column() + layout.separator() + sub = layout.column() sub.label(text="View Navigation:") sub.row().prop(inputs, "navigation_mode", expand=True) @@ -1143,37 +1110,41 @@ class USERPREF_PT_input(Panel): sub.prop(walk, "mouse_speed") sub.prop(walk, "teleport_time") - sub = col.column(align=True) + sub = layout.column(align=True) sub.prop(walk, "walk_speed") sub.prop(walk, "walk_speed_factor") sub.separator() sub.prop(walk, "use_gravity") - sub = col.column(align=True) + sub = layout.column(align=True) sub.active = walk.use_gravity sub.prop(walk, "view_height") sub.prop(walk, "jump_height") + sub.separator() + sub = layout.column() + sub.label(text="Tablet Pressure:") + sub.prop(inputs, "pressure_threshold_max") + sub.prop(inputs, "pressure_softness") + if inputs.use_ndof: - col.separator() - col.label(text="NDOF Device:") - sub = col.column(align=True) + layout.separator() + layout.label(text="NDOF Device:") + sub = layout.column(align=True) sub.prop(inputs, "ndof_sensitivity", text="Pan Sensitivity") sub.prop(inputs, "ndof_orbit_sensitivity", text="Orbit Sensitivity") sub.prop(inputs, "ndof_deadzone", text="Deadzone") sub.separator() - col.label(text="Navigation Style:") - sub = col.column(align=True) + layout.label(text="Navigation Style:") + sub = layout.column(align=True) sub.row().prop(inputs, "ndof_view_navigate_method", expand=True) sub.separator() - col.label(text="Rotation Style:") - sub = col.column(align=True) + layout.label(text="Rotation Style:") + sub = layout.column(align=True) sub.row().prop(inputs, "ndof_view_rotate_method", expand=True) - row.separator() - def draw(self, context): from rna_keymap_ui import draw_keymaps @@ -1189,11 +1160,17 @@ class USERPREF_PT_input(Panel): split = layout.split(factor=0.25) + row = split.row() + col = row.column() + # Input settings - self.draw_input_prefs(inputs, split) + self.draw_input_prefs(inputs, col) + + row.separator() # Keymap Settings - draw_keymaps(context, split) + col = split.column() + draw_keymaps(context, col) #print("runtime", time.time() - start) @@ -1233,8 +1210,8 @@ class USERPREF_PT_addons(Panel): _support_icon_mapping = { 'OFFICIAL': 'FILE_BLEND', - 'COMMUNITY': 'POSE_DATA', - 'TESTING': 'MOD_EXPLODE', + 'COMMUNITY': 'COMMUNITY', + 'TESTING': 'EXPERIMENTAL', } @classmethod @@ -1377,7 +1354,7 @@ class USERPREF_PT_addons(Panel): row.operator( "wm.addon_expand", - icon='TRIA_DOWN' if info["show_expanded"] else 'TRIA_RIGHT', + icon='DISCLOSURE_TRI_DOWN' if info["show_expanded"] else 'DISCLOSURE_TRI_RIGHT', emboss=False, ).module = module_name @@ -1596,8 +1573,6 @@ class USERPREF_PT_studiolight_specular(Panel, StudioLightPanelMixin): classes = ( USERPREF_HT_header, USERPREF_PT_tabs, - USERPREF_MT_interaction_presets, - USERPREF_MT_appconfigs, USERPREF_PT_interface, USERPREF_PT_edit, USERPREF_PT_system, diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 0d96e11cb72..55d1636bd19 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -1534,10 +1534,8 @@ class VIEW3D_MT_add(Menu): layout.menu("VIEW3D_MT_armature_add", icon='OUTLINER_OB_ARMATURE') layout.operator("object.add", text="Lattice", icon='OUTLINER_OB_LATTICE').type = 'LATTICE' layout.operator_menu_enum("object.empty_add", "type", text="Empty", icon='OUTLINER_OB_EMPTY') + layout.menu("VIEW3D_MT_image_add", text="Image", icon='OUTLINER_OB_IMAGE') - sublayout = layout.column() - sublayout.operator_context = 'INVOKE_DEFAULT' - sublayout.operator("object.load_image_as_empty", text="Image", icon="OUTLINER_OB_IMAGE") layout.separator() layout.operator("object.speaker_add", text="Speaker", icon='OUTLINER_OB_SPEAKER') @@ -1576,6 +1574,15 @@ class VIEW3D_MT_add(Menu): ) +class VIEW3D_MT_image_add(Menu): + bl_label = "Add Image" + + def draw(self, context): + layout = self.layout + layout.operator("object.load_reference_image", text="Reference", icon='IMAGE_REFERENCE') + layout.operator("object.load_background_image", text="Background", icon='IMAGE_BACKGROUND') + + class VIEW3D_MT_object_relations(Menu): bl_label = "Relations" @@ -1726,37 +1733,14 @@ class VIEW3D_MT_object_specials(Menu): return context.object def draw(self, context): + layout = self.layout obj = context.object - - layout.operator("view3d.copybuffer", text="Copy Objects", icon='COPYDOWN') - layout.operator("view3d.pastebuffer", text="Paste Objects", icon='PASTEDOWN') - - layout.separator() - - layout.operator("object.duplicate_move") - layout.operator("object.duplicate_move_linked") - - layout.separator() - - layout.menu("VIEW3D_MT_snap") - layout.menu("VIEW3D_MT_object_parent") - layout.operator_context = 'INVOKE_REGION_WIN' - layout.operator("object.move_to_collection") - - layout.separator() - - layout.operator("anim.keyframe_insert_menu", text="Insert Keyframe...") - - layout.separator() - - layout.operator("object.delete", text="Delete...").use_global = False + is_eevee = context.scene.render.engine == 'BLENDER_EEVEE' if obj.type == 'MESH': - layout.separator() - layout.operator("object.shade_smooth", text="Smooth Shading") layout.operator("object.shade_flat", text="Flat Shading") @@ -1834,15 +1818,21 @@ class VIEW3D_MT_object_specials(Menu): emission_node = node break + if is_eevee and not emission_node: + props = layout.operator("wm.context_modal_mouse", text="Energy") + props.data_path_iter = "selected_editable_objects" + props.data_path_item = "data.energy" + props.header_text = "Light Energy: %.3f" + if emission_node is not None: - props = layout.operator("wm.context_modal_mouse", text="Strength") + props = layout.operator("wm.context_modal_mouse", text="Energy") props.data_path_iter = "selected_editable_objects" props.data_path_item = ( "data.node_tree" ".nodes[\"" + emission_node.name + "\"]" ".inputs[\"Strength\"].default_value" ) - props.header_text = "Light Strength: %.3f" + props.header_text = "Light Energy: %.3f" props.input_scale = 0.1 if light.type == 'AREA': @@ -1858,13 +1848,14 @@ class VIEW3D_MT_object_specials(Menu): props.header_text = "Light Size Y: %.3f" elif light.type in {'SPOT', 'POINT', 'SUN'}: - props = layout.operator("wm.context_modal_mouse", text="Size") + props = layout.operator("wm.context_modal_mouse", text="Radius") props.data_path_iter = "selected_editable_objects" props.data_path_item = "data.shadow_soft_size" - props.header_text = "Light Size: %.3f" + props.header_text = "Light Radius: %.3f" if light.type == 'SPOT': layout.separator() + props = layout.operator("wm.context_modal_mouse", text="Spot Size") props.data_path_iter = "selected_editable_objects" props.data_path_item = "data.spot_size" @@ -1877,6 +1868,31 @@ class VIEW3D_MT_object_specials(Menu): props.input_scale = -0.01 props.header_text = "Spot Blend: %.2f" + layout.separator() + + layout.operator("view3d.copybuffer", text="Copy Objects", icon='COPYDOWN') + layout.operator("view3d.pastebuffer", text="Paste Objects", icon='PASTEDOWN') + + layout.separator() + + layout.operator("object.duplicate_move", icon="DUPLICATE") + layout.operator("object.duplicate_move_linked") + + layout.separator() + + layout.menu("VIEW3D_MT_snap") + layout.menu("VIEW3D_MT_object_parent") + layout.operator_context = 'INVOKE_REGION_WIN' + layout.operator("object.move_to_collection") + + layout.separator() + + layout.operator("anim.keyframe_insert_menu", text="Insert Keyframe...") + + layout.separator() + + layout.operator("object.delete", text="Delete...").use_global = False + class VIEW3D_MT_object_shading(Menu): # XXX, this menu is a place to store shading operator in object mode @@ -3835,24 +3851,16 @@ class VIEW3D_MT_shading_pie(Menu): pie.prop_enum(view.shading, "type", value='WIREFRAME') pie.prop_enum(view.shading, "type", value='SOLID') - if context.mode == 'POSE': - pie.prop(view.overlay, "show_bone_select", icon='XRAY') + xray_active = ( + (context.mode in {'POSE', 'EDIT_MESH'}) or + (view.shading.type in {'SOLID', 'WIREFRAME'}) + ) + if xray_active: + sub = pie else: - xray_active = ( - (context.mode in 'EDIT_MESH') or - (view.shading.type in {'SOLID', 'WIREFRAME'}) - ) - - if xray_active: - sub = pie - else: - sub = pie.row() - sub.active = False - - if view.shading.type == 'WIREFRAME': - sub.prop(view.shading, "show_xray_wireframe", text="Toggle X-Ray", icon='XRAY') - else: - sub.prop(view.shading, "show_xray", text="Toggle X-Ray", icon='XRAY') + sub = pie.row() + sub.active = False + sub.operator("view3d.toggle_xray", text="Toggle X-Ray", icon='XRAY') pie.prop(view.overlay, "show_overlays", text="Toggle Overlays", icon='OVERLAY') pie.prop_enum(view.shading, "type", value='MATERIAL') @@ -5089,6 +5097,7 @@ class VIEW3D_PT_overlay_gpencil_options(Panel): class VIEW3D_PT_quad_view(Panel): bl_space_type = 'VIEW_3D' bl_region_type = 'UI' + bl_category = "View" bl_label = "Quad View" bl_options = {'DEFAULT_CLOSED'} @@ -5475,6 +5484,7 @@ classes = ( VIEW3D_PT_transform_orientations, VIEW3D_PT_overlay_gpencil_options, VIEW3D_PT_context_properties, + VIEW3D_MT_image_add, ) |