Commit Graph

136618 Commits

Author SHA1 Message Date
Sergey Sharybin
9faed28dcd Fix #122401: Missing animation rendering scene with "Render Single Layer"
Ensure that the re->r.scemode has R_SINGLE_LAYER when not rendering the
single layer.

Pull Request: https://projects.blender.org/blender/blender/pulls/122402
2024-05-28 21:19:43 +02:00
Clément Foucault
7d533175f2 EEVEE-Next: Shadow: Avoid transmission shadow to go behind light
This avoid missing tiles if light is inside the object radius.
2024-05-28 19:43:24 +02:00
Hans Goudey
33a5b47735 Cleanup: Make format 2024-05-28 13:35:44 -04:00
Hans Goudey
2918602586 Fix #119980: BMesh copy functions can clear selection
A subtle error in 66da875488fc4f9e69b1 mean that the existing selection
was overwritten instead of adding to the final flag on the result BMesh
element. Selection is often interpolated separately which is probably
why this mistake wasn't more observable earlier.
2024-05-28 13:34:50 -04:00
Hans Goudey
f38c4e0a39 Fix #119980: BMesh copying functions can clear selection
A subtle mistake in 66da875488fc4f9e69b1 meant that existing selection
was overwritten instead of maintained in the BMesh utility functions for
copying element custom data and flags.
2024-05-28 13:34:50 -04:00
Hans Goudey
34af347bb5 Cleanup: Remove unused mesh extractor 2024-05-28 13:34:50 -04:00
Nikita Sirgienko
759bb6c768 Cycles: oneAPI: Enable host memory migration
This enables scenes with all textures not fitting in GPU
memory to finally render. For scenes that are fitting,
no functional change or performance change is expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/122385
2024-05-28 19:04:19 +02:00
Jacques Lucke
b210d56857 Nodes: support adding nodes in versioning without node callbacks
There is a fundamental issue when adding nodes from versioning code right now.
Generally speaking, versioning code should not change after it has been written.
If old versioning code suddenly changes its behavior, it can invalidate the versioning
code that comes after it.

The issue is that while the versioning code itself doesn't change, it is indirectly calling
code that is changing and evolving all the time. This makes the versioning unreliable
and makes it hard to do certain changes (e.g. changing which sockets a node has).
It's easy to overlook issues this creates because many of these cases don't have
regression tests.

The solution is to keep the versioning code more independent from the part of
Blender that is constantly evolving. More specifically, this means that when adding
a node, this should not take the current node initialization and declaration code into
account. Instead, the versioning code should just manually create the node with
the sockets that it expects based on the version that the versioning code has been
written for.

This patch adds new `version_node_add_empty`, `version_node_add_socket` and
`version_node_add_link` methods which allow creating nodes without calling ever
evolving code.

Pull Request: https://projects.blender.org/blender/blender/pulls/121664
2024-05-28 18:57:06 +02:00
Dalai Felinto
4b57951604 Extensions: New status message when checking for update
```
- Sync repo: {remote_url}
+ Checking repository "{remote_name}" for updates...

- Sync downloading remote data
+ Refreshing extensions list for "{remote_name}"...

- sync: invalid manifest ({error_msg}) reading {remote_url}!"
+ Repository error: invalid manifest ({error_msg}) for repository "{remote_name}"!

- Sync complete: {:s}".format(remote_url)
+ Extensions list for "{remote_name}" updated
```

---

Note, this is working as expected (from Blender anyways), however I can't test test_cli.py at the moment here.

---

Old messages:

<img src="https://projects.blender.org/attachments/9d4db8f5-ef9a-48c8-9e56-cb534aa9aed5" width=650>

New messages:

<img src="https://projects.blender.org/attachments/0245bcb7-6c4e-47e4-a616-0cf831761b47" width=450>

---

Co-authored by Pablo Vazquez

