Commit Graph

150077 Commits

Author SHA1 Message Date
Hans Goudey
bffc3f824e Fix #137163: Curve to points can ignore instances in input
Mistake in 1f680c3859

Fix that by moving the grease pencil processing into the existing
`modify_geometry_sets` loops instead. And then make a few small
changes to reduce the amount of boilerplate lines that introduces.

Pull Request: https://projects.blender.org/blender/blender/pulls/137732
2025-04-18 19:27:36 +02:00
Falk David
ee6d683809 Grease Pencil: Python API: Expose bézier handle selection
This adds two new python properties to  `GreasePencilStrokePoint`
* `select_handle_left`: The selection of the left handle of this point
* `select_handle_right`: The selection of the right handle of this point

These could already be written to using `drawing.attributes[".selection_handle_left"]`
and `drawing.attributes[".selection_handle_right"]`, but this makes it
easier to work on individual points from the higher-level
python API.

Resolves #137639.

Pull Request: https://projects.blender.org/blender/blender/pulls/137730
2025-04-18 18:20:33 +02:00
Hans Goudey
e64679bd63 Cleanup: Use snake case for Depsgraph BuilderMap function names 2025-04-18 11:33:54 -04:00
Hans Goudey
940f4102fd Cleanup: Grammar fix in Depsgraph BuilderMap function name 2025-04-18 11:25:20 -04:00
Sergey Sharybin
e599a7525b Depsgraph: Add utility to stringify recalc flags
Allows to log human-readable list of recalc bits that are set.

The usage is pretty simple:

```
printf("%s: %s %s\n", __func__, id->name, DEG_stringify_recalc_flags(id->recalc).c_str());
```

Pull Request: https://projects.blender.org/blender/blender/pulls/137715
2025-04-18 16:31:30 +02:00
Falk David
8b3f49381a Fix #135773: Grease Pencil: Applying modifier changes layer order
Rather than trying to change the order of layers to match the evaluated
Grease Pencil geometry, keep the original layer order for now.

Generally, it's less common to change the layer order of original
layers inside a modifier. It's much more common to have the
evaluated layers and original layers in the same order, so for now,
keep the original order instead.

To correctly support this, we probably need to propagate layer groups
inside of geometry nodes. Currently, layer groups are mostly
ignored inside of evaluated data.

Part of #136300.

Pull Request: https://projects.blender.org/blender/blender/pulls/137727
2025-04-18 16:08:59 +02:00
Lukas Tönne
c220e45282 Fix: Geometry Nodes: Grid converter for float3 returns uniform vector
The constructor used here was the `openvdb::Vec3f(float)` variant which
produces an incorrect uniform `(x,x,x)` vector instead of `(x,y,z)`.

Pull Request: https://projects.blender.org/blender/blender/pulls/137714
2025-04-18 15:38:01 +02:00
Sergey Sharybin
730d9e4d2e Fix strict warnings in extern/ after Audaspace update
Done for Clang compiler. GCC might need the same fix, but would
need to be tested separately.
2025-04-18 15:14:50 +02:00
Omar Emara
e115467f8a Compositor: Turn Vector Blur node options to inputs
This patch turns the options of the Vector Blur node into inputs.

In the process, the factor input was renamed to Shutter and was remapped
to match the shutter in Cycles/EEVEE.

Reference #137223.

Pull Request: https://projects.blender.org/blender/blender/pulls/137725
2025-04-18 15:09:27 +02:00
Campbell Barton
3933f45f52 Cleanup: move doc-strings to declarations
Move into headers or to the top of the function body for internal
implementation details, in some cases remove duplicate doc-strings.
2025-04-18 22:58:36 +10:00
Omar Emara
54a8ab9a97 Compositor: Turn Anti-Alias node options into inputs
This patch turns the options of the Anti-Alias node into inputs.

In the process, the [0, 1] limit of the Contrast Limit input was lifted
to allow normalized arbitrary positive limits.

Reference #137223.

Pull Request: https://projects.blender.org/blender/blender/pulls/137717
2025-04-18 12:48:08 +02:00
Falk David
69a722cee5 Geometry Nodes: Add Grease Pencil layer name search
This makes it possible to search layer names in the
`Named Layer Selection` node as well as boolean
modifier inputs that are marked as a `Layer Selection`.

The layer selection UI is slightly updated:
* Use a slightly larger default width for the
   `Named Layer Selection` node.
* Use the layer icon in the field that search for layer names.
* Use `Layer` placeholder string

Pull Request: https://projects.blender.org/blender/blender/pulls/137273
2025-04-18 12:35:49 +02:00
Pratik Borhade
e502593396 Fix #137459: Curves: removing all points deletes geometry attibutes
Deleting all points creates an empty CurvesGeometry object, all previous
attributes are lost that way. Use resize(0, 0) instead, this preserves the attributes list.

