Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYimingWu <xp8110@outlook.com>2022-05-23 09:27:26 +0300
committerYimingWu <xp8110@outlook.com>2022-05-23 10:32:19 +0300
commitac344bd027da00d39fc610bb0a04ca231e2e499a (patch)
treeed1e1cd8816d1438ce8ea60e6dbb907d655a2410 /release
parenta9de546daabc42cf0f30a8d95a72eaba7c2d82b7 (diff)
parent0d959dcc53ac40f8c653ae5c11ecaed8503ad6b6 (diff)
Merge branch 'temp-lineart-contained' into lineart-shadow
Diffstat (limited to 'release')
-rw-r--r--release/datafiles/icons/ops.generic.select_paint.datbin0 -> 1790 bytes
-rw-r--r--release/scripts/modules/bl_console_utils/__init__.py4
-rw-r--r--release/scripts/modules/bl_console_utils/autocomplete/__init__.py (renamed from release/scripts/modules/console/__init__.py)0
-rw-r--r--release/scripts/modules/bl_console_utils/autocomplete/complete_calltip.py (renamed from release/scripts/modules/console/complete_calltip.py)0
-rw-r--r--release/scripts/modules/bl_console_utils/autocomplete/complete_import.py (renamed from release/scripts/modules/console/complete_import.py)0
-rw-r--r--release/scripts/modules/bl_console_utils/autocomplete/complete_namespace.py (renamed from release/scripts/modules/console/complete_namespace.py)0
-rw-r--r--release/scripts/modules/bl_console_utils/autocomplete/intellisense.py (renamed from release/scripts/modules/console/intellisense.py)0
-rw-r--r--release/scripts/modules/bl_i18n_utils/settings.py2
-rw-r--r--release/scripts/modules/console_python.py2
-rw-r--r--release/scripts/modules/rna_info.py28
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py52
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_paint_common.py1
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py21
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py4
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py2
16 files changed, 89 insertions, 29 deletions
diff --git a/release/datafiles/icons/ops.generic.select_paint.dat b/release/datafiles/icons/ops.generic.select_paint.dat
new file mode 100644
index 00000000000..26d76d4548f
--- /dev/null
+++ b/release/datafiles/icons/ops.generic.select_paint.dat
Binary files differ
diff --git a/release/scripts/modules/bl_console_utils/__init__.py b/release/scripts/modules/bl_console_utils/__init__.py
new file mode 100644
index 00000000000..78800fa5703
--- /dev/null
+++ b/release/scripts/modules/bl_console_utils/__init__.py
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+"""
+Utilities relating to text mode console interations.
+"""
diff --git a/release/scripts/modules/console/__init__.py b/release/scripts/modules/bl_console_utils/autocomplete/__init__.py
index 5fa5b11f4bf..5fa5b11f4bf 100644
--- a/release/scripts/modules/console/__init__.py
+++ b/release/scripts/modules/bl_console_utils/autocomplete/__init__.py
diff --git a/release/scripts/modules/console/complete_calltip.py b/release/scripts/modules/bl_console_utils/autocomplete/complete_calltip.py
index 6c7b0611ee2..6c7b0611ee2 100644
--- a/release/scripts/modules/console/complete_calltip.py
+++ b/release/scripts/modules/bl_console_utils/autocomplete/complete_calltip.py
diff --git a/release/scripts/modules/console/complete_import.py b/release/scripts/modules/bl_console_utils/autocomplete/complete_import.py
index 2339e79c8f1..2339e79c8f1 100644
--- a/release/scripts/modules/console/complete_import.py
+++ b/release/scripts/modules/bl_console_utils/autocomplete/complete_import.py
diff --git a/release/scripts/modules/console/complete_namespace.py b/release/scripts/modules/bl_console_utils/autocomplete/complete_namespace.py
index 7bfa2aac1c1..7bfa2aac1c1 100644
--- a/release/scripts/modules/console/complete_namespace.py
+++ b/release/scripts/modules/bl_console_utils/autocomplete/complete_namespace.py
diff --git a/release/scripts/modules/console/intellisense.py b/release/scripts/modules/bl_console_utils/autocomplete/intellisense.py
index 9484f825f9f..9484f825f9f 100644
--- a/release/scripts/modules/console/intellisense.py
+++ b/release/scripts/modules/bl_console_utils/autocomplete/intellisense.py
diff --git a/release/scripts/modules/bl_i18n_utils/settings.py b/release/scripts/modules/bl_i18n_utils/settings.py
index 58e7486b39b..57722d06ce5 100644
--- a/release/scripts/modules/bl_i18n_utils/settings.py
+++ b/release/scripts/modules/bl_i18n_utils/settings.py
@@ -256,7 +256,7 @@ PYGETTEXT_KEYWORDS = (() +
# bUnitDef unit names.
# NOTE: regex is a bit more complex than it would need too. Since the actual
# identifier (`B_UNIT_DEF_`) is at the end, if it's simpler/too general it
- # becomes extremely slow to process some (unrelated) source files.
+ # becomes extremely slow to process some (unrelated) source files.
((r"\{(?:(?:\s*\"[^\"',]+\"\s*,)|(?:\s*NULL\s*,)){4}\s*" +
_msg_re + r"\s*,(?:(?:\s*\"[^\"',]+\"\s*,)|(?:\s*NULL\s*,))(?:[^,]+,){2}"
+ "\s*B_UNIT_DEF_[_A-Z]+\s*\}"),) +
diff --git a/release/scripts/modules/console_python.py b/release/scripts/modules/console_python.py
index 819a01b895f..b7e86d5c673 100644
--- a/release/scripts/modules/console_python.py
+++ b/release/scripts/modules/console_python.py
@@ -213,7 +213,7 @@ execute.hooks = []
def autocomplete(context):
- from console import intellisense
+ from bl_console_utils.autocomplete import intellisense
sc = context.space_data
diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py
index b009cc4fefe..04120508df5 100644
--- a/release/scripts/modules/rna_info.py
+++ b/release/scripts/modules/rna_info.py
@@ -61,7 +61,8 @@ def range_str(val):
def float_as_string(f):
val_str = "%g" % f
- if '.' not in val_str and '-' not in val_str: # value could be 1e-05
+ # Ensure a `.0` suffix for whole numbers, excluding scientific notation such as `1e-05` or `1e+5`.
+ if '.' not in val_str and 'e' not in val_str:
val_str += '.0'
return val_str
@@ -206,6 +207,14 @@ class InfoStructRNA:
functions.append((identifier, attr))
return functions
+ def get_py_c_properties_getset(self):
+ import types
+ properties_getset = []
+ for identifier, descr in self.py_class.__dict__.items():
+ if type(descr) == types.GetSetDescriptorType:
+ properties_getset.append((identifier, descr))
+ return properties_getset
+
def __str__(self):
txt = ""
@@ -576,6 +585,16 @@ def BuildRNAInfo():
structs = []
def _bpy_types_iterator():
+ # Don't report when these types are ignored.
+ suppress_warning = {
+ "bpy_func",
+ "bpy_prop",
+ "bpy_prop_array",
+ "bpy_prop_collection",
+ "bpy_struct",
+ "bpy_struct_meta_idprop",
+ }
+
names_unique = set()
rna_type_list = []
for rna_type_name in dir(bpy.types):
@@ -585,8 +604,13 @@ def BuildRNAInfo():
if rna_struct is not None:
rna_type_list.append(rna_type)
yield (rna_type_name, rna_struct)
+ elif rna_type_name.startswith("_"):
+ # Ignore "__dir__", "__getattr__" .. etc.
+ pass
+ elif rna_type_name in suppress_warning:
+ pass
else:
- print("Ignoring", rna_type_name)
+ print("rna_info.BuildRNAInfo(..): ignoring type", repr(rna_type_name))
# Now, there are some sub-classes in add-ons we also want to include.
# Cycles for e.g. these are referenced from the Scene, but not part of
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 1459b0178a8..84602ece647 100644
--- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
+++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
@@ -1066,29 +1066,9 @@ def km_node_editor(params):
{"items": items},
)
- def node_select_ops(select_mouse):
- return [
- ("node.select", {"type": select_mouse, "value": 'PRESS'},
- {"properties": [("extend", False), ("deselect_all", True)]}),
- ("node.select", {"type": select_mouse, "value": 'PRESS', "ctrl": True},
- {"properties": [("extend", False)]}),
- ("node.select", {"type": select_mouse, "value": 'PRESS', "alt": True},
- {"properties": [("extend", False)]}),
- ("node.select", {"type": select_mouse, "value": 'PRESS', "ctrl": True, "alt": True},
- {"properties": [("extend", False)]}),
- ("node.select", {"type": select_mouse, "value": 'PRESS', "shift": True},
- {"properties": [("extend", True)]}),
- ("node.select", {"type": select_mouse, "value": 'PRESS', "shift": True, "ctrl": True},
- {"properties": [("extend", True)]}),
- ("node.select", {"type": select_mouse, "value": 'PRESS', "shift": True, "alt": True},
- {"properties": [("extend", True)]}),
- ("node.select", {"type": select_mouse, "value": 'PRESS', "shift": True, "ctrl": True, "alt": True},
- {"properties": [("extend", True)]}),
- ]
-
# Allow node selection with both for RMB select
- items.extend(node_select_ops('LEFTMOUSE'))
+ items.extend(_template_node_select(type='LEFTMOUSE', value='PRESS', select_passthrough=True))
items.extend([
("node.select_box", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG'},
@@ -4053,6 +4033,36 @@ def km_3d_view_tool_edit_gpencil_select(params):
)
+# NOTE: duplicated from `blender_default.py`.
+def _template_node_select(*, type, value, select_passthrough):
+ items = [
+ ("node.select", {"type": type, "value": value},
+ {"properties": [("deselect_all", True), ("select_passthrough", True)]}),
+ ("node.select", {"type": type, "value": value, "ctrl": True}, None),
+ ("node.select", {"type": type, "value": value, "alt": True}, None),
+ ("node.select", {"type": type, "value": value, "ctrl": True, "alt": True}, None),
+ ("node.select", {"type": type, "value": value, "shift": True},
+ {"properties": [("toggle", True)]}),
+ ("node.select", {"type": type, "value": value, "shift": True, "ctrl": True},
+ {"properties": [("toggle", True)]}),
+ ("node.select", {"type": type, "value": value, "shift": True, "alt": True},
+ {"properties": [("toggle", True)]}),
+ ("node.select", {"type": type, "value": value, "shift": True, "ctrl": True, "alt": True},
+ {"properties": [("toggle", True)]}),
+ ]
+
+ if select_passthrough and (value == 'PRESS'):
+ # Add an additional click item to de-select all other items,
+ # needed so pass-through is able to de-select other items.
+ items.append((
+ "node.select",
+ {"type": type, "value": 'CLICK'},
+ {"properties": [("deselect_all", True)]},
+ ))
+
+ return items
+
+
def km_3d_view_tool_interactive_add(params):
return (
"3D View Tool: Object, Add Primitive",
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 189210d8540..6b55683ee89 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -49,7 +49,7 @@ class GreasePencilSculptAdvancedPanel:
layout.use_property_decorate = False
tool_settings = context.scene.tool_settings
- brush = context.tool_settings.gpencil_sculpt_paint.brush
+ brush = tool_settings.gpencil_sculpt_paint.brush
tool = brush.gpencil_sculpt_tool
gp_settings = brush.gpencil_settings
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index b8136f26e90..d5b106635ab 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -797,7 +797,6 @@ def brush_settings(layout, context, brush, popover=False):
col = layout.column()
col.active = not brush.curves_sculpt_settings.interpolate_point_count
col.prop(brush.curves_sculpt_settings, "points_per_curve")
- use_frontface = True
elif brush.curves_sculpt_tool == 'GROW_SHRINK':
layout.prop(brush.curves_sculpt_settings, "scale_uniform")
layout.prop(brush.curves_sculpt_settings, "minimum_length")
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 94bad5459c9..40da0b03f76 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -1642,6 +1642,27 @@ class SEQUENCER_PT_source(SequencerButtonsPanel, Panel):
split.operator("sound.pack", icon='UGLYPACKAGE', text="")
layout.prop(sound, "use_memory_cache")
+
+ col = layout.box()
+ col = col.column(align=True)
+ split = col.split(factor=0.5, align=False)
+ split.alignment = 'RIGHT'
+ split.label(text="Samplerate")
+ split.alignment = 'LEFT'
+ if sound.samplerate <= 0:
+ split.label(text="Unknown")
+ else:
+ split.label(text="%d Hz." % sound.samplerate, translate=False)
+
+ split = col.split(factor=0.5, align=False)
+ split.alignment = 'RIGHT'
+ split.label(text="Channels")
+ split.alignment = 'LEFT'
+
+ # FIXME(@campbellbarton): this is ugly, we may want to support a way of showing a label from an enum.
+ channel_enum_items = sound.bl_rna.properties["channels"].enum_items
+ split.label(text=channel_enum_items[channel_enum_items.find(sound.channels)].name)
+ del channel_enum_items
else:
if strip_type == 'IMAGE':
col = layout.column()
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 995b2afebf0..1af70895be9 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2295,6 +2295,8 @@ class VIEW3D_MT_object_relations(Menu):
layout = self.layout
layout.operator("object.make_override_library", text="Make Library Override...")
+ layout.operator("object.make_override_library",
+ text="Make Library Override - Fully Editable...").do_fully_editable = True
layout.operator("object.make_dupli_face")
@@ -5689,7 +5691,7 @@ class VIEW3D_PT_object_type_visibility(Panel):
# Allows derived classes to pass view data other than context.space_data.
# This is used by the official VR add-on, which passes XrSessionSettings
# since VR has a 3D view that only exists for the duration of the VR session.
- def draw_ex(self, context, view, show_select):
+ def draw_ex(self, _context, view, show_select):
layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 3e1754fd908..1b714a40d03 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -276,7 +276,7 @@ class VIEW3D_PT_tools_posemode_options(View3DPanel, Panel):
class TEXTURE_UL_texpaintslots(UIList):
- def draw_item(self, _context, layout, _data, item, icon, _active_data, _active_propname, _index):
+ def draw_item(self, _context, layout, _data, item, _icon, _active_data, _active_propname, _index):
# mat = data
if self.layout_type in {'DEFAULT', 'COMPACT'}: