- Move `gtao_distance` to view layer and rename to
`ambient_occlusion_distance` (API change).
- Remove `gtao_quality` from the RNA (API change).
- Remove `use_gtao` (unused) from the RNA (API change).
- Rename `gtao_focus` to `fast_gi_bias` in the DNA (no API
change).
- Rename `gtao_resolution` to `fast_gi_resolution` in the
DNA (no API change).
Pull Request: https://projects.blender.org/blender/blender/pulls/140298
Move panel header, panel background, and sub-panel background color
settings to be global, under `User Interface`, like other widgets.
Remove per-editor panel styling. This way users can edit the panel
colors once, and affect all panels.
See pull request for screenshots and details.
Pull Request: https://projects.blender.org/blender/blender/pulls/140295
This commit introduces interpolation methods (Nearest, Bilinear,
Bicubic) for the Displace node in the compositor:
- Exposes a dropdown selector for interpolation selection.
- Introduces different methods for Anisotropic and other interpolation
methods.
Reference: #119592.
Pull Request: https://projects.blender.org/blender/blender/pulls/139802
Change island selection from being it's own selection mode,
along side vertex/edge & face modes, to a separate toggle.
This makes it possible to use sync-select without loosing functionality
as previously island selection didn't work when sync-select was enabled.
Now island selection supports sync-select although at the moment this
only works in face-select mode, when !138197 is merged this limitation
will be removed.
In practice this change is subtle, making it possible to toggle island
selection no matter which selection mode is currently active.
Details:
- The UI is mostly unchanged, this option is available
in the same location in the header & menu as a toggle.
- The shortcut 4-key is kept, toggling instead of switching modes.
- Enabling island selection no longer isolates islands,
it just acts on selection actions made after being enabled.
Allow theming the outline of selected elements. This helps to make
active elements more prominent, and allows for flat theme combinations
not possible before.
Pull Request: https://projects.blender.org/blender/blender/pulls/139850
The tabs in the sidebar are aligned to the content, which looks great
when region overlap is off, but when it isn't, it looks like the tabs
are attaching to nothing. Solve this by drawing sidebar tabs as pills,
when using region overlap. This matches the top-bar workspace tabs.
Pull Request: https://projects.blender.org/blender/blender/pulls/139951
This is part of the short term roadmap goal of simplifying the
compositor workflow
(see https://projects.blender.org/blender/blender/issues/134214).
The problem is that many users don't know how to get started with
compositing in Blender, even when they have used Blender for other
areas, e.g. modeling.
Note: although the solution makes compositor node trees reusable
accross blend files, this is a nice side effect and not the main goal
of the PR.
This PR implements a "New" button that creates a new compositing node
tree, and manages trees as IDs. This has following advantages:
- Consistent with other node editors and other parts of Blender,
therefore making it easier to getting started with compositing if users
are familiar with shading or geometry nodes
- Give users the ability to reuse the compositing node tree by linking
or appending it.
Note: The parameter "Use Nodes" is still present in this PR, but will
be removed (in a backward compatible way) in a follow up PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/135223
This adds support for specifying structure types on closures. The main immediate
benefit is that this makes it possible to use fields with closures (without
having incorrect warnings in the UI).
A closure zone behaves very similar to a node group with respect to structure
type inferencing. The structure types can be inferenced fully automatically, or
the user can specify them manually on the closure inputs. On the evaluate
closure zone, the user has to specify the structure types of the inputs and
outputs explicitly (or leave them as dynamic).
Working on this, I was a bit surprised that `get_output_socket_shape` depended
on the field state. Is that a left-over? It feels like it shouldn't be necessary
since the socket shape shouldn't depend on field inferencing anymore. I removed
that now and couldn't see a difference yet.
The operator that creates a closure zone from an evaluate closure node copies
the input structure types already. Beyond that, there is no automatic syncing of
the structure types yet. The structure types only affect the UI and not what's
actually done during evaluation.
Pull Request: https://projects.blender.org/blender/blender/pulls/139713
This moves `PointCloud` to use the recently added `AttributeStorage`
at runtime. Mainly this involves implementing the higher level attribute
API on top, and implementing the RNA API as well. The attribute RNA type
is now backed by either CustomDataLayer or bke::Attribute. For now the
new code is specific to point clouds but next steps can reuse it for
Grease Pencil layer attributes, curves, and eventually meshes.
Point cloud attributes no longer have a name length limit.
Internally, the `AttributeStorage` API is extended with a few additions:
- The data structs have static constructors for convenience.
- A few functions give index-based access to attributes
- A "rename" function is added.
The `Attribute` RNA type now exposes a `storage_type` property.
For now the "single value" option is still unused at runtime, and
accessing the single value data isn't implemented yet.
Pull Request: https://projects.blender.org/blender/blender/pulls/139165
Complete the versioning and writing changes from these commits:
- f9b627d29c
- f2bcd73bd2
- c5ba8bd7c2
4.5 has the forward compatibility handling to support reading files
written by 5.0. This removes the conversion when writing files
and removes the lookup of ".uv_seam" as a fallback for "uv_seam".
Pull Request: https://projects.blender.org/blender/blender/pulls/139841
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
Set fuzzy=1 when softbody modifier is added. As of now, value is 0, this
raises concern of division by zero so bump it to 1.
Updated `softbody_test.blend` to fix the failing test.
Resolves#137849
Pull Request: https://projects.blender.org/blender/blender/pulls/137878
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
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
This patch turns the Blur node options to inputs.
Size is now a 2D vector and replaces the Size X and Y option. Bokeh was
renamed to Separable to reflect its actual function. Relative was
removed in favor of the newly added Relative To Pixel node workflow.
There is a slight difference in variable size blurring due to float vs
integer computations, so two tests were updated.
Reference #137223.
Pull Request: https://projects.blender.org/blender/blender/pulls/139329
This patch adds support for 2D and 4D vector sockets. The default value
structure for vectors was extended to include a new dimensions input,
which can be 2, 3, or 4. The default value was also extended to be a
float4, but only some of its components might be used depending on the
dimensions members.
Each vector subtype now has three variants ending with 2D or 4D as a
prefix depending on its dimensions, and the 2D/4D prefix was taken into
account for the socket type RNA enum functions.
All node systems currently always treat the vectors as 3D, but support
for it in the compositor will shortly follow in another patch.
Depends on #138805.
Pull Request: https://projects.blender.org/blender/blender/pulls/138824
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
This patch turns the options of the Color Balance node into inputs.
In the process, each of the wheels were split into two inputs, a base
float and a color. For instance, Gain is controlled using both a Base
Gain and Color Gain, the former controls the gain for all channels while
the latter controls it per channel.
Reference #137223.
Pull Request: https://projects.blender.org/blender/blender/pulls/138610
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
This patch turns the options of the Crop node into inputs.
Instead of specifying the bounds of the crop, the inputs now specify the
Width and Height of the crop region. The Crop Image Size option was
renamed to Alpha Crop and inverted, so it now defaults to actual
cropping. The Relative option was removed, as it is now superseded by
the Relative To Pixel node, and removal was done to facilitate the
options to inputs project.
Reference #137223.
Pull Request: https://projects.blender.org/blender/blender/pulls/139163
This patch removes the Relative option from the Translate node. This is
now superseded by the Relative To Pixel node, and removal was done to
facilitate the options to inputs project.
Pull Request: https://projects.blender.org/blender/blender/pulls/139147
- Make Curve::type the source of truth for the curve type,
instead of Curve::vfont, since it's possible for this to be
set to null from RNA which effectively changed it's type.
See #138730.
- Update objects to match the curve type on file read.
Without this, an object may link to a curve in another file which
can be replaced by a curve data-block of a different type.
Note that updating the object type was already being done
when reloading library data and setting object data,
just not on file load.
Ref !139137
Armature bone display mode (Octahedral, Stick, Envelope, B-Bone,
Wire) could only be set on the whole armature. This adds ability to
override the display mode per-bone (by default bones use the
same display mode as the armature).
Images in the PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/138445
This patch removes the Gamma option from the Defocus and Blur nodes. The
reasoning is as follows.
- The option was originally added when the compositor wasn't working on
a strictly linear workflow. So this is rarely needed now.
- It is easy to insert a Gamma node around Blur nodes to perform any
gamma correction if really needed.
- Since we are moving options to inputs, it doesn't seem worth it to
provide this option as an input in the process.
Pull Request: https://projects.blender.org/blender/blender/pulls/138673
This patch removes the translation Offset from the Scale node. The
reasoning is that it is easy to insert a Translate node afterwards to
perform any necessary translation. And since we are moving options to
inputs, it doesn't seem worth it to provide those offsets as inputs in
the process.
Pull Request: https://projects.blender.org/blender/blender/pulls/138668
The old versioning code was not guarded in a `MAIN_VERSION_FILE_ATLEAST`
check and the RNA hard minimum was not updated to prevent setting this
to an invalid value.
Pull Request: https://projects.blender.org/blender/blender/pulls/138572
This adds basic templating support to render output paths. By putting
"{variable_name}" in the path string, it will be replaced by the named
variable's value when generating the actual output path. This is similar
to how "//" is already substituted with the path to the blend file's
current directory.
This templating system is implemented for both the primary render output
path as well as the File Output node in the compositing nodes. Support
for using templates in other places can be implemented in future PRs.
In addition to the "{variable_name}" syntax, some additional syntax is
also supported:
- Since "{" and "}" now have special meaning, "{{" and "}}" are now
escape sequences for literal "{" and "}".
- "{variable_name:format_specifier}", where "format_specifier" is a
special syntax using "#", which allows the user to specify how numeric
variables should be formatted:
- "{variable_name:###}" will format the number as an integer with at
least 3 characters (padding with zeros as needed).
- "{variable_name:.##}" will format the number as a float with
precisely 2 fractional digits.
- "{variable_name:###.##}" will format the number as a float with at
least 3 characters for the integer part and precisely 2 for the
fractional part.
For the primary render output path: if there is a template syntax error,
a variable doesn't exist, or a format specifier isn't valid (e.g. trying
to format a string with "##"), the render that needs to write to the
output path fails with a descriptive error message.
For both the primary and File Output node paths: if there are template
syntax errors the field is highlighted in red in the UI, and a tooltip
describes the offending syntax errors. Note that these do *not* yet
reflect errors due to missing variables. That will be for a follow-up
PR.
In addition to the general system, this PR also implements a limited set
of variables for use in templates, but more can be implemented in future
PRs. The variables added in this PR are:
- `blend_name`: the name of the current blend file without the file
extension.
- `fps`: the frames per second of the current scene.
- `resolution_x` and `resolution_y`: the render output resolution.
Pull Request: https://projects.blender.org/blender/blender/pulls/134860
The title is pretty self-explanatory: this change brings support of
displaying HDR content in the sequencer preview. Before this change
it was clamped to the 0..1 range, now it is unclamped sRGB, similar
to how image editor, viewport, and nodes backdrop works.
The general idea is to draw the sequencer content on a non-overlay
frame-buffer and tag viewport as having non-standard input color
space as the sequencer operates in a different space.
The way it is done mimics what happens from the draw manager side
for the nodes backdrop, but bypassing the image engine. Partially
because the image engine expects the Image data-block to be displayed,
but also because of performance: there are a lot of things going on
like float buffer creation, clamping etc. Overall the image engine is
not fast enough for the sequencer needs.
Code-side changes that worth mentioning to highlight the overall
direction for the possible future refactors in the area:
- Decouple arguments from the scene: editing, render data, color
management etc are now passed as individual arguments.
This is an anticipation of story tools project where this data
might be coming from a different place.
- Move the entire preview region drawing to sequencer_preview_draw.cc
Previously logic was split across sequencer_preview_draw.cc and
space_sequencer.cc which was quite tricky to know what should go
where.
- Split functions which had boolean argument to define their behavior
into individual functions.
Generally if a function has boolean argument used in a way
if(foo) { do_something_(); } else { do_something_else() }
it is a good indication that the function is to be split.
Pull Request: https://projects.blender.org/blender/blender/pulls/138094
Patch #137802 made VSE zoom levels constant when resizing the area,
choosing to also align the V2D to the left when horizontally resizing.
This had the added side-effect of causing zooming to be left-aligned. The
fix was attempted in #138041 (and subsequent commit 385a8a4d6a).
However, the versioning code to add the fix (`V2D_ZOOM_IGNORE_KEEPOFS` flag)
was included in the original versioning block instead of a new one. This
meant that newly saved files during the bug did not get the fix applied.
Fix by moving that flag application to a new versioning block.
Pull Request: https://projects.blender.org/blender/blender/pulls/138424
This patch removes the Premultiplied option from the Alpha Over node.
The reasoning is as follows:
- The option mixed between alpha being straight and premultiplied, a
state which doesn't happen in practice.
- The option conflicts with the Convert Premultiplied option, if it is
not zero, then Convert Premultiplied does nothing.
- The option is implemented in a lossy way. It premultiplies the alpha
assuming it is straight, then converts the result to straight again,
then mixed between both results. This is as opposed to mixing the
original straight input with the premultiplied input. The successive
alpha conversion causes data loss in transparent regions.
Pull Request: https://projects.blender.org/blender/blender/pulls/138428
This patch removes the Convert Premultiplied option from the Brightness
and Contrast node. The reasoning is that it is the only node that has
the option to operate on straight alpha, while not being particularly
different. Adding alpha conversion nodes around it is also very easy.
Furthermore, alpha conversion is a lossy operation, so the option looses
data in emissive pixels, and since it is enabled by default, users not
familiar with the exact mechanism of the option wouldn't know how to fix
this.
Pull Request: https://projects.blender.org/blender/blender/pulls/138318
This patch removes the Use Alpha option from Composite and Viewer nodes.
The reasoning for the removal is as follows:
- It has an unintuitive complicated design at the moment.
- If the Alpha Input is unlinked, the output alpha is not adjusted
even if Use Alpha is enabled, leaving users wondering why their
adjustments have no effect.
- Disabled Use Alpha means output an opaque image, that is, it
actually means Ignore Alpha. Which is confusing because users might
think that it controls alpha adjustments based on input.
- It always does alpha replacement without premultiplication, which is
not clear to the user and is not what the user wants in most cases.
- Adding a Set Alpha node before the output is pretty easy and clear, so
the option seems redundant considering the above.
Pull Request: https://projects.blender.org/blender/blender/pulls/138309
This patch turns the options of the Bilateral Blur node into inputs.
In the process, the Sigma Space and Iterations were joined into a single
Size input, previously they were just added together then ceiled to get
the blur size. Furthermore, Sigma Color was renamed to threshold and now
represents the average color difference, not the sum, so it was
previously multiplied by 3.
Versioning and RNA compatibility is not perfect due to joining the two
size options.
Reference #137223.
Pull Request: https://projects.blender.org/blender/blender/pulls/138249
This patch turns the options of the Directional Blur node into inputs.
In the process, the node now allows scaling down, not just scaling up.
The transformation options were renamed to Translation, Rotation, and
Scale as opposed to Distance, Spin, and Zoom. Finally, scaling is now
defined as a scale instead of a delta. So 1 is identity, 2 means scale
up two times, and so on. While previously, 0 was an identity scale, 1
means scale up by two types.
Reference #137223.
Pull Request: https://projects.blender.org/blender/blender/pulls/138198
When tweaking envelope radii of (connected) envelope bones, we dont
always make sure that corresponding head and tail radii are in sync.
Using the `Bone Size` tool should take care of this (and it works to
some extend) but tweaking the radii through the sidepanel UI or the
Properties Editor (through RNA), then corresponding heads and tails
radii get out of sync.
Once we are in such unfortunate situation, then code in the transform
system's `recalcData_edit_armature` fails with wrong assumptions, it
propagates radii from children to parents which are unexpected / not in
use.
So one thing to do would be to add this syncing of radii to
`rna_Armature_editbone_transform_update`.
This alone would solve the "problem" in new files.
For existing files that are already out of sync we add versioning that
corrects this on file load
Pull Request: https://projects.blender.org/blender/blender/pulls/137599
Previously, the bundled essential brushes in Sculpt Mode were changed
from the Scrape, Fill, and Flatten types to the Plane brush type. This
commit does the same thing programmatically and removes the now old code
related to these obsolete brushes.
Resolves#134076
Pull Request: https://projects.blender.org/blender/blender/pulls/138022
This implement the design detailed in #135935.
A new per object property called `Shadow Terminator Normal Offset` is
introduced to shift the shadowed position along the shading normal.
The amount of shift is defined in object space on the object datablock.
This amount is modulated by the facing ratio to the light. Faces
already facing the light will get no offset. This avoids most light
leaking artifacts.
In case of multiple shading normal, the normal used for the shift
is arbitrary. Note that this is the same behavior for other biases.
The magnitude of the bias is controlled by `Shadow Terminator Normal Offset`.
The amount of faces affected by the bias is controlled using
`Shadow Terminator Geometry Offset` just like cycles.
Tweaking the `Shadow Terminator Geometry Offset` allows to avoid too much
shadow distortion on surfaces with bump mapping.
Cycles properties are copied from the Cycles object datablock to the
blender datablock. This break the python API for Cycles.
The defaults are set to no bias because:
- There is no good default. The best value depends on the geometry.
- The best value might depend on real-time displacement.
- Any bias will introduce light leaking on surfaces that do not need it.
- There is an additional cost of enabling it, which is proportional
to the amount of pixels on screen using it.
Pull Request: https://projects.blender.org/blender/blender/pulls/136935