Pull Request: https://projects.blender.org/blender/blender/pulls/122378
2024-05-28 18:39:42 +02:00
Clément Foucault
53797a2ed3 EEVEE-Next: UI: Move fast GI to the bottom of raytracing panel
This avoid to mistakely think that the denoising is applied
to the Fast GI. Fast GI has its own internal denoising.
2024-05-28 18:38:23 +02:00
Sean Kim
025df21a0f Sculpt: Add Polyline Mask, Face Set, and Trim
This PR adds the *Polyline Mask*, *Polyline Face Set*, and
*Polyline Trim* tools.

## Limitations
* *Polyline Face Set* is not added to either of the *Sculpt*
or *Face Sets* menu as none of the other face set gestures are in
either.

Pull Request: https://projects.blender.org/blender/blender/pulls/122248
2024-05-28 18:33:45 +02:00
Dalai Felinto
18cf4e9d09 Correct tooltip for bl_pkg.extensions_show_for_update 2024-05-28 18:12:00 +02:00
Dalai Felinto
7ac762241e Extensions: Fixup for Install/Update operator
The same tooltip is used for Update. Which didn't make much sense as it
was (since it was suggesting that it was enabling the extension).

Simplifying the message now.

Fixup for: 31f7016ba9f92135fe1843aa72892a56607bd061

Co-authored by Pablo Vazquez.
2024-05-28 18:12:00 +02:00
Hans Goudey
48cc79f52d Mesh: Edit data draw extraction improvement
Part of #116901.

Avoid the "extractor" abstraction for creation of edit mode overlay data
vertex buffers. Use threading::parallel_for loops instead. Also prefer
code duplication over linking things that are unrelated. This is the
last "extractor" loop that runs by default in edit mode so there is a
small performance improvement there. Besides that, the changes is the
same as the other similar refactors.

Pull Request: https://projects.blender.org/blender/blender/pulls/122386
2024-05-28 18:06:08 +02:00
Sean Kim
9d3e2de76e Cleanup: make format 2024-05-28 08:47:58 -07:00
Hans Goudey
b642b516d9 Cleanup: Reorder edit data draw buffer extraction function
Just to make a future diff smaller.
2024-05-28 11:26:22 -04:00
Hans Goudey
ebbb72187a Cleanup: Use references, const, for mesh edit data flag extraction 2024-05-28 11:26:21 -04:00
Lukas Tönne
fd651da7e5 GPv3: Fix fill tool boundary construction on thin pixel lines
Finding the boundary uses a Moore neighborhood. The algorithm iterates
over filled pixels, following pixels with empty neighbors, in clockwise
direction. For a given pixel and input direction (where the boundary is
coming from), the next neighbor is found by checking neighbors clockwise
from the previous pixel.

The last direction in this inner loop would be opposite the input
direction, i.e. if the pixel has only one neighbor it can loop back
and iterate over pixels that are already in the boundary, from the
opposite direction. However, this last direction was excluded from the
search (an earlier implementation did not support it). Using this search
direction as well allows the boundary to go back and forth over the same
line of pixels until the boundary is closed.

Pull Request: https://projects.blender.org/blender/blender/pulls/122383
2024-05-28 17:25:35 +02:00
Sean Kim
7726e7f563 Sculpt: Add Line Face Set Tool
This PR adds the `Line Face Set` tool and adds it to the following
location:
* Sculpt Mode toolbar

## Limitations
None of the existing Face Set gesture operators exist in either the
Sculpt dropdown or the Face Set dropdown, this PR does not add the Line
Face set tool in either location as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/122245
2024-05-28 17:17:10 +02:00
Lukas Tönne
f3054f03cd GPv3: Dilate and erode functions for the fill tool
This increases or decreases the initial filled area by an amount of
pixels.

