Commit Graph

134287 Commits

Author SHA1 Message Date
laurynas
15dbfe54e4 Curves: draw evaluated curves and handles in edit mode
This makes the edit mode drawing for the new curves data more similar
to the old edit mode. Specifically, it draws the evaluated curves now instead
of just a poly curve. Furthermore, it now draws bezier handles as well as
a separate control curve for nurbs curves.

Pull Request: https://projects.blender.org/blender/blender/pulls/119053
2024-03-19 10:39:05 +01:00
Pratik Borhade
1ef6d1a11b Merge branch 'blender-v4.1-release' 2024-03-19 14:58:56 +05:30
Pratik Borhade
43e968dc78 Fix #119612: Markers bar in NLA blocks view of final track in list
Mistake in a96f1208cc729f2b4cfaf8152f80d49f627c82b5.
When markers are present, offset should be added to the height.
Earlier it was subtracted like so `v2d->tot.ymin -= MarkerMargin` and that worked
because ymin is assigned like so `v2d->tot.ymin = -height`.
Now that the marker margin is added to the height it needs to be additive.

Pull Request: https://projects.blender.org/blender/blender/pulls/119647
2024-03-19 10:26:29 +01:00
Falk David
53b9d77109 Fix build error
This error was introuced by 5e2955d3cd.
Instead of trying to use the function name
with `__func__` use a string literal.
2024-03-19 10:11:44 +01:00
30711d1398 Fix #119623: Anim: unintended API change in keyframe_insert() function
Bring back the `INSERTKEY_XYZ_TO_RGB` enum item for the
`keyframe_insert()` function (it was removed in 30b0c5b225). This way
any Python code that targets Blender 4.x can safely pass this flag,
without having to check specific Blender versions.

Note that the flag is implemented as a no-op, as the behaviour change
introduced in 30b0c5b225 (just looking at the user preference) is still
retained. The purpose of this commit is simply to avoid the `ValueError`
exception that would otherwise be raised.

This should also fix Rigify report blender/blender-addons#105241.

Pull Request: https://projects.blender.org/blender/blender/pulls/119625
2024-03-19 10:05:22 +01:00
Falk David
5e2955d3cd GPv3: Multithread fill triangulation
This became a bottleneck in one of the test files during playback.

A grease pencil object was using an array modifier which tags the triangle
caches to be invalidated. Then it re computed the fills on every frame, which
was slow (when single threaded).

With this patch, the playback went from ~43fps to 60+fps.

Pull Request: https://projects.blender.org/blender/blender/pulls/119531
2024-03-19 09:52:15 +01:00
Campbell Barton
a535524fe1 Fix #119500: Installing an Extension via dragging has no feedback
Call the install operators directly instead of using bpy.app.handlers.
Now reports from installing are in the status bar.
2024-03-19 18:12:10 +11:00
Iliya Katueshenock
5319e6af7b Fix: Geometry Nodes: Separate Transform node
Fix of wrong destination for scale and non-normalized rotation matrix.

Pull Request: https://projects.blender.org/blender/blender/pulls/119602
2024-03-19 05:29:38 +01:00
Campbell Barton
38dc888d7f Cleanup: use ELEM macro, remove redundant "struct" 2024-03-19 14:17:47 +11:00
Campbell Barton
573146518d check_licenses: exclude ./lib/ from source code checks 2024-03-19 14:10:27 +11:00
Campbell Barton
8ac9b4ca46 Cleanup: use full sentences for code-comments
Also correct references source files.
2024-03-19 13:57:00 +11:00
Campbell Barton
076b2ecf70 Fix debug argument detection reading arguments after --command 2024-03-19 13:49:25 +11:00
Hans Goudey
bb4271459f Fix: Build error from missing include in legacy mesh conversion
The include was removed by a cleanup in main, not in 4.1.
2024-03-18 18:35:32 -04:00
Harley Acheson
061a9ee885 UI: Add Optional Flags for Tooltip Image Fields
Add more flexibility to tooltip images by adding the ability to specify
if (one of two) checkerboards are added, border, premultiplied
blending, or recoloring.

Pull Request: https://projects.blender.org/blender/blender/pulls/119437
2024-03-18 22:17:45 +01:00
Hans Goudey
5001a1a4a7 Merge branch 'blender-v4.1-release' 2024-03-18 16:44:47 -04:00
Hans Goudey
51cdf665ab Fix #119520: Auto smooth modifier added unnecessarily with bevel
If the bevel "Harden Normals" option is on, custom normals will be
generated. In that case, the automatic sharp edge tagging based on the
angle shouldn't run. This PR extends the earlier fix to #116395 to
handle this case and also extends the check to not just check the last
modifier, which doesn't work in this test file which has a collision
modifier at the end. That makes sense anyway, since what we really care
about is whether the evaluated mesh has custom normals or not.

