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/startup/bl_ui')
-rw-r--r--release/scripts/startup/bl_ui/properties_constraint.py72
-rw-r--r--release/scripts/startup/bl_ui/properties_data_mesh.py7
-rw-r--r--release/scripts/startup/bl_ui/properties_freestyle.py9
-rw-r--r--release/scripts/startup/bl_ui/properties_paint_common.py8
-rw-r--r--release/scripts/startup/bl_ui/space_clip.py4
-rw-r--r--release/scripts/startup/bl_ui/space_image.py58
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py39
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py1
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py7
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py6
10 files changed, 145 insertions, 66 deletions
diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py
index 8bae32775a9..215c96a5975 100644
--- a/release/scripts/startup/bl_ui/properties_constraint.py
+++ b/release/scripts/startup/bl_ui/properties_constraint.py
@@ -971,7 +971,7 @@ class ConstraintButtonsSubPanel(Panel):
self.layout.context_pointer_set("constraint", con)
return con
- def draw_transform_source(self, context):
+ def draw_transform_from(self, context):
layout = self.layout
con = self.get_constraint(context)
@@ -980,36 +980,29 @@ class ConstraintButtonsSubPanel(Panel):
layout.use_property_split = True
layout.use_property_decorate = True
+ from_axes = [con.map_to_x_from, con.map_to_y_from, con.map_to_z_from]
+
if con.map_from == 'ROTATION':
layout.prop(con, "from_rotation_mode", text="Mode")
ext = "" if con.map_from == 'LOCATION' else "_rot" if con.map_from == 'ROTATION' else "_scale"
col = layout.column(align=True)
+ col.active = "X" in from_axes
col.prop(con, "from_min_x" + ext, text="X Min")
col.prop(con, "from_max_x" + ext, text="Max")
col = layout.column(align=True)
+ col.active = "Y" in from_axes
col.prop(con, "from_min_y" + ext, text="Y Min")
col.prop(con, "from_max_y" + ext, text="Max")
col = layout.column(align=True)
+ col.active = "Z" in from_axes
col.prop(con, "from_min_z" + ext, text="Z Min")
col.prop(con, "from_max_z" + ext, text="Max")
- def draw_transform_mapping(self, context):
- layout = self.layout
- con = self.get_constraint(context)
- layout.use_property_split = True
- layout.use_property_decorate = True
-
- layout.prop(con, "map_to_x_from", expand=False, text="Source Axis X")
-
- layout.prop(con, "map_to_y_from", expand=False, text="Y")
-
- layout.prop(con, "map_to_z_from", expand=False, text="Z")
-
- def draw_transform_destination(self, context):
+ def draw_transform_to(self, context):
layout = self.layout
con = self.get_constraint(context)
@@ -1024,15 +1017,18 @@ class ConstraintButtonsSubPanel(Panel):
ext = "" if con.map_to == 'LOCATION' else "_rot" if con.map_to == 'ROTATION' else "_scale"
col = layout.column(align=True)
- col.prop(con, "to_min_x" + ext, text="X Min")
+ col.prop(con, "map_to_x_from", expand=False, text="X Source Axis")
+ col.prop(con, "to_min_x" + ext, text="Min")
col.prop(con, "to_max_x" + ext, text="Max")
col = layout.column(align=True)
- col.prop(con, "to_min_y" + ext, text="Y Min")
+ col.prop(con, "map_to_y_from", expand=False, text="Y Source Axis")
+ col.prop(con, "to_min_y" + ext, text="Min")
col.prop(con, "to_max_y" + ext, text="Max")
col = layout.column(align=True)
- col.prop(con, "to_min_z" + ext, text="Z Min")
+ col.prop(con, "map_to_z_from", expand=False, text="Z Source Axis")
+ col.prop(con, "to_min_z" + ext, text="Min")
col.prop(con, "to_max_z" + ext, text="Max")
layout.prop(con, "mix_mode" + ext, text="Mix")
@@ -1387,50 +1383,34 @@ class BONE_PT_bTransformConstraint(BoneConstraintPanel, ConstraintButtonsPanel):
class OBJECT_PT_bTransformConstraint_source(ObjectConstraintPanel, ConstraintButtonsSubPanel):
bl_parent_id = "OBJECT_PT_bTransformConstraint"
- bl_label = "Source"
+ bl_label = "Map From"
def draw(self, context):
- self.draw_transform_source(context)
+ self.draw_transform_from(context)
-class BONE_PT_bTransformConstraint_source(BoneConstraintPanel, ConstraintButtonsSubPanel):
+class BONE_PT_bTransformConstraint_from(BoneConstraintPanel, ConstraintButtonsSubPanel):
bl_parent_id = "BONE_PT_bTransformConstraint"
- bl_label = "Source"
+ bl_label = "Map From"
def draw(self, context):
- self.draw_transform_source(context)
-
-
-class OBJECT_PT_bTransformConstraint_mapping(ObjectConstraintPanel, ConstraintButtonsSubPanel):
- bl_parent_id = "OBJECT_PT_bTransformConstraint"
- bl_label = "Mapping"
-
- def draw(self, context):
- self.draw_transform_mapping(context)
-
-
-class BONE_PT_bTransformConstraint_mapping(BoneConstraintPanel, ConstraintButtonsSubPanel):
- bl_parent_id = "BONE_PT_bTransformConstraint"
- bl_label = "Mapping"
-
- def draw(self, context):
- self.draw_transform_mapping(context)
+ self.draw_transform_from(context)
class OBJECT_PT_bTransformConstraint_destination(ObjectConstraintPanel, ConstraintButtonsSubPanel):
bl_parent_id = "OBJECT_PT_bTransformConstraint"
- bl_label = "Destination"
+ bl_label = "Map To"
def draw(self, context):
- self.draw_transform_destination(context)
+ self.draw_transform_to(context)
-class BONE_PT_bTransformConstraint_destination(BoneConstraintPanel, ConstraintButtonsSubPanel):
+class BONE_PT_bTransformConstraint_to(BoneConstraintPanel, ConstraintButtonsSubPanel):
bl_parent_id = "BONE_PT_bTransformConstraint"
- bl_label = "Destination"
+ bl_label = "Map To"
def draw(self, context):
- self.draw_transform_destination(context)
+ self.draw_transform_to(context)
# Shrinkwrap Constraint
@@ -1619,7 +1599,6 @@ classes = (
OBJECT_PT_bClampToConstraint,
OBJECT_PT_bTransformConstraint,
OBJECT_PT_bTransformConstraint_source,
- OBJECT_PT_bTransformConstraint_mapping,
OBJECT_PT_bTransformConstraint_destination,
OBJECT_PT_bShrinkwrapConstraint,
OBJECT_PT_bDampTrackConstraint,
@@ -1653,9 +1632,8 @@ classes = (
BONE_PT_bMinMaxConstraint,
BONE_PT_bClampToConstraint,
BONE_PT_bTransformConstraint,
- BONE_PT_bTransformConstraint_source,
- BONE_PT_bTransformConstraint_mapping,
- BONE_PT_bTransformConstraint_destination,
+ BONE_PT_bTransformConstraint_from,
+ BONE_PT_bTransformConstraint_to,
BONE_PT_bShrinkwrapConstraint,
BONE_PT_bDampTrackConstraint,
BONE_PT_bSplineIKConstraint,
diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py
index fbd8e2d7cff..27df265d013 100644
--- a/release/scripts/startup/bl_ui/properties_data_mesh.py
+++ b/release/scripts/startup/bl_ui/properties_data_mesh.py
@@ -464,6 +464,10 @@ class DATA_PT_sculpt_vertex_colors(MeshButtonsPanel, Panel):
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
+ @classmethod
+ def poll(cls, context):
+ return context.preferences.experimental.use_sculpt_vertex_colors
+
def draw(self, context):
layout = self.layout
@@ -508,7 +512,8 @@ class DATA_PT_remesh(MeshButtonsPanel, Panel):
col.prop(mesh, "use_remesh_preserve_volume", text="Volume")
col.prop(mesh, "use_remesh_preserve_paint_mask", text="Paint Mask")
col.prop(mesh, "use_remesh_preserve_sculpt_face_sets", text="Face Sets")
- col.prop(mesh, "use_remesh_preserve_vertex_colors", text="Vertex Colors")
+ if context.preferences.experimental.use_sculpt_vertex_colors:
+ col.prop(mesh, "use_remesh_preserve_vertex_colors", text="Vertex Colors")
col.operator("object.voxel_remesh", text="Voxel Remesh")
else:
diff --git a/release/scripts/startup/bl_ui/properties_freestyle.py b/release/scripts/startup/bl_ui/properties_freestyle.py
index f70789ebeed..54b1ca3d910 100644
--- a/release/scripts/startup/bl_ui/properties_freestyle.py
+++ b/release/scripts/startup/bl_ui/properties_freestyle.py
@@ -115,6 +115,15 @@ class VIEWLAYER_PT_freestyle(ViewLayerFreestyleButtonsPanel, Panel):
bl_label = "Freestyle"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
+ def draw_header(self, context):
+ view_layer = context.view_layer
+ rd = context.scene.render
+
+ layout = self.layout
+
+ layout.active = rd.use_freestyle
+ layout.prop(view_layer, "use_freestyle", text="")
+
def draw(self, context):
layout = self.layout
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index 209231cacb0..004bcaf819b 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -192,6 +192,10 @@ class ColorPalettePanel(BrushPanel):
elif context.vertex_paint_object:
capabilities = brush.vertex_paint_capabilities
return capabilities.has_color
+
+ elif context.sculpt_object:
+ capabilities = brush.sculpt_capabilities
+ return capabilities.has_color
return False
def draw(self, context):
@@ -678,6 +682,10 @@ def brush_settings(layout, context, brush, popover=False):
col.prop(brush, "tip_roundness")
col.prop(brush, "tip_scale_x")
+ if brush.sculpt_tool == 'SMEAR':
+ col = layout.column()
+ col.prop(brush, "smear_deform_type")
+
if brush.sculpt_tool == 'MULTIPLANE_SCRAPE':
col = layout.column()
col.prop(brush, "multiplane_scrape_angle")
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index 73bc5fe5c29..032a4a612c8 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -183,7 +183,7 @@ class CLIP_HT_header(Header):
r = active_object.reconstruction
if r.is_valid and sc.view == 'CLIP':
- layout.label(text="Solve error: %.4f" %
+ layout.label(text="Solve error: %.2f px" %
(r.average_error))
row = layout.row()
@@ -741,7 +741,7 @@ class CLIP_PT_track(CLIP_PT_tracking_panel, Panel):
layout.prop(act_track, "weight_stab")
if act_track.has_bundle:
- label_text = "Average Error: %.4f" % (act_track.average_error)
+ label_text = "Average Error: %.2f px" % (act_track.average_error)
layout.label(text=label_text)
layout.use_property_split = False
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index 76b7fc7f156..651866cf316 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -176,7 +176,7 @@ class IMAGE_MT_select(Menu):
layout.separator()
layout.operator("uv.select_pinned")
- layout.operator("uv.select_linked")
+ layout.menu("IMAGE_MT_select_linked")
layout.separator()
@@ -184,6 +184,16 @@ class IMAGE_MT_select(Menu):
layout.operator("uv.select_overlap")
+class IMAGE_MT_select_linked(Menu):
+ bl_label = "Select Linked"
+
+ def draw(self, _context):
+ layout = self.layout
+
+ layout.operator("uv.select_linked", text="Linked")
+ layout.operator("uv.shortest_path_select", text="Shortest Path")
+
+
class IMAGE_MT_image(Menu):
bl_label = "Image"
@@ -321,15 +331,37 @@ class IMAGE_MT_uvs_mirror(Menu):
layout.operator("transform.mirror", text="Y Axis").constraint_axis[1] = True
-class IMAGE_MT_uvs_weldalign(Menu):
- bl_label = "Weld/Align"
+class IMAGE_MT_uvs_align(Menu):
+ bl_label = "Align"
+
+ def draw(self, _context):
+ layout = self.layout
+
+ layout.operator_enum("uv.align", "axis")
+
+
+class IMAGE_MT_uvs_merge(Menu):
+ bl_label = "Merge"
def draw(self, _context):
layout = self.layout
- layout.operator("uv.weld") # W, 1.
- layout.operator("uv.remove_doubles")
- layout.operator_enum("uv.align", "axis") # W, 2/3/4.
+ layout.operator("uv.weld", text="At Center")
+ # Mainly to match the mesh menu.
+ layout.operator("uv.snap_selected", text="At Cursor").target = 'CURSOR'
+
+ layout.separator()
+
+ layout.operator("uv.remove_doubles", text="By Distance")
+
+
+class IMAGE_MT_uvs_split(Menu):
+ bl_label = "Split"
+
+ def draw(self, _context):
+ layout = self.layout
+
+ layout.operator("uv.select_split", text="Selection")
class IMAGE_MT_uvs(Menu):
@@ -350,6 +382,11 @@ class IMAGE_MT_uvs(Menu):
layout.separator()
+ layout.menu("IMAGE_MT_uvs_merge")
+ layout.menu("IMAGE_MT_uvs_split")
+
+ layout.separator()
+
layout.prop(uv, "use_live_unwrap")
layout.operator("uv.unwrap")
@@ -373,7 +410,7 @@ class IMAGE_MT_uvs(Menu):
layout.operator("uv.minimize_stretch")
layout.operator("uv.stitch")
- layout.menu("IMAGE_MT_uvs_weldalign")
+ layout.menu("IMAGE_MT_uvs_align")
layout.separator()
@@ -462,7 +499,7 @@ class IMAGE_MT_uvs_context_menu(Menu):
layout.separator()
# Remove
- layout.operator("uv.remove_doubles", text="Remove Double UVs")
+ layout.operator("uv.remove_doubles", text="Merge By Distance")
layout.operator("uv.stitch")
layout.operator("uv.weld")
@@ -1452,6 +1489,7 @@ classes = (
IMAGE_MT_view,
IMAGE_MT_view_zoom,
IMAGE_MT_select,
+ IMAGE_MT_select_linked,
IMAGE_MT_image,
IMAGE_MT_image_invert,
IMAGE_MT_uvs,
@@ -1459,7 +1497,9 @@ classes = (
IMAGE_MT_uvs_transform,
IMAGE_MT_uvs_snap,
IMAGE_MT_uvs_mirror,
- IMAGE_MT_uvs_weldalign,
+ IMAGE_MT_uvs_align,
+ IMAGE_MT_uvs_merge,
+ IMAGE_MT_uvs_split,
IMAGE_MT_uvs_select_mode,
IMAGE_MT_uvs_context_menu,
IMAGE_MT_mask_context_menu,
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 87464451632..b7852eb92e0 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -50,11 +50,14 @@ def generate_from_enum_ex(
attr,
cursor='DEFAULT',
tooldef_keywords={},
+ exclude_filter = {}
):
tool_defs = []
for enum in type.bl_rna.properties[attr].enum_items_static:
name = enum.name
idname = enum.identifier
+ if idname in exclude_filter:
+ continue
tool_defs.append(
ToolDef.from_dict(
dict(
@@ -1178,12 +1181,18 @@ class _defs_sculpt:
@staticmethod
def generate_from_brushes(context):
+ if bpy.context.preferences.experimental.use_sculpt_vertex_colors:
+ exclude_filter = {}
+ else:
+ exclude_filter = {'PAINT', 'SMEAR'}
+
return generate_from_enum_ex(
context,
idname_prefix="builtin_brush.",
icon_prefix="brush.sculpt.",
type=bpy.types.Brush,
attr="sculpt_tool",
+ exclude_filter = exclude_filter,
)
@ToolDef.from_fn
@@ -1579,6 +1588,20 @@ class _defs_image_uv_select:
)
+class _defs_image_uv_edit:
+
+ @ToolDef.from_fn
+ def rip_region():
+ return dict(
+ idname="builtin.rip_region",
+ label="Rip Region",
+ icon="ops.mesh.rip",
+ # TODO: generic operator (UV version of `VIEW3D_GGT_tool_generic_handle_free`).
+ widget=None,
+ keymap=(),
+ )
+
+
class _defs_image_uv_sculpt:
@staticmethod
@@ -2173,6 +2196,8 @@ class IMAGE_PT_tools_active(ToolSelectPanelHelper, Panel):
None,
*_tools_annotate,
None,
+ _defs_image_uv_edit.rip_region,
+ None,
lambda context: (
_defs_image_uv_sculpt.generate_from_brushes(context)
if _defs_image_generic.poll_uvedit(context)
@@ -2469,9 +2494,19 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
None,
_defs_sculpt.mesh_filter,
_defs_sculpt.cloth_filter,
- _defs_sculpt.color_filter,
+ lambda context: (
+ (_defs_sculpt.color_filter,)
+ if bpy.context.preferences.view.show_developer_ui and \
+ bpy.context.preferences.experimental.use_sculpt_vertex_colors
+ else ()
+ ),
None,
- _defs_sculpt.mask_by_color,
+ lambda context: (
+ (_defs_sculpt.mask_by_color,)
+ if bpy.context.preferences.view.show_developer_ui and \
+ bpy.context.preferences.experimental.use_sculpt_vertex_colors
+ else ()
+ ),
None,
_defs_transform.translate,
_defs_transform.rotate,
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index e5171df597a..5392ed9cc25 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -2143,6 +2143,7 @@ class USERPREF_PT_experimental_new_features(ExperimentalPanel, Panel):
self._draw_items(
context, (
({"property": "use_new_particle_system"}, "T73324"),
+ ({"property": "use_sculpt_vertex_colors"}, "T71947"),
),
)
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index df2b3fcdbeb..e4d0423cd76 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2256,8 +2256,7 @@ class VIEW3D_MT_object_relations(Menu):
layout.operator("object.proxy_make", text="Make Proxy...")
- if bpy.app.use_override_library:
- layout.operator("object.make_override_library", text="Make Library Override...")
+ layout.operator("object.make_override_library", text="Make Library Override...")
layout.operator("object.make_dupli_face")
@@ -3877,6 +3876,8 @@ class VIEW3D_MT_edit_mesh_extrude(Menu):
layout.operator("view3d.edit_mesh_extrude_move_shrink_fatten", text="Extrude Faces Along Normals"),
'FACE': lambda layout:
layout.operator("mesh.extrude_faces_move", text="Extrude Individual Faces"),
+ 'MANIFOLD': lambda layout:
+ layout.operator("view3d.edit_mesh_extrude_manifold_normal", text="Extrude Manifold"),
}
@staticmethod
@@ -3887,7 +3888,7 @@ class VIEW3D_MT_edit_mesh_extrude(Menu):
menu = []
if mesh.total_face_sel:
- menu += ['REGION', 'REGION_VERT_NORMAL', 'FACE']
+ menu += ['REGION', 'REGION_VERT_NORMAL', 'FACE', 'MANIFOLD']
if mesh.total_edge_sel and (select_mode[0] or select_mode[1]):
menu += ['EDGE']
if mesh.total_vert_sel and select_mode[0]:
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 549b89938e0..39e4ee2beac 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -737,7 +737,8 @@ class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel):
@classmethod
def poll(cls, context):
- return (context.sculpt_object and context.tool_settings.sculpt)
+ paint_settings = cls.paint_settings(context)
+ return (context.sculpt_object and context.tool_settings.sculpt and paint_settings)
def draw_header(self, context):
is_popover = self.is_popover
@@ -811,7 +812,8 @@ class VIEW3D_PT_sculpt_voxel_remesh(Panel, View3DPaintPanel):
col.prop(mesh, "use_remesh_preserve_volume", text="Volume")
col.prop(mesh, "use_remesh_preserve_paint_mask", text="Paint Mask")
col.prop(mesh, "use_remesh_preserve_sculpt_face_sets", text="Face Sets")
- col.prop(mesh, "use_remesh_preserve_vertex_colors", text="Vertex Colors")
+ if context.preferences.experimental.use_sculpt_vertex_colors:
+ col.prop(mesh, "use_remesh_preserve_vertex_colors", text="Vertex Colors")
layout.operator("object.voxel_remesh", text="Remesh")