Pull Request: https://projects.blender.org/blender/blender/pulls/122368
2024-05-28 17:14:28 +02:00
Clément Foucault
71e8e6520e EEVEE-Next: Fast GI: Improve Precision parameter
The parameter was not taking the number of samples into
account, making it impossible to acheive highest quality
at high sample count.
2024-05-28 17:14:06 +02:00
Sean Kim
1ab3fffc1d Sculpt: Add increase / decrease visibility operator
This PR adds a new operator: `PAINT_OT_visibility_edit` to support
iteratively expanding or shrinking the visibility of a mesh, similar to
the *Grow / Shrink Mask* actions and the *Grow / Shrink Face Set*
options. This operator is exposed via two new entries in the *Sculpt*
toolbar entry as *Show More* and *Show Less* and have also been
assigned to Page Up and Page Down in the default Blender keybinds for
Sculpt Mode.

### Technical Details
Each of the PBVH types is solved slightly differently, though the
general principle for each is as follows:

1. Make a copy of the current mesh visibility state
2. Iterate over elements (faces & corners if available, otherwise
   vertices) to look at adjacency information
3. Apply appropriate visibility change to vertices
4. Sync face visibility

### Limitations
* Currently, like all other operators in the `paint_hide.cc` file. This
  new operator is limited to Sculpt mode only.

