The built-in brush identifier didn't match the enum name causing
brush assignment not to update the tool-system (clearing the tool).
Resolve by using generate_from_enum_ex(..) to avoid each brush
definition having to manually duplicate enum definitions.
Also avoid using a dict as a default argument. While it didn't cause
problems - in general it's bad practice and worth avoiding as any
modifications produce strange behavior.
Use names:
- `tool_settings` instead of `ts`.
- `props` instead of `op` / `prop` / `op_props`
As Python may reference operators, don't confuse the operator
properties with an instance of the operator.
In both cases these names were already used for most scripts.
- "Lens" can be a transparent object used in cameras, or specifically
its property of focal length
- "Empty" can be an adjective meaning void, or an object type. The
latter is already disambiguated using `ID_ID`
- "New" and "Old" are adjectives that can have agreements in some
languages
- "Modified" is an adjective that can have agreement in some languages
- "Clipping" can be a property of a camera, or a behavior of the
mirror modifier
- "Value" in HSV nodes, see #105113
- "Area" in the Face Area geometry node, can mean a measurement or a
window type
- "New" is an adjective that can have agreement
- "Tab" can be a UI element or a whitespace character
- "Volume" can mean a measurement or an object type. The latter is
already disambiguated using `ID_ID`
These changes introduce the new `BLT_I18NCONTEXT_TIME` translation
context.
They also remove `BLT_I18NCONTEXT_VIRTUAL_REALITY`, which I added at
one point but then couldn't find which messages I wanted to fix with
it.
Ref #43295
Pull Request: #106718
This property is not editable after 7966cd16d6dc4e66d01f,
though doing so didn't seem to give an error. It doesn't have
to be set anymore, since the data is redundant with the
"loop_start" anyway.
Mistake in ba25023d22, updated the drawing code with the wrong function
call. So when setting the add-ons category to "User", add-ons installed
in the user paths (custom paths configured in Preferences) wouldn't show
up.
When loading an external file in the text editor, the footer text
stating "File: <file>" or "File: <file> (unsaved)" was not translated,
because the translation happened after string formatting, and the
message was thus not found in the po files.
Pull Request: https://projects.blender.org/blender/blender/pulls/106716
It was that names of related "combo" operations
like Hue/Saturation/Value, *Dilate/Erode*
and Brightness/Contrast should be separated
by slashes in their names.
This patch changes this for the multiple nodes
and operators concerning Hue/Saturation/Value
across Blender.
Note1: This patch should only touch UI names
which do not need versioning and should not
break scripts.
Note2: This breaks first letter fuzzy search
for "hsv". It was noted by @HooglyBoogly that
the "/" character needs to be added to the
fuzzy search split list. Note however that such
search is already broken in Main for nodes like
Brightness/Contrast and Dilate/Erode which
already use slash separators
Pull Request: https://projects.blender.org/blender/blender/pulls/106721
Rename *Bright/Contrast* to *Brightness/Contrast* in order to avoid the use of shortened names and improve consistency within Blender and with industry conventions.
Reasoning:
The modified color characteristic is called *brightness*, not *bright*. You don't modify the *bright* of an image.
This also interferes with search in case someone searches for brightness, producing no results.
*Note: This patch should only touch UI names which do not need versioning. It leaves the actual property name in nodes for a future breaking release.*
Pull Request: https://projects.blender.org/blender/blender/pulls/104998
Give errors in a few cases:
- The mesh has no UV map
- The faces have no area
- The applied modifier has no curve data (it may have been modified)
Use errors instead of cancelling the operator completely so the
operator can still do something useful when many meshes are
selected and only some fail.
Pull Request: https://projects.blender.org/blender/blender/pulls/106823
Makes it possible to select multiple custom script directories in Preferences >
File Paths, replacing the single Scripts path option. Each of these directories
supports the regular script directory layout with a startup file (or files?),
add-ons, modules and presets.
When installing an add-on, the script directory can be chosen.
NOTE: Deprecates the `bpy.types.PreferencesFilePaths.script_directory`
property, and replaces `bpy.utils.script_path_pref` with
`bpy.utils.script_paths_pref`.
Pull Request: https://projects.blender.org/blender/blender/pulls/104876
Introduce a context manager that temporarily overrides a UILayout's
operator context.
Instead of writing this:
```py
default_op_context = layout.context
layout.context = 'OTHER_VALUE'
layout.do_stuff()
layout.context = default_op_context
```
you can now write this:
```py
from bl_ui_utils.layout import operator_context
with operator_context(layout, 'OTHER_VALUE'):
layout.do_stuff()
```
This is also exception-safe; it will always ensure the layout's operator
context is restored when the `with` body is exited, regardless of
whether that's done with an exception or regularly.
Idea in-the-hallway approved by @Sergey.
pgettext_tip incorrectly imported as iface_ instead of importing
pgettext_iface. These leads to incorrectly translated attribute text
shown when the user elects to translate only tooltips.
Pull Request: https://projects.blender.org/blender/blender/pulls/106507
Previously the only way to control the subtype was to remove the group
input or output and create it again. This commit adds a dropdown to
change an existing socket, for supported socket types.
Based on a patch by Angus Stanton: https://developer.blender.org/D15715
It was necessary to fix the UI code slightly; the layout's context
wasn't being used in calls to an operator's enum items callback.
Pull Request: https://projects.blender.org/blender/blender/pulls/105614
Face Nearest only works with individual projection, so always set the
`SCE_SNAP_PROJECT` flag in this case.
Also gray out the `Project Individual Elements` option in the UI if
`Face Nearest` is enabled.
And change the description to indicate that `Project Individual Elements`
is always enabled with the `Face Nearest` option.
(I feel a better design for this option needs to be considered).
This adds the select more/less operators to the weight paint mode face selection.
Just like in edit mode, press `CTRL`+`Numpad Plus/Minus` to use them.
They have also been added to the `Select` menu.
Pull Request: https://projects.blender.org/blender/blender/pulls/105607
This adds the select more/less operators to the weight paint mode vertex selection.
Just like in edit mode, press CTRL+Numpad Plus/Minus to use them.
They have also been added to the Select menu.
Pull Request: https://projects.blender.org/blender/blender/pulls/105633
This was an issue with the `operator_context`. It's a bit confusing because it
looks like every `uiLayout` has its own, but in `uiLayoutSetOperatorContext`
you can see that the `operator_context` is always set on the root layout for
some reason.
The fix is to set `INVOKE_REGION_WIN` as the operator context after it has been
set to something else (I found this to be the default by printing the operator
context before it was changed).
Pull Request: https://projects.blender.org/blender/blender/pulls/106213
Currently assigning values to IDProperties clears their UI data.
That is fixed by #106161, but that is too risky for 3.5. Instead,
work around the issue by triggering `MOD_nodes_update_interface`
function which recreates the UI data of the modifier properties.
Pull Request: https://projects.blender.org/blender/blender/pulls/106190
Add a Gaussian smoothing operator to supersede the current
smoothing operator in the graph editor.
Advantage over the current implementation:
* Supports modal operations
* Is independent of key density
* More options in the redo panel
* More predictable Impulse Response
Option in the redo panel to change
Filter Width: How far out on each side of a key the code checks
to average key values
Sigma: The shape of the bell curve, lower values make a sharper bell curve
reducing the smoothing effect.
Too High values will make the code behave like an average filter as the
curve in the -1/1 range will almost be flat.
On a technical note, the operator needs to store additional data when running in modal
to avoid allocating/deallocating data on every modal run.
For that reason the `tGraphSliderOp` struct has been extended with
`void *operator_data` and `void (*free_operator_data)(void *operator_data)`.
The former is the data and the latter is a function responsible for freeing that data.
Pull Request: https://projects.blender.org/blender/blender/pulls/105635
This patch adds an option to the Status Bar: `Scene Duration`
This shows the duration of the current scene in frames and timecode
`Duration: <timecode> (Frame <current frame>/<total frames>)`
The timecode follows the formatting defined in the user preferences.
Pull Request: https://projects.blender.org/blender/blender/pulls/104882
Add control over how bone relation lines are drawn. Instead of always
drawing from the head of the child to the tail of the parent, give users
a choice for the parent side of the line. This can now be toggled
between the head and the tail of the bone, where the tail is Blender's
original behaviour and is retained as default value.
Pull request: https://projects.blender.org/blender/blender/pulls/105427
Geometry Nodes: SDF Volume nodes milestone 1
Adds initial support for SDF volume creation and manipulation.
`SDF volume` is Blender's name of an OpenVDB grid of type Level Set.
See the discussion about naming in #91668.
The new nodes are:
- Mesh to SDF Volume: Converts a mesh to an SDF Volume
- Points to SDF Volume: Converts points to an SDF Volume
- Mean Filter SDF Volume: Applies a Mean Filter to an SDF
- Offset SDF Volume: Applies an offset to an SDF
- SDF Volume Sphere: Creates an SDF Volume in the shape of a sphere
For now an experimental option `New Volume Nodes` needs to be
enabled in Blender preferences for the nodes to be visible.
See the current work plan for Volume Nodes in #103248.
Pull Request: https://projects.blender.org/blender/blender/pulls/105090
- Show/hide mask layers: the tooltip was confusing from a user's
perspective, because they should not be expected to know what a hide
flag is.
- Active Spline -> Active Point: likely a copy and paste error.
- Geo Nodes face is planar node: forgotten article.
- Axes, plural instead of axis for the viewport preferences. Here
there are several usages of axis or axes. Since they refer to
coordinate axes I believe they should be plural, even though the
property `mini_axis_type` is still wrong.
-----
![image](/attachments/7ccdc72d-1e83-4c22-b8e9-c3b7c5fcf629)
![image](/attachments/746015bc-23e1-49bc-8828-df07d7605048)
![image](/attachments/61c58766-a8f5-4a90-b862-c9b57c44c355)
Pull Request: https://projects.blender.org/blender/blender/pulls/105814
Move the deform curves with surface node group to last so it affects the
final generated curves consistently (though this will have a negative
performance impact), and make the generate and interpolate modifiers use
the surface mesh's rest positions.
In most places where it appears in a menu, the operator would already
apply to all selected F-Curves. Now it is done consistently and explicitly
from all menu items. The default of the operator is now also set to 'all
selected', so that it also behaves like that when called from the operator
search menu.
This patch enables edge panning for the operators where there was
a mismatch in behaviour between using the shortcut `G` and the
"Move" operator exposed via the menu and operator search.
Commit 19da434e9cc0 introduced a `view2d_edge_pan` property which
was activated for the translate operators invoked when pressing G in
the default keymap.
The property is not enabled by default, to avoid it getting in the
way in some cases, so the "Move" operators exposed via the menus
didn't have edge panning. This lead to inconsistent behavior between
moving via the shortcut or via the menu.
Pull Request: https://projects.blender.org/blender/blender/pulls/104482