diff options
Diffstat (limited to 'release')
46 files changed, 502 insertions, 211 deletions
diff --git a/release/datafiles/alert_icons.png b/release/datafiles/alert_icons.png Binary files differindex e1cb671713f..0add7a3ccf8 100644 --- a/release/datafiles/alert_icons.png +++ b/release/datafiles/alert_icons.png diff --git a/release/datafiles/alert_icons_update.py b/release/datafiles/alert_icons_update.py index dba96c2126a..34a2798a18c 100644..100755 --- a/release/datafiles/alert_icons_update.py +++ b/release/datafiles/alert_icons_update.py @@ -1,5 +1,25 @@ #!/usr/bin/env python3 +# ##### BEGIN GPL LICENSE BLOCK ##### +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# ##### END GPL LICENSE BLOCK ##### + +# <pep8 compliant> + # This script updates icons from the SVG file import os import subprocess @@ -7,19 +27,19 @@ import sys BASEDIR = os.path.abspath(os.path.dirname(__file__)) -inkscape_path = 'inkscape' +inkscape_bin = os.environ.get("INKSCAPE_BIN", "inkscape") if sys.platform == 'darwin': - inkscape_app_path = '/Applications/Inkscape.app/Contents/Resources/script' + inkscape_app_path = '/Applications/Inkscape.app/Contents/MacOS/inkscape' if os.path.exists(inkscape_app_path): - inkscape_path = inkscape_app_path + inkscape_bin = inkscape_app_path cmd = ( - inkscape_path, + inkscape_bin, os.path.join(BASEDIR, "alert_icons.svg"), "--export-width=1280", "--export-height=256", - "--without-gui", - "--export-png=" + os.path.join(BASEDIR, "alert_icons.png"), + "--export-type=png", + "--export-filename=" + os.path.join(BASEDIR, "alert_icons.png"), ) subprocess.check_call(cmd) diff --git a/release/datafiles/blender_icons.svg b/release/datafiles/blender_icons.svg index f894ca3f298..c3461fd1bea 100644 --- a/release/datafiles/blender_icons.svg +++ b/release/datafiles/blender_icons.svg @@ -17301,6 +17301,26 @@ d="m 1800,348 h 3 v 14 h -3 z m -4,7 h 16 v 3 h -16 z" inkscape:connector-curvature="0" /> </g> + <path + style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.98999999;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:new" + d="m 418.85321,140.04954 -2.82,-2.82 a 0.62,0.62 0 0 0 -0.4,-0.18 0.6,0.6 0 0 0 -0.6,0.6 0.62,0.62 0 0 0 0.18,0.43 l 1,1 -9.18,9.12 -1,-1 a 0.62,0.62 0 0 0 -0.4,-0.15 0.6,0.6 0 0 0 -0.6,0.6 0.62,0.62 0 0 0 0.18,0.4 l 2.82,2.82 a 0.6,0.6 0 0 0 0.82,-0.82 l -1,-1 9.18,-9.15 1,1 a 0.6,0.6 0 0 0 0.82,-0.85 z" + id="path3261" + inkscape:connector-curvature="0" /> + <g + style="display:inline;enable-background:new" + transform="translate(-0.35812,42.294299)" + id="g4073"> + <path + sodipodi:nodetypes="cccccccccccccssssccs" + d="m 388.17266,99.291166 c -0.27613,4e-5 -0.49997,0.22388 -0.5,0.5 v 1.261304 h -3.16865 v 1.46027 h 3.16865 v 1.27843 c 3e-5,0.27613 0.22387,0.49997 0.5,0.5 h 4 c 0.27613,-3e-5 0.49997,-0.22387 0.5,-0.5 v -4.000004 c -3e-5,-0.27612 -0.22387,-0.49996 -0.5,-0.5 z m 2.59221,-4.74807 c 2.50006,0 4.81247,1.33488 6.0625,3.5 1.25002,2.165124 1.25002,4.834884 0,7.000004 -1.25003,2.16512 -3.56244,3.5 -6.0625,3.5 h -6.5 c 0,-4.66667 0,-9.333336 0,-14.000004 z" + style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;paint-order:fill markers stroke;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:new" + id="rect10339-4-1-6" /> + </g> + <path + id="rect10339-4-1-7-3" + style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;paint-order:fill markers stroke;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:new" + d="m 368.30892,141.58547 c -0.27613,4e-5 -0.49997,0.22388 -0.5,0.5 v 1.26473 h -4.76715 v 1.4911 h 4.76715 v 1.24417 c 3e-5,0.27613 0.22387,0.49997 0.5,0.5 0.63583,0.004 3.43318,-0.006 3.9995,-0.006 0.24106,0 0.46127,-0.0485 0.46127,-0.50967 4e-5,-0.85242 -8.9e-4,-2.98571 -8.9e-4,-3.95935 0,-0.30244 -0.19636,-0.51552 -0.46153,-0.51552 -0.82724,0 -3.36276,-0.009 -3.99823,-0.009 v 2e-5 z m 2.30359,-4.68113 -0.005,4.25868 c 0.48989,0.002 1.39549,0.005 1.88538,0.007 0.44541,0.0357 0.71675,0.47423 0.71675,0.85988 -6.6e-4,1.00616 -0.009,2.97018 -0.009,4.15122 0,0.46073 -0.24756,0.84994 -0.6533,0.84994 -0.48399,0.0143 -1.44986,-1.1e-4 -1.93405,-1.6e-4 v 3.87356 l -7.75691,-0.0669 v -14.00001 z" + sodipodi:nodetypes="cccccccccccccccccccccccccc" /> </g> <g inkscape:groupmode="layer" diff --git a/release/datafiles/blender_icons16/icon16_fixed_size.dat b/release/datafiles/blender_icons16/icon16_fixed_size.dat Binary files differnew file mode 100644 index 00000000000..95a777e733f --- /dev/null +++ b/release/datafiles/blender_icons16/icon16_fixed_size.dat diff --git a/release/datafiles/blender_icons16/icon16_force_boid.dat b/release/datafiles/blender_icons16/icon16_force_boid.dat Binary files differindex 71f89bd7c04..f719054d84a 100644 --- a/release/datafiles/blender_icons16/icon16_force_boid.dat +++ b/release/datafiles/blender_icons16/icon16_force_boid.dat diff --git a/release/datafiles/blender_icons16/icon16_gp_caps_flat.dat b/release/datafiles/blender_icons16/icon16_gp_caps_flat.dat Binary files differnew file mode 100644 index 00000000000..cdd76d850a3 --- /dev/null +++ b/release/datafiles/blender_icons16/icon16_gp_caps_flat.dat diff --git a/release/datafiles/blender_icons16/icon16_gp_caps_round.dat b/release/datafiles/blender_icons16/icon16_gp_caps_round.dat Binary files differnew file mode 100644 index 00000000000..7c5f4c56497 --- /dev/null +++ b/release/datafiles/blender_icons16/icon16_gp_caps_round.dat diff --git a/release/datafiles/blender_icons32/icon32_fixed_size.dat b/release/datafiles/blender_icons32/icon32_fixed_size.dat Binary files differnew file mode 100644 index 00000000000..a83e3755229 --- /dev/null +++ b/release/datafiles/blender_icons32/icon32_fixed_size.dat diff --git a/release/datafiles/blender_icons32/icon32_force_boid.dat b/release/datafiles/blender_icons32/icon32_force_boid.dat Binary files differindex 7fc7cb5ee8c..9043989024b 100644 --- a/release/datafiles/blender_icons32/icon32_force_boid.dat +++ b/release/datafiles/blender_icons32/icon32_force_boid.dat diff --git a/release/datafiles/blender_icons32/icon32_gp_caps_flat.dat b/release/datafiles/blender_icons32/icon32_gp_caps_flat.dat Binary files differnew file mode 100644 index 00000000000..fcd3c466c83 --- /dev/null +++ b/release/datafiles/blender_icons32/icon32_gp_caps_flat.dat diff --git a/release/datafiles/blender_icons32/icon32_gp_caps_round.dat b/release/datafiles/blender_icons32/icon32_gp_caps_round.dat Binary files differnew file mode 100644 index 00000000000..e7f5b80aecb --- /dev/null +++ b/release/datafiles/blender_icons32/icon32_gp_caps_round.dat diff --git a/release/datafiles/blender_icons_geom_update.py b/release/datafiles/blender_icons_geom_update.py index 5b95961ae6b..257b7a49285 100755 --- a/release/datafiles/blender_icons_geom_update.py +++ b/release/datafiles/blender_icons_geom_update.py @@ -1,15 +1,34 @@ #!/usr/bin/env python3 +# ##### BEGIN GPL LICENSE BLOCK ##### +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# ##### END GPL LICENSE BLOCK ##### + +# <pep8 compliant> + # This script updates icons from the BLEND file import os import subprocess import sys -def run(cmd): +def run(cmd, *, env=None): print(" ", " ".join(cmd)) - # Don't use check_call because asan causes nonzero exitcode :S - subprocess.call(cmd) + subprocess.check_call(cmd, env=env) def edit_text_file(filename, marker_begin, marker_end, content): @@ -73,7 +92,17 @@ for blend in icons_blend: "--group", "Export", "--output-dir", output_dir, ) - run(cmd) + + env = {} + # Developers may have ASAN enabled, avoid non-zero exit codes. + env["ASAN_OPTIONS"] = "exitcode=0:" + os.environ.get("ASAN_OPTIONS", "") + # These NEED to be set on windows for python to initialize properly. + if sys.platform[:3] == "win": + env["PATHEXT"] = os.environ.get("PATHEXT", "") + env["SystemDrive"] = os.environ.get("SystemDrive", "") + env["SystemRoot"] = os.environ.get("SystemRoot", "") + + run(cmd, env=env) files_new = set(names_and_time_from_path(output_dir)) icon_files.extend([ diff --git a/release/datafiles/blender_icons_update.py b/release/datafiles/blender_icons_update.py index 8167b8b25e6..524cc512f29 100755 --- a/release/datafiles/blender_icons_update.py +++ b/release/datafiles/blender_icons_update.py @@ -1,18 +1,48 @@ #!/usr/bin/env python3 +# ##### BEGIN GPL LICENSE BLOCK ##### +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# ##### END GPL LICENSE BLOCK ##### + +# <pep8 compliant> + # This script updates icons from the SVG file import os import subprocess import sys -def run(cmd): +def run(cmd, *, env=None): print(" ", " ".join(cmd)) - subprocess.check_call(cmd) + subprocess.check_call(cmd, env=env) BASEDIR = os.path.abspath(os.path.dirname(__file__)) +env = {} +# Developers may have ASAN enabled, avoid non-zero exit codes. +env["ASAN_OPTIONS"] = "exitcode=0:" + os.environ.get("ASAN_OPTIONS", "") + +# These NEED to be set on windows for python to initialize properly. +if sys.platform[:3] == "win": + env["PATHEXT"] = os.environ.get("PATHEXT", "") + env["SystemDrive"] = os.environ.get("SystemDrive", "") + env["SystemRoot"] = os.environ.get("SystemRoot", "") + inkscape_bin = os.environ.get("INKSCAPE_BIN", "inkscape") blender_bin = os.environ.get("BLENDER_BIN", "blender") @@ -32,7 +62,7 @@ cmd = ( "--export-type=png", "--export-filename=" + os.path.join(BASEDIR, "blender_icons16.png"), ) -run(cmd) +run(cmd, env=env) cmd = ( inkscape_bin, @@ -42,7 +72,7 @@ cmd = ( "--export-type=png", "--export-filename=" + os.path.join(BASEDIR, "blender_icons32.png"), ) -run(cmd) +run(cmd, env=env) # For testing it can be good to clear all old @@ -64,7 +94,7 @@ cmd = ( "--minx_icon", "2", "--maxx_icon", "2", "--miny_icon", "2", "--maxy_icon", "2", "--spacex_icon", "1", "--spacey_icon", "1", ) -run(cmd) +run(cmd, env=env) cmd = ( blender_bin, "--background", "--factory-startup", "-noaudio", @@ -78,7 +108,7 @@ cmd = ( "--minx_icon", "4", "--maxx_icon", "4", "--miny_icon", "4", "--maxy_icon", "4", "--spacex_icon", "2", "--spacey_icon", "2", ) -run(cmd) +run(cmd, env=env) os.remove(os.path.join(BASEDIR, "blender_icons16.png")) os.remove(os.path.join(BASEDIR, "blender_icons32.png")) diff --git a/release/datafiles/ctodata.py b/release/datafiles/ctodata.py index 0471faad565..20f119c4264 100755 --- a/release/datafiles/ctodata.py +++ b/release/datafiles/ctodata.py @@ -1,27 +1,25 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# ***** BEGIN GPL LICENSE BLOCK ***** +# ##### BEGIN GPL LICENSE BLOCK ##### # -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # The Original Code is Copyright (C) 2009 Blender Foundation. # All rights reserved. # -# ***** END GPL LICENCE BLOCK ***** - +# ##### END GPL LICENSE BLOCK ##### # <pep8 compliant> diff --git a/release/datafiles/locale b/release/datafiles/locale -Subproject 62e82958a760dad775d9b3387d7fb535fd6de4c +Subproject 8a05b618f031582c006c6f62b9e60619ab3eef8 diff --git a/release/datafiles/preview.blend b/release/datafiles/preview.blend Binary files differindex f92f68ad029..e342cb85158 100644 --- a/release/datafiles/preview.blend +++ b/release/datafiles/preview.blend diff --git a/release/datafiles/prvicons_update.py b/release/datafiles/prvicons_update.py index fa526f88e96..ad42ede9772 100755 --- a/release/datafiles/prvicons_update.py +++ b/release/datafiles/prvicons_update.py @@ -1,5 +1,25 @@ #!/usr/bin/env python3 +# ##### BEGIN GPL LICENSE BLOCK ##### +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# ##### END GPL LICENSE BLOCK ##### + +# <pep8 compliant> + # This script updates icons from the SVG file import os import subprocess @@ -7,15 +27,15 @@ import sys BASEDIR = os.path.abspath(os.path.dirname(__file__)) -inkscape_path = 'inkscape' +inkscape_bin = os.environ.get("INKSCAPE_BIN", "inkscape") if sys.platform == 'darwin': inkscape_app_path = '/Applications/Inkscape.app/Contents/MacOS/inkscape' if os.path.exists(inkscape_app_path): - inkscape_path = inkscape_app_path + inkscape_bin = inkscape_app_path cmd = ( - inkscape_path, + inkscape_bin, os.path.join(BASEDIR, "prvicons.svg"), "--export-width=1792", "--export-height=256", diff --git a/release/scripts/addons b/release/scripts/addons -Subproject 4475cbd11a636382d57571e0f5dfeff1f90bd6b +Subproject 67f1fbca1482d9d9362a4001332e785c3fd5d23 diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib -Subproject 788441f2930465bbfba8f0797b12dcef1d46694 +Subproject ef6ef414d22c2578fad99327743b925ab640a99 diff --git a/release/scripts/modules/bl_i18n_utils/utils.py b/release/scripts/modules/bl_i18n_utils/utils.py index fda93682dc5..95184853f73 100644 --- a/release/scripts/modules/bl_i18n_utils/utils.py +++ b/release/scripts/modules/bl_i18n_utils/utils.py @@ -1355,7 +1355,7 @@ class I18n: print(prefix.join(lines)) @classmethod - def check_py_module_has_translations(clss, src, settings=settings): + def check_py_module_has_translations(cls, src, settings=settings): """ Check whether a given src (a py module, either a directory or a py file) has some i18n translation data, and returns a tuple (src_file, translations_tuple) if yes, else (None, None). @@ -1367,11 +1367,11 @@ class I18n: if not fname.endswith(".py"): continue path = os.path.join(root, fname) - _1, txt, _2, has_trans = clss._parser_check_file(path) + _1, txt, _2, has_trans = cls._parser_check_file(path) if has_trans: txts.append((path, txt)) elif src.endswith(".py") and os.path.isfile(src): - _1, txt, _2, has_trans = clss._parser_check_file(src) + _1, txt, _2, has_trans = cls._parser_check_file(src) if has_trans: txts.append((src, txt)) for path, txt in txts: diff --git a/release/scripts/modules/bl_i18n_utils/utils_spell_check.py b/release/scripts/modules/bl_i18n_utils/utils_spell_check.py index c310eee0b14..14fc81821c4 100644 --- a/release/scripts/modules/bl_i18n_utils/utils_spell_check.py +++ b/release/scripts/modules/bl_i18n_utils/utils_spell_check.py @@ -48,6 +48,7 @@ class SpellChecker: "equi", # equi-angular, etc. "fader", "globbing", + "haptics", "hasn", # hasn't "hetero", "hoc", # ad-hoc @@ -188,7 +189,7 @@ class SpellChecker: "reprojection", "reproject", "reprojecting", "resize", "restpose", - "resync", + "resync", "resynced", "retarget", "retargets", "retargeting", "retargeted", "retiming", "rigidbody", @@ -227,6 +228,7 @@ class SpellChecker: "un", "unassociate", "unassociated", "unbake", + "uncheck", "unclosed", "uncomment", "unculled", @@ -381,6 +383,7 @@ class SpellChecker: "albedo", "anamorphic", "anisotropic", "anisotropy", + "bimanual", # OpenXR? "bitangent", "boid", "boids", "ceil", @@ -430,6 +433,7 @@ class SpellChecker: "spacebar", "subtractive", "superellipse", + "thumbstick", "tooltip", "tooltips", "trackpad", "tuple", @@ -493,7 +497,7 @@ class SpellChecker: "pinlight", "qi", "radiosity", - "raycasting", + "raycast", "raycasting", "raytrace", "raytracing", "raytraced", "refractions", "remesher", "remeshing", "remesh", @@ -698,6 +702,7 @@ class SpellChecker: "msgid", "msgids", "mux", "ndof", + "pbr", # Physically Based Rendering "ppc", "precisa", "px", diff --git a/release/scripts/modules/bpy/utils/__init__.py b/release/scripts/modules/bpy/utils/__init__.py index 58b20d9e3c8..1fe73f50639 100644 --- a/release/scripts/modules/bpy/utils/__init__.py +++ b/release/scripts/modules/bpy/utils/__init__.py @@ -754,12 +754,10 @@ def register_classes_factory(classes): which simply registers and unregisters a sequence of classes. """ def register(): - from bpy.utils import register_class for cls in classes: register_class(cls) def unregister(): - from bpy.utils import unregister_class for cls in reversed(classes): unregister_class(cls) diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index 29b53aedf78..8a1615ad99f 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -477,29 +477,34 @@ class Mesh(bpy_types.ID): face_lengths = tuple(map(len, faces)) - self.vertices.add(len(vertices)) - self.edges.add(len(edges)) + # NOTE: check non-empty lists by length because of how `numpy` handles truth tests, see: T90268. + vertices_len = len(vertices) + edges_len = len(edges) + faces_len = len(faces) + + self.vertices.add(vertices_len) + self.edges.add(edges_len) self.loops.add(sum(face_lengths)) - self.polygons.add(len(faces)) + self.polygons.add(faces_len) self.vertices.foreach_set("co", tuple(chain.from_iterable(vertices))) self.edges.foreach_set("vertices", tuple(chain.from_iterable(edges))) vertex_indices = tuple(chain.from_iterable(faces)) - loop_starts = tuple(islice(chain([0], accumulate(face_lengths)), len(faces))) + loop_starts = tuple(islice(chain([0], accumulate(face_lengths)), faces_len)) self.polygons.foreach_set("loop_total", face_lengths) self.polygons.foreach_set("loop_start", loop_starts) self.polygons.foreach_set("vertices", vertex_indices) - if edges or faces: + if edges_len or faces_len: self.update( # Needed to either: # - Calculate edges that don't exist for polygons. # - Assign edges to polygon loops. - calc_edges=bool(faces), + calc_edges=bool(faces_len), # Flag loose edges. - calc_edges_loose=bool(edges), + calc_edges_loose=bool(edges_len), ) @property @@ -761,9 +766,9 @@ class Macro(StructRNA): __slots__ = () @classmethod - def define(self, opname): + def define(cls, opname): from _bpy import ops - return ops.macro_define(self, opname) + return ops.macro_define(cls, opname) class PropertyGroup(StructRNA, metaclass=RNAMetaPropGroup): diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 3527e993173..d9538930f33 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -775,6 +775,8 @@ def km_property_editor(_params): # Constraint panels ("constraint.delete", {"type": 'X', "value": 'PRESS'}, {"properties": [("report", True)]}), ("constraint.delete", {"type": 'DEL', "value": 'PRESS'}, {"properties": [("report", True)]}), + ("constraint.copy", {"type": 'D', "value": 'PRESS', "shift": True}, None), + ("constraint.apply", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("report", True)]}), ]) return keymap @@ -1968,8 +1970,8 @@ def km_file_browser(params): *_template_space_region_type_toggle( toolbar_key={"type": 'T', "value": 'PRESS'}, ), - ("screen.region_toggle", {"type": 'N', "value": 'PRESS'}, - {"properties": [("region_type", 'TOOL_PROPS')]}), + ("wm.context_toggle", {"type": 'N', "value": 'PRESS'}, + {"properties": [("data_path", 'space_data.show_region_tool_props')]}), ("file.parent", {"type": 'UP_ARROW', "value": 'PRESS', "alt": True}, None), ("file.previous", {"type": 'LEFT_ARROW', "value": 'PRESS', "alt": True}, None), ("file.next", {"type": 'RIGHT_ARROW', "value": 'PRESS', "alt": True}, None), @@ -1999,7 +2001,12 @@ def km_file_browser(params): {"properties": [("increment", -10)]}), ("file.filenum", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True, "repeat": True}, {"properties": [("increment", -100)]}), + + # Select file under cursor before spawning the context menu. + ("file.select", {"type": 'RIGHTMOUSE', "value": 'PRESS'}, + {"properties": [("open", False), ("only_activate_if_selected", params.select_mouse == 'LEFTMOUSE'), ("pass_through", True)]}), *_template_items_context_menu("FILEBROWSER_MT_context_menu", params.context_menu_event), + *_template_items_context_menu("ASSETBROWSER_MT_context_menu", params.context_menu_event), ]) return keymap @@ -3328,6 +3335,8 @@ def km_grease_pencil_stroke_edit_mode(params): ("gpencil.layer_isolate", {"type": 'NUMPAD_ASTERIX', "value": 'PRESS'}, None), # Move to layer op_menu("GPENCIL_MT_move_to_layer", {"type": 'M', "value": 'PRESS'}), + # Merge Layer + ("gpencil.layer_merge", {"type": 'M', "value": 'PRESS', "shift": True, "ctrl": True}, None), # Transform tools ("transform.translate", {"type": 'G', "value": 'PRESS'}, None), ("transform.translate", {"type": params.select_tweak, "value": 'ANY'}, None), @@ -3426,6 +3435,8 @@ def km_grease_pencil_stroke_paint_mode(params): {"properties": [("unselected", True)]}), # Active layer op_menu("GPENCIL_MT_layer_active", {"type": 'Y', "value": 'PRESS'}), + # Merge Layer + ("gpencil.layer_merge", {"type": 'M', "value": 'PRESS', "shift": True, "ctrl": True}, None), # Active material op_menu("GPENCIL_MT_material_active", {"type": 'U', "value": 'PRESS'}), # Keyframe menu @@ -3591,6 +3602,8 @@ def km_grease_pencil_stroke_sculpt_mode(params): ("gpencil.active_frames_delete_all", {"type": 'DEL', "value": 'PRESS', "shift": True}, None), # Active layer op_menu("GPENCIL_MT_layer_active", {"type": 'Y', "value": 'PRESS'}), + # Merge Layer + ("gpencil.layer_merge", {"type": 'M', "value": 'PRESS', "shift": True, "ctrl": True}, None), # Keyframe menu op_menu("VIEW3D_MT_gpencil_animation", {"type": 'I', "value": 'PRESS'}), # Context menu @@ -3808,6 +3821,8 @@ def km_grease_pencil_stroke_weight_mode(params): ("gpencil.active_frames_delete_all", {"type": 'DEL', "value": 'PRESS', "shift": True}, None), # Active layer op_menu("GPENCIL_MT_layer_active", {"type": 'Y', "value": 'PRESS'}), + # Merge Layer + ("gpencil.layer_merge", {"type": 'M', "value": 'PRESS', "shift": True, "ctrl": True}, None), # Keyframe menu op_menu("VIEW3D_MT_gpencil_animation", {"type": 'I', "value": 'PRESS'}), # Context menu @@ -3872,6 +3887,8 @@ def km_grease_pencil_stroke_vertex_mode(params): ("gpencil.active_frames_delete_all", {"type": 'DEL', "value": 'PRESS', "shift": True}, None), # Active layer op_menu("GPENCIL_MT_layer_active", {"type": 'Y', "value": 'PRESS'}), + # Merge Layer + ("gpencil.layer_merge", {"type": 'M', "value": 'PRESS', "shift": True, "ctrl": True}, None), # Keyframe menu op_menu("VIEW3D_MT_gpencil_animation", {"type": 'I', "value": 'PRESS'}), # Vertex Paint context menu 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 714126903d8..dba94d71a43 100644 --- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py +++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py @@ -139,12 +139,12 @@ def _template_items_basic_tools(*, connected=False): ] def _template_items_tool_select(params, operator, *, extend): - return [ - (operator, {"type": 'LEFTMOUSE', "value": 'PRESS'}, - {"properties": [("deselect_all", True)]}), - (operator, {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, - {"properties": [(extend, True)]}), - ] + return [ + (operator, {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("deselect_all", True)]}), + (operator, {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, + {"properties": [(extend, True)]}), + ] def _template_items_tool_select_actions(operator, *, type, value): @@ -465,6 +465,7 @@ def km_property_editor(params): # Constraint panels ("constraint.delete", {"type": 'BACK_SPACE', "value": 'PRESS'}, {"properties": [("report", True)]}), ("constraint.delete", {"type": 'DEL', "value": 'PRESS'}, {"properties": [("report", True)]}), + ("constraint.copy", {"type": 'D', "value": 'PRESS', "ctrl": True}, None), ]) return keymap @@ -1248,7 +1249,12 @@ def km_file_browser(params): {"properties": [("increment", -10)]}), ("file.filenum", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True, "repeat": True}, {"properties": [("increment", -100)]}), + + # Select file under cursor before spawning the context menu. + ("file.select", {"type": 'RIGHTMOUSE', "value": 'PRESS'}, + {"properties": [("open", False), ("only_activate_if_selected", True), ("pass_through", True)]}), *_template_items_context_menu("FILEBROWSER_MT_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}), + *_template_items_context_menu("ASSETBROWSER_MT_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}), ]) return keymap diff --git a/release/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py b/release/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py index 40dd0729fec..be47890a002 100644 --- a/release/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py +++ b/release/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py @@ -21,48 +21,43 @@ import bpy from bpy.app.handlers import persistent - -@persistent -def load_handler(_): - import bpy - - # 2D Animation - screen = bpy.data.screens['2D Animation'] - if screen: - for area in screen.areas: +def update_factory_startup_screens(): + # 2D Animation. + screen = bpy.data.screens["2D Animation"] + for area in screen.areas: + if area.type == 'PROPERTIES': # Set Tool settings as default in properties panel. - if area.type == 'PROPERTIES': - for space in area.spaces: - if space.type != 'PROPERTIES': - continue - space.context = 'TOOL' - + space = area.spaces.active + space.context = 'TOOL' + elif area.type == 'DOPESHEET_EDITOR': # Open sidebar in Dopesheet. - elif area.type == 'DOPESHEET_EDITOR': - for space in area.spaces: - if space.type != 'DOPESHEET_EDITOR': - continue - space.show_region_ui = True + space = area.spaces.active + space.show_region_ui = True + + # 2D Full Canvas. + screen = bpy.data.screens["2D Full Canvas"] + for area in screen.areas: + if area.type == 'VIEW_3D': + space = area.spaces.active + space.shading.type = 'MATERIAL' + space.shading.use_scene_world = True - # 2D Full Canvas - screen = bpy.data.screens['2D Full Canvas'] - if screen: - for area in screen.areas: - if area.type == 'VIEW_3D': - for space in area.spaces: - if space.type != 'VIEW_3D': - continue - space.shading.type = 'MATERIAL' - space.shading.use_scene_world = True - # Grease pencil object - scene = bpy.data.scenes[0] - if scene: +def update_factory_startup_scenes(): + for scene in bpy.data.scenes: scene.tool_settings.use_keyframe_insert_auto = True - for ob in scene.objects: - if ob.type == 'GPENCIL': - gpd = ob.data - gpd.onion_keyframe_type = 'ALL' + + +def update_factory_startup_grease_pencils(): + for gpd in bpy.data.grease_pencils: + gpd.onion_keyframe_type = 'ALL' + + +@persistent +def load_handler(_): + update_factory_startup_screens() + update_factory_startup_scenes() + update_factory_startup_grease_pencils() def register(): diff --git a/release/scripts/startup/bl_app_templates_system/Video_Editing/__init__.py b/release/scripts/startup/bl_app_templates_system/Video_Editing/__init__.py index ae3fdee56ac..247a1ec342e 100644 --- a/release/scripts/startup/bl_app_templates_system/Video_Editing/__init__.py +++ b/release/scripts/startup/bl_app_templates_system/Video_Editing/__init__.py @@ -20,10 +20,8 @@ import bpy from bpy.app.handlers import persistent -@persistent -def load_handler(_): - from bpy import context - screen = context.screen +def update_factory_startup_screens(): + screen = bpy.data.screens["Video Editing"] for area in screen.areas: if area.type == 'FILE_BROWSER': space = area.spaces.active @@ -31,6 +29,11 @@ def load_handler(_): params.use_filter_folder = True +@persistent +def load_handler(_): + update_factory_startup_screens() + + def register(): bpy.app.handlers.load_factory_startup_post.append(load_handler) diff --git a/release/scripts/startup/bl_operators/assets.py b/release/scripts/startup/bl_operators/assets.py index c782cd0646e..8c76018b7a1 100644 --- a/release/scripts/startup/bl_operators/assets.py +++ b/release/scripts/startup/bl_operators/assets.py @@ -130,7 +130,7 @@ class ASSET_OT_open_containing_blend_file(Operator): return {'RUNNING_MODAL'} if returncode: - self.report({'WARNING'}, "Blender subprocess exited with error code %d" % returncode) + self.report({'WARNING'}, "Blender sub-process exited with error code %d" % returncode) # TODO(Sybren): Replace this with a generic "reload assets" operator # that can run outside of the Asset Browser context. 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 de743033036..8de6925c051 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -54,7 +54,7 @@ class AnnotationDrawingToolsPanel: col.label(text="Stroke Placement:") row = col.row(align=True) row.prop_enum(tool_settings, "annotation_stroke_placement_view2d", 'VIEW') - row.prop_enum(tool_settings, "annotation_stroke_placement_view2d", 'CURSOR', text="Cursor") + row.prop_enum(tool_settings, "annotation_stroke_placement_view2d", 'IMAGE', text="Image") class GreasePencilSculptOptionsPanel: diff --git a/release/scripts/startup/bl_ui/properties_mask_common.py b/release/scripts/startup/bl_ui/properties_mask_common.py index 09a1f40d3a9..40a704a65dd 100644 --- a/release/scripts/startup/bl_ui/properties_mask_common.py +++ b/release/scripts/startup/bl_ui/properties_mask_common.py @@ -237,9 +237,8 @@ class MASK_PT_point: class MASK_PT_display: # subclasses must define... # ~ bl_space_type = 'CLIP_EDITOR' - # ~ bl_region_type = 'UI' + # ~ bl_region_type = 'HEADER' bl_label = "Mask Display" - bl_options = {'DEFAULT_CLOSED'} @classmethod def poll(cls, context): diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py index 4ea1ec26738..52af4fafd09 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -216,6 +216,7 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel): obj = context.object obj_type = obj.type is_geometry = (obj_type in {'MESH', 'CURVE', 'SURFACE', 'META', 'FONT', 'VOLUME', 'HAIR', 'POINTCLOUD'}) + has_bounds = (is_geometry or obj_type in {'LATTICE', 'ARMATURE'}) is_wire = (obj_type in {'CAMERA', 'EMPTY'}) is_empty_image = (obj_type == 'EMPTY' and obj.empty_display_type == 'IMAGE') is_dupli = (obj.instance_type != 'NONE') @@ -247,21 +248,27 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel): # Only useful with object having faces/materials... col.prop(obj, "color") - col = layout.column(align=False, heading="Bounds") - col.use_property_decorate = False - row = col.row(align=True) - sub = row.row(align=True) - sub.prop(obj, "show_bounds", text="") - sub = sub.row(align=True) - sub.active = obj.show_bounds or (obj.display_type == 'BOUNDS') - sub.prop(obj, "display_bounds_type", text="") - row.prop_decorator(obj, "display_bounds_type") + if has_bounds: + col = layout.column(align=False, heading="Bounds") + col.use_property_decorate = False + row = col.row(align=True) + sub = row.row(align=True) + sub.prop(obj, "show_bounds", text="") + sub = sub.row(align=True) + sub.active = obj.show_bounds or (obj.display_type == 'BOUNDS') + sub.prop(obj, "display_bounds_type", text="") + row.prop_decorator(obj, "display_bounds_type") class OBJECT_PT_instancing(ObjectButtonsPanel, Panel): bl_label = "Instancing" bl_options = {'DEFAULT_CLOSED'} + @classmethod + def poll(cls, context): + ob = context.object + return (ob.type in {'MESH', 'EMPTY', 'POINTCLOUD'}) + def draw(self, context): layout = self.layout @@ -399,6 +406,10 @@ class OBJECT_PT_visibility(ObjectButtonsPanel, Panel): col = layout.column(heading="Grease Pencil") col.prop(ob, "use_grease_pencil_lights", toggle=False) + layout.separator() + col = layout.column(heading="Mask") + col.prop(ob, "is_holdout") + class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} diff --git a/release/scripts/startup/bl_ui/properties_output.py b/release/scripts/startup/bl_ui/properties_output.py index 75c1f69f84f..0c1a26ceec1 100644 --- a/release/scripts/startup/bl_ui/properties_output.py +++ b/release/scripts/startup/bl_ui/properties_output.py @@ -205,6 +205,9 @@ class RENDER_PT_stamp(RenderOutputButtonsPanel, Panel): col.prop(rd, "use_stamp_marker", text="Marker") col.prop(rd, "use_stamp_filename", text="Filename") + if rd.use_sequencer: + col.prop(rd, "use_stamp_sequencer_strip", text="Strip Name") + class RENDER_PT_stamp_note(RenderOutputButtonsPanel, Panel): bl_label = "Note" diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 4bfd2fd32b0..c038f5f906a 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -1141,14 +1141,15 @@ def brush_basic__draw_color_selector(context, layout, brush, gp_settings, props) if not gp_settings.use_material_pin: ma = context.object.active_material icon_id = 0 + txt_ma = "" if ma: - icon_id = ma.id_data.preview.icon_id - txt_ma = ma.name - maxw = 25 - if len(txt_ma) > maxw: - txt_ma = txt_ma[:maxw - 5] + '..' + txt_ma[-3:] - else: - txt_ma = "" + ma.id_data.preview_ensure() + if ma.id_data.preview: + icon_id = ma.id_data.preview.icon_id + txt_ma = ma.name + maxw = 25 + if len(txt_ma) > maxw: + txt_ma = txt_ma[:maxw - 5] + '..' + txt_ma[-3:] sub = row.row() sub.ui_units_x = 8 @@ -1252,6 +1253,12 @@ def brush_basic_gpencil_paint_settings(layout, context, brush, *, compact=False) if brush.gpencil_tool == 'TINT': row = layout.row(align=True) row.prop(gp_settings, "vertex_mode", text="Mode") + else: + row = layout.row(align=True) + if context.region.type == 'TOOL_HEADER': + row.prop(gp_settings, "caps_type", text="", expand=True) + else: + row.prop(gp_settings, "caps_type", text="Caps Type") # FIXME: tools must use their own UI drawing! if tool.idname in { diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index afbc3abf302..a1e5b509295 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -1075,6 +1075,31 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel): layout.prop(stab, "filter_type") +class CLIP_PT_2d_cursor(Panel): + bl_space_type = 'CLIP_EDITOR' + bl_region_type = 'UI' + bl_category = "View" + bl_label = "2D Cursor" + + @classmethod + def poll(cls, context): + sc = context.space_data + + if CLIP_PT_clip_view_panel.poll(context): + return sc.pivot_point == 'CURSOR' or sc.mode == 'MASK' + + def draw(self, context): + layout = self.layout + + sc = context.space_data + + layout.use_property_split = True + layout.use_property_decorate = False + + col = layout.column() + col.prop(sc, "cursor_location", text="Location") + + class CLIP_PT_proxy(CLIP_PT_clip_view_panel, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' @@ -1156,12 +1181,6 @@ class CLIP_PT_mask_layers(MASK_PT_layers, Panel): 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' @@ -1191,6 +1210,11 @@ class CLIP_PT_tools_mask_tools(MASK_PT_tools, Panel): bl_region_type = 'TOOLS' bl_category = "Mask" + +class CLIP_PT_mask_display(MASK_PT_display, Panel): + bl_space_type = 'CLIP_EDITOR' + bl_region_type = 'HEADER' + # --- end mask --- @@ -1240,7 +1264,7 @@ class CLIP_PT_tools_scenesetup(Panel): class CLIP_PT_annotation(AnnotationDataPanel, CLIP_PT_clip_view_panel, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' - bl_category = "Annotation" + bl_category = "View" bl_options = set() # NOTE: this is just a wrapper around the generic GP Panel @@ -1863,6 +1887,7 @@ classes = ( CLIP_PT_proxy, CLIP_PT_footage, CLIP_PT_stabilization, + CLIP_PT_2d_cursor, CLIP_PT_mask, CLIP_PT_mask_layers, CLIP_PT_mask_display, diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py index 8ca93d2406c..aea2b76e07b 100644 --- a/release/scripts/startup/bl_ui/space_filebrowser.py +++ b/release/scripts/startup/bl_ui/space_filebrowser.py @@ -37,9 +37,9 @@ class FILEBROWSER_HT_header(Header): params = space_data.params row = layout.row(align=True) - row.prop(params, "asset_library", text="") + row.prop(params, "asset_library_ref", text="") # External libraries don't auto-refresh, add refresh button. - if params.asset_library != 'LOCAL': + if params.asset_library_ref != 'LOCAL': row.operator("file.refresh", text="", icon='FILE_REFRESH') layout.separator_spacer() @@ -52,18 +52,10 @@ class FILEBROWSER_HT_header(Header): layout.prop_with_popover( params, "display_type", - panel="FILEBROWSER_PT_display", + panel="ASSETBROWSER_PT_display", text="", icon_only=True, ) - layout.prop_with_popover( - params, - "display_type", - panel="FILEBROWSER_PT_filter", - text="", - icon='FILTER', - icon_only=True, - ) layout.prop(params, "filter_search", text="", icon='VIEWZOOM') @@ -84,28 +76,36 @@ class FILEBROWSER_HT_header(Header): if space_data.active_operator is None: layout.template_header() - FILEBROWSER_MT_editor_menus.draw_collapsible(context, layout) - if SpaceAssetInfo.is_asset_browser(space_data): + ASSETBROWSER_MT_editor_menus.draw_collapsible(context, layout) layout.separator() self.draw_asset_browser_buttons(context) else: + FILEBROWSER_MT_editor_menus.draw_collapsible(context, layout) layout.separator_spacer() if not context.screen.show_statusbar: layout.template_running_jobs() -class FILEBROWSER_PT_display(Panel): +class FileBrowserPanel: bl_space_type = 'FILE_BROWSER' - bl_region_type = 'HEADER' - bl_label = "Display Settings" # Shows as tooltip in popover - bl_ui_units_x = 10 @classmethod def poll(cls, context): + space_data = context.space_data + # can be None when save/reload with a file selector open - return context.space_data.params is not None + if space_data.params is None: + return False + + return space_data and space_data.type == 'FILE_BROWSER' and space_data.browse_mode == 'FILES' + + +class FILEBROWSER_PT_display(FileBrowserPanel, Panel): + bl_region_type = 'HEADER' + bl_label = "Display Settings" # Shows as tooltip in popover + bl_ui_units_x = 10 def draw(self, context): layout = self.layout @@ -129,17 +129,11 @@ class FILEBROWSER_PT_display(Panel): layout.prop(params, "use_sort_invert") -class FILEBROWSER_PT_filter(Panel): - bl_space_type = 'FILE_BROWSER' +class FILEBROWSER_PT_filter(FileBrowserPanel, Panel): bl_region_type = 'HEADER' bl_label = "Filter Settings" # Shows as tooltip in popover bl_ui_units_x = 8 - @classmethod - def poll(cls, context): - # can be None when save/reload with a file selector open - return context.space_data.params is not None - def draw(self, context): layout = self.layout @@ -201,7 +195,7 @@ class FILEBROWSER_PT_filter(Panel): sub = row.column(align=True) - if context.preferences.experimental.use_asset_browser: + if context.preferences.experimental.use_extended_asset_browser: sub.prop(params, "use_filter_asset_only") filter_id = params.filter_id @@ -302,7 +296,7 @@ class FILEBROWSER_MT_bookmarks_context_menu(Menu): text="Move to Bottom").direction = 'BOTTOM' -class FILEBROWSER_PT_bookmarks_favorites(Panel): +class FILEBROWSER_PT_bookmarks_favorites(FileBrowserPanel, Panel): bl_space_type = 'FILE_BROWSER' bl_region_type = 'TOOLS' bl_category = "Bookmarks" @@ -379,6 +373,7 @@ class FILEBROWSER_PT_advanced_filter(Panel): def poll(cls, context): # only useful in append/link (library) context currently... return ( + context.space_data.params and context.space_data.params.use_library_browsing and panel_poll_is_upper_region(context.region) and not panel_poll_is_asset_browsing(context) @@ -389,19 +384,17 @@ class FILEBROWSER_PT_advanced_filter(Panel): space = context.space_data params = space.params - if params and params.use_library_browsing: - layout.prop(params, "use_filter_blendid") - if params.use_filter_blendid: - layout.separator() - col = layout.column(align=True) + layout.prop(params, "use_filter_blendid") + if params.use_filter_blendid: + layout.separator() + col = layout.column(align=True) - if context.preferences.experimental.use_asset_browser: - col.prop(params, "use_filter_asset_only") + col.prop(params, "use_filter_asset_only") - filter_id = params.filter_id - for identifier in dir(filter_id): - if identifier.startswith("filter_"): - col.prop(filter_id, identifier, toggle=True) + filter_id = params.filter_id + for identifier in dir(filter_id): + if identifier.startswith("filter_"): + col.prop(filter_id, identifier, toggle=True) def is_option_region_visible(context, space): @@ -429,6 +422,10 @@ class FILEBROWSER_PT_directory_path(Panel): return True + @classmethod + def poll(cls, context): + return context.space_data.params + def draw(self, context): layout = self.layout space = context.space_data @@ -477,7 +474,14 @@ class FILEBROWSER_PT_directory_path(Panel): ).region_type = 'TOOL_PROPS' -class FILEBROWSER_MT_editor_menus(Menu): +class FileBrowserMenu: + @classmethod + def poll(cls, context): + space_data = context.space_data + return space_data and space_data.type == 'FILE_BROWSER' and space_data.browse_mode == 'FILES' + + +class FILEBROWSER_MT_editor_menus(FileBrowserMenu, Menu): bl_idname = "FILEBROWSER_MT_editor_menus" bl_label = "" @@ -488,7 +492,7 @@ class FILEBROWSER_MT_editor_menus(Menu): layout.menu("FILEBROWSER_MT_select") -class FILEBROWSER_MT_view(Menu): +class FILEBROWSER_MT_view(FileBrowserMenu, Menu): bl_label = "View" def draw(self, context): @@ -510,7 +514,7 @@ class FILEBROWSER_MT_view(Menu): layout.menu("INFO_MT_area") -class FILEBROWSER_MT_select(Menu): +class FILEBROWSER_MT_select(FileBrowserMenu, Menu): bl_label = "Select" def draw(self, _context): @@ -525,7 +529,7 @@ class FILEBROWSER_MT_select(Menu): layout.operator("file.select_box") -class FILEBROWSER_MT_context_menu(Menu): +class FILEBROWSER_MT_context_menu(FileBrowserMenu, Menu): bl_label = "Files Context Menu" def draw(self, context): @@ -552,10 +556,6 @@ class FILEBROWSER_MT_context_menu(Menu): sub.operator_context = 'EXEC_DEFAULT' sub.operator("file.delete", text="Delete") - active_asset = asset_utils.SpaceAssetInfo.get_active_asset(context) - if active_asset: - layout.operator("asset.open_containing_blend_file") - layout.separator() sub = layout.row() @@ -572,11 +572,91 @@ class FILEBROWSER_MT_context_menu(Menu): layout.prop_menu_enum(params, "sort_method") +class ASSETBROWSER_PT_display(asset_utils.AssetBrowserPanel, Panel): + bl_region_type = 'HEADER' + bl_label = "Display Settings" # Shows as tooltip in popover + bl_ui_units_x = 10 + + def draw(self, context): + layout = self.layout + + space = context.space_data + params = space.params + + layout.use_property_split = True + layout.use_property_decorate = False # No animation. + + if params.display_type == 'THUMBNAIL': + layout.prop(params, "display_size", text="Size") + else: + col = layout.column(heading="Columns", align=True) + col.prop(params, "show_details_size", text="Size") + col.prop(params, "show_details_datetime", text="Date") + + +class AssetBrowserMenu: + @classmethod + def poll(cls, context): + from bpy_extras.asset_utils import SpaceAssetInfo + return SpaceAssetInfo.is_asset_browser_poll(context) + + +class ASSETBROWSER_MT_editor_menus(AssetBrowserMenu, Menu): + bl_idname = "ASSETBROWSER_MT_editor_menus" + bl_label = "" + + def draw(self, _context): + layout = self.layout + + layout.menu("ASSETBROWSER_MT_view") + layout.menu("ASSETBROWSER_MT_select") + + +class ASSETBROWSER_MT_view(AssetBrowserMenu, Menu): + bl_label = "View" + + def draw(self, context): + layout = self.layout + st = context.space_data + params = st.params + + layout.prop(st, "show_region_toolbar", text="Source List") + layout.prop(st, "show_region_tool_props", text="Asset Details") + layout.operator("file.view_selected") + + layout.separator() + + layout.prop_menu_enum(params, "display_size") + + layout.separator() + + layout.menu("INFO_MT_area") + + +class ASSETBROWSER_MT_select(AssetBrowserMenu, Menu): + bl_label = "Select" + + def draw(self, _context): + layout = self.layout + + layout.operator("file.select_all", text="All").action = 'SELECT' + layout.operator("file.select_all", text="None").action = 'DESELECT' + layout.operator("file.select_all", text="Inverse").action = 'INVERT' + + layout.separator() + + layout.operator("file.select_box") + + class ASSETBROWSER_PT_navigation_bar(asset_utils.AssetBrowserPanel, Panel): bl_label = "Asset Navigation" bl_region_type = 'TOOLS' bl_options = {'HIDE_HEADER'} + @classmethod + def poll(cls, context): + return context.preferences.experimental.use_extended_asset_browser + def draw(self, context): layout = self.layout @@ -602,8 +682,8 @@ class ASSETBROWSER_PT_metadata(asset_utils.AssetBrowserPanel, Panel): layout.label(text="No asset selected", icon='INFO') return - asset_library = context.asset_library - asset_lib_path = bpy.types.AssetHandle.get_full_library_path(asset_file_handle, asset_library) + asset_library_ref = context.asset_library_ref + asset_lib_path = bpy.types.AssetHandle.get_full_library_path(asset_file_handle, asset_library_ref) if asset_file_handle.local_id: # If the active file is an ID, use its name directly so renaming is possible from right here. @@ -678,6 +758,32 @@ class ASSETBROWSER_UL_metadata_tags(UIList): row.prop(tag, "name", text="", emboss=False, icon_value=icon) +class ASSETBROWSER_MT_context_menu(AssetBrowserMenu, Menu): + bl_label = "Assets Context Menu" + + def draw(self, context): + layout = self.layout + st = context.space_data + params = st.params + + layout.operator("file.refresh", text="Refresh") + + layout.separator() + + sub = layout.row() + sub.operator_context = 'EXEC_DEFAULT' + sub.operator("asset.clear", text="Clear Asset") + + layout.separator() + + layout.operator("asset.open_containing_blend_file") + + layout.separator() + + if params.display_type == 'THUMBNAIL': + layout.prop_menu_enum(params, "display_size") + + classes = ( FILEBROWSER_HT_header, FILEBROWSER_PT_display, @@ -694,12 +800,17 @@ classes = ( FILEBROWSER_MT_view, FILEBROWSER_MT_select, FILEBROWSER_MT_context_menu, + ASSETBROWSER_PT_display, + ASSETBROWSER_MT_editor_menus, + ASSETBROWSER_MT_view, + ASSETBROWSER_MT_select, ASSETBROWSER_PT_navigation_bar, ASSETBROWSER_PT_metadata, ASSETBROWSER_PT_metadata_preview, ASSETBROWSER_PT_metadata_details, ASSETBROWSER_PT_metadata_tags, ASSETBROWSER_UL_metadata_tags, + ASSETBROWSER_MT_context_menu, ) if __name__ == "__main__": # only for live edit. diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 0fceb864ac2..dcb0ab2e9e5 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -817,7 +817,7 @@ class IMAGE_HT_header(Header): row.prop(sima, "show_stereo_3d", text="") if show_maskedit: row = layout.row() - row.popover(panel='CLIP_PT_mask_display') + row.popover(panel='IMAGE_PT_mask_display') # layers. layout.template_image_layers(ima, iuser) @@ -826,12 +826,6 @@ class IMAGE_HT_header(Header): row = layout.row() row.prop(sima, "display_channels", icon_only=True) - row = layout.row(align=True) - if ima.type == 'COMPOSITE': - row.operator("image.record_composite", icon='REC') - if ima.type == 'COMPOSITE' and ima.source in {'MOVIE', 'SEQUENCE'}: - row.operator("image.play_composite", icon='PLAY') - class IMAGE_MT_editor_menus(Menu): bl_idname = "IMAGE_MT_editor_menus" @@ -917,8 +911,7 @@ class IMAGE_PT_active_mask_point(MASK_PT_point, Panel): class IMAGE_PT_mask_display(MASK_PT_display, Panel): bl_space_type = 'IMAGE_EDITOR' - bl_region_type = 'UI' - bl_category = "Mask" + bl_region_type = 'HEADER' # --- end mask --- diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py index 0a4f419362d..febd064147f 100644 --- a/release/scripts/startup/bl_ui/space_outliner.py +++ b/release/scripts/startup/bl_ui/space_outliner.py @@ -315,7 +315,7 @@ class OUTLINER_MT_asset(Menu): @classmethod def poll(cls, context): - return context.preferences.experimental.use_asset_browser + return context.preferences.experimental.use_extended_asset_browser def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 30467521c3d..20fb39e8c1f 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -148,20 +148,6 @@ class SEQUENCER_HT_header(Header): layout.separator_spacer() - if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}: - layout.prop(st, "display_mode", text="", icon_only=True) - layout.prop(st, "preview_channels", text="", icon_only=True) - - gpd = context.gpencil_data - tool_settings = context.tool_settings - - # Proportional editing - if gpd and gpd.use_stroke_edit_mode: - row = layout.row(align=True) - row.prop(tool_settings, "use_proportional_edit", icon_only=True) - if tool_settings.use_proportional_edit: - row.prop(tool_settings, "proportional_edit_falloff", icon_only=True) - if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}: tool_settings = context.tool_settings row = layout.row(align=True) @@ -170,6 +156,10 @@ class SEQUENCER_HT_header(Header): sub.popover(panel="SEQUENCER_PT_snapping") layout.separator_spacer() + if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}: + layout.prop(st, "display_mode", text="", icon_only=True) + layout.prop(st, "preview_channels", text="", icon_only=True) + row = layout.row(align=True) row.prop(st, "show_strip_overlay", text="", icon='OVERLAY') sub = row.row(align=True) diff --git a/release/scripts/startup/bl_ui/space_spreadsheet.py b/release/scripts/startup/bl_ui/space_spreadsheet.py index afdbfea5091..51f8841419b 100644 --- a/release/scripts/startup/bl_ui/space_spreadsheet.py +++ b/release/scripts/startup/bl_ui/space_spreadsheet.py @@ -55,7 +55,7 @@ class SPREADSHEET_HT_header(bpy.types.Header): layout.operator("spreadsheet.toggle_pin", text="", icon=pin_icon, emboss=False) if space.object_eval_state == 'VIEWER_NODE' and len(context_path) < 3: - layout.label(text="No active viewer node.", icon='INFO') + layout.label(text="No active viewer node", icon='INFO') layout.separator_spacer() diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py index 93ab12e8462..811e7fd41c5 100644 --- a/release/scripts/startup/bl_ui/space_text.py +++ b/release/scripts/startup/bl_ui/space_text.py @@ -268,10 +268,7 @@ class TEXT_MT_text(Menu): 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(text, "use_module") layout.prop(st, "use_live_edit") diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 46a6944d2ea..bde710d8dbf 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1903,6 +1903,7 @@ class _defs_gpencil_paint: brush_basic__draw_color_selector(context, layout, brush, gp_settings, props) brush_basic_gpencil_paint_settings(layout, context, brush, compact=True) + return True @staticmethod def generate_from_brushes(context): diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index 5e68896a2a7..bcf579208a0 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -468,6 +468,9 @@ class TOPBAR_MT_file_import(Menu): text="Collada (Default) (.dae)") if bpy.app.build_options.alembic: self.layout.operator("wm.alembic_import", text="Alembic (.abc)") + if bpy.app.build_options.usd: + self.layout.operator( + "wm.usd_import", text="Universal Scene Description (.usd, .usdc, .usda)") self.layout.operator("wm.gpencil_import_svg", text="SVG as Grease Pencil") diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 91bd5f04b9d..003f2f223ea 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -1366,11 +1366,6 @@ class USERPREF_PT_saveload_autorun(FilePathsPanel, Panel): class USERPREF_PT_file_paths_asset_libraries(FilePathsPanel, Panel): bl_label = "Asset Libraries" - @classmethod - def poll(cls, context): - prefs = context.preferences - return prefs.experimental.use_asset_browser - def draw(self, context): layout = self.layout layout.use_property_split = False @@ -2258,7 +2253,7 @@ class USERPREF_PT_experimental_new_features(ExperimentalPanel, Panel): context, ( ({"property": "use_sculpt_vertex_colors"}, "T71947"), ({"property": "use_sculpt_tools_tilt"}, "T82877"), - ({"property": "use_asset_browser"}, ("project/profile/124/", "Milestone 1")), + ({"property": "use_extended_asset_browser"}, ("project/view/130/", "Project Page")), ({"property": "use_override_templates"}, ("T73318", "Milestone 4")), ), ) diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index df41445ee6f..c6bc6d9b5d3 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -1854,6 +1854,7 @@ class VIEW3D_MT_select_gpencil(Menu): layout.operator("gpencil.select_linked", text="Linked") layout.operator("gpencil.select_alternate") + layout.operator("gpencil.select_random") layout.operator_menu_enum("gpencil.select_grouped", "type", text="Grouped") if context.mode == 'VERTEX_GPENCIL': @@ -6386,7 +6387,13 @@ class VIEW3D_PT_overlay_edit_mesh_normals(Panel): sub = row.row(align=True) sub.active = overlay.show_vertex_normals or overlay.show_face_normals or overlay.show_split_normals - sub.prop(overlay, "normals_length", text="Size") + if overlay.use_normals_constant_screen_size: + sub.prop(overlay, "normals_constant_screen_size", text="Size") + else: + sub.prop(overlay, "normals_length", text="Size") + + row.prop(overlay, "use_normals_constant_screen_size", text="", icon='FIXED_SIZE') + class VIEW3D_PT_overlay_edit_mesh_freestyle(Panel): diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 46fed79332d..16b5ed33f3f 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1029,7 +1029,7 @@ class VIEW3D_PT_tools_vertexpaint_options(Panel, View3DPaintPanel): bl_options = {'DEFAULT_CLOSED'} @classmethod - def poll(self, _context): + def poll(cls, _context): # This is currently unused, since there aren't any Vertex Paint mode specific options. return False diff --git a/release/scripts/startup/nodeitems_builtins.py b/release/scripts/startup/nodeitems_builtins.py index 09820291222..6f9b222571c 100644 --- a/release/scripts/startup/nodeitems_builtins.py +++ b/release/scripts/startup/nodeitems_builtins.py @@ -495,6 +495,7 @@ geometry_node_categories = [ NodeItem("GeometryNodeAttributeTransfer"), ]), GeometryNodeCategory("GEO_COLOR", "Color", items=[ + NodeItem("ShaderNodeMixRGB"), NodeItem("ShaderNodeRGBCurve"), NodeItem("ShaderNodeValToRGB"), NodeItem("ShaderNodeSeparateRGB"), @@ -510,7 +511,9 @@ geometry_node_categories = [ NodeItem("GeometryNodeCurveTrim"), NodeItem("GeometryNodeCurveLength"), NodeItem("GeometryNodeCurveReverse"), + NodeItem("GeometryNodeCurveSplineType"), NodeItem("GeometryNodeCurveSetHandles"), + NodeItem("GeometryNodeCurveSelectHandles"), ]), GeometryNodeCategory("GEO_PRIMITIVES_CURVE", "Curve Primitives", items=[ NodeItem("GeometryNodeCurvePrimitiveLine"), |