Split the "Interpolation Line" theme property into three for each
interpolation mode, and use them accordingly. In the current theme
refactor, almost all theme properties of the dope sheet are getting
either removed (unused), or moved (shared). This decluttering opens up
the possibility to allow more theming, and let artists read the Dope
Sheet better.
## Avoiding Confusion
There's two "Bézier" interpolation types:
- Called "Bézier" in the interpolation type menu, and
- Called "Bézier" in the code, for the types that are labeled as
**"Easing" and "Dynamic"** in the interpolation type menu.
Since this commit is about the interpolation lines, which are **not**
drawn for the former, **this PR only covers Constant, Linear, and the
latter form of Bézier interpolation types.**
Pull Request: https://projects.blender.org/blender/blender/pulls/144255
This breaks tests (and the VR addon itself of course).
Needs to be done differently, will create new PR for proper fix.
This reverts commit 0c22ef5ae7.
In the Viewport VR Preview, an unusual and complicated import
manipulates sys.path to import a class from a file that is already
importable anyway.
There is no documented reason for this, and the common way to subclass an RNA type in python is by using its `bpy.types....` registered class, _not_ by directly subclassing the python type used to declare/register the parent type.
Pull Request: https://projects.blender.org/blender/blender/pulls/147656
Rename modules in `./scripts/modules/` to use an underscore prefix to
make it clear they aren't intended to be part of public API's. This
also means there is no implication that these modules should be stable,
allowing us to change them based on Blender's internal usage.
The following modules have been marked as private:
- `animsys_refactor`
- `bl_console_utils`
- `bl_i18n_utils`
- `bl_previews_utils`
- `bl_rna_utils`
- `bl_text_utils`
- `bl_ui_utils`
- `bpy_restrict_state`
- `console_python`
- `console_shell`
- `graphviz_export`
- `keyingsets_utils`
- `rna_info`
- `rna_manual_reference`
- `rna_xml`
Note that we could further re-arrange these modules
(under `_bpy_internal` in some cases), this change is mainly to mark
them as private, further changes can be handed on a case-by-case basis.
Ref !147773
Commit 6c6d1a9b63 allowed several units to OSL camera shaders'
parameters. Only meters 'm' were supported as distance units, because
others cannot be converted automatically into the shader' unit.
This commit allows using 'mm' in addition to 'm', and makes the
Blender property use a 'DISTANCE_CAMERA' subtype. This assumes that
someone using 'mm' specifically wants to use the value for camera
parameters, which means it can be used as is, without any conversion
in the shader.
The camera templates were updated to use a focal length in mm.
Pull Request: https://projects.blender.org/blender/blender/pulls/147347
We have icons that represent specific individual collections. like
Icon_Outliner_Collection for a default (uncolored) collection, and
Icon_Collection_color_x for ones with colors. For "collections" as a
general thing though we have icon_group. Sometimes we confuse the two,
for example the list of tabs to show in Properties uses a different
icon than the actual category icon. This PR fixes the complaint by
using the correct icon for each of these purposes.
Pull Request: https://projects.blender.org/blender/blender/pulls/147942
In OSL custom cameras, the current aperture size depends on the focal
length of the Blender camera, even though it is not usable by the
shader. This gives incoherent values to the depth of field.
To ignore this factor, this commit makes the custom camera behave the
same as the orthographic camera, by not being multiplied by the focal
length.
To compensate for that, the multiplication must happen inside the
shader. This adjustment was done in the advanced camera shader
template.
Pull Request: https://projects.blender.org/blender/blender/pulls/147346
The Grease Pencil operator for changing the Opacity of selected strokes
was missing from the transform menu, which is the where the `Radius`
operator lives.
This prevented the operator from being searched.
4.5 backport candidate.
Pull Request: https://projects.blender.org/blender/blender/pulls/147672
Moving `__call__` logic into Python's C-API means error messages
caused by operators reference the code of the caller instead of the
call from `.scripts/modules/bpy/ops.py`.
When a full call stack is available this isn't so important,
however when logging callers it's not useful to log the call
from `ops.py`.
There minor performance advantages for moving from Python to C++
however this wasn't a significant consideration for the change.
Note that this is a fairly direct conversion from Python to C++,
there is room for refactoring to simplify the calling logic.
See #144746 for the motivation & #147448 for further improvements.
Ref !145344
This function is used to add undo steps. It includes a message, for
use in the Undo History menu. This label uses the "Operator" context
for translation.
This commit adds automatic extraction of two functions `ED_undo_push`
and `ED_undo_grouped_push`, as well as manual extraction for many
strings not declared in the function calls.
In order to extract those messages using the proper context, the
extraction logic had to be changed so that a custom context could be
specified. The regexes can now be either a pattern, or
a (ctxt_override, pattern) tuple.
Pull Request: https://projects.blender.org/blender/blender/pulls/147581
This patch shows the start and end frames of the Movie Clip in its UI
template, which is now shown in the compositor node N-panel and camera
background image
Pull Request: https://projects.blender.org/blender/blender/pulls/145541
The Radial Tilling node crashes in the compositor in GPU mode. This is
because the compositor does not yet support 2D vectors in shader code
generation, but properly supports and expects them in the interface,
which the Radial Tilling node declares. This results in a bad shader
which crashes Blender.
To properly fix this, we need to:
- Support 2D vectors in compositor GPU material shader code generation.
- Support 2D vectors in shader node GPU stack construction.
- Adjust the interface of radial tilling to actually use 2D vectors.
This seems risky for 5.0, so this patch temporarily drops support for
the node in the compositor in 5.0. Then once 2D vectors are supported,
it can be enabled again.
Pull Request: https://projects.blender.org/blender/blender/pulls/147627
Since the introduction of the sequencer scene,
some of the sequencer python operators have
been using `context.scene` when they should be using
`context.workspace.sequencer_scene`.
This fixes `SequencerFadesAdd`, `SequencerFadesClear`,
`SequencerDeinterlaceSelectedMovies`,
`SequencerSplitMulticam`, and `SequencerCrossfadeSounds`.
Pull Request: https://projects.blender.org/blender/blender/pulls/147560
In bd06baf6e6, "WM_report" was renamed to "WM_global_report", but this
name was not changed in the translation extraction regex. Same for the
format version of this function.
Reported by Ye Gui in #43295.
The button used a custom text that could be the same as the default,
properly extracted text ("Show Hotkey Text"), or a different
one ("Hide Hotkey Text"), and was thus not always shown.
Reported by Ye Gui in #43295.
Geometry Nodes can generate warnings inside node trees using a Warning
node. This is used to report warnings in the modifier interface.
This commit allows translation of these warnings in the interface
template, and extracts the messages from built-in asset node groups,
by looking at each warning node.
Pull Request: https://projects.blender.org/blender/blender/pulls/147584
In 2a1a658492, layout functions for nodes were refactored and new
methods were introduced, but this change was not applied to the
translation extraction script.
This commit adds these method names and argument order to Python
extraction: "node_operator", "node_operator_with_outputs",
"simulation_zone", "repeat_zone", "for_each_element_zone",
"closure_zone".
Tooltips specified in a special structure are manually extracted using
`n_()`.
Actual translation is done manually in the UI methods inside NodeMenu,
in order to override the context, which by default would have been
"Operator".
Reported by Ye Gui in #43295.
Pull Request: https://projects.blender.org/blender/blender/pulls/147582
Remove access to the clipboard from the Paste Global Transform operator
poll function, as it can cause slowdowns when there is a lot of data on
the clipboard.
This also means that the parsing code has to be a bit more lenient to the
contents of the clipboard. And, because the error message that there is
no matrix on the clipboard is now going to be shown more often, I made it
a bit more friendly.
Pull Request: https://projects.blender.org/blender/blender/pulls/147562
This adds unobtrusive tab button for selecting displayed tabs to the
tabs region. The idea is, that this way, the filter is much more
discoverable than it being hidden in options popover. The button is
grayed out, when all tabs are visible.
To only draw arrow, is achieved by setting `UILayout.emboss` to `NONE`
or `NONE_OR_STATUS`
Pull Request: https://projects.blender.org/blender/blender/pulls/135132
We have icons that represent specific individual collections. like
Icon_Outliner_Collection for a default (uncolored) collection, and
Icon_Collection_color_x for ones with colors. For "collections" as a
general thing though we have icon_group. Sometimes we confuse the two,
for example the list of tabs to show in Properties uses a different
icon than the actual category icon. This PR fixes the complaint by
using the correct icon for each of these purposes.
Pull Request: https://projects.blender.org/blender/blender/pulls/147652