Pull Request: https://projects.blender.org/blender/blender/pulls/119638
2024-03-18 21:43:22 +01:00
Miguel Pozo
58eab5e3be EEVEE-Next: Disable viewport motion blur outside of playback
Avoid motion blur on regular scene editing.

Pull Request: https://projects.blender.org/blender/blender/pulls/119484
2024-03-18 20:39:38 +01:00
Hans Goudey
5bfe6ad8f8 Fix: Various issues with auto smooth versioning
This PR fixes several issues with the versioning that replaces the old
auto smooth flag with a modifier.

One issue is that the flag wasn't cleared in the initial versioning
code. That means some objects have the replacement modifier but their
meshes still have the flag set. The fix for that is to make the
versioning idempotent by trying to find an existing node group before
adding a new one. The versioning is now re-run on all objects to clear
the flags. Flags on all meshes are cleared too, even unused meshes.
That could cause loss of the auto-smooth when the mesh is linked from
a different blend-file, but that situation should be very rare.

Another issue was that the versioning wasn't run when linking objects.
That was simple to solve by adding the versioning where the proxy
versioning already existed for that case.

Finally, arguably the largest issue was that the the newly added node
groups were always added as local data-blocks. When linking, having
library data-blocks point to local data-blocks not in that library is
quite bad and breaks assumptions around Blender. This is solved by
having an auto smooth node group per library.

Resolves #119516, #119455, #119447

Pull Request: https://projects.blender.org/blender/blender/pulls/119539
2024-03-18 20:15:36 +01:00
Julian Eisel
0d7ac2542e Merge branch 'blender-v4.1-release' 2024-03-18 19:37:56 +01:00
Julian Eisel
745fd2a2cb Fix: Tree-view items always collapsed by default
Since 660867fa00, having tree-view items uncollapsed by default using
the `set_collapsed()` functions wouldn't work anymore. An attempt to do
this would assert even, so eb71d9f7bc disabled the assert.

I think a function designed to handle exactly this is the best solution,
it makes the intent & behavior more clear than before, and highlights
that this is a special case.

Mitigates #117957, in that it solves the regression, but tree-views still
don't remember their state on screen-layout changes. This is a known
limitation and not supported.

Pull Request: https://projects.blender.org/blender/blender/pulls/119166
2024-03-18 19:32:53 +01:00
Jeroen Bakker
8945b29762 EEVEE: Overscan/Border mixed resolution rendering
Mixed resolution rendering had some issues with overscan and border
rendering.

- `render_offset` was in display space and not in render space. Is
  now replaced by the `overscan_extent`.
- `overscan_extent` introduced that stored the overscan of the render
  extent.
- Fixed issues to determine the film sample weight when `scaling_factor`
  was used. It didn't match decompose the actual offset making the
  length of the same to large, what blurred the final samples.

NOTE: there are some other issues related to border rendering which was
already in main before mixed resolution rendering was added. I assume
that viewport render image in camera view still adds an additional
offset, which should be ignored.

Fixes #119510
Fixes #119511

Pull Request: https://projects.blender.org/blender/blender/pulls/119524
2024-03-18 16:02:57 +01:00
Brecht Van Lommel
ebf12765a6 Merge branch 'blender-v4.1-release' 2024-03-18 15:09:45 +01:00
Brecht Van Lommel
7a395e2e7f Revert changes from main commits that were merged into blender-v4.1-release
The last good commit was f57e4c5b98c075f3dfc61faebbcb43c99a778956.

After this one more fix was committed, this one is preserved as well:
67bd678887d7f8aec9f3b23bbf1aaf29f80d0da4.
2024-03-18 15:04:12 +01:00
Jacques Lucke
516912f741 Merge branch 'blender-v4.1-release' 2024-03-18 14:44:50 +01:00
Jacques Lucke
4842bf1101 Cleanup: make format 2024-03-18 14:44:31 +01:00
Jacques Lucke
ce9fee394d Merge branch 'blender-v4.1-release' 2024-03-18 14:43:18 +01:00
Jacques Lucke
67bd678887 Fix #119578: crash when node tool does not have geometry as first output socket
This was simply missing a check and error message. The same error message
is shown when the node group is used as modifier.

Pull Request: https://projects.blender.org/blender/blender/pulls/119604
2024-03-18 14:36:43 +01:00
Jacques Lucke
42093bbe3d Nodes: have either input or output socket in declaration
Support for having an input and output socket in the same socket declaration
builder was added for the original node panels to be able to support inline
sockets. However, those were generally disabled for now. As can be seen in the
simulation and repeat zone, inline sockets can work differently too. Having an
input and output in the same socket declaration builder builder makes some
things simpler but makes other things much harder. For example, the current
design wouldn't work all that well if the input and output socket has different
types. This is easier to do with the `align_with_previous_socket` approach.

