Fix: crash when selecting a brush asset from the wrong mode #117233

Merged
Brecht Van Lommel merged 5 commits from brecht/blender:brush-asset-fix-mode-crash into brush-assets-project 2024-01-17 17:31:01 +01:00

Ideally these should not appear at all in the asset shelf, but it's not
obvious that will 100% ensure the right mode.

Also fix a missing redraw of the properties editor when switching
brushes.

Ideally these should not appear at all in the asset shelf, but it's not obvious that will 100% ensure the right mode. Also fix a missing redraw of the properties editor when switching brushes.
Brecht Van Lommel added 1 commit 2024-01-17 15:43:11 +01:00
da1059d3ff Fix: crash when selecting a brush from the wrong mode
Ideally these should not appear at all in the asset shelf, but it's not
obvious that will 100% ensure the right mode.

Also fix a missing redraw of the properties editor when switching
brushes.
Brecht Van Lommel requested review from Bastien Montagne 2024-01-17 15:43:29 +01:00
Brecht Van Lommel requested review from Julian Eisel 2024-01-17 15:43:30 +01:00
Brecht Van Lommel requested review from Hans Goudey 2024-01-17 15:43:30 +01:00
Author
Owner

I don't know if we are going to want to do PRs for every simple thing like this, but just to get something started.

I don't know if we are going to want to do PRs for every simple thing like this, but just to get something started.
Brecht Van Lommel added 1 commit 2024-01-17 15:59:19 +01:00
Hans Goudey approved these changes 2024-01-17 16:12:38 +01:00
Hans Goudey left a comment
Member

Even if we do the filtering everywhere, it doesn't stop someone from calling the operator with an invalid asset. So it seems reasonable to protect from that here.

Even if we do the filtering everywhere, it doesn't stop someone from calling the operator with an invalid asset. So it seems reasonable to protect from that here.
@ -694,2 +694,3 @@
void BKE_paint_brush_asset_set(Paint *p, Brush *br, AssetWeakReference *weak_asset_reference)
bool BKE_paint_brush_asset_set(Paint *p, Brush *br, AssetWeakReference *weak_asset_reference)
{
/* TODO: does this need to be ensure at some higher level? Assets should be tagged
Member

ensure -> ensured

`ensure` -> `ensured`
brecht marked this conversation as resolved
@ -1179,6 +1179,8 @@ static int brush_asset_select_exec(bContext *C, wmOperator * /*op*/)
/* Either takes ownership of the brush_asset_reference, or frees it. */
BKE_paint_brush_asset_set(&tool_settings->curves_sculpt->paint, brush, brush_asset_reference);
Member

I guess this should check the return argument and return OPERATOR_CANCELLED and give an error

I guess this should check the return argument and return `OPERATOR_CANCELLED` and give an error
Author
Owner

It's not a no-op right now, because the brush did get added to the main database. Just not actually selected for painting.

I can try to do the mode check somewhere inside BKE_brush_asset_runtime_ensure to really make it a no-op. It doesn't make a lot of difference in practice since this operator doesn't have OPTYPE_UNDO or OPTYPE_REGISTER, but still more elegant.

It's not a no-op right now, because the brush did get added to the main database. Just not actually selected for painting. I can try to do the mode check somewhere inside `BKE_brush_asset_runtime_ensure` to really make it a no-op. It doesn't make a lot of difference in practice since this operator doesn't have `OPTYPE_UNDO` or `OPTYPE_REGISTER`, but still more elegant.
Member

Ah, good point. Maybe just a RPT_WARNING then

Ah, good point. Maybe just a `RPT_WARNING` then
brecht marked this conversation as resolved
Brecht Van Lommel added 1 commit 2024-01-17 17:01:55 +01:00
Brecht Van Lommel added 56 commits 2024-01-17 17:03:15 +01:00
8954099042 EEVEE: Fix Lights On High-res Monitors
When using EEVEE on high resolution monitors the light buffers might not
get initialized as there are range checks that pass in the first try.

