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:
authorJacques Lucke <jacques@blender.org>2020-02-28 11:01:15 +0300
committerJacques Lucke <jacques@blender.org>2020-02-28 11:01:15 +0300
commit4ed7334ef617abc3f3fabbca4fe3e128f74020c2 (patch)
treeedd7dcae4a5b9ed764d4471b4b63f992ede777a7 /release/scripts
parentb92b1a4fe56338c7a66dda4f27426c10e070b11c (diff)
parent9cac5fa681c55edcf6e856e59e07e90e2ae25965 (diff)
Merge branch 'master' into functions
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/modules/bl_keymap_utils/keymap_hierarchy.py4
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/blender_default.py13
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py4
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py8
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_common.py31
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py33
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py22
7 files changed, 83 insertions, 32 deletions
diff --git a/release/scripts/modules/bl_keymap_utils/keymap_hierarchy.py b/release/scripts/modules/bl_keymap_utils/keymap_hierarchy.py
index a98fa2c1fa8..35b5f217247 100644
--- a/release/scripts/modules/bl_keymap_utils/keymap_hierarchy.py
+++ b/release/scripts/modules/bl_keymap_utils/keymap_hierarchy.py
@@ -95,8 +95,8 @@ _km_hierarchy = [
('Weight Paint', 'EMPTY', 'WINDOW', [
_km_expand_from_toolsystem('VIEW_3D', 'PAINT_WEIGHT'),
]),
- ('Weight Paint Vertex Selection', 'EMPTY', 'WINDOW', []),
- ('Face Mask', 'EMPTY', 'WINDOW', []),
+ ('Paint Vertex Selection (Weight, Vertex)', 'EMPTY', 'WINDOW', []),
+ ('Paint Face Mask (Weight, Vertex, Texture)', 'EMPTY', 'WINDOW', []),
# image and view3d
('Image Paint', 'EMPTY', 'WINDOW', [
_km_expand_from_toolsystem('VIEW_3D', 'PAINT_TEXTURE'),
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 6d67c02a49c..109e05ad6fb 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -3380,7 +3380,7 @@ def km_grease_pencil_stroke_weight_mode(_params):
def km_face_mask(params):
items = []
keymap = (
- "Face Mask",
+ "Paint Face Mask (Weight, Vertex, Texture)",
{"space_type": 'EMPTY', "region_type": 'WINDOW'},
{"items": items},
)
@@ -3405,7 +3405,7 @@ def km_face_mask(params):
def km_weight_paint_vertex_selection(params):
items = []
keymap = (
- "Weight Paint Vertex Selection",
+ "Paint Vertex Selection (Weight, Vertex)",
{"space_type": 'EMPTY', "region_type": 'WINDOW'},
{"items": items},
)
@@ -5408,8 +5408,8 @@ def km_3d_view_tool_edit_armature_bone_size(params):
"3D View Tool: Edit Armature, Bone Size",
{"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
{"items": [
- ("transform.bbone_resize", {"type": params.tool_tweak, "value": 'ANY'},
- {"properties": [("release_confirm", True)]}),
+ ("transform.transform", {"type": params.tool_tweak, "value": 'ANY'},
+ {"properties": [("release_confirm", True), ("mode", 'BONE_ENVELOPE')]}),
]},
)
@@ -5418,9 +5418,10 @@ def km_3d_view_tool_edit_armature_bone_envelope(params):
return (
"3D View Tool: Edit Armature, Bone Envelope",
{"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
+
{"items": [
- ("transform.transform", {"type": params.tool_tweak, "value": 'ANY'},
- {"properties": [("release_confirm", True), ("mode", 'BONE_ENVELOPE')]}),
+ ("transform.bbone_resize", {"type": params.tool_tweak, "value": 'ANY'},
+ {"properties": [("release_confirm", True)]}),
]},
)
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 0195232a59d..b0b7c542df3 100644
--- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
+++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
@@ -2531,7 +2531,7 @@ def km_grease_pencil_stroke_weight_mode(params):
def km_face_mask(params):
items = []
keymap = (
- "Face Mask",
+ "Paint Face Mask (Weight, Vertex, Texture)",
{"space_type": 'EMPTY', "region_type": 'WINDOW'},
{"items": items},
)
@@ -2558,7 +2558,7 @@ def km_face_mask(params):
def km_weight_paint_vertex_selection(params):
items = []
keymap = (
- "Weight Paint Vertex Selection",
+ "Paint Vertex Selection (Weight, Vertex)",
{"space_type": 'EMPTY', "region_type": 'WINDOW'},
{"items": items},
)
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index f216acb2f0f..131a7b8dce1 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -494,13 +494,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
layout.prop(md, "iterations")
- row = layout.row()
- row.active = not is_bind
- row.label(text="Anchors Vertex Group:")
-
- row = layout.row()
+ row = layout.row(align=True)
row.enabled = not is_bind
- row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
+ row.prop_search(md, "vertex_group", ob, "vertex_groups")
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
layout.separator()
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py
index d2deb70d4a2..796c089906d 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_common.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py
@@ -68,8 +68,8 @@ ToolDef = namedtuple(
"idname",
# The name to display in the interface.
"label",
- # Description (for tooltip), when not set, use the description of 'operator',
- # may be a string or a 'function(context, item, keymap) -> string'.
+ # Description (for tool-tip), when not set, use the description of 'operator',
+ # may be a string or a 'function(context, item, key-map) -> string'.
"description",
# The name of the icon to use (found in ``release/datafiles/icons``) or None for no icon.
"icon",
@@ -77,13 +77,34 @@ ToolDef = namedtuple(
"cursor",
# An optional gizmo group to activate when the tool is set or None for no gizmo.
"widget",
- # Optional keymap for tool, either:
- # - A function that populates a keymaps passed in as an argument.
+ # Optional key-map for tool, possible values are:
+ #
+ # - ``None`` when the tool doesn't have a key-map.
+ # Also the default value when no key-map value is defined.
+ #
+ # - A string literal for the key-map name, the key-map items are located in the default key-map.
+ #
+ # - ``()`` an empty tuple for a default name.
+ # This is convenience functionality for generating a key-map name.
+ # So if a tool name is "Bone Size", in "Edit Armature" mode for the "3D View",
+ # All of these values are combined into an id, e.g:
+ # "3D View Tool: Edit Armature, Bone Envelope"
+ #
+ # Typically searching for a string ending with the tool name
+ # in the default key-map will lead you to the key-map for a tool.
+ #
+ # - A function that populates a key-maps passed in as an argument.
+ #
# - A tuple filled with triple's of:
# ``(operator_id, operator_properties, keymap_item_args)``.
#
+ # Use this to define the key-map in-line.
+ #
+ # Note that this isn't used for Blender's built in tools which use the built-in key-map.
+ # Keep this functionality since it's likely useful for add-on key-maps.
+ #
# Warning: currently 'from_dict' this is a list of one item,
- # so internally we can swap the keymap function for the keymap it's self.
+ # so internally we can swap the key-map function for the key-map it's self.
# This isn't very nice and may change, tool definitions shouldn't care about this.
"keymap",
# Optional data-block associated with this tool.
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index cd1fc49ac8b..2c79ceb5763 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -18,6 +18,9 @@
# <pep8 compliant>
+# For documentation on tool definitions: see "bl_ui.space_toolsystem_common.ToolDef"
+# where there are comments for each field and their use.
+
# For now group all tools together
# we may want to move these into per space-type files.
#
@@ -608,15 +611,6 @@ class _defs_edit_mesh:
region_type = context.region.type
if not extra:
- if props.offset_type == 'PERCENT':
- layout.prop(props, "offset_pct")
- else:
- offset_text = "Width"
- if props.offset_type == 'DEPTH':
- offset_text = "Depth"
- elif props.offset_type == 'OFFSET':
- offset_text = "Offset"
- layout.prop(props, "offset", text=offset_text)
if region_type == 'TOOL_HEADER':
layout.prop(props, "offset_type", text="")
else:
@@ -1136,8 +1130,25 @@ class _defs_weight_paint:
def draw_settings(context, layout, tool):
brush = context.tool_settings.weight_paint.brush
if brush is not None:
- layout.prop(brush, "weight", slider=True)
- layout.prop(brush, "strength", slider=True)
+ from bl_ui.properties_paint_common import UnifiedPaintPanel
+ UnifiedPaintPanel.prop_unified(
+ layout,
+ context,
+ brush,
+ "weight",
+ unified_name="use_unified_weight",
+ slider=True,
+ header=True
+ )
+ UnifiedPaintPanel.prop_unified(
+ layout,
+ context,
+ brush,
+ "strength",
+ unified_name="use_unified_strength",
+ header=True
+ )
+
props = tool.operator_properties("paint.weight_gradient")
layout.prop(props, "type", expand=True)
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 7d880f4892f..3d0a5acc0a7 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -4294,6 +4294,7 @@ class VIEW3D_MT_edit_curve_context_menu(Menu):
# Remove
layout.operator("curve.split")
layout.operator("curve.decimate")
+ layout.operator("curve.separate")
layout.operator("curve.dissolve_verts")
layout.operator("curve.delete", text="Delete Segment").type = 'SEGMENT'
layout.operator("curve.delete", text="Delete Point").type = 'VERT'
@@ -4333,6 +4334,23 @@ class VIEW3D_MT_edit_font(Menu):
layout.operator("font.style_toggle", text="Toggle Underline", icon='UNDERLINE').style = 'UNDERLINE'
layout.operator("font.style_toggle", text="Toggle Small Caps", icon='SMALL_CAPS').style = 'SMALL_CAPS'
+ layout.menu("VIEW3D_MT_edit_font_kerning")
+
+
+class VIEW3D_MT_edit_font_kerning(Menu):
+ bl_label = "Kerning"
+
+ def draw(self, context):
+ layout = self.layout
+
+ ob = context.active_object
+ text = ob.data
+ kerning = text.edit_format.kerning
+
+ layout.operator("font.change_spacing", text="Decrease Kerning").delta = -1
+ layout.operator("font.change_spacing", text="Increase Kerning").delta = 1
+ layout.operator("font.change_spacing", text="Reset Kerning").delta = -kerning
+
class VIEW3D_MT_edit_text_chars(Menu):
bl_label = "Special Characters"
@@ -4524,6 +4542,7 @@ class VIEW3D_MT_armature_context_menu(Menu):
# Remove
layout.operator("armature.split")
+ layout.operator("armature.separate")
layout.operator("armature.merge")
layout.operator("armature.dissolve")
layout.operator("armature.delete")
@@ -5419,6 +5438,7 @@ class VIEW3D_PT_shading_lighting(Panel):
col.prop(shading, "studiolight_rotate_z", text="Rotation")
col.prop(shading, "studiolight_intensity")
col.prop(shading, "studiolight_background_alpha")
+ col.prop(shading, "studiolight_background_blur")
col = split.column() # to align properly with above
elif shading.type == 'RENDERED':
@@ -5442,6 +5462,7 @@ class VIEW3D_PT_shading_lighting(Panel):
col.prop(shading, "studiolight_rotate_z", text="Rotation")
col.prop(shading, "studiolight_intensity")
col.prop(shading, "studiolight_background_alpha")
+ col.prop(shading, "studiolight_background_blur")
col = split.column() # to align properly with above
@@ -7107,6 +7128,7 @@ classes = (
VIEW3D_MT_edit_curve_showhide,
VIEW3D_MT_edit_surface,
VIEW3D_MT_edit_font,
+ VIEW3D_MT_edit_font_kerning,
VIEW3D_MT_edit_text_chars,
VIEW3D_MT_edit_meta,
VIEW3D_MT_edit_meta_showhide,