diff options
Diffstat (limited to 'release')
54 files changed, 488 insertions, 94 deletions
diff --git a/release/datafiles/fonts/DejaVuSans.woff2 b/release/datafiles/fonts/DejaVuSans.woff2 Binary files differnew file mode 100644 index 00000000000..a391596a421 --- /dev/null +++ b/release/datafiles/fonts/DejaVuSans.woff2 diff --git a/release/datafiles/fonts/DejaVuSansMono.woff2 b/release/datafiles/fonts/DejaVuSansMono.woff2 Binary files differnew file mode 100644 index 00000000000..cf200e12fff --- /dev/null +++ b/release/datafiles/fonts/DejaVuSansMono.woff2 diff --git a/release/datafiles/fonts/Noto Sans CJK Regular.woff2 b/release/datafiles/fonts/Noto Sans CJK Regular.woff2 Binary files differnew file mode 100644 index 00000000000..5d3854b6bf7 --- /dev/null +++ b/release/datafiles/fonts/Noto Sans CJK Regular.woff2 diff --git a/release/datafiles/fonts/NotoEmoji-VariableFont_wght.woff2 b/release/datafiles/fonts/NotoEmoji-VariableFont_wght.woff2 Binary files differnew file mode 100644 index 00000000000..4d019787bca --- /dev/null +++ b/release/datafiles/fonts/NotoEmoji-VariableFont_wght.woff2 diff --git a/release/datafiles/fonts/NotoSansArabic-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansArabic-VariableFont_wdth,wght.woff2 Binary files differnew file mode 100644 index 00000000000..8ee78b73e72 --- /dev/null +++ b/release/datafiles/fonts/NotoSansArabic-VariableFont_wdth,wght.woff2 diff --git a/release/datafiles/fonts/NotoSansArmenian-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansArmenian-VariableFont_wdth,wght.woff2 Binary files differnew file mode 100644 index 00000000000..c6c1ed5c2cf --- /dev/null +++ b/release/datafiles/fonts/NotoSansArmenian-VariableFont_wdth,wght.woff2 diff --git a/release/datafiles/fonts/NotoSansBengali-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansBengali-VariableFont_wdth,wght.woff2 Binary files differnew file mode 100644 index 00000000000..cdac12cc8e8 --- /dev/null +++ b/release/datafiles/fonts/NotoSansBengali-VariableFont_wdth,wght.woff2 diff --git a/release/datafiles/fonts/NotoSansDevanagari-Regular.woff2 b/release/datafiles/fonts/NotoSansDevanagari-Regular.woff2 Binary files differnew file mode 100644 index 00000000000..2cb157b2c51 --- /dev/null +++ b/release/datafiles/fonts/NotoSansDevanagari-Regular.woff2 diff --git a/release/datafiles/fonts/NotoSansEthiopic-Regular.woff2 b/release/datafiles/fonts/NotoSansEthiopic-Regular.woff2 Binary files differnew file mode 100644 index 00000000000..dc272d98964 --- /dev/null +++ b/release/datafiles/fonts/NotoSansEthiopic-Regular.woff2 diff --git a/release/datafiles/fonts/NotoSansGeorgian-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansGeorgian-VariableFont_wdth,wght.woff2 Binary files differnew file mode 100644 index 00000000000..4ebc52f0b59 --- /dev/null +++ b/release/datafiles/fonts/NotoSansGeorgian-VariableFont_wdth,wght.woff2 diff --git a/release/datafiles/fonts/NotoSansGujarati-Regular.woff2 b/release/datafiles/fonts/NotoSansGujarati-Regular.woff2 Binary files differnew file mode 100644 index 00000000000..6e66a15b1cd --- /dev/null +++ b/release/datafiles/fonts/NotoSansGujarati-Regular.woff2 diff --git a/release/datafiles/fonts/NotoSansGurmukhi-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansGurmukhi-VariableFont_wdth,wght.woff2 Binary files differnew file mode 100644 index 00000000000..e752468775f --- /dev/null +++ b/release/datafiles/fonts/NotoSansGurmukhi-VariableFont_wdth,wght.woff2 diff --git a/release/datafiles/fonts/NotoSansHebrew-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansHebrew-VariableFont_wdth,wght.woff2 Binary files differnew file mode 100644 index 00000000000..4f6033c916f --- /dev/null +++ b/release/datafiles/fonts/NotoSansHebrew-VariableFont_wdth,wght.woff2 diff --git a/release/datafiles/fonts/NotoSansJavanese-Regular.woff2 b/release/datafiles/fonts/NotoSansJavanese-Regular.woff2 Binary files differnew file mode 100644 index 00000000000..aeb0bbe8dab --- /dev/null +++ b/release/datafiles/fonts/NotoSansJavanese-Regular.woff2 diff --git a/release/datafiles/fonts/NotoSansKannada-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansKannada-VariableFont_wdth,wght.woff2 Binary files differnew file mode 100644 index 00000000000..56fbd8d8bce --- /dev/null +++ b/release/datafiles/fonts/NotoSansKannada-VariableFont_wdth,wght.woff2 diff --git a/release/datafiles/fonts/NotoSansMalayalam-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansMalayalam-VariableFont_wdth,wght.woff2 Binary files differnew file mode 100644 index 00000000000..bdbce8a0b76 --- /dev/null +++ b/release/datafiles/fonts/NotoSansMalayalam-VariableFont_wdth,wght.woff2 diff --git a/release/datafiles/fonts/NotoSansMath-Regular.woff2 b/release/datafiles/fonts/NotoSansMath-Regular.woff2 Binary files differnew file mode 100644 index 00000000000..bb3baafeb7a --- /dev/null +++ b/release/datafiles/fonts/NotoSansMath-Regular.woff2 diff --git a/release/datafiles/fonts/NotoSansMyanmar-Regular.woff2 b/release/datafiles/fonts/NotoSansMyanmar-Regular.woff2 Binary files differnew file mode 100644 index 00000000000..f18edac80ed --- /dev/null +++ b/release/datafiles/fonts/NotoSansMyanmar-Regular.woff2 diff --git a/release/datafiles/fonts/NotoSansSymbols-VariableFont_wght.woff2 b/release/datafiles/fonts/NotoSansSymbols-VariableFont_wght.woff2 Binary files differnew file mode 100644 index 00000000000..98f940b813e --- /dev/null +++ b/release/datafiles/fonts/NotoSansSymbols-VariableFont_wght.woff2 diff --git a/release/datafiles/fonts/NotoSansSymbols2-Regular.woff2 b/release/datafiles/fonts/NotoSansSymbols2-Regular.woff2 Binary files differnew file mode 100644 index 00000000000..cefcc2d9c0d --- /dev/null +++ b/release/datafiles/fonts/NotoSansSymbols2-Regular.woff2 diff --git a/release/datafiles/fonts/NotoSansTamil-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansTamil-VariableFont_wdth,wght.woff2 Binary files differnew file mode 100644 index 00000000000..a3541942429 --- /dev/null +++ b/release/datafiles/fonts/NotoSansTamil-VariableFont_wdth,wght.woff2 diff --git a/release/datafiles/fonts/NotoSansTelugu-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansTelugu-VariableFont_wdth,wght.woff2 Binary files differnew file mode 100644 index 00000000000..790235d3a71 --- /dev/null +++ b/release/datafiles/fonts/NotoSansTelugu-VariableFont_wdth,wght.woff2 diff --git a/release/datafiles/fonts/NotoSansThai-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansThai-VariableFont_wdth,wght.woff2 Binary files differnew file mode 100644 index 00000000000..507255e6b5c --- /dev/null +++ b/release/datafiles/fonts/NotoSansThai-VariableFont_wdth,wght.woff2 diff --git a/release/datafiles/fonts/bmonofont-i18n.ttf b/release/datafiles/fonts/bmonofont-i18n.ttf Binary files differdeleted file mode 100644 index 08b3f723d61..00000000000 --- a/release/datafiles/fonts/bmonofont-i18n.ttf +++ /dev/null diff --git a/release/datafiles/fonts/droidsans.ttf b/release/datafiles/fonts/droidsans.ttf Binary files differdeleted file mode 100644 index b03e47f087e..00000000000 --- a/release/datafiles/fonts/droidsans.ttf +++ /dev/null diff --git a/release/datafiles/fonts/lastresort.woff2 b/release/datafiles/fonts/lastresort.woff2 Binary files differnew file mode 100644 index 00000000000..e5ad6f353f5 --- /dev/null +++ b/release/datafiles/fonts/lastresort.woff2 diff --git a/release/datafiles/locale b/release/datafiles/locale -Subproject 4d67fb6e2773619392b3d2099188ae742ef9662 +Subproject a2eb507891449a0b67582be9561840075513661 diff --git a/release/datafiles/splash.png b/release/datafiles/splash.png Binary files differindex d7c9cdd3a8f..eb1250cf5a5 100644 --- a/release/datafiles/splash.png +++ b/release/datafiles/splash.png diff --git a/release/license/THIRD-PARTY-LICENSES.txt b/release/license/THIRD-PARTY-LICENSES.txt index f73a6a625a5..e0ac2bdf226 100644 --- a/release/license/THIRD-PARTY-LICENSES.txt +++ b/release/license/THIRD-PARTY-LICENSES.txt @@ -4023,38 +4023,6 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------ -** The OpenGL Extension Wrangler Library; version 2.0.0 -- -http://glew.sourceforge.net/ -Copyright (C) 2008-2015, Nigel Stewart <nigels[]users sourceforge net> -Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> -Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> -Copyright (C) 2002, Lev Povalahev -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. -* The name of the author may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -THE POSSIBILITY OF SUCH DAMAGE. - - Mesa 3-D graphics library Version: 7.0 diff --git a/release/scripts/addons b/release/scripts/addons -Subproject 32baafe44dc56edd1baf6e5a16b4439ded8238f +Subproject 7a8502871c34db0343cc7de52d6b49b15a84238 diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib -Subproject 42da56aa73726710107031787af5eea18679798 +Subproject 95107484d076bc965239942e857c83433bfa86d diff --git a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py index 9f22b2417ed..fc7cbe566c3 100644 --- a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py +++ b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py @@ -8,6 +8,7 @@ import datetime import os import re import sys +import glob # XXX Relative import does not work here when used from Blender... from bl_i18n_utils import settings as settings_i18n, utils @@ -883,6 +884,29 @@ def dump_preset_messages(msgs, reports, settings): process_msg(msgs, settings.DEFAULT_CONTEXT, msgid, msgsrc, reports, None, settings) +def dump_template_messages(msgs, reports, settings): + bfiles = [""] # General template, no name needed. + bfiles += glob.glob(settings.TEMPLATES_DIR + "/**/*.blend", recursive=True) + + workspace_names = {} + + for bfile in bfiles: + template = os.path.dirname(bfile) + template = os.path.basename(template) + bpy.ops.wm.read_homefile(use_factory_startup=True, app_template=template) + for ws in bpy.data.workspaces: + names = workspace_names.setdefault(ws.name, []) + names.append(template or "General") + + from bpy.app.translations import contexts as i18n_contexts + msgctxt = i18n_contexts.id_workspace + for workspace_name in sorted(workspace_names): + for msgsrc in sorted(workspace_names[workspace_name]): + msgsrc = "Workspace from template " + msgsrc + process_msg(msgs, msgctxt, workspace_name, msgsrc, + reports, None, settings) + + ##### Main functions! ##### def dump_messages(do_messages, do_checks, settings): bl_ver = "Blender " + bpy.app.version_string @@ -918,6 +942,9 @@ def dump_messages(do_messages, do_checks, settings): # Get strings from presets. dump_preset_messages(msgs, reports, settings) + # Get strings from startup templates. + dump_template_messages(msgs, reports, settings) + # Get strings from addons' categories. for uid, label, tip in bpy.types.WindowManager.addon_filter.keywords['items']( bpy.context.window_manager, diff --git a/release/scripts/modules/bl_i18n_utils/settings.py b/release/scripts/modules/bl_i18n_utils/settings.py index fb60b07a657..05db4df7cd2 100644 --- a/release/scripts/modules/bl_i18n_utils/settings.py +++ b/release/scripts/modules/bl_i18n_utils/settings.py @@ -519,6 +519,10 @@ REL_POTFILES_SOURCE_DIR = os.path.join("source") # Where to search for preset names (relative to SOURCE_DIR). REL_PRESETS_DIR = os.path.join("release", "scripts", "presets") +# Where to search for templates (relative to SOURCE_DIR). +REL_TEMPLATES_DIR = os.path.join("release", "scripts", "startup", + "bl_app_templates_system") + # The template messages file (relative to I18N_DIR). REL_FILE_NAME_POT = os.path.join(REL_BRANCHES_DIR, DOMAIN + ".pot") @@ -678,6 +682,7 @@ class I18nSettings: GIT_I18N_PO_DIR = property(*(_gen_get_set_path("GIT_I18N_ROOT", "REL_GIT_I18N_PO_DIR"))) POTFILES_SOURCE_DIR = property(*(_gen_get_set_path("SOURCE_DIR", "REL_POTFILES_SOURCE_DIR"))) PRESETS_DIR = property(*(_gen_get_set_path("SOURCE_DIR", "REL_PRESETS_DIR"))) + TEMPLATES_DIR = property(*(_gen_get_set_path("SOURCE_DIR", "REL_TEMPLATES_DIR"))) FILE_NAME_POT = property(*(_gen_get_set_path("I18N_DIR", "REL_FILE_NAME_POT"))) MO_PATH_ROOT = property(*(_gen_get_set_path("I18N_DIR", "REL_MO_PATH_ROOT"))) MO_PATH_TEMPLATE = property(*(_gen_get_set_path("I18N_DIR", "REL_MO_PATH_TEMPLATE"))) diff --git a/release/scripts/modules/bpy_extras/bmesh_utils.py b/release/scripts/modules/bpy_extras/bmesh_utils.py new file mode 100644 index 00000000000..a24ea253f51 --- /dev/null +++ b/release/scripts/modules/bpy_extras/bmesh_utils.py @@ -0,0 +1,56 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +__all__ = ( + "bmesh_linked_uv_islands", +) + +import bmesh + + +def match_uv(face, vert, uv, uv_layer): + for loop in face.loops: + if loop.vert == vert: + return uv == loop[uv_layer].uv + return False + + +def bmesh_linked_uv_islands(bm, uv_layer): + """ + Returns lists of faces connected by UV islands. + + For meshes use :class:`bpy.types.Mesh.mesh_linked_uv_islands` instead. + + :arg bm: the bmesh used to group with. + :type bmesh: :class:`BMesh` + :arg uv_layer: the UV layer to source UVs from. + :type bmesh: :class:`BMLayerItem` + :return: list of lists containing polygon indices + :rtype: list + """ + + result = [] + used = set() + for seed_face in bm.faces: + if seed_face in used: + continue # Face has already been processed. + used.add(seed_face) + island = [seed_face] + stack = [seed_face] # Faces still to consider on this island. + while stack: + current_face = stack.pop() + for loop in current_face.loops: + v = loop.vert + uv = loop[uv_layer].uv + for f in v.link_faces: + if f is current_face or f in used: + continue + if not match_uv(f, v, uv, uv_layer): + continue + + # `f` is part of island, add to island and stack + used.add(f) + island.append(f) + stack.append(f) + result.append(island) + + return result diff --git a/release/scripts/modules/bpy_extras/mesh_utils.py b/release/scripts/modules/bpy_extras/mesh_utils.py index f6dc33e4f02..d593ce6a1e4 100644 --- a/release/scripts/modules/bpy_extras/mesh_utils.py +++ b/release/scripts/modules/bpy_extras/mesh_utils.py @@ -13,14 +13,22 @@ __all__ = ( def mesh_linked_uv_islands(mesh): """ - Splits the mesh into connected polygons, use this for separating cubes from - other mesh elements within 1 mesh datablock. + Returns lists of polygon indices connected by UV islands. :arg mesh: the mesh used to group with. :type mesh: :class:`bpy.types.Mesh` - :return: lists of lists containing polygon indices + :return: list of lists containing polygon indices :rtype: list """ + + if mesh.polygons and not mesh.uv_layers.active.data: + # Currently, when in edit mode, UV Layer data will always be empty + # when accessed though RNA. This may change in the future. + raise ValueError( + "UV Layers are not currently available from python in Edit Mode. " + "Use bmesh and bpy_extras.bmesh_utils.bmesh_linked_uv_islands instead." + ) + uv_loops = [luv.uv[:] for luv in mesh.uv_layers.active.data] poly_loops = [poly.loop_indices for poly in mesh.polygons] luv_hash = {} diff --git a/release/scripts/modules/gpu_extras/presets.py b/release/scripts/modules/gpu_extras/presets.py index ac9fd3cc1ff..eba8d6c161d 100644 --- a/release/scripts/modules/gpu_extras/presets.py +++ b/release/scripts/modules/gpu_extras/presets.py @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-or-later -def draw_circle_2d(position, color, radius, *, segments=32): +def draw_circle_2d(position, color, radius, *, segments=None): """ Draw a circle. @@ -11,10 +11,11 @@ def draw_circle_2d(position, color, radius, *, segments=32): :arg radius: Radius of the circle. :type radius: float :arg segments: How many segments will be used to draw the circle. - Higher values give besser results but the drawing will take longer. - :type segments: int + Higher values give better results but the drawing will take longer. + If None or not specified, an automatic value will be calculated. + :type segments: int or None """ - from math import sin, cos, pi + from math import sin, cos, pi, ceil, acos import gpu from gpu.types import ( GPUBatch, @@ -22,6 +23,12 @@ def draw_circle_2d(position, color, radius, *, segments=32): GPUVertFormat, ) + if segments is None: + max_pixel_error = 0.25 # TODO: multiply 0.5 by display dpi + segments = int(ceil(pi / acos(1.0 - max_pixel_error / radius))) + segments = max(segments, 8) + segments = min(segments, 1000) + if segments <= 0: raise ValueError("Amount of segments must be greater than 0.") diff --git a/release/scripts/modules/rna_keymap_ui.py b/release/scripts/modules/rna_keymap_ui.py index a7ad162ba66..73e9b6cd70f 100644 --- a/release/scripts/modules/rna_keymap_ui.py +++ b/release/scripts/modules/rna_keymap_ui.py @@ -11,8 +11,10 @@ __all__ = ( import bpy -from bpy.app.translations import pgettext_iface as iface_ -from bpy.app.translations import contexts as i18n_contexts +from bpy.app.translations import ( + contexts as i18n_contexts, + pgettext_iface as iface_, +) def _indented_layout(layout, level): diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index efc70f22321..c8569990a3a 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -2234,6 +2234,7 @@ def km_file_browser(params): {"properties": [("increment", -10)]}), ("file.filenum", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True, "repeat": True}, {"properties": [("increment", -100)]}), + op_menu_pie("FILEBROWSER_MT_view_pie", {"type": 'ACCENT_GRAVE', "value": 'PRESS'}), # Select file under cursor before spawning the context menu. ("file.select", {"type": 'RIGHTMOUSE', "value": 'PRESS'}, diff --git a/release/scripts/startup/bl_operators/__init__.py b/release/scripts/startup/bl_operators/__init__.py index 14dc72336f6..6f61d7e7129 100644 --- a/release/scripts/startup/bl_operators/__init__.py +++ b/release/scripts/startup/bl_operators/__init__.py @@ -31,6 +31,7 @@ _modules = [ "userpref", "uvcalc_follow_active", "uvcalc_lightmap", + "uvcalc_randomize_transform", "vertexpaint_dirt", "view3d", "wm", diff --git a/release/scripts/startup/bl_operators/node.py b/release/scripts/startup/bl_operators/node.py index df4ca9ef170..ff9b5a06fb7 100644 --- a/release/scripts/startup/bl_operators/node.py +++ b/release/scripts/startup/bl_operators/node.py @@ -149,37 +149,6 @@ class NODE_OT_add_node(NodeAddOperator, Operator): bl_options = {'REGISTER', 'UNDO'} -# Add a node and link it to an existing socket -class NODE_OT_add_and_link_node(NodeAddOperator, Operator): - '''Add a node to the active tree and link to an existing socket''' - bl_idname = "node.add_and_link_node" - bl_label = "Add and Link Node" - bl_options = {'REGISTER', 'UNDO'} - - link_socket_index: IntProperty( - name="Link Socket Index", - description="Index of the socket to link", - ) - - def execute(self, context): - space = context.space_data - ntree = space.edit_tree - - node = self.create_node(context) - if not node: - return {'CANCELLED'} - - to_socket = getattr(context, "link_to_socket", None) - if to_socket: - ntree.links.new(node.outputs[self.link_socket_index], to_socket) - - from_socket = getattr(context, "link_from_socket", None) - if from_socket: - ntree.links.new(from_socket, node.inputs[self.link_socket_index]) - - return {'FINISHED'} - - class NODE_OT_add_search(NodeAddOperator, Operator): '''Add a node to the active tree''' bl_idname = "node.add_search" @@ -306,7 +275,6 @@ class NODE_OT_tree_path_parent(Operator): classes = ( NodeSetting, - NODE_OT_add_and_link_node, NODE_OT_add_node, NODE_OT_add_search, NODE_OT_collapse_hide_unused_toggle, diff --git a/release/scripts/startup/bl_operators/uvcalc_randomize_transform.py b/release/scripts/startup/bl_operators/uvcalc_randomize_transform.py new file mode 100644 index 00000000000..2867164a72e --- /dev/null +++ b/release/scripts/startup/bl_operators/uvcalc_randomize_transform.py @@ -0,0 +1,212 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +from bpy.types import Operator +from mathutils import Vector + +import math + + +def get_random_transform(transform_params, entropy): + from random import uniform + from random import seed as random_seed + + (seed, loc, rot, scale, scale_even) = transform_params + + # First, seed the RNG. + random_seed(seed + entropy) + + # Next, call uniform a known number of times. + offset_u = uniform(0, 1) + offset_v = uniform(0, 1) + angle = uniform(0, 1) + scale_u = uniform(0, 1) + scale_v = uniform(0, 1) + + # Apply the transform_params. + if loc: + offset_u *= loc[0] + offset_v *= loc[1] + else: + offset_u = 0 + offset_v = 0 + + if rot: + angle *= rot + else: + angle = 0 + + if scale: + scale_u = scale_u * (2 * scale[0] - 2.0) + 2.0 - scale[0] + scale_v = scale_v * (2 * scale[1] - 2.0) + 2.0 - scale[1] + else: + scale_u = 1 + scale_v = 1 + + if scale_even: + scale_v = scale_u + + # Results in homogenous co-ordinates. + return [[scale_u * math.cos(angle), -scale_v * math.sin(angle), offset_u], + [scale_u * math.sin(angle), scale_v * math.cos(angle), offset_v]] + + +def randomize_uv_transform_island(bm, uv_layer, faces, transform_params): + # Ensure consistent random values for island, regardless of selection etc. + entropy = min(f.index for f in faces) + + transform = get_random_transform(transform_params, entropy) + + # Find bounding box. + minmax = [1e30, 1e30, -1e30, -1e30] + for face in faces: + for loop in face.loops: + u, v = loop[uv_layer].uv + minmax[0] = min(minmax[0], u) + minmax[1] = min(minmax[1], v) + minmax[2] = max(minmax[2], u) + minmax[3] = max(minmax[3], v) + + mid_u = (minmax[0] + minmax[2]) / 2 + mid_v = (minmax[1] + minmax[3]) / 2 + + del_u = transform[0][2] + mid_u - transform[0][0] * mid_u - transform[0][1] * mid_v + del_v = transform[1][2] + mid_v - transform[1][0] * mid_u - transform[1][1] * mid_v + + # Apply transform. + for face in faces: + for loop in face.loops: + pre_uv = loop[uv_layer].uv + u = transform[0][0] * pre_uv[0] + transform[0][1] * pre_uv[1] + del_u + v = transform[1][0] * pre_uv[0] + transform[1][1] * pre_uv[1] + del_v + loop[uv_layer].uv = (u, v) + + +def is_face_uv_selected(face, uv_layer): + for loop in face.loops: + if not loop[uv_layer].select: + return False + return True + + +def is_island_uv_selected(bm, island, uv_layer): + for face in island: + if is_face_uv_selected(face, uv_layer): + return True + return False + + +def randomize_uv_transform_bmesh(mesh, bm, transform_params): + import bpy_extras.bmesh_utils + uv_layer = bm.loops.layers.uv.verify() + islands = bpy_extras.bmesh_utils.bmesh_linked_uv_islands(bm, uv_layer) + for island in islands: + if is_island_uv_selected(bm, island, uv_layer): + randomize_uv_transform_island(bm, uv_layer, island, transform_params) + + +def randomize_uv_transform(context, transform_params): + import bmesh + ob_list = context.objects_in_mode_unique_data + for ob in ob_list: + bm = bmesh.from_edit_mesh(ob.data) + if not bm.loops.layers.uv: + continue + + # Only needed to access the minimum face index of each island. + bm.faces.index_update() + randomize_uv_transform_bmesh(ob.data, bm, transform_params) + + for ob in ob_list: + bmesh.update_edit_mesh(ob.data) + + return {'FINISHED'} + + +from bpy.props import ( + BoolProperty, + FloatProperty, + FloatVectorProperty, + IntProperty, +) + + +class RandomizeUVTransform(Operator): + """Randomize uv island's location, rotation, and scale""" + bl_idname = "uv.randomize_uv_transform" + bl_label = "Randomize" + bl_options = {'REGISTER', 'UNDO'} + + random_seed: IntProperty( + name="Random Seed", + description="Seed value for the random generator", + min=0, + max=10000, + default=0, + ) + use_loc: BoolProperty( + name="Randomize Location", + description="Randomize the location values", + default=True, + ) + loc: FloatVectorProperty( + name="Location", + description=("Maximum distance the objects " + "can spread over each axis"), + min=-100.0, + max=100.0, + size=2, + subtype='TRANSLATION', + default=(0.0, 0.0), + ) + use_rot: BoolProperty( + name="Randomize Rotation", + description="Randomize the rotation value", + default=True, + ) + rot: FloatProperty( + name="Rotation", + description="Maximum rotation", + min=-2 * math.pi, + max=2 * math.pi, + subtype='ANGLE', + default=0.0, + ) + use_scale: BoolProperty( + name="Randomize Scale", + description="Randomize the scale values", + default=True, + ) + scale_even: BoolProperty( + name="Scale Even", + description="Use the same scale value for both axes", + default=False, + ) + + scale: FloatVectorProperty( + name="Scale", + description="Maximum scale randomization over each axis", + min=-100.0, + max=100.0, + default=(1.0, 1.0), + size=2, + ) + + @classmethod + def poll(cls, context): + return context.mode == 'EDIT_MESH' + + def execute(self, context): + seed = self.random_seed + + loc = [0, 0] if not self.use_loc else self.loc + rot = 0 if not self.use_rot else self.rot + scale = None if not self.use_scale else self.scale + scale_even = self.scale_even + + transformParams = [seed, loc, rot, scale, scale_even] + return randomize_uv_transform(context, transformParams) + + +classes = ( + RandomizeUVTransform, +) diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 7e7dbbc387e..cbb5a63b754 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -3152,7 +3152,10 @@ class WM_OT_drop_blend_file(Operator): bl_label = "Handle dropped .blend file" bl_options = {'INTERNAL'} - filepath: StringProperty() + filepath: StringProperty( + subtype='FILE_PATH', + options={'SKIP_SAVE'}, + ) def invoke(self, context, _event): context.window_manager.popup_menu(self.draw_menu, title=bpy.path.basename(self.filepath), icon='QUESTION') diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py index 0f839eac126..963ffc60806 100644 --- a/release/scripts/startup/bl_ui/properties_data_camera.py +++ b/release/scripts/startup/bl_ui/properties_data_camera.py @@ -201,7 +201,7 @@ class DATA_PT_camera(CameraButtonsPanel, Panel): class DATA_PT_camera_dof(CameraButtonsPanel, Panel): bl_label = "Depth of Field" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} def draw_header(self, context): cam = context.camera @@ -228,7 +228,7 @@ class DATA_PT_camera_dof(CameraButtonsPanel, Panel): class DATA_PT_camera_dof_aperture(CameraButtonsPanel, Panel): bl_label = "Aperture" bl_parent_id = "DATA_PT_camera_dof" - COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/properties_data_light.py b/release/scripts/startup/bl_ui/properties_data_light.py index df3ad43e6de..2980592ee0b 100644 --- a/release/scripts/startup/bl_ui/properties_data_light.py +++ b/release/scripts/startup/bl_ui/properties_data_light.py @@ -18,7 +18,7 @@ class DataButtonsPanel: class DATA_PT_context_light(DataButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE_NEXT', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} def draw(self, context): layout = self.layout @@ -36,7 +36,7 @@ class DATA_PT_context_light(DataButtonsPanel, Panel): class DATA_PT_preview(DataButtonsPanel, Panel): bl_label = "Preview" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE_NEXT', 'BLENDER_EEVEE'} def draw(self, context): self.layout.template_preview(context.light) @@ -62,7 +62,7 @@ class DATA_PT_light(DataButtonsPanel, Panel): class DATA_PT_EEVEE_light(DataButtonsPanel, Panel): bl_label = "Light" - COMPAT_ENGINES = {'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_EEVEE_NEXT', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -108,7 +108,7 @@ class DATA_PT_EEVEE_light_distance(DataButtonsPanel, Panel): bl_label = "Custom Distance" bl_parent_id = "DATA_PT_EEVEE_light" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_EEVEE_NEXT', 'BLENDER_EEVEE'} @classmethod def poll(cls, context): @@ -256,7 +256,7 @@ class DATA_PT_area(DataButtonsPanel, Panel): class DATA_PT_spot(DataButtonsPanel, Panel): bl_label = "Spot Shape" bl_parent_id = "DATA_PT_EEVEE_light" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE_NEXT', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} @classmethod def poll(cls, context): @@ -301,7 +301,7 @@ class DATA_PT_falloff_curve(DataButtonsPanel, Panel): class DATA_PT_custom_props_light(DataButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE_NEXT', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} _context_path = "object.data" _property_type = bpy.types.Light 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 44d82be8ab0..38522a1bf84 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -355,8 +355,7 @@ class GPENCIL_UL_annotation_layer(UIList): row = layout.row(align=True) - icon_xray = 'XRAY' if gpl.show_in_front else 'FACESEL' - row.prop(gpl, "show_in_front", text="", icon=icon_xray, emboss=False) + row.prop(gpl, "show_in_front", text="", icon='XRAY' if gpl.show_in_front else 'FACESEL', emboss=False) row.prop(gpl, "annotation_hide", text="", emboss=False) elif self.layout_type == 'GRID': diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index 2bf12401f79..080c8ca5726 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -2,8 +2,10 @@ import bpy from bpy.types import Panel, Menu from rna_prop_ui import PropertyPanel -from bpy.app.translations import pgettext_iface as iface_ -from bpy.app.translations import contexts as i18n_contexts +from bpy.app.translations import ( + contexts as i18n_contexts, + pgettext_iface as iface_, +) from bl_ui.utils import PresetPanel from bl_ui.properties_physics_common import ( diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index e031b32247a..dafe32c5e5d 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -162,6 +162,64 @@ class RENDER_PT_eevee_motion_blur(RenderButtonsPanel, Panel): col.prop(props, "motion_blur_steps", text="Steps") +class RENDER_PT_eevee_next_motion_blur(RenderButtonsPanel, Panel): + bl_label = "Motion Blur" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_EEVEE_NEXT'} + + @classmethod + def poll(cls, context): + return (context.engine in cls.COMPAT_ENGINES) + + def draw_header(self, context): + scene = context.scene + props = scene.eevee + self.layout.prop(props, "use_motion_blur", text="") + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + scene = context.scene + props = scene.eevee + + layout.active = props.use_motion_blur + col = layout.column() + col.prop(props, "motion_blur_position", text="Position") + col.prop(props, "motion_blur_shutter") + col.separator() + col.prop(props, "motion_blur_depth_scale") + col.prop(props, "motion_blur_steps", text="Steps") + + +class RENDER_PT_motion_blur_curve(RenderButtonsPanel, Panel): + bl_label = "Shutter Curve" + bl_parent_id = "RENDER_PT_eevee_next_motion_blur" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_EEVEE_NEXT'} + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + + scene = context.scene + rd = scene.render + layout.active = rd.use_motion_blur + + col = layout.column() + + col.template_curve_mapping(rd, "motion_blur_shutter_curve") + + col = layout.column(align=True) + row = col.row(align=True) + row.operator("render.shutter_curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH' + row.operator("render.shutter_curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND' + row.operator("render.shutter_curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT' + row.operator("render.shutter_curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP' + row.operator("render.shutter_curve_preset", icon='LINCURVE', text="").shape = 'LINE' + row.operator("render.shutter_curve_preset", icon='NOCURVE', text="").shape = 'MAX' + + class RENDER_PT_eevee_depth_of_field(RenderButtonsPanel, Panel): bl_label = "Depth of Field" bl_options = {'DEFAULT_CLOSED'} @@ -190,6 +248,32 @@ class RENDER_PT_eevee_depth_of_field(RenderButtonsPanel, Panel): col.prop(props, "bokeh_overblur") +class RENDER_PT_eevee_next_depth_of_field(RenderButtonsPanel, Panel): + bl_label = "Depth of Field" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_EEVEE_NEXT'} + + @classmethod + def poll(cls, context): + return (context.engine in cls.COMPAT_ENGINES) + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + scene = context.scene + props = scene.eevee + + col = layout.column() + col.prop(props, "bokeh_max_size") + col.prop(props, "bokeh_threshold") + col.prop(props, "bokeh_neighbor_max") + col.prop(props, "use_bokeh_jittered") + + col = layout.column() + col.active = props.use_bokeh_jittered + col.prop(props, "bokeh_overblur") + + class RENDER_PT_eevee_bloom(RenderButtonsPanel, Panel): bl_label = "Bloom" bl_options = {'DEFAULT_CLOSED'} @@ -739,12 +823,16 @@ class RENDER_PT_simplify_greasepencil(RenderButtonsPanel, Panel, GreasePencilSim classes = ( RENDER_PT_context, RENDER_PT_eevee_sampling, + RENDER_PT_eevee_next_sampling, RENDER_PT_eevee_ambient_occlusion, RENDER_PT_eevee_bloom, RENDER_PT_eevee_depth_of_field, + RENDER_PT_eevee_next_depth_of_field, RENDER_PT_eevee_subsurface_scattering, RENDER_PT_eevee_screen_space_reflections, RENDER_PT_eevee_motion_blur, + RENDER_PT_eevee_next_motion_blur, + RENDER_PT_motion_blur_curve, RENDER_PT_eevee_volumetric, RENDER_PT_eevee_volumetric_lighting, RENDER_PT_eevee_volumetric_shadows, @@ -754,10 +842,9 @@ classes = ( RENDER_PT_eevee_indirect_lighting, RENDER_PT_eevee_indirect_lighting_display, RENDER_PT_eevee_film, - - RENDER_PT_eevee_next_sampling, RENDER_PT_eevee_next_film, + RENDER_PT_gpencil, RENDER_PT_opengl_sampling, RENDER_PT_opengl_lighting, diff --git a/release/scripts/startup/bl_ui/properties_view_layer.py b/release/scripts/startup/bl_ui/properties_view_layer.py index 01bd0adc8df..78aec096510 100644 --- a/release/scripts/startup/bl_ui/properties_view_layer.py +++ b/release/scripts/startup/bl_ui/properties_view_layer.py @@ -79,6 +79,7 @@ class VIEWLAYER_PT_eevee_next_layer_passes_data(ViewLayerButtonsPanel, Panel): layout.use_property_split = True layout.use_property_decorate = False + scene = context.scene view_layer = context.view_layer col = layout.column() @@ -87,7 +88,9 @@ class VIEWLAYER_PT_eevee_next_layer_passes_data(ViewLayerButtonsPanel, Panel): col.prop(view_layer, "use_pass_mist") col.prop(view_layer, "use_pass_normal") col.prop(view_layer, "use_pass_position") - col.prop(view_layer, "use_pass_vector") + sub = col.column() + sub.active = not scene.eevee.use_motion_blur + sub.prop(view_layer, "use_pass_vector") class VIEWLAYER_PT_eevee_layer_passes_light(ViewLayerButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py index 96ce731306f..1e7faf68b3f 100644 --- a/release/scripts/startup/bl_ui/space_filebrowser.py +++ b/release/scripts/startup/bl_ui/space_filebrowser.py @@ -566,6 +566,21 @@ class FILEBROWSER_MT_context_menu(FileBrowserMenu, Menu): layout.prop_menu_enum(params, "sort_method") +class FILEBROWSER_MT_view_pie(Menu): + bl_label = "View" + bl_idname = "FILEBROWSER_MT_view_pie" + + def draw(self, context): + layout = self.layout + + pie = layout.menu_pie() + view = context.space_data + + pie.prop_enum(view.params, "display_type", value='LIST_VERTICAL') + pie.prop_enum(view.params, "display_type", value='LIST_HORIZONTAL') + pie.prop_enum(view.params, "display_type", value='THUMBNAIL') + + class ASSETBROWSER_PT_display(asset_utils.AssetBrowserPanel, Panel): bl_region_type = 'HEADER' bl_label = "Display Settings" # Shows as tooltip in popover @@ -823,6 +838,7 @@ classes = ( FILEBROWSER_MT_view, FILEBROWSER_MT_select, FILEBROWSER_MT_context_menu, + FILEBROWSER_MT_view_pie, ASSETBROWSER_PT_display, ASSETBROWSER_PT_filter, ASSETBROWSER_MT_editor_menus, diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 0f51c3830eb..4165f6ab0cf 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -292,6 +292,10 @@ class IMAGE_MT_uvs_transform(Menu): layout.operator("transform.shear") + layout.separator() + + layout.operator("uv.randomize_uv_transform") + class IMAGE_MT_uvs_snap(Menu): bl_label = "Snap" diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index dab06cc4993..118928ef9c6 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -1,8 +1,10 @@ # SPDX-License-Identifier: GPL-2.0-or-later import bpy from bpy.types import Header, Menu, Panel -from bpy.app.translations import pgettext_iface as iface_ -from bpy.app.translations import contexts as i18n_contexts +from bpy.app.translations import ( + pgettext_iface as iface_, + contexts as i18n_contexts, +) from bl_ui.utils import PresetPanel from bl_ui.properties_grease_pencil_common import ( AnnotationDataPanel, diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 38aa343e542..20021762d5a 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1881,7 +1881,7 @@ class _defs_image_uv_sculpt: if brush is None: return radius = brush.size - draw_circle_2d(xy, (1.0,) * 4, radius, segments=32) + draw_circle_2d(xy, (1.0,) * 4, radius) return generate_from_enum_ex( context, diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 8af36d0bca9..1b155d22bdf 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -637,7 +637,7 @@ class USERPREF_PT_system_memory(SystemPanel, CenterAlignMixIn, Panel): layout.separator() col = layout.column() - col.prop(system, "vbo_time_out", text="Vbo Time Out") + col.prop(system, "vbo_time_out", text="VBO Time Out") col.prop(system, "vbo_collection_rate", text="Garbage Collection Rate") @@ -653,7 +653,7 @@ class USERPREF_PT_system_video_sequencer(SystemPanel, CenterAlignMixIn, Panel): layout.separator() - layout.prop(system, "use_sequencer_disk_cache") + layout.prop(system, "use_sequencer_disk_cache", text="Disk Cache") col = layout.column() col.active = system.use_sequencer_disk_cache col.prop(system, "sequencer_disk_cache_dir", text="Directory") @@ -2273,6 +2273,7 @@ class USERPREF_PT_experimental_new_features(ExperimentalPanel, Panel): ({"property": "use_sculpt_tools_tilt"}, "T82877"), ({"property": "use_extended_asset_browser"}, ("project/view/130/", "Project Page")), ({"property": "use_override_templates"}, ("T73318", "Milestone 4")), + ({"property": "use_realtime_compositor"}, "T99210"), ), ) diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index e0970a9708e..b1b5738aecd 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -5183,6 +5183,9 @@ class VIEW3D_MT_edit_gpencil_stroke(Menu): layout.separator() layout.operator("gpencil.reset_transform_fill", text="Reset Fill Transform") + layout.separator() + layout.operator("gpencil.stroke_outline", text="Outline") + class VIEW3D_MT_edit_gpencil_point(Menu): bl_label = "Point" @@ -6145,6 +6148,24 @@ class VIEW3D_PT_shading_render_pass(Panel): layout.prop(shading, "render_pass", text="") +class VIEW3D_PT_shading_compositor(Panel): + bl_space_type = 'VIEW_3D' + bl_region_type = 'HEADER' + bl_label = "Compositor" + bl_parent_id = 'VIEW3D_PT_shading' + + @classmethod + def poll(cls, context): + return (context.space_data.shading.type in {'MATERIAL', 'RENDERED'} and + context.preferences.experimental.use_realtime_compositor) + + def draw(self, context): + shading = context.space_data.shading + + layout = self.layout + layout.prop(shading, "use_compositor") + + class VIEW3D_PT_gizmo_display(Panel): bl_space_type = 'VIEW_3D' bl_region_type = 'HEADER' @@ -7985,6 +8006,7 @@ classes = ( VIEW3D_PT_shading_options_shadow, VIEW3D_PT_shading_options_ssao, VIEW3D_PT_shading_render_pass, + VIEW3D_PT_shading_compositor, VIEW3D_PT_gizmo_display, VIEW3D_PT_overlay, VIEW3D_PT_overlay_guides, |