Pull Request: https://projects.blender.org/blender/blender/pulls/137511
2025-04-18 11:48:52 +02:00
Julian Eisel
529ab6555c UI: File/Asset Browser: Improve positioning of labels and icons
While working on #136907, I noticed issues with how we position and size
elements in the File/Asset Browser:
- A padding meant for outside the list "tiles" was applied inside, resulting
  in unnecessary/unintended extra space between previews and their label, and
  too small vertical paddings between tiles (see screenshots in PR).
- The height of text was measured based on the font size (not the actual line
  height) and scaled up by some arbitrary amount. Made it hard to draw
  multi-line text well, as done in #136907.
- Icons in list views were not centered vertically.
- The vertical list offset the entire list by the padding meant for tiles. Not
  quite sure if intentional, I think it looks better with it. But code was
  confusing since suddenly this extra tile padding was thrown in. Should be a
  separate padding.

All these changes are a bit intertwined, so submitting them together.

Basically this makes paddings be applied more consistently and fixes related
issues, so the code makes much more sense.

Pull Request: https://projects.blender.org/blender/blender/pulls/137675
2025-04-18 11:34:01 +02:00
Jacques Lucke
826abf2ddc Geometry Nodes: support creating closure with correct interface using link-drag-search
This significantly simplifies creating closures a specific Evaluate Closure node,
because one does not have to create all the inputs and outputs manually.

Pull Request: https://projects.blender.org/blender/blender/pulls/137687
2025-04-18 11:10:45 +02:00
Omar Emara
44497bd5ff Fix #137293: Compositor crash when resolution is changed
The interactive compositor crashes if the scene resolution is changed
after rendering. That's because the compositor queries its render size
from the scene directly, which might be different from the size that was
already rendered.

To fix this, the compositor should use the size of the existing render
result if available, while it should fallback to the scene resolution.

Pull Request: https://projects.blender.org/blender/blender/pulls/137674
2025-04-18 10:52:51 +02:00
YimingWu
f1bdc0f2cd Fix #124674: Missing UI update exiting palette color picking
Color picker supports palette color picking by clicking during the modal
operator, but it will set initial color on the color property when
exiting from palette color picking, but it didn't send out a notifier
which means interface would kept showing last hovering color.

This fix also included a more obvious visual notification on the bottom
bar so the mode change gets more attention and would be harder to miss.

-------

This PR makes it so that if you clicked while holding `Shift + X`, this info would prompt on the bottom bar, this may need interface to look & decide whether that's needed because previously the string change wasn't eye-catchy enough:

<img width="194" alt="图片" src="attachments/5185f05a-54c2-45b9-acf9-3a0da8d686bb">

Pull Request: https://projects.blender.org/blender/blender/pulls/128842
2025-04-18 07:47:28 +02:00
Alaska
0e144463e8 Tests: Add adaptive subdivision tests with problematic geometry features
As reported in blender/blender#137517, a regression was introduced
where certain features (Normals, tangents, window) would not render
properly when using adaptive subdivision. Presumably this issue slipped
through testing, so this commit adds a test to test this.

Ref: blender/blender-test-data!85
2025-04-18 07:00:24 +02:00
Sean Kim
fa2514aeab Fix: Plane brush sculpt normal can be invalid with symmetry enabled
Instead of skipping `update_sculpt_normal` entirely, we should avoid
doing the extra sampled calculation when we know we have a valid plane
normal.

This better aligns with future refactors to avoid both caclulating and
setting values inside `calc_brush_plane`.

Pull Request: https://projects.blender.org/blender/blender/pulls/137689
2025-04-18 06:54:05 +02:00
lucid3dr
18e5efd21a Fix: VSE: Local transform for mirrored strip images
When creating the `axismtx` in `SeqToTransData`, the strip's rotation
needs to be multiplied by the mirror values.

This adjustment effectively multiplies the rotation by -1 when a mirror
is active, resulting in the `axismtx` being correct. This process is
essentially the same as in #136004.

The `axismtx` is utilized in various transform modes, such as
`transform_mode_translate`.

Pull Request: https://projects.blender.org/blender/blender/pulls/137489
2025-04-18 06:15:19 +02:00
Sean Kim
24f6719d00 Tests: Add sculpt rebuild bvh performance tests
Using the same sized grids as the brush tests, this commit uses the
`sculpt.optimize` operator to approximate the cost of rebuilding the BVH
for a given base mesh grid, multires grid, and dyntopo grid.

Pull Request: https://projects.blender.org/blender/blender/pulls/137690
2025-04-18 06:08:41 +02:00
Sean Kim
719c1b9611 Fix: Sculpt view normal incorrectly calculated
Mistake in 5a21fa0ada