I'm not yet entirely sure whether we want to use the same approach for
corresponding sockets in the node tree interface, but that can be tried and
decided separately.

Pull Request: https://projects.blender.org/blender/blender/pulls/119599
2024-03-18 14:36:03 +01:00
Jacques Lucke
5da0363013 Fix #119617: crash because node sockets depend on experimental feature flag
This was caused by 62bd0ea5fde55a696e0a8353249ed4964d62984d. Now the socket is
always created but made unavailable if the feature is disabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/119620
2024-03-18 13:57:16 +01:00
Jason Fielder
661d12aef7 Fix #119195: Ensure Metal uses correct attribute conversion mode
Resolves custom attribute types for ints and booleans by ensuring
conversion mode is correct. Previously, the attribute declarations
were assumed to be linear. However, patch ensures the correct
attribute index is now fetched, ensuring the conversion mode
is correctly specified for non-linear attribute ID's.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/119569
2024-03-18 13:38:09 +01:00
Philipp Oeser
5ba581bd0a Fix #119523: Missing driver bone target doesn't mark driver as invalid
If a bone was specified (but now missing), the driver would fallback to
using the object as a target (which can lead to unintended behavior).

So now check if a bone is specified, if it is missing, mark the driver
invalid. If no bone is specified at all, then use the armature object as
the target.

NOTE: `DTAR_FLAG_INVALID` is not granular enough to distinguish the
object and bone targets, so both will be marked in red in the UI (there
is already comments about it in code). If necessary, we could introduce
an additional DTAR_FLAG_BONE_INVALID and use that in a couple of places.

Pull Request: https://projects.blender.org/blender/blender/pulls/119533
2024-03-18 12:48:43 +01:00
Emmett-Lalish
d1cbb10d17 Add Khronos PBR Neutral tone mapper
A tone mapper designed specifically for PBR color accuracy, to get sRGB
colors in the output render that match as faithfully as possible the input
sRGB baseColor under gray-scale lighting. This is aimed toward product
photography use cases, where the scene is well-exposed and HDR color values
are mostly restricted to small specular highlights.

Fixes #118824: Proposal: add a view transform for Khronos PBR Neutral Tone Mapper

Co-authored-by: Emmett Lalish <elalish@google.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/118936
2024-03-18 12:16:53 +01:00
Falk David
a3243172bf GPv3: Switch back to the current grease pencil render engine
This makes it so GPv3 objects are rendered using the current grease pencil render engine.

A new `gpencil_next` engine was added at the beginning of the project, but it couldn't
be finished in time. This commit removes the `gpencil_next` engine as it is no longer
used. The current status of the new engine been pushed to the `gpencil-next` branch on
the `blender` repository.

Note: Onion skinning is not supported yet. This work will be done in a separate PR.

Fixes #115467 and #116347.

Pull Request: https://projects.blender.org/blender/blender/pulls/118664
2024-03-18 12:01:15 +01:00
Brecht Van Lommel
433d91fca8 Merge branch 'blender-v4.1-release' 2024-03-18 11:00:49 +01:00
Brecht Van Lommel
f57e4c5b98 Fix #119551: Cycles denoising crash canceling tiled render with MetalRT
The BVH has been freed at this point, but the Metal queue sets it on
every invocation. Make sure it's null so it doesn't get used anymore.

Pull Request: https://projects.blender.org/blender/blender/pulls/119581
2024-03-18 11:00:21 +01:00
Pratik Borhade
b3095d9c2e Merge branch 'blender-v4.1-release' 2024-03-18 14:43:15 +05:30
Kamil Galik
d739d27a2d Fix #119203: Change default NDOF Deadzone value
There is a Deadband built in the sensor of SpaceMouse,
therefore the default value of Deadzone field can be equal to 0.0
instead of 0.100.

Pull Request: https://projects.blender.org/blender/blender/pulls/119522
2024-03-18 10:10:21 +01:00
Jacques Lucke
e4e4b51c83 Fix: add missing socket type in forward declaration list
Not quite sure how I missed this before. It's quite unfortunate that this
causes issues like #119179 in Blender 4.0.
2024-03-17 19:08:40 +01:00
Jacques Lucke
ee1fa8e1ca BLI: support set operations on index masks
The `IndexMask` data structure was designed to allow us to implement set
operations like `union`, `intersection` and `difference` efficiently
(2cfcb8b0b805401a0ffb252fd41750fadb0392ab). This patch adds an evaluator for
arbitrary expressions involving the mentioned operations. The evaluator makes
use of the design of the `IndexMask` data structure to be quite efficient.

