For linked grease pencil data, layer operators are accessible right
now. Grey out them in UI by adjusting poll functions. Also disabled
the individual layer row of tree-view.`
See images in PR description
Pull Request: https://projects.blender.org/blender/blender/pulls/137946
Adds a new operator in Grease Pencil edit mode to convert between curve
types. This acts as a replacment for the `Set Curve Type` operator as
the new operator better aligns with previous workflows and artist
expectations. Specifically using a threshold to adjust how well the
resulting curves fit to the original.
It can be found in the `Stroke` > `Convert Type` menu.
This operator aims at keeping visual fidelity between the curves. When
converting to a non-poly curve type, there's a `threshold` parameter
that dictates how closley the shapes will match (a value of zero meaning
an almost perfect match, and higher values will result in less accuracy
but lower control point count).
The conversion to `Catmull-Rom` does not do an actual curve fitting.
For now, this will resample the curves and then do an adaptive
simplification of the line (using the threshold parameter)
to simulate a curve fitting.
The `Set Curve Type` operator is no longer exposed in the
`Stroke` menu.
This also adds a new `geometry::fit_curves` function.
The function will fit a selection of curves to bézier curves. The
selected curves are treated as if they were poly curves.
The `thresholds` virtual array is the error threshold distance
for each curve that the fit should be within. The size of the virtual
array is assumed to have the same size as the total number of
input curves.
The `corners` virtual array allows specific input points to be treated
as sharp corners. The resulting bezier curve will have this point and
the handles will be set to "free".
There are two fitting methods:
* **Split**: Uses a least squares solver to find the control
points (faster, but less accurate).
* **Refit**: Iteratively removes knots with the least error starting
with a dense curve (slower, more accurate fit).
Co-authored-by: Casey Bianco-Davis <caseycasey739@gmail.com>
Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/137808
With 24d08e0bae, the ability to view UVs
in the Image Editor was introduced in all modes, not just Texture Paint
and Edit Mode. This introduced a new flag that was enabled by default,
causing UVs to be displayed in any of the Image Editor modes.
While this is helpful for some workflows, it is unnecessarily
distracting for many usecases when using the Image and Mask modes of the
Image Editor. To remedy this, this PR adds various polls to ensure
that these are only shown in the Paint Mode of the Image Editor and the
UV Editor. Further thought should be put into the potential separation
between the different usecases of this editor, but that is out of scope
for now.
Pull Request: https://projects.blender.org/blender/blender/pulls/139563
Deactivate the following buttons when no node tree exists:
- Overlays (all node editors)
- Snap (all node editors)
- Gizmos (compositor only)
- Backdrop (compositor only)
Note: a node tree can exist although compositing is deactivated
(e.g. "Use Nodes" is set to False), in which case the buttons are
active.
Pull Request: https://projects.blender.org/blender/blender/pulls/139526
This reduces the search weight of the frame node because it is rarely added
through the add menu. It's much easier to add it with the F key.
By reducing its search weight, the Frame output of the Scene Time node shows up
as first result, which is more desirable.
Pull Request: https://projects.blender.org/blender/blender/pulls/139709
Added WoA support status. Up to now there hasn't been a working stack
that allows Windows+ARM GPU+Blender work well together. There are render
glitches and occasional crashes. Currently we are investigating the
issues together with Qualcomm in order to improve the situation. However
for Blender 4.5 release Vulkan support should not be expected to work.
There have een some issues detected with core vulkan that are not
visible on other platforms.
Currently VR can have suboptimal performance when using the Vulkan
backend (#138977). Jereon has run various experiments and was unable
to resolve the issue. So in the meantime work on Vulkan VR performance
has been delayed until Blender 5.0.
Since Blender 4.5 is likely to release without a fix for the VR
performance issue. This commit adds an explicit note about it to the
user preferences.
Pull Request: https://projects.blender.org/blender/blender/pulls/139519
Add ability to randomize color of each stroke for or use perlin noise
randomization during the stroke. Works similarly to grease pencil stroke
color randomization. This feature is available for all mesh color
painting modes (Sculpt Paint brush, Texture Paint and Vertex Paint)
This setting is available both as a per-brush setting and a unified
setting on the scene level. Additionally, the equivalent Grease Pencil
options have been migrated to these more generic flags and values.
Based on this [1] RCS request.
[1]: https://blender.community/c/rightclickselect/mwgbbc/
Pull Request: https://projects.blender.org/blender/blender/pulls/128953
This implements the "boundary strokes" features (from 4.2 LTS).
To make it a bit more clear, the feature is now called "fill guides".
It uses the same `Alt`+`LMB` shortcut.
Fill guides are denoted by a `".is_fill_guide"` attribute set to `true`.
Otherwise they behave as normal strokes.
There is the `Clean Up` > `Remove Fill Guides` operator to remove
the strokes.
This also adds an option to the Fill tool to automatically remove fill
guides once a fill has been created.
Pull Request: https://projects.blender.org/blender/blender/pulls/139293
The `SEQUENCER_OT_change_effect_input` operator does exactly the same thing
as `SEQUENCER_OT_swap_inputs` . "Change effect input" in the
"Effect Strip" context menu also seems bugged in recent versions.
Since "Swap Inputs" already has a keybind and the name itself is closer
to its intended use, just use that operator over the other one.
Also poll "Swap Inputs" so it is grayed out if the effect does not take
two inputs.
Pull Request: https://projects.blender.org/blender/blender/pulls/139615
All contained operators are using poll functions that check we are in
weight paint mode, so all operators would be disabled in editmode
anyways, better to remove the menu to avoid confusion.
Pull Request: https://projects.blender.org/blender/blender/pulls/139535
Use these terms over "Cross" and "Gamma Cross" in the UI/RNA
when referring to effect strips.
Keep it as "Cross" for blend modes for now (which is in and of itself
a bit of a weird naming. In the future, we should consider unifying
our blend mode types with compositor ones for consistency).
Pull Request: https://projects.blender.org/blender/blender/pulls/139606
e.g. stands for "exempli gratia" in Latin which means "for example".
The best way to make sure it makes sense when writing is to just expand
it to "for example". In these cases where the text was "for e.g.", that
leaves us with "for for example" which makes no sense. This commit fixes
all 110 cases, mostly just just replacing the words with "for example",
but also restructuring the text a bit more in a few cases, mostly by
moving "e.g." to the beginning of a list in parentheses.
Pull Request: https://projects.blender.org/blender/blender/pulls/139596
- Previously, effects could be changed into types that take different
amount of inputs, e.g. from "add" to "glow", which led to undefined
and glitchy behavior (unreported bug). Fix by requiring same input count
for new effect.
- Previously, strip names were not updated when changing effect type,
which tended to be confusing. Now, if the default name was not changed,
update to the new effect type name.
- Remove "effect strip" menu from color and text strips. Although they
are effects internally, to a user, this is not clear, and providing the
option to modify effect inputs in these cases doesn't really make sense.
Pull Request: https://projects.blender.org/blender/blender/pulls/139514
Prior to this commit, the cursor overlay options were tied to the
`has_overlay` setting for brushes. This check used the `mtex` property
to examine the mapping mode of the associated texture.
This should not apply to the overall cursor overlay settings, as they
are not dependent upon a texture being loaded.
Pull Request: https://projects.blender.org/blender/blender/pulls/139567
This adds a new Format String node which simplifies constructing strings from
multiple values. The node takes a format string and a dynamic number of
additional parameters as input. The format string determines how the other
inputs are inserted into the string. Only integer, float and string inputs are
supported for now.
It supports two different format syntaxes:
* Python compatible format syntax which also mostly matches the behavior of the
`fmt` C++ library. Most of this is supported, but there are some small
limitations.
* Syntax of the form `###.##` where each `#` stands for a digit. This is the
syntax that was introduced in #134860.
This node greatly simplifies common string operations which would have required
potentially many nodes before to convert numbers to strings and to concatenate
them. It also makes new conversions possible that were not supported before.
This node can also be used to insert e.g. frame numbers into a file path which
was surprisingly complex before.
This node has special behavior for the name of new inputs. For the purpose of
the node, the name of the inputs must be valid identifiers and it's usually
helpful when they are short. New names are therefore initialized to be single
characters. If possible, the first character of the linked input is used. This
works well when connecting e.g. a Separate Vector/Color node. Otherwise, inputs
are named `a` to `z` by default. If that's not possible, the source socket name
is used instead (converted to be a valid identifier). If that still doesn't
work, the name is made unique using the normal `.001` mechanism except that `_`
instead of `.` is used as separator to make the name a valid identifier.
Python Syntax references:
* Python: https://docs.python.org/3/library/string.html#formatspec
* `fmt`: https://fmt.dev/latest/syntax/
More detailed notes about compatibility with the above syntax specifications:
* Conversion using e.g. `!r` like in Python is not supported (maybe the future).
* Sub-attribute access like `{vector.x}` is not supported (maybe the future).
* Using `%` like in Python is not supported (maybe in future).
* Using `#` for an alternate form is not supported. This might help in the
future to make the syntax compatible with #134860.
* Using `L` like in the `fmt` library is not supported because it depends on the
locale which is not good for determinism.
* Grouping with e.g. thousands separators using e.g. `,` or `_` like in Python
is not supported (maybe in future). Need to think about the locale here too.
* Mixing of unnamed (`{}`) and named (`{x} or {0}`) specifiers is allowed.
However, all unnamed specifiers must come before any named specifier.
The implementation uses the `fmt` library for the actual formatting. However,
the inputs are preprocessed to give us more control over the exact supported
syntax and error messages. The code is already somewhat written so that many
strings could be formatted with the same format but that's not actually used yet
because we don't have string fields yet.
Error messages are propagated using a new mechanism that allows a limited form
of error propagation from multi-functions to the node that evaluates them.
Currently, this only works in fairly limited circumstances, e.g. it does not
work during field evaluation. Since this node is never part of field evaluation
yet, that limitation seems ok, but it's something to work on at some point.
Properly supporting that requires some more changes to propagate enough context
information everywhere. Also showing errors of field evaluation on the field
node itself (instead of on the evaluation node) requires even more work because
our current logging system is not setup to support that yet.
This node comes with a few new requirements for the socket items system: names
must be valid identifiers and they are initialized in a non-trivial way.
Overall, this was fairly straight forward to implement but currently it requires
to adding a bunch of new members to all the accessors that don't really need it.
This is something that we should simplify at some point even if I'm not entirely
sure how yet. The same new requirements used in this node would probably also
exist in a potential future expression node.
Pull Request: https://projects.blender.org/blender/blender/pulls/138860
Previously the only way to see these attributes and their values
was the Python API. It's helpful for both users and developers to
be able to know all the data attached to the geometry.
This commit adds an option to the spreadsheet's "View" menu
to display attributes starting with a period that are normally hidden.
The option is off by default. Anonymous attributes are still hidden.
---