Based off of [this](https://blender.community/c/rightclickselect/pz4y/)
RCS request.

Pull Request: https://projects.blender.org/blender/blender/pulls/120282
2024-05-28 17:12:45 +02:00
Philipp Oeser
fcc481a407 Render: include info string for "render_stats" handler
The "render_stats" handler now includes the message line that was
written to stdout as the first arg (using `BKE_callback_exec_string`
instead of just `BKE_callback_exec_null`).

This can be useful to track render progress (and people were relying on
parsing stdout in the past).

Was a request in chat.

This also corrects possible output from the callback being written in
between message parts in `do_write_image_or_movie` (which was probably a
mistake in 93d5e106aac8).

Pull Request: https://projects.blender.org/blender/blender/pulls/119789
2024-05-28 17:07:27 +02:00
Hans Goudey
89c13dbb5c Fix: Mesh draw extraction missing wire batch missing normals input
The `overlay_wireframe` shaders uses a `nor` input but it wasn't added
to the GPU batch since the normals were split to a separate vertex buffer.
Adding that input gets closer to the appearance in 4.0. But it still looks a
bit different-- the outline is not as bright overall.

Fixes #120781.

Pull Request: https://projects.blender.org/blender/blender/pulls/120827
2024-05-28 16:58:08 +02:00
Nika Kutsniashvili
61178b22a2 Nodes: port "Connect to Output" operator from Node Wrangler
As Node Wrangler add-on is moving to extensions platform and maybe isn't shipped
with Blender from 4.2 onwards, some of it's more important functionalities which are
crucial for Blender UX can be ported inside core. Also see #121749.

This PR ports "Preview Node" operator from add-on inside `scripts/startup/bl_operators`.

When Shift-Ctrl (or Shift-Alt) clicked on the node operator connects output socket of the
node to active Output node in the tree (group, material, light, or world output). For Geometry
Nodes this is just handy operator, but in Shader Nodes, because Viewer Node isn't
implemented, this has always been the only way to quickly preview nodes by connecting
it to Material Output.

Changes made from Node Wrangler version:
- Renamed operator from "Preview Node" to "**Connect to Output**", because node previews
  already mean a different thing in context of compositor and shader editor, and viewer node
  is used for previewing in geometry nodes. Connect to Output is correct name because in every
  context it's called that's what it does.
- Assigned shortcut Shift-Alt-Click in shader editor as well. Even though Shift-Ctrl click already
  works, it's good to have consistency with geometry nodes, so that users can use same shortcut
  in both contexts.

Operator doesn't work in compositor. It's not clear if that's wanted (to connect to Composite node),
and if it is it'll be added in separate PR.

Original authors of the add-on: Bartek Skorupa, Greg Zaal, Sebastian Koenig, Christian Brinkmann, Florian Meyer

Pull Request: https://projects.blender.org/blender/blender/pulls/122016
2024-05-28 16:42:55 +02:00
Campbell Barton
be4788a9bd Extensions: pass platform to the remote URL
Add the platform to the URL when connecting to the remote server.

Based on !122234.

Co-authored-by: Dalai Felinto <dalai@blender.org>

----

This follows documented platform ID's from: https://docs.blender.org/manual/nb/dev/advanced/extensions/getting_started.html

Co-authored-by: Dalai Felinto <dalai@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/122371
2024-05-28 16:35:41 +02:00
Jacques Lucke
905aaf439c Geometry Nodes: new Set Instance Transform node
This node allows replacing the transformation of every instance by providing a matrix.

Before, this was only possible by using the Store Named Attribute node. It's more common
in Blender to have specialized built-in nodes for built-in attributes (e.g. Set Position, and Set ID).

Pull Request: https://projects.blender.org/blender/blender/pulls/121473
2024-05-28 16:34:37 +02:00
Clément Foucault
6e50aebd74 EEVEE-Next: UI: Remove mention of Horizon Scan in tooltip
We use fast GI for this feature now.
2024-05-28 16:16:53 +02:00
Clément Foucault
c9c95e7e64 EEVEE-Next: RNA: Rename horizon property to fast_gi
This avoid discrepancy between the UI and the API.
2024-05-28 16:09:00 +02:00
Clément Foucault
117bfc870d EEVEE-Next: Fast GI: Add angular thickness
While easier to understand, the conventionnal global
scene thickness parameter have some downside:
- It doesn't scale with larger scenes since the
  distant samples have small thickness
- It doesn't handle fine geometric variation in
  foreground.

The proposed angular thicknes makes all sample
have the same angular span. This makes it
distance independant and capture different occluder
thickness with less artifacts. The downside is
that the occluders have the same angular span
at any distance which makes the same occluder inflate
with distance.

A downside is that the geometry near the shading point is
under-represented. Leaving light leaking or lack of AO
at contact points. To fix this, we introduce back a
geometric thickness parameter.

Pull Request: https://projects.blender.org/blender/blender/pulls/122334
2024-05-28 16:00:38 +02:00
Bart van der Braak
ceeaea0c8a Fix: Switch to scheduled trigger for appropriate permission scope in workflow
Previously, the workflow was triggered by **opened pull requests** events.
However, testing revealed that this event, initiated by external GitHub users,
lacks the permission scope to comment on or close pull requests.

To address this, I've updated the workflow to trigger on a schedule. Scheduled
triggers aren't tied to external actors, thereby ensuring the necessary
permission scopes are available.

Pull Request: https://projects.blender.org/blender/blender/pulls/122363
2024-05-28 14:12:20 +02:00
Campbell Barton
b15bc1b5bb Extensions: add the blender version to the remote URL
Add query arguments to the URL when connecting to the remote server.

This information is stripped to create relative paths and for error
messages to prevent overly verbose URS's.

Based on !122234.

Co-authored-by: Dalai Felinto <dalai@blender.org>
2024-05-28 21:41:43 +10:00
Campbell Barton
171319d9ef Extensions: send access token for HTTP requests
- The access token is used when connecting to the server.
- Mention an invalid access token as a possible cause for 403 errors.

Based on !122234.

Co-authored-by: Dalai Felinto <dalai@blender.org>
2024-05-28 21:36:23 +10:00
Campbell Barton
a55c3f503c Cleanup: quiet switch warning 2024-05-28 21:35:27 +10:00
Campbell Barton
a64f36a591 Unbreak building without OPENVDB 2024-05-28 21:35:01 +10:00
Campbell Barton
c33b03fe68 Fix extension tests running after operator poll() changes
Enable "--online-mode" when running tests which require it.
2024-05-28 21:31:25 +10:00
Dalai Felinto
31f7016ba9 Extensions: Tooltip and poll for Install and Update operator(s)
Co-authored by: Pablo Vazquez.
2024-05-28 13:01:07 +02:00
Dalai Felinto
651621da0d Extensions: Tooltips and disable poll message for Check for Updates
This includes checks for offline-mode.

Co-authored by Pablo Vazquez.
2024-05-28 13:01:07 +02:00
Dalai Felinto
bdde38eff1 UI: Preferences: Group the Themes tab with the Extensions
Co-authored by Pablo Vazquez.
2024-05-28 13:01:07 +02:00
Lukas Tönne
0fd81e4994 GPv3: Dot stroke materials for fill tool
This allows using strokes with a "Dot" material as boundaries for the
fill tool.

Note: "Square" materials are not currently supported, they get rendered
as dots too. This is the same in GPv2, there just isn't a simple shader
for rotated squares.

Pull Request: https://projects.blender.org/blender/blender/pulls/122324
2024-05-28 12:53:26 +02:00
Falk David
e7cf4676a1 Fix: GPv3: Build modifier conversion
There were some copy-paste mistakes in the
build modifier conversion.

Pull Request: https://projects.blender.org/blender/blender/pulls/122358
2024-05-28 12:52:38 +02:00
Falk David
d8c5f9a8ba Fix: GPv3: Build modifier maximum gap not working
The "Maximum Gap" setting for the "Natural Drawing Speed"
mode was not working.
This was because the code used `math::max` to try and clamp the value
to a maximum when it should have used `math::min`.
This fixes this issue.
2024-05-28 12:27:36 +02:00
Falk David
e4c0055591 Fix #122355: Opacity modifier hardness mode not working
This was introduced by 944be3d619e07b6f28b6e355aa1f9ab4241da9a1.

In order to keep the behavior the same at the user level,
we can't invert the factor. We have to invert the values, then
apply the factor and convert back.

Pull Request: https://projects.blender.org/blender/blender/pulls/122360
2024-05-28 12:12:31 +02:00
Lukas Tönne
1080a94a3d Geometry Nodes: Value logging for Volume geometry and Grid sockets
Volumes and grids were not yet handled by the Geometry Nodes value
logging system. This patch adds basic information (number of grids)
to the value logger and node tooltips.

Pull Request: https://projects.blender.org/blender/blender/pulls/121622
2024-05-28 12:05:58 +02:00
Iliya Katueshenock
0507dc8c2a Geometry Nodes: skip unused output of multi-function when evaluating on single values
This is slight optimization. Number of nodes with additional outputs like `Valid`
flag of other math-related things will be more in future, its better to strict api
and do not evaluate even singles. This also can reduce number of logged values.

Pull Request: https://projects.blender.org/blender/blender/pulls/121799
2024-05-28 12:00:14 +02:00
Christoph Lendenfeld
f3af98db5c Fix #120858: Flip Quaternions didn't use keyingset for autokeying
The issue was that the code called a function that doesn't
check for the active keyingset in combination with autokeying.
The fix is to just call `autokeyframe_pose_channel` which does that check.

I snuck in a minor change to the operator label.
It spells out "Quaternions" now instead of shortening to "Quats".
I haven't seen that way to shorten it in Blender before.

Pull Request: https://projects.blender.org/blender/blender/pulls/122170
2024-05-28 11:58:46 +02:00
Jacques Lucke
c10de354ac Curves: add edit mode context menu 2024-05-28 11:38:17 +02:00
Jacques Lucke
afec41e8d3 Curves: add extrude operator to menu 2024-05-28 11:37:22 +02:00
Falk David
489bb2e29a Cleanup: GPv3: Use dereference operator instead of .varray 2024-05-28 11:19:54 +02:00
Christoph Lendenfeld
669b15a53d Fix #119945: Dependency Graph not updated properly when adding constraints through python
The issue was that when adding a constraint through
python to an object that is already animated,
the constraint did not evaluate properly at first.
The fix is to update the depsgraph when creating a
constraint through the API.
Such an update already happened when running the
operator to create a constraint.

Pull Request: https://projects.blender.org/blender/blender/pulls/122198
2024-05-28 11:08:26 +02:00