In some common cases, the evaluator runs in constant time. So it's very fast
even if the mask contains many millions of indices. If possible the evaluator
works on entire segments at once instead of looking at the individual indices.
This results in a very low constant factor even if the evaluation time is
linear. If the evaluator has to look at the individual indices to be able to
perform the operation, it can make use of multi-threading.

The evaluation consists of the following steps:
1. A coarse evaluation that looks at entire segments at once.
2. All segments that couldn't be fully evaluated by the coarse evaluation are
   evaluated exactly by looking at the actual indices. There are two evaluators
   for this case. One that is based on `std::set_union` etc. The other one first
   converts the index masks to bit spans, then does bit operations to evaluate
   the expression, and then converts the bits back into indices. Depending on
   the expression, one or the other can be more efficient.
3. Construct an index mask from the evaluated segments.

Showing the performance of the evaluator is kind of difficult because it highly
depends on the input data. Comparing the performance to something that does not
short-circuit when there are full ranges is meaningless, because one can
construct an example where the new evaluator is arbitrarily faster. I'm still
working on a case where performance can be compared to e.g. using
`std::set_union`. This comparison is only fair when the input data when
constructing a case where the new evaluator can't short-circuit.

One of the main remaining bottlenecks are the calls to `slice_content` on large
index masks. I think the impact of those can still be reduced.

We are not using this evaluator much yet, except through `IndexMask::complement`
calls. I intend to use it when I get to refactoring the field evaluator for
geometry nodes to optimize the evaluation of selections.

Pull Request: https://projects.blender.org/blender/blender/pulls/117805
2024-03-17 09:52:32 +01:00
Habib Gahbiche
f9cb2eb988 Cleanup: Tests: update message to refer to git instead of svn
Pull Request: https://projects.blender.org/blender/blender/pulls/119577
2024-03-17 09:47:40 +01:00
Campbell Barton
2de84a77ac Cleanup: include otherwise unused imports in __all__
Suppresses unused import warnings with "ruff check".
2024-03-17 17:25:14 +11:00
Jason Fielder
6768ded895 Fix #118868: Metal render pass output for EEVEE Next
Resolves render pass export for EEVEE Next on Metal.
Reads from texture views was previously utilising the
root texture rather than the view variant, resulting
in views into texture arrays being incorrectly sampled.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/119563
2024-03-16 20:16:37 +01:00
Harley Acheson
bec9b4bc4b UI: Update Polls on Single Repository Sync and Upgrade
The buttons to sync and update individual repositories only work for
remote repositories. This PR just updates their poll functions to
disable them for local repos.

Pull Request: https://projects.blender.org/blender/blender/pulls/119568
2024-03-16 20:00:49 +01:00
Brecht Van Lommel
b8ea467475 Merge branch 'blender-v4.1-release' 2024-03-16 19:45:51 +01:00
Brecht Van Lommel
714ebd6890 Fix: Linux libraries have files stored as LFS that shouldn't be 2024-03-16 19:44:26 +01:00
Guillermo Venegas
1058006e03 Fix #119549: Avoid resetting properties tagged as SKIP_PRESET
Excludes properties tagged as `SKIP_PRESET` from being reset.

Pull Request: https://projects.blender.org/blender/blender/pulls/119550
2024-03-16 19:34:49 +01:00
Alaska
b8a3560a77 Fix #119545: Error drawing Cycles denoising settings with NONE device
Pull Request: https://projects.blender.org/blender/blender/pulls/119547
2024-03-16 19:34:16 +01:00
Ray Molenkamp
f780c1e52e Windows: OpenImageDenoise-2.2.2 2024-03-16 12:29:29 -06:00
Harley Acheson
8770299406 UI: Option for Separate Extension Dev Tools
Experimental flag for "Extensions Development Utilities" that can be
enabled separately from "Extensions". Note this PR does not enable the
use of this flag (coming later) as uses are in addons-contrib. This
flag is requested in #119521

Pull Request: https://projects.blender.org/blender/blender/pulls/119562
2024-03-16 17:24:34 +01:00
Clément Foucault
38b180f236 EEVEE-Next: Shadow: Hide banding artifact at projection edges
This affect all local lights (non-sun light).

We hide the artifact caused by different tracing results from
two adjacent projection. This is visible as the shading point
switches projections.

We fix this by randomizing which shadow map projection (face)
to trace. We do that by using the point at half the ray instead
of the shading point to choose the projection. This gives
a soft enough look proportional to the light shape.
This also has the benefit of being stupidly simple.

Pull Request: https://projects.blender.org/blender/blender/pulls/119555
2024-03-16 15:20:46 +01:00