Pull Request: https://projects.blender.org/blender/blender/pulls/137696
2025-04-18 06:07:24 +02:00
Nika Kutsniashvili
47f80eb158 UI: Improve labels of asset browser parameters
In new asset browser popover "Import Settings" there are new options
for instancing. Naming of properties wasn't clear enough at a glance, and
it reuses terms "Link" and "Append" which are used way too frequently and
can be mistaken for something else. This commit clarifies what parameters
do in labels.

See Images attached in PR description.

Pull Request: https://projects.blender.org/blender/blender/pulls/137295
2025-04-18 06:04:44 +02:00
Campbell Barton
234a4ce3a0 Cleanup: CLANG warning with recent function signature change 2025-04-18 12:56:09 +10:00
Campbell Barton
6711256578 Cleanup: move BLI_file_alias_target doc-string to the header
Also adjust the function signature to include the array size.
2025-04-18 12:49:51 +10:00
Alaska
9679d9a3eb Release notes tools: Add manual revert commit sorting
This adds a small feature to the script that generates a list of
bug reports per release to help users of the script sort reverted fix
commits.

This comes in the form of the script presenting you with the commit
message for each revert commit and asking you what commit hash was
reverted (The hash should hopefully be in the commit message.)

Pull Request: https://projects.blender.org/blender/blender/pulls/137582
2025-04-18 03:48:42 +02:00
Sean Kim
fd803c2a3f Sculpt: Avoid calculating brush normal during stroke for automasking
The `initial_normal` and `initial_normal_symm` values used for the "Area
Normal" automasking functionality are not set inside
`update_sculpt_normal`, therefore this check and subsequent processing
can be removed.

Pull Request: https://projects.blender.org/blender/blender/pulls/137693
2025-04-18 02:12:37 +02:00
Sean Kim
5a21fa0ada Cleanup: Various non-functional changes for sculpt.cc
Updates sculpt_update_cache_variants to:
* Join declaration and assignment
* Use const where possible
* Use references where possible
* Use C++ math operations where possible

Pull Request: https://projects.blender.org/blender/blender/pulls/137643
2025-04-17 23:47:51 +02:00
Sean Kim
9684f98460 Cleanup: Change SculptSession#needs_flush_to_id from char to bool
Pull Request: https://projects.blender.org/blender/blender/pulls/137578
2025-04-17 22:14:41 +02:00
Sean Kim
68bb7d674b Sculpt: Avoid calculating brush normal for view automasking
View automasking does not use the brush plane normal, so it does not
need to calculate this as part of the main brush loop.

Pull Request: https://projects.blender.org/blender/blender/pulls/137642
2025-04-17 22:12:54 +02:00
Jacques Lucke
b6342a7e94 Cleanup: simplify allocating buffers for a CPPType
This reduces verbosity when using `LinearAllocator` or `ResourceScope` to
allocate values for a `CPPType`. Now, this is simplified and one also does not
have to manually add a destructor call anymore.

Pull Request: https://projects.blender.org/blender/blender/pulls/137685
2025-04-17 22:01:07 +02:00
Sean Kim
9d94512f96 Sculpt: Avoid unnecessary sampled brush normal calculation
When applying a texture, the brush local matrix is required, but if
there is no active texture, the normal does not need to be computed.

Pull Request: https://projects.blender.org/blender/blender/pulls/137640
2025-04-17 21:29:05 +02:00
Jacques Lucke
82116aca2f Geometry Nodes: support adding zones with link-drag-search
Previously, it was not possible to add any of the existing zones using
link-drag-search, but only using normal search of the Add menu.

For most zones the intended behavior was fairly straight forward. Just for For
Each Element zone is a bit special, because it has two output geometries which
have different meaning.

I also had to update the link-drag-search a bit to remove the limitation that
only a single node can be added.

Pull Request: https://projects.blender.org/blender/blender/pulls/137684
2025-04-17 21:14:49 +02:00
Jacques Lucke
7988fc631b Cleanup: BLI: use IndexMask forward declaration in CPPType
This avoids recursive dependencies when we want to make it easier to
allocate `CPPType` values with e.g. `LinearAllocator` efficiently.

Pull Request: https://projects.blender.org/blender/blender/pulls/137678
2025-04-17 20:41:53 +02:00
Brecht Van Lommel
df053e290d Fix #137621: Cycles curve info random gives wrong value
Caused by filter width changes in 5ce239cc229931b8225.

Pull Request: https://projects.blender.org/blender/blender/pulls/137671
2025-04-17 19:15:05 +02:00
Brecht Van Lommel
d53fdfc7c3 Fix #137517: Cycles adaptive subdivision doesn't use flat normals
Pull Request: https://projects.blender.org/blender/blender/pulls/137677
2025-04-17 19:13:22 +02:00
Weizhen Huang
f9692e10fc Fix #136531: Cycles: missing light update when Emission Sampling is None
When Emission Sampling in None, we loop through
kernel_data.integrator.num_lights to find the light intersection.

