As discussed in the UI Module Meeting we don't have an acceptable use
case for dialogs that use the Blender logo. Removing this image from
the project since this is now exposed through dialog customization.
Pull Request: https://projects.blender.org/blender/blender/pulls/117676
This patch rewrites and optimizes the Double Edge Mask node to be orders
of magnitude faster. For a 1k complex mask, it is 650x faster, while for
a 1k simple mask, it is only 50x faster.
This improvement is attributed to the use of a new Jump Flooding
algorithm as well as multi-threading, matching the GPU implementation.
The result of the new implementation differs in that the boundaries of
the masks are now identified as the last pixels inside the mask.
Pull Request: https://projects.blender.org/blender/blender/pulls/117545
The GPU implementation of the Use Alpha option of the Z Combine node
only worked if the first image is closer, since it sampled the alpha
channel from it and used it for mixing. Instead, the mix factor should
depend on the closer pixel, like the CPU implementation.
The Z Combine node switches its inputs when changing the Use Alpha
option if both Z values are equal. That's because the operations used by
the node internally use two different conditions, less than and less
than or equal. This patch fixes that by unifying it to the less than
case.
This simplifies the C++ API for making layout panels. Now it is also more similar to the Python API.
`uiLayoutPanel` is like `layout.panel` and `uiLayoutPanelProp` is like `layout.panel_prop`.
Both, `uiLayoutPanel` and `uiLayoutPanelProp`, now exist in two variants. One that takes a label
parameter and one that does not. If the label is passed in, only the panel body layout is returned.
Otherwise, the header and body are returned for more customization.
Pull Request: https://projects.blender.org/blender/blender/pulls/117670
Grease pencil modifiers were using a default weight of 1.0 if the
influence vertex group is not found. Whether or not that is correct
depends on whether a vertex group is set (name not empty). In case the
name is set but the group is not found a weight of zero should be used.
This can happen in GP3 when no vertex is assigned to a vertex group,
since each drawing only has a subset of all the vertex groups.
A utility function was added to make this consistent and less error
prone.
Pull Request: https://projects.blender.org/blender/blender/pulls/117671
Move WM notifiers from property setter functions to
`RNA_def_property_update` call.
This actually makes them work properly, for example setting
`bone_collection.is_solo` from Python now actually updates the armature
in the 3D Viewport. Toggling the property from the UI already worked
(for other reasons, apparently), masking this issue.
When clicking on an expandable item in the tree view, it used to
automatically expand that item. This has now been removed; clicking just
makes that item the active one.
This impacts all tree views. The authors of the following ones have been
consulted on this, and all agreed it was a good idea:
- Asset Catalogs
- Bone Collections
- Grease Pencil Layers
- Node Panels
- Light Linking (uses tree view, but just to present a flat list)
Thickness modifier ported to Grease Pencil v3.
Note: Uniform thickness range and UI step changed to better
match new thickness of blender unit.
![image](/attachments/2e9c9bfa-d869-4bec-a529-c3833390a201)
Pull Request: https://projects.blender.org/blender/blender/pulls/117631
Current method only considers first selected collection in the outliner
tree. This restricts user from selecting objects of multiple selected
collections. To fix this, first gather all the selected collections in
list with the help of `outliner_collect_selected_collections` traverse
function. Then iterate through layer collections to select base/objects
Pull Request: https://projects.blender.org/blender/blender/pulls/113831
Simplify `animviz_verify_motionpaths()` as the current code structure
got in the way of me reviewing an addition to it.
Some conditions and calculations are reordered so that they don't have
to be repeated. This allowed me to reduce nesting of the code, and make
it easier to understand when exactly a motion path is reused
cache-and-all, when it's reused but gets a new cache, and when it's
freshly allocated.
I also think this removes a theoretical memory leak, as there was a code
path that would allocate a new cache without freeing the old one. This
would require a somewhat invalid data structure to begin with, but the
code path now simply doesn't exist any more. I don't think this
problematic code path was ever hit in normal use, though.
No actual functional changes.
This allows users to turn off reflective and refractive caustics
separately from each other when using the Generalized Schlick material.
This will impact the Principled BSDF and Glass BSDF, along with some
custom OSL scripts.
Pull Request: https://projects.blender.org/blender/blender/pulls/117617
When a string shouldn't be used or is invalid, use std::nullopt to
make it clear it's value shouldn't be used.
Without this it's possible to accidentally use an empty string
which will silently fail.
This pull request adds the ability for users to specify input samples
on a per brush basis. The existing field in the main `Paint` struct
forces all brushes of a particular tool type to use the same value.
A new field was added to the `Brush` struct to allow for this value
to be specified there instead, and a corresponding unified value in
`UnifiedPaintSettings` has been created to allow users to use the
same value across all brushes.
Addresses #108109
Pull Request: https://projects.blender.org/blender/blender/pulls/117080
Add separate functions that deal with the vertex domain and copy vertex
groups without using the attribute API which has a large overhead when
abstracting the access of many vertex groups.
In a 1m vertex mesh with 20 vertex groups, I observed an improvement
in the node's runtime from 399 ms to 64 ms.
Also resolves#117553. That was an error when adding weight data to a
mesh without any weight data would invalidate custom data layers. That
is solved more simply now by just doing nothing in that case.
Part of changes proposed in #117285.
Unfortunately layout panels aren't supported in popovers, so this has
been worked around using a kludge that stores the expanded state as a
class member, toggled via "wm.context_toggle".
For some reason the "get" function actually allocates the button's
operator properties container. This may or may not make sense to
do, but while it happens, the function name might as well make
that clear.
There is extra one user of shared enum definition in case this is new one
so already exist user is enough. Also using of `new` operator to construct
enum definition make this impossible to catch such leask for trivial type.
`Vector` have 4-element inline buffer so this was trivial case for <=4 items.
Pull Request: https://projects.blender.org/blender/blender/pulls/117599
Removal of "confirm" operator callback for confirmation customization,
in favor of new method that shares existing operator dialog code and
allows python configuration.
Pull Request: https://projects.blender.org/blender/blender/pulls/117564
Part of overall "improve filtering situation" (#116980): replace Subsampled3x3
(added for blender 3.5 in f210842a72 et al.) strip scaling filter with a
general Box filter.
Subsampled3x3 is really a Box filter ("average pixel values over NxM region"),
hardcoded to 3x3 size. As such, it works pretty well when downscaling images by
3x on each axis. But starts to break down and introduce aliasing at other
scaling factors. Also when scaling up or scaling down by less than 3x, using
total of 9 samples is a bit of overkill and hurts performance.
So instead, calculate the amount of NxM samples needed by looking at scaling
factors on X/Y axes. Note: use at least 2 samples on each axis, so that when
rotation is present, the result edges will get some anti-aliasing, just like it
was happening in previous filter implementation.
Images in PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/117584
This patch changes all anti-aliasing operations to use SMAA instead of
the Scale3x-based operation. That's because SMAA is more accurate while
the Scale3x one is more a hack.