Pull Request: https://projects.blender.org/blender/blender/pulls/139559
Overall the goal of the PR is to show the preview range in the
clip editor's dopesheet and graph mode.
To accomplish this, some cleanup and refactor were needed:
- Clip editor had a nearly 1:1 copy paste of the timeline draw code,
which has been replaced with `ANIM_draw_framerange`.
- Preview range draw code required `bContext`, which was only used to
access scene. Now scene is passed explicitly, without need to know the
context.
- The macro to access the preview range was removed. This is because the
code is within `PRVRANGEON` check, so `PSFRA`/`PEFRA` were doing
redundant checks.
Pull Request: https://projects.blender.org/blender/blender/pulls/138678
Previously, one had to search for the name of an input node (Geometry, Light
Path, etc.) instead of for the actual desired values.
This patch makes it possible to search for the output names of various input
nodes directly. All other outputs of the input node are hidden automatically.
This was partially support for the Scene Time before.
Supported nodes:
* Compositor: Scene Time
* Geometry Nodes: Camera Info, Mouse Position, Scene Time, Viewport Transform
* Shader Nodes: Camera Data, Curves Info, Geometry, Volume Info, Light Path,
Object Info, Particle Info
Right now, the output names are hardcoded in the menu. We don't have a great way
to access those without an actual node instance currently. For that we'll need
to make the node declarations available in Python, which is a good project but
out of scope for this this feature. It also does not seem too bad to have more
explicit control over what's shown in the search.
Pull Request: https://projects.blender.org/blender/blender/pulls/139477
Implementation of #127106.
This is just a visual representation of the field/single/grid
status of sockets to make the workflow more intuitive. With
a visual representation for volume grid sockets, volume features
should be unblocked for further development. The structure type
will also be used to distinguish list sockets in the interface.
Group input nodes now have a "Structure Type" option instead of
the existing "Single Value Only". Usually the auto option should be
enough, but in some cases where the inferencing cannot (yet) make
a clear determination, it can be helpful to choose a specific type.
The new visualization and the group input structure type option
are hidden behind a new experimental option for now.
Pull Request: https://projects.blender.org/blender/blender/pulls/134811
The menu item for Knife tool and what is bound to the "K" differ by
some properties so it does not show the shortcut on the menu. Those
properties are all defaults, so this PR just removes those from the
keymap. Everything works as now, but it shows the shortcut.
Pull Request: https://projects.blender.org/blender/blender/pulls/139457
This patch adds a new Image Coordinates node for the compositor. The
Texture Coordinates and Pixel Coordinates outputs were removed from the
Image Info node and were added to the new node instead. Additionally, a
new Normalized Coordinates output was added.
The Pixel Coordinates output now no longer includes half pixel offsets.
Pull Request: https://projects.blender.org/blender/blender/pulls/138935
With #128051, the default timeline tool changed to
a `sequencer.select` on press with no associated
properties (before, it had `deselect_all`).
This meant that retiming key selection broke (as
reported in #129892) and strips would only deselect
on release if clicking into empty space (due to a separate
keymap item in the global sequencer keymap).
This patch reverts 97e44901b4 while keeping its fix,
in favor of a more robust solution (just add `deselect_all`
to the keymap item properties in the box select tool).
This probably have occured after migration from UIList. When nodetree ID
is linked form another file, disable the layout for individual rows and
the add/remove operator. Also tweak `supports_renaming()` function so that
individual tree element cannot be renamed when linked.
Pull Request: https://projects.blender.org/blender/blender/pulls/139269
How solid/faded the edges of a Grease Pencil stroke is
controlled by the `softness` attribute. This change adds a
node that exposes that attribute, allowing the user to
control it via Geometry Nodes.
Pull Request: https://projects.blender.org/blender/blender/pulls/138939
In the Python API, helper function `gpu_extras.presets.draw_texture_2d`
still used batch type `TRI_FAN`, which is deprecated since Blender 3.2.
In this patch the batch type is changed to `TRIS`.
Pull Request: https://projects.blender.org/blender/blender/pulls/139300
When enabled, this normalize the strength by the light area, to keep
the total output the same regardless of shape or size. This is the
existing behavior.
This is supported in Cycles, EEVEE, Hydra, USD, COLLADA.
For add-ons, an API function to compute the area is added for conversion,
in case there is no native support for normalization.
area = light.area(matrix_world=ob.matrix_world)
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/136958
Similar to other renderers, this adds a temperature property to set the
light color using blackbody emission. This can be more convenient than
using nodes, and can improve interop with other software.
This is supported in Cycles, EEVEE, Hydra, USD, COLLADA and FBX.
Pull Request: https://projects.blender.org/blender/blender/pulls/134303
Similar to other renderers, this adds an exposure property to multiply
the light power by 2^exposure. This can be more convenient to control
a wide range of values.
This is supported in Cycles, EEVEE, Hydra, USD, COLLADA and FBX.
Pull Request: https://projects.blender.org/blender/blender/pulls/134528
Previously, we were drawing the context path in the header of the spreadsheet.
However, that had some problems:
* When using a viewer that's somewhere deep in a node group, the viewer path
wouldn't fit.
* Standard editor menus didn't fit in. Also we wanted to add spreadsheet
specific operators that should be in a new menu.
* Couldn't fit more useful data for the context path (like the inspection index
for repeat zones).
This patch solves this by moving the entire context path to the left side bar.
This frees up the header for menus.
The new context panel information is added at the top of the side bar because
then there is a proper hierarchy: `Object > Evaluation State > Viewer Path
(optional) > Instance Selection > Domain Selection`
This patch also adds information about the current inspection index for for-each
and repeat zones. They are not editable yet, but that can be implemented
separately as it might require a few more changes for everything to update
correctly.
The new Viewer Path panel is only displayed when actually showing viewer data.
Pull Request: https://projects.blender.org/blender/blender/pulls/138477
This patch adds snapping options for the playhead to all animation editors.
The options can be modified through a new dropdown in the editor header.
All editors will show all those options, and they are shared,
so toggling the option in on editor will change it for all other editors too.
Some options are not working/relevant in some editors for example
Strips in the Dope Sheet. However for consistency the option is still shown.
This is a separate menu from the transform snapping menu because
you can toggle the snapping for transform and playhead separately.
Putting it in the existing snapping transform menu would imply that it can
be turned off with the magnet which is not the case.
Playhead snapping is explicitly disabled for the drivers editor
because there is no playhead to drag around.
Snapping to Frame/Second intervals takes the scene start as a starting point.
That means you can snap to the n-th second of the animation even though
it might not start at frame 1. The preview range is NOT taken into account
by design since the use case is working on a sub-section of the animation
in which case the snap target should not change.
Snapping is toggled by pressing CTRL as indicated by the status bar.
Snapping to Frames/Seconds is absolute, meaning no matter
how far away your cursor it will snap to the closest snap point.
All others only snap to things if they are close to the cursor in pixel values.
When mixing those two behaviors, it prefers relative snapping.
If no point is close enough to snap relative,
it will fall back to absolute snapping.
Based on the prototype #135913
Part of #135794
Pull Request: https://projects.blender.org/blender/blender/pulls/137278