If the light shader changes, the number of lights might change, so we
need to tag the light manager for update to recount the lights.

Pull Request: https://projects.blender.org/blender/blender/pulls/137605
2025-04-17 19:12:20 +02:00
Weizhen Huang
891448093f Fix #136556: Cycles emission estimate affects the constant emission
Emission estimate from auto conversion is downscaled to avoid building
a light tree that is expensive to evaluate; however, this estimate is
also used as the final emission value in the kernel if the emission is
constant.

Therefore, only downscale the estimate for the EMISSION_SAMPLING_AUTO
case.

Pull Request: https://projects.blender.org/blender/blender/pulls/137606
2025-04-17 19:11:38 +02:00
Falk David
3a7b2f713f Fix #137523: Grease Pencil: Crash in realize instance node
In the function `gather_attributes_to_propagate` all the instance
attributes were set to be propagated to the `Point` domain.

For Grease Pencil, we want to make sure to propagate these
attributes to the `Layer` domain instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/137665
2025-04-17 18:43:43 +02:00
Falk David
4ba94714bd Spreadsheet: UI: Disable domains that aren't in the selected geometry set
This disables the labels for the geometry domains that the selected
geometry set doesn't contain.
It also removes the sub rows for the domains for these geometry types.

Pull Request: https://projects.blender.org/blender/blender/pulls/137666
2025-04-17 17:55:26 +02:00
Jacques Lucke
b1b831919a Cleanup: BLI: move CPPType asserts to implementation
This simplifies the header that's included in many places.
2025-04-17 17:51:33 +02:00
Pratik Borhade
603ea8ca89 Fix: Outliner: Grease Pencil layer visibility icons are grayed out
Current code is setting UI_BUT_INACTIVE when the parent group is
visible, rather than when invisible. This PR reverses that mistake.

Pull Request: https://projects.blender.org/blender/blender/pulls/137641
2025-04-17 17:42:42 +02:00
Hans Goudey
f19f260ca8 Nodes: Align inputs and outputs on some function nodes
Adjust 9 rotation and matrix nodes.
In some cases this helps to clarify the node's purpose.

Pull Request: https://projects.blender.org/blender/blender/pulls/137672
2025-04-17 17:17:19 +02:00
Omar Emara
24379b8243 Compositor: Turn Denoise node options into inputs
This patch turns the options of the Denoise node into inputs.

Reference #137223.

Pull Request: https://projects.blender.org/blender/blender/pulls/137669
2025-04-17 16:39:11 +02:00
Hans Goudey
134ba08bdf Geometry Nodes: Align inputs and outputs on three nodes
- Scale Elements
- Scale Instances
- Set Grease Pencil Color

These were missed in 7e4d50f1db
2025-04-17 10:11:03 -04:00
Jeroen Bakker
54f469ffa8 Cleanup: Vulkan: Remove unused flags
Removing unused flags when creating descriptor pools.
2025-04-17 15:34:52 +02:00
Hans Goudey
6e8c82ef3c Tests: Update tests hash for Geometry Nodes fix
https://projects.blender.org/blender/blender/pulls/137614
2025-04-17 08:38:30 -04:00
Hans Goudey
0852c7b5ee Fix #137600: Curve to points node anonymous attribute outputs broken
Mistake in fe52284be9.
The attribute filter created by the geoemtry nodes evaluation system
doesn't work in this case because the the conversion from curves to
points is internal to the node, just an implementation detail.

Pull Request: https://projects.blender.org/blender/blender/pulls/137614
2025-04-17 14:35:24 +02:00
Jörg Müller
e4792cb4e7 Audaspace: MixingThreadDevice
Fixes #135897 by introducing a mixing thread to coreaudio, making the callback lock free. At the same time these changes unify all devices that use a mixing thread (now that's jack, pulse, pipewire and coreaudio).

Pull Request: https://projects.blender.org/blender/blender/pulls/136711
2025-04-17 14:30:34 +02:00
Jeroen Bakker
13d6ba1f62 Vulkan: Reduce memory overhead rendergraph
For performance reasons render graphs can keep memory allocated so it
could be reused. This PR optimizes the memory usage inside the
rendergraph to keep it within normal usage.

I didn't detect any performance regression with this change but reduces
the memory when performing final image rendering of heavy scenes.

Partial fix for #137382. the amount of memory still increases with 4mb
per render. It fixes the main difference when using large scenes.

Pull Request: https://projects.blender.org/blender/blender/pulls/137660
2025-04-17 13:45:47 +02:00