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')
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/blender_default.py21
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py4
-rw-r--r--release/scripts/startup/bl_operators/object.py3
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py14
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py3
-rw-r--r--release/scripts/startup/bl_ui/properties_material_gpencil.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_particle.py4
-rw-r--r--release/scripts/startup/bl_ui/space_console.py94
-rw-r--r--release/scripts/startup/bl_ui/space_dopesheet.py2
-rw-r--r--release/scripts/startup/bl_ui/space_graph.py5
-rw-r--r--release/scripts/startup/bl_ui/space_image.py1
-rw-r--r--release/scripts/startup/bl_ui/space_info.py65
-rw-r--r--release/scripts/startup/bl_ui/space_nla.py2
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py194
-rw-r--r--release/scripts/startup/bl_ui/space_text.py112
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py9
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py291
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py56
-rw-r--r--release/scripts/startup/keyingsets_builtins.py36
19 files changed, 624 insertions, 294 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 8a35a937928..e8e78a86b6a 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -1736,6 +1736,7 @@ def km_info(params):
("info.report_delete", {"type": 'X', "value": 'PRESS'}, None),
("info.report_delete", {"type": 'DEL', "value": 'PRESS'}, None),
("info.report_copy", {"type": 'C', "value": 'PRESS', "ctrl": True}, None),
+ op_menu("INFO_MT_context_menu", params.context_menu_event),
])
return keymap
@@ -2128,7 +2129,7 @@ def km_text_generic(_params):
),
("text.start_find", {"type": 'F', "value": 'PRESS', "ctrl": True}, None),
("text.jump", {"type": 'J', "value": 'PRESS', "ctrl": True}, None),
- ("text.find", {"type": 'G', "value": 'PRESS', "ctrl": True}, None),
+ ("text.find_set_selected", {"type": 'G', "value": 'PRESS', "ctrl": True}, None),
("text.replace", {"type": 'H', "value": 'PRESS', "ctrl": True}, None),
])
@@ -2144,10 +2145,6 @@ def km_text(params):
)
items.extend([
- ("text.move", {"type": 'LEFT_ARROW', "value": 'PRESS', "alt": True},
- {"properties": [("type", 'PREVIOUS_WORD')]}),
- ("text.move", {"type": 'RIGHT_ARROW', "value": 'PRESS', "alt": True},
- {"properties": [("type", 'NEXT_WORD')]}),
("wm.context_cycle_int", {"type": 'WHEELUPMOUSE', "value": 'PRESS', "ctrl": True},
{"properties": [("data_path", 'space_data.font_size'), ("reverse", False)]}),
("wm.context_cycle_int", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS', "ctrl": True},
@@ -2165,6 +2162,11 @@ def km_text(params):
else:
items.extend([
("text.new", {"type": 'N', "value": 'PRESS', "ctrl": True}, None),
+
+ ("text.move", {"type": 'LEFT_ARROW', "value": 'PRESS', "alt": True},
+ {"properties": [("type", 'PREVIOUS_WORD')]}),
+ ("text.move", {"type": 'RIGHT_ARROW', "value": 'PRESS', "alt": True},
+ {"properties": [("type", 'NEXT_WORD')]}),
])
items.extend([
@@ -2267,7 +2269,7 @@ def km_text(params):
{"properties": [("lines", 1)]}),
("text.line_break", {"type": 'RET', "value": 'PRESS'}, None),
("text.line_break", {"type": 'NUMPAD_ENTER', "value": 'PRESS'}, None),
- op_menu("TEXT_MT_toolbox", {"type": 'RIGHTMOUSE', "value": 'PRESS', "any": True}),
+ op_menu("TEXT_MT_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
("text.autocomplete", {"type": 'SPACE', "value": 'PRESS', "ctrl": True}, None),
("text.line_number", {"type": 'TEXTINPUT', "value": 'ANY', "any": True}, None),
("text.insert", {"type": 'TEXTINPUT', "value": 'ANY', "any": True}, None),
@@ -2407,6 +2409,10 @@ def km_sequencer(params):
{"properties": [("mode", 'TIME_EXTEND')]}),
("marker.add", {"type": 'M', "value": 'PRESS'}, None),
("marker.rename", {"type": 'M', "value": 'PRESS', "ctrl": True}, None),
+ ("sequencer.select",{"type": 'LEFT_BRACKET', "value": 'PRESS'},
+ {"properties": [("left_right", 'LEFT'), ("linked_time", True)]}),
+ ("sequencer.select",{"type": 'RIGHT_BRACKET', "value": 'PRESS'},
+ {"properties": [("left_right", 'RIGHT'), ("linked_time", True)]}),
])
return keymap
@@ -2444,7 +2450,7 @@ def km_sequencerpreview(params):
return keymap
-def km_console(_params):
+def km_console(params):
items = []
keymap = (
"Console",
@@ -2504,6 +2510,7 @@ def km_console(_params):
("console.indent", {"type": 'TAB', "value": 'PRESS'}, None),
("console.unindent", {"type": 'TAB', "value": 'PRESS', "shift": True}, None),
("console.insert", {"type": 'TEXTINPUT', "value": 'ANY', "any": True}, None),
+ op_menu("CONSOLE_MT_context_menu", params.context_menu_event),
])
return keymap
diff --git a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
index d96a1d335fa..a8fe45c8b15 100644
--- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
+++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
@@ -1136,6 +1136,7 @@ def km_info(params):
("info.report_delete", {"type": 'BACK_SPACE', "value": 'PRESS'}, None),
("info.report_delete", {"type": 'DEL', "value": 'PRESS'}, None),
("info.report_copy", {"type": 'C', "value": 'PRESS', "ctrl": True}, None),
+ op_menu("INFO_MT_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
])
return keymap
@@ -1637,7 +1638,7 @@ def km_text(params):
{"properties": [("lines", 1)]}),
("text.line_break", {"type": 'RET', "value": 'PRESS'}, None),
("text.line_break", {"type": 'NUMPAD_ENTER', "value": 'PRESS'}, None),
- op_menu("TEXT_MT_toolbox", {"type": 'RIGHTMOUSE', "value": 'PRESS', "any": True}),
+ op_menu("TEXT_MT_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS', "any": True}),
("text.autocomplete", {"type": 'SPACE', "value": 'PRESS', "ctrl": True}, None),
("text.line_number", {"type": 'TEXTINPUT', "value": 'ANY', "any": True}, None),
("text.insert", {"type": 'TEXTINPUT', "value": 'ANY', "any": True}, None),
@@ -1859,6 +1860,7 @@ def km_console(params):
("console.indent", {"type": 'TAB', "value": 'PRESS'}, None),
("console.unindent", {"type": 'TAB', "value": 'PRESS', "shift": True}, None),
("console.insert", {"type": 'TEXTINPUT', "value": 'ANY', "any": True}, None),
+ op_menu("CONSOLE_MT_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
])
return keymap
diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py
index e4f8daa9c4b..8463277e28c 100644
--- a/release/scripts/startup/bl_operators/object.py
+++ b/release/scripts/startup/bl_operators/object.py
@@ -914,7 +914,8 @@ class LoadImageAsEmpty:
align=('VIEW' if self.view_align else 'WORLD'),
)
- obj = context.active_object
+ view_layer = context.view_layer
+ obj = view_layer.objects.active
obj.data = image
obj.empty_display_size = 5.0
self.set_settings(context, obj)
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 66e96199b08..316ce818530 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -1785,13 +1785,15 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
col = split.column()
col.label(text="Settings:")
- row = col.row(align=True)
- row.enabled = md.mode == 'FIXED'
- row.prop(md, "step")
- row = col.row(align=True)
- row.enabled = not md.mode == 'FIXED'
- row.prop(md, "factor")
+ if md.mode == 'FIXED':
+ col.prop(md, "step")
+ elif md.mode == 'ADAPTIVE':
+ col.prop(md, "factor")
+ elif md.mode == 'SAMPLE':
+ col.prop(md, "length")
+ elif md.mode == 'MERGE':
+ col.prop(md, "length", text="Threshold")
col = layout.column()
col.separator()
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 1e5aac4cc0d..6f089f93f00 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -606,7 +606,8 @@ class GPENCIL_MT_cleanup(Menu):
def draw(self, _context):
layout = self.layout
- layout.operator("gpencil.frame_clean_loose", text="Loose Points")
+ layout.operator("gpencil.frame_clean_loose", text="Delete Loose Points")
+ layout.operator("gpencil.stroke_merge_by_distance", text="Merge by Distance")
layout.separator()
layout.operator("gpencil.frame_clean_fill", text="Boundary Strokes").mode = 'ACTIVE'
diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py
index 8db0f8182ab..a9e68ecc502 100644
--- a/release/scripts/startup/bl_ui/properties_material_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py
@@ -162,6 +162,8 @@ class MATERIAL_PT_gpencil_strokecolor(GPMaterialButtonsPanel, Panel):
if gpcolor.mode in {'DOTS', 'BOX'}:
col.prop(gpcolor, "alignment_mode")
+ if gpcolor.mode == 'LINE':
+ col.prop(gpcolor, "use_overlap_strokes")
class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel):
bl_label = "Fill"
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
index 02b809cdfb4..ebbf278c5e7 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -272,7 +272,9 @@ class PARTICLE_PT_emission(ParticleButtonsPanel, Panel):
col = layout.column()
col.active = part.emit_from == 'VERT' or part.distribution != 'GRID'
col.prop(part, "count")
- col.prop(psys, "seed")
+
+ if psys is not None:
+ col.prop(psys, "seed")
if part.type == 'HAIR':
col.prop(part, "hair_length")
diff --git a/release/scripts/startup/bl_ui/space_console.py b/release/scripts/startup/bl_ui/space_console.py
index 2e1d0fd2eba..2db1b06c902 100644
--- a/release/scripts/startup/bl_ui/space_console.py
+++ b/release/scripts/startup/bl_ui/space_console.py
@@ -31,8 +31,6 @@ class CONSOLE_HT_header(Header):
CONSOLE_MT_editor_menus.draw_collapsible(context, layout)
- layout.operator("console.autocomplete", text="Autocomplete")
-
class CONSOLE_MT_editor_menus(Menu):
bl_idname = "CONSOLE_MT_editor_menus"
@@ -40,28 +38,32 @@ class CONSOLE_MT_editor_menus(Menu):
def draw(self, _context):
layout = self.layout
+ layout.menu("CONSOLE_MT_view")
layout.menu("CONSOLE_MT_console")
-class CONSOLE_MT_console(Menu):
- bl_label = "Console"
+class CONSOLE_MT_view(Menu):
+ bl_label = "View"
def draw(self, _context):
layout = self.layout
- layout.operator("console.indent")
- layout.operator("console.unindent")
+ props = layout.operator("wm.context_cycle_int", text="Zoom In")
+ props.data_path = 'space_data.font_size'
+ props.reverse = False
+ props = layout.operator("wm.context_cycle_int", text="Zoom Out")
+ props.data_path = 'space_data.font_size'
+ props.reverse = True
layout.separator()
- layout.operator("console.clear")
- layout.operator("console.clear_line")
+ layout.operator("console.move", text="Move to Previous Word").type = 'PREVIOUS_WORD'
+ layout.operator("console.move", text="Move to Next Word").type = 'NEXT_WORD'
+ layout.operator("console.move", text="Move to Line Begin").type = 'LINE_BEGIN'
+ layout.operator("console.move", text="Move to Line End").type = 'LINE_END'
layout.separator()
- layout.operator("console.copy_as_script")
- layout.operator("console.copy")
- layout.operator("console.paste")
layout.menu("CONSOLE_MT_language")
layout.separator()
@@ -92,17 +94,81 @@ class CONSOLE_MT_language(Menu):
translate=False).language = language
+class CONSOLE_MT_console(Menu):
+ bl_label = "Console"
+
+ def draw(self, _context):
+ layout = self.layout
+
+ layout.operator("console.clear")
+ layout.operator("console.clear_line")
+ layout.operator("console.delete", text="Delete Previous Word").type = 'PREVIOUS_WORD'
+ layout.operator("console.delete", text="Delete Next Word").type = 'NEXT_WORD'
+
+ layout.separator()
+
+ layout.operator("console.copy_as_script", text="Copy as Script")
+ layout.operator("console.copy", text="Copy")
+ layout.operator("console.paste", text="Paste")
+
+ layout.separator()
+
+ layout.operator("console.indent")
+ layout.operator("console.unindent")
+
+ layout.separator()
+
+ layout.operator("console.history_cycle", text="Backward in History").reverse = True
+ layout.operator("console.history_cycle", text="Forward in History").reverse = False
+
+ layout.separator()
+
+ layout.operator("console.autocomplete", text="Autocomplete")
+
+class CONSOLE_MT_context_menu(Menu):
+ bl_label = "Console Context Menu"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("console.clear")
+ layout.operator("console.clear_line")
+ layout.operator("console.delete", text="Delete Previous Word").type = 'PREVIOUS_WORD'
+ layout.operator("console.delete", text="Delete Next Word").type = 'NEXT_WORD'
+
+ layout.separator()
+
+ layout.operator("console.copy_as_script", text="Copy as Script")
+ layout.operator("console.copy", text="Copy")
+ layout.operator("console.paste", text="Paste")
+
+ layout.separator()
+
+ layout.operator("console.indent")
+ layout.operator("console.unindent")
+
+ layout.separator()
+
+ layout.operator("console.history_cycle", text="Backward in History").reverse = True
+ layout.operator("console.history_cycle", text="Forward in History").reverse = False
+
+ layout.separator()
+
+ layout.operator("console.autocomplete", text="Autocomplete")
+
+
def add_scrollback(text, text_type):
for l in text.split("\n"):
- bpy.ops.console.scrollback_append(text=l.expandtabs(4),
- type=text_type)
+ bpy.ops.console.scrollback_append(text=l.expandtabs(4), type=text_type)
classes = (
CONSOLE_HT_header,
CONSOLE_MT_editor_menus,
- CONSOLE_MT_console,
+ CONSOLE_MT_view,
CONSOLE_MT_language,
+ CONSOLE_MT_console,
+ CONSOLE_MT_context_menu,
)
if __name__ == "__main__": # only for live edit.
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index b02a17e7270..3b1b33b26e9 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -361,7 +361,7 @@ class DOPESHEET_MT_select(Menu):
layout.separator()
layout.operator("action.select_box").axis_range = False
- layout.operator("action.select_box", text="Border Axis Range").axis_range = True
+ layout.operator("action.select_box", text="Box Select (Axis Range)").axis_range = True
layout.operator("action.select_circle")
diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py
index 7af2e8cd0a6..b6195d1626a 100644
--- a/release/scripts/startup/bl_ui/space_graph.py
+++ b/release/scripts/startup/bl_ui/space_graph.py
@@ -169,10 +169,10 @@ class GRAPH_MT_select(Menu):
props = layout.operator("graph.select_box")
props.axis_range = False
props.include_handles = False
- props = layout.operator("graph.select_box", text="Border Axis Range")
+ props = layout.operator("graph.select_box", text="Box Select (Axis Range)")
props.axis_range = True
props.include_handles = False
- props = layout.operator("graph.select_box", text="Border (Include Handles)")
+ props = layout.operator("graph.select_box", text="Box Select (Include Handles)")
props.axis_range = False
props.include_handles = True
@@ -336,7 +336,6 @@ class GRAPH_MT_context_menu(Menu):
layout.separator()
- layout.operator_menu_enum("graph.keyframe_type", "type", text="Keyframe Type")
layout.operator_menu_enum("graph.handle_type", "type", text="Handle Type")
layout.operator_menu_enum("graph.interpolation_type", "type", text="Interpolation Mode")
layout.operator_menu_enum("graph.easing_type", "type", text="Easing Type")
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index eea34beaad1..06505c54c9c 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -176,6 +176,7 @@ class IMAGE_MT_select(Menu):
layout.separator()
layout.operator("uv.select_split")
+ layout.operator("uv.select_overlap")
class IMAGE_MT_brush(Menu):
diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py
index a8aa0d9d0b6..eabf71365d5 100644
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@ -23,14 +23,60 @@ from bpy.types import Header, Menu
class INFO_HT_header(Header):
bl_space_type = 'INFO'
- def draw(self, _context):
+ def draw(self, context):
layout = self.layout
layout.template_header()
- # Empty for now until info editor gets turned into log editor
+ INFO_MT_editor_menus.draw_collapsible(context, layout)
+
+
+class INFO_MT_editor_menus(Menu):
+ bl_idname = "INFO_MT_editor_menus"
+ bl_label = ""
+
+ def draw(self, context):
+ layout = self.layout
+ layout.menu("INFO_MT_view")
+ layout.menu("INFO_MT_info")
+
+
+class INFO_MT_view(Menu):
+ bl_label = "View"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.menu("INFO_MT_area")
+
+
+class INFO_MT_info(Menu):
+ bl_label = "Info"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("info.select_all", text="Select All").action = 'SELECT'
+ layout.operator("info.select_all", text="Deselect All").action = 'DESELECT'
+ layout.operator("info.select_all", text="Invert Selection").action = 'INVERT'
+ layout.operator("info.select_all", text="Toggle Selection").action = 'TOGGLE'
+
+ layout.separator()
+
+ layout.operator("info.select_box")
+
+ layout.separator()
+
+ # Disabled because users will likely try this and find
+ # it doesn't work all that well in practice.
+ # Mainly because operators needs to run in the right context.
+
+ # layout.operator("info.report_replay")
+ # layout.separator()
+
+ layout.operator("info.report_delete", text="Delete")
+ layout.operator("info.report_copy", text="Copy")
-# Not really info, just add to re-usable location.
class INFO_MT_area(Menu):
bl_label = "Area"
@@ -58,9 +104,22 @@ class INFO_MT_area(Menu):
).use_hide_panels = True
+class INFO_MT_context_menu(Menu):
+ bl_label = "Info Context Menu"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("info.report_copy", text="Copy")
+ layout.operator("info.report_delete", text="Delete")
+
classes = (
INFO_HT_header,
+ INFO_MT_editor_menus,
INFO_MT_area,
+ INFO_MT_view,
+ INFO_MT_info,
+ INFO_MT_context_menu,
)
if __name__ == "__main__": # only for live edit.
diff --git a/release/scripts/startup/bl_ui/space_nla.py b/release/scripts/startup/bl_ui/space_nla.py
index 06bd69928d8..aaa971cfa55 100644
--- a/release/scripts/startup/bl_ui/space_nla.py
+++ b/release/scripts/startup/bl_ui/space_nla.py
@@ -126,7 +126,7 @@ class NLA_MT_select(Menu):
layout.separator()
layout.operator("nla.select_box").axis_range = False
- layout.operator("nla.select_box", text="Border Axis Range").axis_range = True
+ layout.operator("nla.select_box", text="Box Select (Axis Range)").axis_range = True
layout.separator()
props = layout.operator("nla.select_leftright", text="Before Current Frame")
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index d5ef24d7ff3..f12dff248ed 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -185,6 +185,27 @@ class SEQUENCER_MT_range(Menu):
layout.operator("anim.end_frame_set", text="Set End Frame")
+class SEQUENCER_MT_preview_zoom(Menu):
+ bl_label = "Fractional Zoom"
+
+ def draw(self, context):
+ layout = self.layout
+ layout.operator_context = 'INVOKE_REGION_PREVIEW'
+
+ ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1))
+
+ for i, (a, b) in enumerate(ratios):
+ if i in {3, 4}: # Draw separators around Zoom 1:1.
+ layout.separator()
+
+ layout.operator(
+ "sequencer.view_zoom_ratio",
+ text=iface_(f"Zoom {a:d}:{b:d}"),
+ translate=False,
+ ).ratio = a / b
+ layout.operator_context = 'INVOKE_DEFAULT'
+
+
class SEQUENCER_MT_view(Menu):
bl_label = "View"
@@ -194,6 +215,8 @@ class SEQUENCER_MT_view(Menu):
st = context.space_data
is_preview = st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}
is_sequencer_view = st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}
+ scene = context.scene
+ ed = scene.sequence_editor
if st.view_type == 'PREVIEW':
# Specifying the REGION_PREVIEW context is needed in preview-only
@@ -214,6 +237,21 @@ class SEQUENCER_MT_view(Menu):
layout.operator("sequencer.view_all", text="Frame All")
layout.operator("view2d.zoom_border", text="Zoom")
+ if is_preview:
+ layout.operator_context = 'INVOKE_REGION_PREVIEW'
+ layout.separator()
+
+ layout.operator("sequencer.view_all_preview", text="Fit Preview in Window")
+
+ if is_sequencer_view:
+ layout.menu("SEQUENCER_MT_preview_zoom", text="Fractional Preview Zoom")
+ else:
+ layout.operator("view2d.zoom_border", text="Zoom")
+ layout.menu("SEQUENCER_MT_preview_zoom")
+
+ layout.operator_context = 'INVOKE_DEFAULT'
+
+ if is_sequencer_view:
layout.separator()
layout.operator_context = 'INVOKE_DEFAULT'
@@ -227,47 +265,26 @@ class SEQUENCER_MT_view(Menu):
layout.separator()
layout.operator_context = 'INVOKE_DEFAULT'
- if is_preview:
- layout.operator_context = 'INVOKE_REGION_PREVIEW'
- layout.operator("sequencer.view_all_preview", text="Fit Preview in window")
- layout.operator("view2d.zoom_border", text="Zoom")
-
- layout.separator()
-
- ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1))
-
- for a, b in ratios:
- layout.operator(
- "sequencer.view_zoom_ratio",
- text=iface_("Zoom %d:%d") % (a, b),
- translate=False,
- ).ratio = a / b
+# layout.prop(st, "show_frame_indicator") #Do not have any function and do not work.
+ layout.prop(st, "show_strip_offset")
+ layout.prop(st, "show_marker_lines")
+ if is_preview:
layout.separator()
-
- layout.operator_context = 'INVOKE_DEFAULT'
-
- # # XXX, invokes in the header view
- # layout.operator("sequencer.view_ghost_border", text="Overlay Border")
+ if st.display_mode == 'IMAGE':
+ layout.prop(ed, "show_overlay", text="Show Frame Overlay")
+ layout.prop(st, "show_safe_areas", text="Show Safe Areas")
+ layout.prop(st, "show_metadata", text="Show Metadata")
+ layout.prop(st, "show_annotation", text="Show Annotations")
+ elif st.display_mode == 'WAVEFORM':
+ layout.prop(st, "show_separate_color", text="Show Separate Color Channels")
if is_sequencer_view:
- layout.prop(st, "show_seconds")
- layout.prop(st, "show_frame_indicator")
- layout.prop(st, "show_strip_offset")
- layout.prop(st, "show_marker_lines")
-
layout.separator()
layout.menu("SEQUENCER_MT_view_cache")
layout.prop_menu_enum(st, "waveform_display_type")
- if is_preview:
- if st.display_mode == 'IMAGE':
- layout.prop(st, "show_safe_areas")
- layout.prop(st, "show_metadata")
- elif st.display_mode == 'WAVEFORM':
- layout.prop(st, "show_separate_color")
-
layout.separator()
layout.operator("render.opengl", text="Sequence Render Image", icon='RENDER_STILL').sequencer = True
@@ -276,6 +293,9 @@ class SEQUENCER_MT_view(Menu):
props.sequencer = True
layout.separator()
+ layout.operator("sequencer.export_subtitles", text="Export Subtitles", icon="EXPORT")
+
+ layout.separator()
layout.menu("INFO_MT_area")
@@ -670,7 +690,7 @@ class SEQUENCER_MT_strip(Menu):
'CROSS', 'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP', 'WIPE', 'GLOW',
'TRANSFORM', 'COLOR', 'SPEED', 'MULTICAM', 'ADJUSTMENT',
- 'GAUSSIAN_BLUR', 'TEXT',
+ 'GAUSSIAN_BLUR',
}:
layout.separator()
layout.menu("SEQUENCER_MT_strip_effect")
@@ -681,6 +701,9 @@ class SEQUENCER_MT_strip(Menu):
layout.separator()
layout.operator("sequencer.rendersize")
layout.operator("sequencer.images_separate")
+ elif strip_type == 'TEXT':
+ layout.separator()
+ layout.menu("SEQUENCER_MT_strip_effect")
elif strip_type == 'META':
layout.separator()
layout.operator("sequencer.meta_make")
@@ -752,7 +775,7 @@ class SEQUENCER_MT_context_menu(Menu):
'CROSS', 'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP', 'WIPE', 'GLOW',
'TRANSFORM', 'COLOR', 'SPEED', 'MULTICAM', 'ADJUSTMENT',
- 'GAUSSIAN_BLUR', 'TEXT',
+ 'GAUSSIAN_BLUR',
}:
layout.separator()
layout.menu("SEQUENCER_MT_strip_effect")
@@ -763,6 +786,9 @@ class SEQUENCER_MT_context_menu(Menu):
layout.separator()
layout.operator("sequencer.rendersize")
layout.operator("sequencer.images_separate")
+ elif strip_type == 'TEXT':
+ layout.separator()
+ layout.menu("SEQUENCER_MT_strip_effect")
elif strip_type == 'META':
layout.separator()
layout.operator("sequencer.meta_make")
@@ -1038,26 +1064,10 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
col.label(text="Two or more channels are needed below this strip", icon='INFO')
elif strip_type == 'TEXT':
- col = layout.column()
- col.prop(strip, "text")
- col.template_ID(strip, "font", open="font.open", unlink="font.unlink")
- col.prop(strip, "font_size")
-
- row = col.row()
- row.prop(strip, "color")
- row = col.row()
- row.prop(strip, "use_shadow")
- rowsub = row.row()
- rowsub.active = strip.use_shadow
- rowsub.prop(strip, "shadow_color", text="")
-
- col.prop(strip, "align_x", text="Horizontal")
- col.prop(strip, "align_y", text="Vertical")
- row = col.row(align=True)
- row.prop(strip, "location", text="Location", slider=True)
- col.prop(strip, "wrap_width")
-
- layout.operator("sequencer.export_subtitles", text="Export Subtitles", icon='EXPORT')
+ layout = self.layout
+ layout.use_property_split = False
+ layout.prop(strip, "text", text="")
+ layout.use_property_split = True
col = layout.column(align=True)
if strip_type == 'SPEED':
@@ -1076,6 +1086,73 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
row.prop(strip, "factor", slider=True)
+class SEQUENCER_PT_effect_text_layout(SequencerButtonsPanel, Panel):
+ bl_label = "Layout"
+ bl_parent_id = "SEQUENCER_PT_effect"
+ bl_category = "Strip"
+
+ @classmethod
+ def poll(cls, context):
+ strip = act_strip(context)
+ return strip.type == 'TEXT'
+
+ def draw(self, context):
+ strip = act_strip(context)
+ layout = self.layout
+ layout.use_property_split = True
+ col = layout.column()
+ col.prop(strip, "location", text="Location")
+ col.prop(strip, "align_x", text="Alignment X")
+ col.prop(strip, "align_y", text="Y")
+ col.prop(strip, "wrap_width", text="Wrap Width")
+
+
+class SEQUENCER_PT_effect_text_style(SequencerButtonsPanel, Panel):
+ bl_label = "Style"
+ bl_parent_id = "SEQUENCER_PT_effect"
+ bl_category = "Strip"
+
+ @classmethod
+ def poll(cls, context):
+ strip = act_strip(context)
+ return strip.type == 'TEXT'
+
+ def draw(self, context):
+ strip = act_strip(context)
+ layout = self.layout
+ layout.use_property_split = True
+ col = layout.column()
+ col.template_ID(strip, "font", open="font.open", unlink="font.unlink")
+ col.prop(strip, "font_size")
+ col.prop(strip, "color")
+
+
+class SEQUENCER_PT_effect_text_style_shadow(SequencerButtonsPanel, Panel):
+ bl_label = "Shadow"
+ bl_parent_id = "SEQUENCER_PT_effect_text_style"
+ bl_options = {'DEFAULT_CLOSED'}
+ bl_category = "Strip"
+
+ @classmethod
+ def poll(cls, context):
+ strip = act_strip(context)
+ return strip.type != 'SOUND'
+
+ def draw_header(self, context):
+ strip = act_strip(context)
+ self.layout.prop(strip, "use_shadow", text="")
+
+ def draw(self, context):
+ strip = act_strip(context)
+ layout = self.layout
+ layout.use_property_split = True
+
+ layout.active = strip.use_shadow and (not strip.mute)
+
+ col = layout.column(align=True)
+ col.prop(strip, "shadow_color", text="Color")
+
+
class SEQUENCER_PT_source(SequencerButtonsPanel, Panel):
bl_label = "Source"
bl_options = {'DEFAULT_CLOSED'}
@@ -1843,6 +1920,11 @@ class SEQUENCER_PT_frame_overlay(SequencerButtonsPanel_Output, Panel):
def draw(self, context):
layout = self.layout
+
+ layout.operator_context = 'INVOKE_REGION_PREVIEW'
+ layout.operator("sequencer.view_ghost_border", text="Set Overlay Region")
+ layout.operator_context = 'INVOKE_DEFAULT'
+
layout.use_property_split = True
layout.use_property_decorate = False
@@ -2024,6 +2106,7 @@ classes = (
SEQUENCER_MT_view,
SEQUENCER_MT_view_cache,
SEQUENCER_MT_view_toggle,
+ SEQUENCER_MT_preview_zoom,
SEQUENCER_MT_select_playhead,
SEQUENCER_MT_select_handle,
SEQUENCER_MT_select_channel,
@@ -2057,6 +2140,9 @@ classes = (
SEQUENCER_PT_effect,
SEQUENCER_PT_scene,
SEQUENCER_PT_mask,
+ SEQUENCER_PT_effect_text_style,
+ SEQUENCER_PT_effect_text_layout,
+ SEQUENCER_PT_effect_text_style_shadow,
SEQUENCER_PT_time,
SEQUENCER_PT_source,
diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py
index 91984131464..1ffb181b219 100644
--- a/release/scripts/startup/bl_ui/space_text.py
+++ b/release/scripts/startup/bl_ui/space_text.py
@@ -47,6 +47,11 @@ class TEXT_HT_header(Header):
layout.separator_spacer()
+ row = layout.row(align=True)
+ row.prop(st, "show_line_numbers", text="")
+ row.prop(st, "show_word_wrap", text="")
+ row.prop(st, "show_syntax_highlight", text="")
+
if text:
is_osl = text.name.endswith((".osl", ".osl"))
@@ -107,6 +112,7 @@ class TEXT_MT_editor_menus(Menu):
if text:
layout.menu("TEXT_MT_edit")
+ layout.menu("TEXT_MT_select")
layout.menu("TEXT_MT_format")
layout.menu("TEXT_MT_templates")
@@ -179,6 +185,33 @@ class TEXT_PT_find(Panel):
row.prop(st, "use_find_all", text="All", toggle=True)
+class TEXT_MT_view_navigation(Menu):
+ bl_label = "Navigation"
+
+ def draw(self, context):
+ layout = self.layout
+
+ st = context.space_data
+
+ layout.operator("text.move", text="Top").type = 'FILE_TOP'
+ layout.operator("text.move", text="Bottom").type = 'FILE_BOTTOM'
+
+ layout.separator()
+
+ layout.operator("text.move", text="Line Begin").type = 'LINE_BEGIN'
+ layout.operator("text.move", text="Line End").type = 'LINE_END'
+
+ layout.separator()
+
+ layout.operator("text.move", text="Previous Line").type = 'PREVIOUS_LINE'
+ layout.operator("text.move", text="Next Line").type = 'NEXT_LINE'
+
+ layout.separator()
+
+ layout.operator("text.move", text="Previous Word").type = 'PREVIOUS_WORD'
+ layout.operator("text.move", text="Next Word").type = 'NEXT_WORD'
+
+
class TEXT_MT_view(Menu):
bl_label = "View"
@@ -198,12 +231,7 @@ class TEXT_MT_view(Menu):
layout.separator()
- layout.operator("text.move",
- text="Top of File",
- ).type = 'FILE_TOP'
- layout.operator("text.move",
- text="Bottom of File",
- ).type = 'FILE_BOTTOM'
+ layout.menu("TEXT_MT_view_navigation")
layout.separator()
@@ -219,7 +247,7 @@ class TEXT_MT_text(Menu):
st = context.space_data
text = st.text
- layout.operator("text.new", text="New")
+ layout.operator("text.new", text="New", icon='FILE_NEW')
layout.operator("text.open", text="Open...", icon='FILE_FOLDER')
if text:
@@ -231,9 +259,18 @@ class TEXT_MT_text(Menu):
layout.operator("text.save_as", text="Save As...")
if text.filepath:
+ layout.separator()
layout.operator("text.make_internal")
layout.separator()
+ row = layout.row()
+ row.active = text.name.endswith(".py")
+ row.prop(text, "use_module")
+ row = layout.row()
+
+ layout.prop(st, "use_live_edit")
+
+ layout.separator()
layout.operator("text.run_script")
@@ -270,14 +307,35 @@ class TEXT_MT_templates(Menu):
layout.menu("TEXT_MT_templates_osl")
-class TEXT_MT_edit_select(Menu):
+class TEXT_MT_select(Menu):
bl_label = "Select"
def draw(self, _context):
layout = self.layout
- layout.operator("text.select_all")
- layout.operator("text.select_line")
+ layout.operator("text.select_all", text="All")
+ layout.operator("text.select_line", text="Line")
+ layout.operator("text.select_word", text="Word")
+
+ layout.separator()
+
+ layout.operator("text.move_select", text="Top").type = 'FILE_TOP'
+ layout.operator("text.move_select", text="Bottom").type = 'FILE_BOTTOM'
+
+ layout.separator()
+
+ layout.operator("text.move_select", text="Line Begin").type = 'LINE_BEGIN'
+ layout.operator("text.move_select", text="Line End").type = 'LINE_END'
+
+ layout.separator()
+
+ layout.operator("text.move_select", text="Previous Line").type = 'PREVIOUS_LINE'
+ layout.operator("text.move_select", text="Next Line").type = 'NEXT_LINE'
+
+ layout.separator()
+
+ layout.operator("text.move_select", text="Previous Word").type = 'PREVIOUS_WORD'
+ layout.operator("text.move_select", text="Next Word").type = 'NEXT_WORD'
class TEXT_MT_format(Menu):
@@ -335,23 +393,17 @@ class TEXT_MT_edit(Menu):
layout.separator()
- layout.prop(st, "use_live_edit")
-
- layout.separator()
-
- layout.operator("text.move_lines",
- text="Move line(s) up").direction = 'UP'
- layout.operator("text.move_lines",
- text="Move line(s) down").direction = 'DOWN'
+ layout.operator("text.move_lines", text="Move Line(s) Up").direction = 'UP'
+ layout.operator("text.move_lines", text="Move Line(s) Down").direction = 'DOWN'
layout.separator()
- layout.menu("TEXT_MT_edit_select")
+ layout.operator("text.start_find", text="Find & Replace...")
+ layout.operator("text.find_set_selected", text="Find Next")
+ layout.operator("text.jump", text="Jump To...")
layout.separator()
- layout.operator("text.jump")
- layout.operator("text.start_find", text="Find...")
layout.operator("text.autocomplete")
layout.separator()
@@ -359,7 +411,7 @@ class TEXT_MT_edit(Menu):
layout.menu("TEXT_MT_edit_to3d")
-class TEXT_MT_toolbox(Menu):
+class TEXT_MT_context_menu(Menu):
bl_label = ""
def draw(self, _context):
@@ -370,14 +422,12 @@ class TEXT_MT_toolbox(Menu):
layout.operator("text.cut")
layout.operator("text.copy", icon='COPYDOWN')
layout.operator("text.paste", icon='PASTEDOWN')
+ layout.operator("text.duplicate_line")
layout.separator()
- layout.operator("text.duplicate_line")
- layout.operator("text.move_lines",
- text="Move Lines Up").direction = 'UP'
- layout.operator("text.move_lines",
- text="Move Lines Down").direction = 'DOWN'
+ layout.operator("text.move_lines", text="Move Line(s) Up").direction = 'UP'
+ layout.operator("text.move_lines", text="Move Line(s) Down").direction = 'DOWN'
layout.separator()
@@ -386,8 +436,7 @@ class TEXT_MT_toolbox(Menu):
layout.separator()
- layout.operator("text.comment", text="Comment")
- layout.operator("text.uncomment", text="Uncomment")
+ layout.operator("text.comment_toggle")
layout.separator()
@@ -402,14 +451,15 @@ classes = (
TEXT_PT_find,
TEXT_PT_properties,
TEXT_MT_view,
+ TEXT_MT_view_navigation,
TEXT_MT_text,
TEXT_MT_templates,
TEXT_MT_templates_py,
TEXT_MT_templates_osl,
- TEXT_MT_edit_select,
+ TEXT_MT_select,
TEXT_MT_format,
TEXT_MT_edit_to3d,
- TEXT_MT_toolbox,
+ TEXT_MT_context_menu,
)
if __name__ == "__main__": # only for live edit.
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 08f36bb15bb..128d6100a27 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -44,9 +44,11 @@ class USERPREF_HT_header(Header):
if prefs.use_preferences_save and (not bpy.app.use_userpref_skip_save_on_exit):
pass
else:
- sub = row.row(align=True)
- sub.active = prefs.is_dirty
- sub.operator("wm.save_userpref")
+ # Show '*' to let users know the preferences have been modified.
+ row.operator(
+ "wm.save_userpref",
+ text="Save Preferences{:s}".format(" *" if prefs.is_dirty else ""),
+ )
def draw(self, context):
layout = self.layout
@@ -427,7 +429,6 @@ class USERPREF_PT_edit_annotations(PreferencePanel, Panel):
flow.prop(edit, "grease_pencil_default_color", text="Default Color")
flow.prop(edit, "grease_pencil_eraser_radius", text="Eraser Radius")
- flow.prop(edit, "use_grease_pencil_simplify_stroke", text="Simplify Stroke")
class USERPREF_PT_edit_weight_paint(PreferencePanel, Panel):
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 582d4fe1258..65619ffd285 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -761,6 +761,8 @@ class VIEW3D_MT_editor_menus(Menu):
layout.menu("VIEW3D_MT_paint_gpencil")
elif obj and obj.mode == 'EDIT_GPENCIL':
layout.menu("VIEW3D_MT_edit_gpencil")
+ layout.menu("VIEW3D_MT_edit_gpencil_stroke")
+ layout.menu("VIEW3D_MT_edit_gpencil_point")
elif obj and obj.mode == 'WEIGHT_GPENCIL':
layout.menu("VIEW3D_MT_weight_gpencil")
@@ -779,10 +781,7 @@ class VIEW3D_MT_editor_menus(Menu):
elif obj:
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")
- if mode_string == 'SCULPT':
- layout.menu("VIEW3D_MT_hide_mask")
+
else:
layout.menu("VIEW3D_MT_object")
@@ -2643,63 +2642,6 @@ class VIEW3D_MT_make_links(Menu):
layout.operator("object.join_uvs") # stupid place to add this!
-class VIEW3D_MT_brush(Menu):
- bl_label = "Brush"
-
- def draw(self, context):
- layout = self.layout
-
- tool_settings = context.tool_settings
- settings = UnifiedPaintPanel.paint_settings(context)
- brush = getattr(settings, "brush", None)
-
- ups = tool_settings.unified_paint_settings
- layout.prop(ups, "use_unified_size", text="Unified Size")
- layout.prop(ups, "use_unified_strength", text="Unified Strength")
- if context.image_paint_object or context.vertex_paint_object:
- layout.prop(ups, "use_unified_color", text="Unified Color")
- layout.separator()
-
- # skip if no active brush
- if not brush:
- layout.label(text="No Brushes currently available", icon='INFO')
- return
-
- # brush paint modes
- layout.menu("VIEW3D_MT_brush_paint_modes")
-
- # brush tool
- if context.sculpt_object:
- layout.operator("brush.reset")
- layout.prop_menu_enum(brush, "sculpt_tool")
- elif context.image_paint_object:
- layout.prop_menu_enum(brush, "image_tool")
- elif context.vertex_paint_object:
- layout.prop_menu_enum(brush, "vertex_tool")
- elif context.weight_paint_object:
- layout.prop_menu_enum(brush, "weight_tool")
-
- # TODO: still missing a lot of brush options here
-
- # sculpt options
- if context.sculpt_object:
-
- sculpt_tool = brush.sculpt_tool
-
- layout.separator()
- layout.prop_menu_enum(brush, "curve_preset")
- layout.separator()
-
- if sculpt_tool != 'GRAB':
- layout.prop_menu_enum(brush, "stroke_method")
-
- if sculpt_tool in {'DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'}:
- layout.prop_menu_enum(brush, "direction")
-
- if sculpt_tool == 'LAYER':
- layout.prop(brush, "use_persistent")
- layout.operator("sculpt.set_persistent_base")
-
class VIEW3D_MT_brush_paint_modes(Menu):
bl_label = "Enabled Modes"
@@ -2788,6 +2730,27 @@ class VIEW3D_MT_vertex_group(Menu):
layout.operator("object.vertex_group_remove", text="Remove All Groups").all = True
+class VIEW3D_MT_gpencil_vertex_group(Menu):
+ bl_label = "Vertex Groups"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator_context = 'EXEC_AREA'
+ ob = context.active_object
+
+ layout.operator("object.vertex_group_add", text="Add New Group")
+ ob = context.active_object
+ if ob.vertex_groups.active:
+ layout.separator()
+
+ layout.operator("gpencil.vertex_group_assign", text="Assign")
+ layout.operator("gpencil.vertex_group_remove_from", text="Remove")
+
+ layout.operator("gpencil.vertex_group_select", text="Select")
+ layout.operator("gpencil.vertex_group_deselect", text="Deselect")
+
+
class VIEW3D_MT_paint_weight(Menu):
bl_label = "Weights"
@@ -2839,38 +2802,6 @@ class VIEW3D_MT_sculpt(Menu):
def draw(self, context):
layout = self.layout
- tool_settings = context.tool_settings
- sculpt = tool_settings.sculpt
-
- layout.operator("sculpt.dynamic_topology_toggle", text="Toggle Dynamic Topology")
-
- layout.separator()
-
- 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")
- layout.prop(sculpt, "lock_z")
-
- layout.separator()
-
- layout.prop(sculpt, "use_threaded", text="Threaded Sculpt")
- layout.prop(sculpt, "show_low_resolution")
- layout.prop(sculpt, "show_brush")
- layout.prop(sculpt, "use_deform_only")
- layout.prop(sculpt, "show_mask")
-
-
-class VIEW3D_MT_hide_mask(Menu):
- bl_label = "Hide/Mask"
-
- def draw(self, _context):
- layout = self.layout
-
props = layout.operator("paint.hide_show", text="Show All")
props.action = 'SHOW'
props.area = 'ALL'
@@ -2885,7 +2816,6 @@ class VIEW3D_MT_hide_mask(Menu):
props = layout.operator("paint.hide_show", text="Hide Masked")
props.area = 'MASKED'
- props.action = 'HIDE'
layout.separator()
@@ -4447,6 +4377,7 @@ class VIEW3D_MT_gpencil_simplify(Menu):
layout = self.layout
layout.operator("gpencil.stroke_simplify_fixed", text="Fixed")
layout.operator("gpencil.stroke_simplify", text="Adaptive")
+ layout.operator("gpencil.stroke_sample", text="Sample")
class VIEW3D_MT_paint_gpencil(Menu):
@@ -4457,7 +4388,6 @@ class VIEW3D_MT_paint_gpencil(Menu):
layout = self.layout
layout.menu("VIEW3D_MT_gpencil_animation")
- layout.menu("VIEW3D_MT_edit_gpencil_interpolate")
layout.separator()
@@ -4501,46 +4431,58 @@ class VIEW3D_MT_gpencil_copy_layer(Menu):
class VIEW3D_MT_edit_gpencil(Menu):
- bl_label = "Strokes"
+ bl_label = "Grease Pencil"
def draw(self, _context):
layout = self.layout
layout.menu("VIEW3D_MT_edit_gpencil_transform")
-
- layout.separator()
+ layout.menu("VIEW3D_MT_mirror")
layout.menu("GPENCIL_MT_snap")
layout.separator()
layout.menu("VIEW3D_MT_gpencil_animation")
- layout.menu("VIEW3D_MT_edit_gpencil_interpolate")
layout.separator()
# Cut, Copy, Paste
layout.operator("gpencil.duplicate_move", text="Duplicate")
+ layout.operator("gpencil.stroke_split", text="Split")
layout.operator("gpencil.copy", text="Copy", icon='COPYDOWN')
layout.operator("gpencil.paste", text="Paste", icon='PASTEDOWN').type = 'COPY'
layout.operator("gpencil.paste", text="Paste & Merge").type = 'MERGE'
layout.separator()
- layout.operator("gpencil.stroke_smooth", text="Smooth")
- layout.operator("gpencil.stroke_subdivide", text="Subdivide")
+ layout.menu("VIEW3D_MT_weight_gpencil")
+
+ layout.separator()
+
+ layout.menu("VIEW3D_MT_edit_gpencil_showhide")
+
+ layout.operator_menu_enum("gpencil.stroke_separate", "mode")
+ layout.menu("GPENCIL_MT_cleanup")
+
+ layout.separator()
+
+ # Remove
+ layout.menu("VIEW3D_MT_edit_gpencil_delete")
+
+
+class VIEW3D_MT_edit_gpencil_stroke(Menu):
+ bl_label = "Stroke"
+
+ def draw(self, _context):
+ layout = self.layout
+
+ layout.operator("gpencil.stroke_subdivide", text="Subdivide").only_selected = False
layout.menu("VIEW3D_MT_gpencil_simplify")
layout.operator("gpencil.stroke_trim", text="Trim")
layout.separator()
- layout.operator_menu_enum("gpencil.stroke_separate", "mode", text="Separate...")
- layout.operator("gpencil.stroke_split", text="Split")
- layout.operator("gpencil.stroke_merge", text="Merge")
- op = layout.operator("gpencil.stroke_cyclical_set", text="Close")
- op.type = 'CLOSE'
- op.geometry = True
layout.operator_menu_enum("gpencil.stroke_join", "type", text="Join...")
- layout.operator("gpencil.stroke_flip", text="Flip Direction")
layout.separator()
@@ -4551,14 +4493,35 @@ class VIEW3D_MT_edit_gpencil(Menu):
layout.separator()
# Convert
+ op = layout.operator("gpencil.stroke_cyclical_set", text="Close")
+ op.type = 'CLOSE'
+ op.geometry = True
layout.operator("gpencil.stroke_cyclical_set", text="Toggle Cyclic").type = 'TOGGLE'
layout.operator_menu_enum("gpencil.stroke_caps_set", text="Toggle Caps...", property="type")
+ layout.operator("gpencil.stroke_flip", text="Switch Direction")
+
+
+class VIEW3D_MT_edit_gpencil_point(Menu):
+ bl_label = "Point"
+
+ def draw(self, _context):
+ layout = self.layout
+
+ layout.operator("gpencil.extrude_move", text="Extrude Points")
layout.separator()
- # Remove
- layout.menu("GPENCIL_MT_cleanup")
- layout.menu("VIEW3D_MT_edit_gpencil_delete")
+ layout.operator("gpencil.stroke_smooth", text="Smooth Points").only_selected = True
+
+ layout.separator()
+
+ layout.operator("gpencil.stroke_merge", text="Merge Points")
+
+ # TODO: add new RIP operator
+
+ layout.separator()
+
+ layout.menu("VIEW3D_MT_gpencil_vertex_group")
class VIEW3D_MT_weight_gpencil(Menu):
@@ -4571,10 +4534,12 @@ class VIEW3D_MT_weight_gpencil(Menu):
layout.operator("gpencil.vertex_group_normalize", text="Normalize")
layout.separator()
+
layout.operator("gpencil.vertex_group_invert", text="Invert")
layout.operator("gpencil.vertex_group_smooth", text="Smooth")
layout.separator()
+
layout.menu("VIEW3D_MT_gpencil_autoweights")
@@ -4590,12 +4555,17 @@ class VIEW3D_MT_gpencil_animation(Menu):
layout = self.layout
layout.operator("gpencil.blank_frame_add")
- layout.operator("gpencil.active_frames_delete_all", text="Delete Frame(s)")
layout.separator()
+
layout.operator("gpencil.frame_duplicate", text="Duplicate Active Frame")
layout.operator("gpencil.frame_duplicate", text="Duplicate All Layers").mode = 'ALL'
+ layout.separator()
+
+ layout.operator("gpencil.delete", text="Delete Active Frame").type = 'FRAME'
+ layout.operator("gpencil.active_frames_delete_all", text="Delete All Active Frames")
+
class VIEW3D_MT_edit_gpencil_transform(Menu):
bl_label = "Transform"
@@ -4615,14 +4585,17 @@ class VIEW3D_MT_edit_gpencil_transform(Menu):
layout.operator("transform.transform", text="Shrink Fatten").mode = 'GPENCIL_SHRINKFATTEN'
-class VIEW3D_MT_edit_gpencil_interpolate(Menu):
- bl_label = "Interpolate"
+ layout.operator("gpencil.interpolate", text="Interpolate")
+ layout.operator("gpencil.interpolate_sequence", text="Sequence")
+
+class VIEW3D_MT_edit_gpencil_showhide(Menu):
+ bl_label = "Show/hide"
def draw(self, _context):
layout = self.layout
- layout.operator("gpencil.interpolate", text="Interpolate")
- layout.operator("gpencil.interpolate_sequence", text="Sequence")
+ layout.operator("gpencil.hide", text="Hide Active Layer")
+ layout.operator("gpencil.reveal", text="Show All Layers")
class VIEW3D_MT_object_mode_pie(Menu):
@@ -5801,23 +5774,36 @@ class VIEW3D_PT_overlay_pose(Panel):
row.prop(overlay, "show_xray_bone")
-class VIEW3D_PT_overlay_paint(Panel):
+class VIEW3D_PT_overlay_texture_paint(Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'HEADER'
bl_parent_id = 'VIEW3D_PT_overlay'
- bl_label = ""
+ bl_label = "Texture Paint"
@classmethod
def poll(cls, context):
- return context.mode in {'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE'}
+ return context.mode == 'PAINT_TEXTURE'
- def draw_header(self, context):
+ def draw(self, context):
layout = self.layout
- layout.label(text={
- 'PAINT_TEXTURE': "Texture Paint",
- 'PAINT_VERTEX': "Vertex Paint",
- 'PAINT_WEIGHT': "Weight Paint",
- }[context.mode])
+ view = context.space_data
+ overlay = view.overlay
+ display_all = overlay.show_overlays
+
+ col = layout.column()
+ col.active = display_all
+ col.prop(overlay, "texture_paint_mode_opacity")
+
+
+class VIEW3D_PT_overlay_vertex_paint(Panel):
+ bl_space_type = 'VIEW_3D'
+ bl_region_type = 'HEADER'
+ bl_parent_id = 'VIEW3D_PT_overlay'
+ bl_label = "Vertex Paint"
+
+ @classmethod
+ def poll(cls, context):
+ return context.mode == 'PAINT_VERTEX'
def draw(self, context):
layout = self.layout
@@ -5828,22 +5814,37 @@ class VIEW3D_PT_overlay_paint(Panel):
col = layout.column()
col.active = display_all
- col.prop(overlay, {
- 'PAINT_TEXTURE': "texture_paint_mode_opacity",
- 'PAINT_VERTEX': "vertex_paint_mode_opacity",
- 'PAINT_WEIGHT': "weight_paint_mode_opacity",
- }[context.mode], text="Opacity")
+ col.prop(overlay, "vertex_paint_mode_opacity", text="Opacity")
+ col.prop(overlay, "show_paint_wire")
- if context.mode == 'PAINT_WEIGHT':
- row = col.split(factor=0.33)
- row.label(text="Zero Weights")
- sub = row.row()
- sub.prop(context.tool_settings, "vertex_group_user", expand=True)
- col.prop(overlay, "show_wpaint_contours")
+class VIEW3D_PT_overlay_weight_paint(Panel):
+ bl_space_type = 'VIEW_3D'
+ bl_region_type = 'HEADER'
+ bl_parent_id = 'VIEW3D_PT_overlay'
+ bl_label = "Weight Paint"
- if context.mode in {'PAINT_WEIGHT', 'PAINT_VERTEX'}:
- col.prop(overlay, "show_paint_wire")
+ @classmethod
+ def poll(cls, context):
+ return context.mode == 'PAINT_WEIGHT'
+
+ def draw(self, context):
+ layout = self.layout
+ view = context.space_data
+ overlay = view.overlay
+ display_all = overlay.show_overlays
+
+ col = layout.column()
+ col.active = display_all
+
+ col.prop(overlay, "weight_paint_mode_opacity", text="Opacity")
+ row = col.split(factor=0.33)
+ row.label(text="Zero Weights")
+ sub = row.row()
+ sub.prop(context.tool_settings, "vertex_group_user", expand=True)
+
+ col.prop(overlay, "show_wpaint_contours")
+ col.prop(overlay, "show_paint_wire")
class VIEW3D_PT_pivot_point(Panel):
@@ -6306,8 +6307,7 @@ class VIEW3D_MT_gpencil_edit_context_menu(Menu):
if is_3d_view:
layout.menu("GPENCIL_MT_cleanup")
- layout.operator("gpencil.stroke_simplify_fixed", text="Simplify")
- layout.operator("gpencil.stroke_simplify", text="Simplify Adaptive")
+ layout.menu("VIEW3D_MT_gpencil_simplify")
layout.operator("gpencil.stroke_merge", text="Merge")
layout.menu("VIEW3D_MT_edit_gpencil_delete")
@@ -6552,14 +6552,13 @@ classes = (
VIEW3D_MT_object_showhide,
VIEW3D_MT_make_single_user,
VIEW3D_MT_make_links,
- VIEW3D_MT_brush,
VIEW3D_MT_brush_paint_modes,
VIEW3D_MT_paint_vertex,
VIEW3D_MT_hook,
VIEW3D_MT_vertex_group,
+ VIEW3D_MT_gpencil_vertex_group,
VIEW3D_MT_paint_weight,
VIEW3D_MT_sculpt,
- VIEW3D_MT_hide_mask,
VIEW3D_MT_particle,
VIEW3D_MT_particle_context_menu,
VIEW3D_MT_particle_showhide,
@@ -6601,7 +6600,10 @@ classes = (
VIEW3D_MT_paint_gpencil,
VIEW3D_MT_assign_material,
VIEW3D_MT_edit_gpencil,
+ VIEW3D_MT_edit_gpencil_stroke,
+ VIEW3D_MT_edit_gpencil_point,
VIEW3D_MT_edit_gpencil_delete,
+ VIEW3D_MT_edit_gpencil_showhide,
VIEW3D_MT_weight_gpencil,
VIEW3D_MT_gpencil_animation,
VIEW3D_MT_gpencil_simplify,
@@ -6628,7 +6630,6 @@ classes = (
VIEW3D_MT_edit_armature_names,
VIEW3D_MT_edit_armature_delete,
VIEW3D_MT_edit_gpencil_transform,
- VIEW3D_MT_edit_gpencil_interpolate,
VIEW3D_MT_object_mode_pie,
VIEW3D_MT_view_pie,
VIEW3D_MT_transform_gizmo_pie,
@@ -6668,7 +6669,9 @@ classes = (
VIEW3D_PT_overlay_edit_mesh_normals,
VIEW3D_PT_overlay_edit_mesh_freestyle,
VIEW3D_PT_overlay_edit_curve,
- VIEW3D_PT_overlay_paint,
+ VIEW3D_PT_overlay_texture_paint,
+ VIEW3D_PT_overlay_vertex_paint,
+ VIEW3D_PT_overlay_weight_paint,
VIEW3D_PT_overlay_pose,
VIEW3D_PT_overlay_sculpt,
VIEW3D_PT_pivot_point,
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index c4f69e18c43..13172a07cb2 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -37,6 +37,53 @@ from bl_ui.properties_paint_common import (
from bl_ui.utils import PresetPanel
+class VIEW3D_MT_brush_context_menu(Menu):
+ bl_label = "Material Specials"
+
+ def draw(self, context):
+ layout = self.layout
+
+ tool_settings = context.tool_settings
+ settings = UnifiedPaintPanel.paint_settings(context)
+ brush = getattr(settings, "brush", None)
+
+ # skip if no active brush
+ if not brush:
+ layout.label(text="No Brushes currently available", icon='INFO')
+ return
+
+ # brush paint modes
+ layout.menu("VIEW3D_MT_brush_paint_modes")
+
+ # brush tool
+
+ if context.image_paint_object:
+ layout.prop_menu_enum(brush, "image_tool")
+ elif context.vertex_paint_object:
+ layout.prop_menu_enum(brush, "vertex_tool")
+ elif context.weight_paint_object:
+ layout.prop_menu_enum(brush, "weight_tool")
+ elif context.sculpt_object:
+ layout.prop_menu_enum(brush, "sculpt_tool")
+ layout.operator("brush.reset")
+
+
+class VIEW3D_MT_brush_context_menu_paint_modes(Menu):
+ bl_label = "Enabled Modes"
+
+ def draw(self, context):
+ layout = self.layout
+
+ settings = UnifiedPaintPanel.paint_settings(context)
+ brush = settings.brush
+
+ layout.prop(brush, "use_paint_sculpt", text="Sculpt")
+ layout.prop(brush, "use_paint_uv_sculpt", text="UV Sculpt")
+ 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")
+
+
class View3DPanel:
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
@@ -299,8 +346,9 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
brush = settings.brush
if not self.is_popover:
- col = layout.split().column()
- col.template_ID_preview(settings, "brush", new="brush.add", rows=3, cols=8)
+ row = layout.row()
+ row.column().template_ID_preview(settings, "brush", new="brush.add", rows=3, cols=8)
+ row.menu("VIEW3D_MT_brush_context_menu", icon='DOWNARROW_HLT', text="")
# Sculpt Mode #
if context.sculpt_object and brush:
@@ -1117,8 +1165,6 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
col.prop(sculpt, "show_low_resolution")
col = flow.column()
col.prop(sculpt, "use_deform_only")
- col = flow.column()
- col.prop(sculpt, "show_mask")
class VIEW3D_PT_sculpt_options_unified(Panel, View3DPaintPanel):
@@ -2071,6 +2117,8 @@ class VIEW3D_PT_gpencil_brush_presets(PresetPanel, Panel):
classes = (
+ VIEW3D_MT_brush_context_menu,
+ VIEW3D_MT_brush_context_menu_paint_modes,
VIEW3D_PT_tools_meshedit_options,
VIEW3D_PT_tools_meshedit_options_automerge,
VIEW3D_PT_tools_curveedit_options_stroke,
diff --git a/release/scripts/startup/keyingsets_builtins.py b/release/scripts/startup/keyingsets_builtins.py
index 1132a09420e..e24cbcfd18e 100644
--- a/release/scripts/startup/keyingsets_builtins.py
+++ b/release/scripts/startup/keyingsets_builtins.py
@@ -199,8 +199,8 @@ class BUILTIN_KSI_BendyBones(KeyingSetInfo):
# VisualLocation
class BUILTIN_KSI_VisualLoc(KeyingSetInfo):
- ("Insert a keyframe on each of the location channels, taking into account effects of constraints "
- "and relationships")
+ """Insert a keyframe on each of the location channels, """ \
+ """taking into account effects of constraints and relationships"""
bl_label = "Visual Location"
bl_options = {'INSERTKEY_VISUAL'}
@@ -217,8 +217,8 @@ class BUILTIN_KSI_VisualLoc(KeyingSetInfo):
# VisualRotation
class BUILTIN_KSI_VisualRot(KeyingSetInfo):
- ("Insert a keyframe on each of the rotation channels, taking into account effects of constraints "
- "and relationships")
+ """Insert a keyframe on each of the rotation channels, """ \
+ """taking into account effects of constraints and relationships"""
bl_label = "Visual Rotation"
bl_options = {'INSERTKEY_VISUAL'}
@@ -235,8 +235,8 @@ class BUILTIN_KSI_VisualRot(KeyingSetInfo):
# VisualScaling
class BUILTIN_KSI_VisualScaling(KeyingSetInfo):
- ("Insert a keyframe on each of the scale channels, taking into account effects of constraints "
- "and relationships")
+ """Insert a keyframe on each of the scale channels, """ \
+ """taking into account effects of constraints and relationships"""
bl_label = "Visual Scaling"
bl_options = {'INSERTKEY_VISUAL'}
@@ -253,8 +253,8 @@ class BUILTIN_KSI_VisualScaling(KeyingSetInfo):
# VisualLocRot
class BUILTIN_KSI_VisualLocRot(KeyingSetInfo):
- ("Insert a keyframe on each of the location and rotation channels, taking into account effects of constraints "
- "and relationships")
+ """Insert a keyframe on each of the location and rotation channels, """ \
+ """taking into account effects of constraints and relationships"""
bl_label = "Visual LocRot"
bl_options = {'INSERTKEY_VISUAL'}
@@ -275,8 +275,8 @@ class BUILTIN_KSI_VisualLocRot(KeyingSetInfo):
# VisualLocScale
class BUILTIN_KSI_VisualLocScale(KeyingSetInfo):
- ("Insert a keyframe on each of the location and scaling channels, taking into account effects of constraints "
- "and relationships")
+ """Insert a keyframe on each of the location and scaling channels, """ \
+ """taking into account effects of constraints and relationships"""
bl_label = "Visual LocScale"
bl_options = {'INSERTKEY_VISUAL'}
@@ -297,8 +297,8 @@ class BUILTIN_KSI_VisualLocScale(KeyingSetInfo):
# VisualLocRotScale
class BUILTIN_KSI_VisualLocRotScale(KeyingSetInfo):
- ("Insert a keyframe on each of the location, rotation and scaling channels, taking into account effects "
- "of constraints and relationships")
+ """Insert a keyframe on each of the location, """ \
+ """rotation and scaling channels, taking into account effects of constraints and relationships"""
bl_label = "Visual LocRotScale"
bl_options = {'INSERTKEY_VISUAL'}
@@ -321,8 +321,8 @@ class BUILTIN_KSI_VisualLocRotScale(KeyingSetInfo):
# VisualRotScale
class BUILTIN_KSI_VisualRotScale(KeyingSetInfo):
- ("Insert a keyframe on each of the rotation and scaling channels, taking into account effects of constraints "
- "and relationships")
+ """Insert a keyframe on each of the rotation and scaling channels, """ \
+ """taking into account effects of constraints and relationships"""
bl_label = "Visual RotScale"
bl_options = {'INSERTKEY_VISUAL'}
@@ -369,8 +369,8 @@ class BUILTIN_KSI_Available(KeyingSetInfo):
# All properties that are likely to get animated in a character rig
class BUILTIN_KSI_WholeCharacter(KeyingSetInfo):
- ("Insert a keyframe for all properties that are likely to get animated in a character rig "
- "(useful when blocking out a shot)")
+ """Insert a keyframe for all properties that are likely to get animated in a character rig """ \
+ """(useful when blocking out a shot)"""
bl_idname = ANIM_KS_WHOLE_CHARACTER_ID
bl_label = "Whole Character"
@@ -530,8 +530,8 @@ class BUILTIN_KSI_WholeCharacter(KeyingSetInfo):
class BUILTIN_KSI_WholeCharacterSelected(KeyingSetInfo):
- ("Insert a keyframe for all properties that are likely to get animated in a character rig "
- "(only selected bones)")
+ """Insert a keyframe for all properties that are likely to get animated in a character rig """ \
+ """(only selected bones)"""
bl_idname = ANIM_KS_WHOLE_CHARACTER_SELECTED_ID
bl_label = "Whole Character (Selected bones only)"