- number of tiles needed is larger than the max_tile_count_threshold
- total_word_count is smaller than max_word_count_threshold as it is
  never set (still initialized to zero.

Solution is to not exit on the first try. In a later stage we might want
to use something that doesn't require any looping.

Fixes: #117128
Pull Request: #117164
f16dbd0360 ImBuf: no need to use double precision inside IMB_transform
Double precision pixel coordinate interpolation was added in 3a65d2f591 to
fix an issue of "wobbly" resulting image at very high scale factors. But
the root cause of that was the fact that the scanline loop was repeatedly
adding the floating point step for each pixel, instead of doing multiplication
by pixel index (repeated floating point additions can "drift" due to
imprecision, whereas multiplications are much more accurate).

Change all that math back to use single precision floats. I checked the
original issue the commit was fixing, it is still fine. Also added a gtest
to cover this situation: `imbuf_transform, nearest_very_large_scale`

This makes `IMB_transform` a tiny bit faster, on Windows/VS2022/Ryzen5950X
scaling an image at 4K resolution:
- Bilinear: 5.92 -> 5.83 ms
- Subsampled3x3: 53.6 -> 52.7 ms

Pull Request: #117160
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
53e34dba80
Fix #115727: Draw panel buttons in the node editor side bar
In 13fac109 the node panels got support for individual option button
callbacks, but these were not included in the node editor side bar.
Only the older top-level buttons are drawn there.

The panel structure is currently not accessible in python since it is
part of the `NodeDeclaration` system. To draw node input sockets and
buttons in the correct panel order as they appear on the node, a new
template function `uiTemplateNodeInputs` has been added. This iterates
over declared panels and their contents in the appropriate order and
draws the buttons before sockets in the same panel.

Pull Request: #116936
aefa1cd723 Build: bump sse2neon version to latest hash
This includes an additional fix for precision of some operations that affect
Blender tests.
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
0e68898a37
Fix: broken make update on new macOS build
Properly check for the existence of the Python binary in precompiled libs.
c5e2ec8a1a Report when `register_class` overrides classes with the same bl_idname
The unregistering of already registered classes is expected behavior,
however this was done silently and can be unsafe as two Addons may have
the same names for operators and in case of name collision the addon
registered first will break silently / start behave unexpectedly.
So reporting the unregister step seems reasonable.

During Addon development, this might seem noisy when classes are
frequently updated, however catching the problematic cases instead of
being silent might be beneficial.

Part of #116370

Pull Request: #116374
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
ccd85adabb
Fix #117158: Multires sculpting crash
The change to use `float3` in `frontface` didn't account for the
fact that the values we sometimes null.
83d3ba8a58 Fix #116477: Node group sockets with subtypes have broken idnames
Loading pre-4.0.20 node groups with sockets using subtypes causes
broken socket identifiers. This is because the node tree interface now
expects sockets to use the base identifiers ("NodeSocketFloat" instead
of "NodeSocketFloatFactor" etc.).

To correct this the conversion code now replaces socket idnames that
include a subtype suffix with their base names. This fix is also applied
to files between versions 4.0.20 and 4.1.10, where the socket types
may have been converted incorrectly.

Pull Request: #117133
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
6d63da40ee
Fix: error when custom socket has no 'draw' function
This `draw` method is optional. The same check is also done elsewhere.

Pull Request: #117061
6a35c8c99e Fix: incorrect Exists output in Named Attribute node for grease pencil
Grease pencil needs some special handling because it stores layer attributes
independently of point/curve attributes.
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
766c1e2f8d
Fix: crash trying to store an attribute on unsupported grease pencil domain
This crash happened when trying to store an attribute on the edge domain
on a grease pencil geometry.
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
10dfa07e36
Linux: Use huge pages in jemalloc to speed up allocations
Enable huge pages for jemalloc. This requests the Linux kernel to use
huge (2 MB) pages for large allocations. This has the effect of speeding
up first accesses to those allocations, and possibly also speeds up future
accesses by reducing TLB faults.

By default, 4 KB pages are used unless the user enables huge pages through
a kernel parameter or an obscure sysfs setting.

For Cycles benchmarks, this gives about a 5% CPU rendering performance
improvement. It likely also improves performance in other areas of Blender.

Pull Request: #116663
c02f3c94d9 GPv3: Opacity modifier
Opacity modifier implementation based on GP2.
Functionality is largely unchanged.

_Color Mode_ is either `Stroke` or `Fill` for modifying color opacity or
`Hardness`.
_Uniform Opacity_ does two things at once (!):
- Sets the same opacity value for every point in a stroke.
- Sets opacity as an absolute value rather than a factor.

_Weight as Factor_ (button to the right of Opacity Factor): Use the
vertex group as opacity __factor__ rather than an overall __influence__.
This is confusing and hard to convey, but copies behavior from GP2.

The _Influence_ panel contains the same filter settings as the GP2
modifier, with some small changes:
- _Layer_ selects only strokes in the respective layer (with an _Invert_
  option)
- _Material_ selects only points with the respective material (with an
  _Invert_ option)
- _Layer Pass_ and _Material Pass_ select only strokes/points which are
  rendered in the respective pass.
  _Note 1: Layers don't have UI for setting a pass yet, this will be a
  generic layer attribute. This can be set through the API for testing._
  _Note 2: In GP2 a pass value of zero was used to disable pass filters.
  Since zero is a valid pass ID an explicit flag has been added for the
  purpose of turning pass filters on and off._
- _Vertex Group_: This can be used as an additional influence filter on
  points. If _Weight as Factor_ is enable the vertex group instead
  replaces the opacity factor. In _Fill_ mode the vertex group weight of
  the stroke's first point is used as influence for the entire stroke.
- _Custom Curve_ is another possible influence factor per point. The
  curve input value is the relative position of a point along its
  stroke.

The Influence settings have been moved into a separate DNA struct, which
should help with reusability in various modifiers. Various utility
functions can be found int `MOD_grease_pencil_util.hh` for handling
influence settings and generating `IndexMasks` for modernized C++ code.

Pull Request: #116946
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
da6b45f9b8
Cleanup: Make format
991b588cc0 Fix: GPv3: Opacity modifier compilation error
The parameters for `threading::parallel_for_each` were not correct.
776604be66 Fix #117168: crash when using layout panel in popover
Using layout panels in this context is not yet supported. Therefor, the fix
is to raise an exception instead of crashing.

The problem here is that layout panels need an a parent panel which
has a persistent state. The popover currently does not only has a very
short-lived panel currently that is freed directly after drawing.
Also see `ui_paneltype_draw_impl`.

It's likely that support for this can be added in the future but it's currently
unclear how many changes this would require.
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
595c70c90c
Cleanup: GPv3: Modifier filter UI
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
67ec39defa
Cleanup: Use Map instead of GHash for memfile writing
The goal is to simplify future work on #106903.

Pull Request: #117141
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
2391338ba0
Cleanup: simplify code in IMB_transform
There were some abstractions inside `IMB_transform` implementation
that were kinda getting in the way. I want to speed up Subsampled3x3
filtering by reformulating the math being done, but that needs to
sample byte images while storing intermediate result as a float -- but
the whole `Pixel`, `PixelPointer` et al. machinery was not quite prepared
to deal with that. Feels like those helper classes do not achieve much,
just make the code longer.

So remove them (`Pixel`, `PixelPointer`, `ChannelConverter` etc.) and
use simple functions. Now the code is more straightforward (IMHO) and
270 lines shorter (40% of the whole file!), and allows me to do the
follow-up optimization easier.

No functional changes.

Pull Request: #117182
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
bff51ae66c
Cleanup: Use std::string to store UI button string
This simplifies memory management and button string manipulation in
general. Just change one of the few strings stored in `uiBut` for now.

Pull Request: #117183
a6fd1f5034 Fix: Curves extrude with all points selected
CurvesGeometry has no ".selection" attribute when all control points
are selected. The earlier code assumed that the attribute always exists.
Also Python tests are added for the "extrude" operator.

Pull Request: #117095
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
55131f6f90
Tests: Enable new triangulate geometry node test files
0d7225bf0c Cleanup: remove outdated comment
String suggestion now allow the operator list to be searched.
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
796577d76e
Outliner: Double-click on item icon to select contents/hierarchy
Allow double-clicking on Outliner items to select all child items.

Pull Request: #110151
58e1e88dc3 UI: Cleanup Dialog to Manage Orphaned Data
Creates a new "Cleanup" dialog that allows purging unused data blocks,
as well as a window used for managing unused data blocks.

Pull Request: #106653
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
35028d9480
Fix: Memory leaks after recent button string cleanup
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
a2032a9aa5
Fix: Tooltip contains bogus text after recent button string cleanup
The code still needs to differentiate a null string from an empty
string in one cast I missed earlier.
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
7dd81cad94
Fix #117188: Context.temp_override() failed with full-screen areas
Using screen changing functions with screens used for full screen areas
isn't supported & caused corrupt screen data.

Add checks that the current and overriding screen support switching,
raising an error when they don't. Also add a check when restoring the
context not to change any full screen areas.
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
ae29c8d950
Fix font sub-pixel AA impacting character spacing when AA is disabled
40035046ca Fix incorrect number of planes for ImBuf used for render passes
Set the number of planes based on the number of pass channels.

If the pass contains 2 passes or more than 4 passes set the number
of planes to the previously used value of 32.

This is needed because quite some areas check for the number of
planes for various optimizations. For example, this is one of the
factors which make IMB_create_gpu_texture() to choose the texture
format. If the number of planes for the depth pass is set to the
previously used this function will never consider using single
channel GPU texture.

Unfortunately, this change is not enough to make the GPU texture
to use single channel format as the color space of the image
buffer is also checked, and that is nullptr which means scene linear.
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
11c2028795
Render: Set non-color colorspace for ImBuf of data passes
This allows code outside of the render pipeline to make proper
decisions about how the imbuf of render passes are to be handled.

For example, IMB_create_gpu_texture() will now properly select
single channel grayscale texture format for depth pass coming from
multilayer EXR, additionally solving assert in the GPU compositor
code which verifies expected and actual imbuf texture format.

Pull Request: #117184
b85fecee67 VSE: Speedup Subsampled 3x3 image filter
Make Subsampling 3x3 filter twice faster (on 4K UHD resolution,
Windows/VS2022/Ryzen5950X: 52.7ms -> 28.3ms), by reformulating how it works:

Conceptually Subsampling filter is a box filter: it sums up N source image
pixels, computes their average and outputs the result. Critical thing is,
that should be done in premultiplied space so that colors from fully or
mostly transparent regions do not "override" opaque  colors.

Previously, when operating on byte images, the code achieved this by always
working on byte values, doing "progressively smaller" lerp into byte color
result, taking care of premultiplication and again storing the "straight"
alpha for each sample being processed. This meant that for each sample, there
are 3 divisions involved! This also led to some precision loss, since for all
9 samples all the intermediate results would only be stored at byte precision.

Reformulate that by simply accumulating the premultiplied color as a float.
This gets rid of all divisions, except the last step when said float needs to
be written back into a byte color.

The unit test results have a tiny difference, since now it is arguably better
(as per above, previously it was having some precision loss).

Pull Request: #117125
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
7149424087
Geometry Nodes: expose bake id in Python API
This is necessary to be able to invoke baking of individual bake nodes
or simulation zones with Python.
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
65b722bc30
Geometry Nodes: expose NodesModifierBake.node property in Python API
This allows scripts to filter the set of bakes by e.g. the node name.
More filtering options will be necessary, but this is a good start.
8b454fe5d4 Curves: Debug crash after switching to sculpt mode
`bounds_min_max` returns an optional and it can be `nullopt` when
curve points are 0.

Pull Request: #117163
b10953d957 Fix #117191: Crash using the Extrude tool and Snap Base
`GIZMO_GT_button_2d` has no modal/custom_modal callback function
defined hence the crash due to calling `modal_fn()`

Pull Request: #117194
e39bd974a0 Cleanup: Curves: Remove redundant resizing in extrude operator
Curve resizing is already handled in `copy_only_curve_domain` (i.e.
copy curve nums/attributes, point_num = 0, fresh offset array)

Pull Request: #117166
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
f811e9c6d6
Fix: crash when adding repeat zone from search
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.
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
65e1a3a5c3
Compositor: Port redesigned Defocus node to CPU
This patch ports the redesigned GPU Defocus node to the CPU.

Pull Request: #117174
8feba61c41 Geometry Nodes: support synchronous baking
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.
9df4ffc0c2 Geometry Nodes: reorganize panels in modifier
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: #117170
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
f020e436d5
Fix #117171: Assert in GPU compositor Denoise node
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.
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
049e48b431
GPv3: Add curve plane normal cache
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.
c954940e76 Fix: remove assert when creating interface socket
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.
1e85feb542 Fix #117161: Detectable geometry for the brush doesn't update after Undo
Caused by aaa25bc882
This seems to be due to missing flag for updating bounds

Pull Request: #117192
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
e4a93d7b8c
Compositor: Add High Precision option to Kuwahara
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: #115763
f566f51f29 Cleanup: GPv3: Move curve smoothing to geometry namespace
Moves the `gaussian_blur_1D` and `smooth_curve_attribute` functions to the `geometry` namespace.

Pull Request: #117238

Something must have gone wrong with a merge or rebase? There are many unrelated changes in the diff currently...

Something must have gone wrong with a merge or rebase? There are many unrelated changes in the diff currently...
Author
Owner

Force of habit, should have merged brush-assets-project instead of main.

Force of habit, should have merged brush-assets-project instead of main.
Brecht Van Lommel added 1 commit 2024-01-17 17:19:45 +01:00
Bastien Montagne approved these changes 2024-01-17 17:21:49 +01:00
Bastien Montagne left a comment
Owner

Makes sense to me too.

Makes sense to me too.
Brecht Van Lommel merged commit 9a553f3b71 into brush-assets-project 2024-01-17 17:31:01 +01:00
Brecht Van Lommel deleted branch brush-asset-fix-mode-crash 2024-01-17 17:31:03 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#117233
No description provided.