No functional changes.
In #116823 the function `remap_driver_frame` was moved,
but the name doesn't exactly correspond to what the function is doing.
Since it evaluates the driver, with different parameters, it is now called
`evaluate_driver_from_rna_pointer`.
We could maybe remove the function because it is only called once.
Pull Request: https://projects.blender.org/blender/blender/pulls/117294
Exceptions:
* Links to personal wiki pages
* Pages that are not in the new developer docs yet (like Human Interface Guidelines)
* tools\check_wiki\check_wiki_file_structure.py needs a refactor
No functional changes expected.
Before this PR the keyframing code was aware of driver specifics
and changed the frame where a key is inserted to the current driver value.
This is now changed so that the calling code needs to know where on the
FCurve the key should be inserted. This removes the need for the
`INSERTKEY_DRIVER` flag.
Pull Request: https://projects.blender.org/blender/blender/pulls/116823
The GPU Directional Blur node distorts the inputs if the resolution is
not square. This is because rotation is performed on normalized
coordinates. This patch performs the normalization at the texture
evaluation.
When there is no default color attribute yet, when creating a new color
attribute with the store named attribute node, set the default. Though
we generally try to avoid this more magical behavior, there's little
downside in this case, and it's probably what users expect.
Don't set the active attribute though, since that's UI data that generally
shouldn't be changed procedurally. It's okay if there's no active color
attribute.
Pull Request: https://projects.blender.org/blender/blender/pulls/117249
It is very common for graphical editors with layers to support
locking individual layers to protect them from accidental edits due
to misclicks. Blender itself already supports locking vertex groups.
This adds lock toggles for shape keys, with lock/unlock all operators.
The flags are checked by sculpt brushes, edit mode transform tools,
and Smooth, Propagate and Blend From Shape operators. This selection
aims to cover operations that only deform the mesh, where the shape
key selection matters.
Topology changing operations always apply to all keys, and thus
incorrect shape key selection is less impactful. Excluding them
from the new feature greatly reduces the patch size.
Pull Request: https://projects.blender.org/blender/blender/pulls/104463
The function for retrieving a shape key by its index is named
somewhat confusingly, and effectively reimplements BLI_findlink.
However, more importantly, for some reason it is coded to return
null for the index 0 instead of the basis shape key. This severely
limits its usability in some cases.
This refactor replaces the function with a simple strongly typed
wrapper around BLI_findlink, using a different name, and updating
the call sites to check that the index is not 0 where necessary.
The old implementation was a simple rounding operation and was not
implemented for full-frame compositor.
The issue with the old implementation is that it will not give
satisfactory results for images with high frequency details,
including cases when is used for a preview on Cycles render with
low number of samples. Additionally, when applied on animated
footage it produces very noisy result.
The new algorithm uses an explicit pixel size setting, which allows
the node to be used on its own, without need to have scale-down and
scale-up nodes. It also uses neighbour averaging, which produces
better looking result during animation and noisy input images.
The old tiled compositor setup will render without changes with
this change. This commit does not include modifications in the GPU
compositor implementation.
Ref #88150
Pull Request: https://projects.blender.org/blender/blender/pulls/117223
Increase performance when drawing scenes that don't have blended materials. This should
save some CPU and GPU cycles as parts (or the whole pipeline) can be skipped.
Mostly it ensures that the hiz isn't tagged dirty and has a chance that it is being reused
by other areas. Shadows and irradiance caches aren't forced to be updated.
Mac Studio M1 Ultra
- space_raceship.blend went from 27 fps to 33 fps (10%-20% improvement).
This is a common scenario to optimize as by default materials are not blended and require
user action to set them up. When using compositing/renderpasses, blended materials aren't
supported and most likely not being used.
Pull Request: https://projects.blender.org/blender/blender/pulls/117269
An assert that ensures the GPU compositor executes in a non main thread
wrongly fires in background mode, that's because in background mode,
rendering happens in the main thread. So add a condition for background
mode.
When enabling the "Only Show Errors" option in the Dope Sheet/Graph Editor,
it might not show anything even though there are FCurves with errors.
The issue is that the flag `FCURVE_DISABLED` is set by the drawing code,
which means the channels have to be visible first.
This creates a workflow issue where you want to filter down to only the
curves with problems, but you need to find them first...
This PR fixes the issue by validating all FCurves whenever the option
is enabled.
Pull Request: https://projects.blender.org/blender/blender/pulls/116815
The FPS menu was using a cached value which wasn't being refreshed
when translation changed.
Add `bpy.app.handlers.translation_update_post` handler which runs
when translation changes, this can be used to clear any cached UI
values.
Ref !117049
Change the behavior of UI_but_string_info_get to fill in shortcuts
when requested.
Previously shortcuts were ignored for menus, because showing shortcuts
in tool-tips which are already displayed in the menu isn't needed.
Move this logic to tool-tip creation so other the shortcuts may be
accessed in other contexts.
This information can be retrieved from `AssetRepresentation` now.
Also remove unnecessarily specific lambda capture. That usually suggests
usage in `std::function` with a more complex lifetime.
For high radii Kuwahara, we use a Summed Area Table (SAT) implementation
to accelerate the classic variant of the algorithm. The problem is that
due to limited floating point precision, the SAT can produce artifacts
in its output.
An attempt to fix this was implemented in #114191, and while that patch
improved precision by 10x, the artifacts still existed, albeit less
noticeable. But since the improved precision also meant a performance
penalty, it was decided that the improvement is not worth it.
Since the artifacts are only noticeable for scenes with very high
values, this patch adds a High Precision option that defaults to false
and can be enabled by the user upon noticing any artifacts. The option
simply uses direction convolution instead of SAT in this case. The
downside, of course, is that it can be orders of magnitude slower.
An alternative to using this option is for the user to clamp the input
or downsample the image. Both methods should be documented in the
documentation.
Fixes: #113578.
Pull Request: https://projects.blender.org/blender/blender/pulls/115763
We don't actually protect against interface sockets with empty
names elsewhere. This assert was triggered when trying to group
a `Bake` node, because it tried to create an interface socket of
the extend socket. This case is handled by the check below.
This adds a cache to read a normal vector for a plane that (roughly) fits a curve.
If the curve lies on a plane, the vector always point along this plane normal, otherwise it's an approximation.
The cache is lazily calculated and invalidated when the positions are tagged for a change.
Blender asserts when an Image node is directly connected to a Denoise
node in the GPU compositor. This is because the node reads the image to
host memory, but the cached image didn't specifiy host read usage. This
patch adds the host read usage flag to the IMB module GPU image creation
functions.
The goal is to simplify the interface of the geometry nodes modifier while also
making it more scalable. This allows creating better looking modifiers which
feel more built-in. No functionality is removed by this patch.
The following changes are done:
* The `Output Attributes` panel is hidden when there are no output attributes.
* The `Internal Dependencies` panel is replaced by a new `Manage` panel that
contains all the stuff that is common to all geometry nodes modifiers. It
contains new `Bake` and `Named Attributes` panels for now.
Potential next steps:
* Merge `Output Attributes` panel with the rest of the input list.
* Support hiding the `Manage` panel under some circumstances.
Pull Request: https://projects.blender.org/blender/blender/pulls/117170
Previously, calling the bake operator was always creating a job that will
be run in parallel to Blender. This is good when baking from the UI, but may
be undesired when baking with a script.
Now, when the `exec` method of the bake operator is called, the baking
happens synchronously. That means that the operator call will return only
after the baking is done. The `invoke` method has the same behavior as
before. This approach is similar to e.g. `FLUID_OT_bake_all`.
I did notice that calling the invoke method from a script can still result
in a crash sometimes, probably due to conflicting depsgraph evaluations.
That has to be investigated more.
The issue was that some code expected the "extend" sockets
to always exist. This was already always true from the user
point of view, but not internally.
There are different possible fixes, but this patch makes sure
that the extend socket will be available as expected. This is
achieved by making them part of the static node declaration.
We want to extend the static declaration of such dynamic
nodes anyway, to improve reflection capabilities without
having to instantiate nodes.