Commit Graph

110155 Commits

Author SHA1 Message Date
Alaska
08cc73a9bb Fix #123249: Orthographic DOF is influenced by near clip
Fix an issue where the DOF distance in orthographic mode is
specified distance + near clip distance, which can lead to
unpredicable results.

Pull Request: https://projects.blender.org/blender/blender/pulls/123267
2024-06-17 17:45:55 +02:00
Alaska
274da96722 Render: Clamp minimum DOF focus distance
Clamp DOF focus distance to a minimum of 1e-5.
This is to primarily stop focus distances of 0 being used
which would lead to issues in future code changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/123310
2024-06-17 17:42:38 +02:00
Brecht Van Lommel
8ce5c2d8cb Fix: Memory leak in Hydra USD delegate 2024-06-17 16:03:41 +02:00
Jeroen Bakker
832918f9d8 Fix #115344: Generated coordinates for hair psys
When using particle system the generated coordinates where not set.
The reason is that a loose resource handle was created for particle
system that didn't contain enough information to calculate orcos.

This PR will create the object info from its parent object.

Pull Request: https://projects.blender.org/blender/blender/pulls/123307
2024-06-17 13:45:23 +02:00
Miguel Pozo
86bbd2d3a5 Fix #123227 : EEVEE : Ghosting on viewport rendering
Pull Request: https://projects.blender.org/blender/blender/pulls/123308
2024-06-17 13:44:16 +02:00
Clément Foucault
9a6a822dd6 EEVEE-Next: Remove artificial bias
This bias was added when the pixel radius estimation
computation was still broken. This resulted in a shadow
bias way too big in general.

Also fix shadow pixel size being clampped to the wrong
LOD level.

Fix #123295
2024-06-17 12:48:16 +02:00
Miguel Pozo
b029608b97 Fix #123285: EEVEE Next: Ray Visibility > Camera
Add the camera visibility to the MaterialKey.
2024-06-17 12:22:30 +02:00
Bastien Montagne
b143cc1885 I18N: Remove 'edit translation' features from the Blender UI.
This feature was not maintained for a long time already, and would have
required a lot of work to make it sensible and usable after 'recent'
changes (like the move to weblate translation platform).

For details see also
https://devtalk.blender.org/t/ui-translation-tools-remove-edit-translation-feature-from-blender-ui-in-4-2lts-release/34947
2024-06-17 12:17:55 +02:00
Aras Pranckevicius
59d98f3314 Fix #123259: VSE alpha over not working with a Mask modifier
A strip was wrongly deemed to be opaque (and thus strips below it
were skipped from rendering), if the strip content was opaque, but
it gained transparency via presence of a Mask modifier.

While at it, I also noticed that a strip could have been wrongly deemed
opaque when it had a Multiplier < 1.0 with "multiply alpha" option
checked under strip Color settings. So fixed that too.

The whole logic of that factored out into is_opaque_alpha_over function
to make the call site clearer.

Pull Request: https://projects.blender.org/blender/blender/pulls/123303
2024-06-17 11:43:28 +02:00
Aras Pranckevicius
1535ebff61 Fix: VSE waveform preview does not always clip too loud samples
For very low frequency sounds (the ones where waveform drawing goes into
"line mode"), either of min or max can go outside of -1..+1 range.
The code was assuming that only max could be above +1, and only min
could be below -1. Fix that, and also make "line mode" also apply
red "clipped" color when clipping happens.

Pull Request: https://projects.blender.org/blender/blender/pulls/123246
2024-06-17 11:26:50 +02:00
Jeroen Bakker
52d72d9fbb Fix #122847: Show Transparent Render Pass
EEVEE has a transparent render pass that renders materials where
the render mode is set to blended. This was introduced when EEVEE-Next
was still in development, but was never fully backported.

This PR adds the missing pieces.

Pull Request: https://projects.blender.org/blender/blender/pulls/123298
2024-06-17 09:35:03 +02:00
Jeroen Bakker
8e2f51af58 Fix #123269: Shadow jittering when navigating
When navigating the viewport, the shadow jittering wasn't always
updated anymore. Regression introduced by e1ee3ed7df

Pull Request: https://projects.blender.org/blender/blender/pulls/123282
2024-06-17 09:34:25 +02:00
YimingWu
30b3bc8f2b Fix #123226: Sound: Ensure camera switch when baking
In `sound_bake_animation_exec`, the camera needs to be ensured each
frame so that marker camera switch can still give correct stereo/surround
effect during render.

Pull Request: https://projects.blender.org/blender/blender/pulls/123294
2024-06-17 10:24:21 +08:00
John Kiril Swenson
fca4318e3c Fix: Wrong extra half-pixel width of VSE preview
While implementing preview snapping, I noticed an oddity with snapping
videos to view bounds, and found that the preview window's total v2d has
half a pixel of extra padded width.

The bug was introduced in fb5e2f5610, which added `roundf` calls to
numerous areas in the blender code to replace instances of adding `0.5`
and then casting to an integer.

One mistake in the patch was fixed shortly after in d122911d10, but the
other mistake has been unfixed until now. This fixes the glitchy
behavior with preview snapping and is also small enough to add to 4.2
LTS.

Pull Request: https://projects.blender.org/blender/blender/pulls/123279
2024-06-16 07:34:24 +02:00
John Swenson
7b6ae7abbb Fix: VSE glitchy timeline snapping for small mouse movements around valid snap
The issue is that timeline snapping code does not set the transform
`values` to a rounded frame delta, instead, it adds the rounded distance
between current source and target points to the unrounded `values`
float, leaving it unrounded.

Since snapping code is only run on some `transform_modal` calls due to
"time base quirky code" in `transform_snap_mixed_apply`, sometimes
frames briefly show mouse input added to `values` causing the strip to
get transformed away from the snap target before the snap code is run
once again.

To fix this, set transform `values` to the exact rounded snap target
frame diff (like in node snapping) instead of expecting it to get
properly rounded for every call. Do this by changing
`tsnap->snap_source[0]` to the original snap source on `transformInit`,
not the updated snap source.

Pull Request: https://projects.blender.org/blender/blender/pulls/123217
2024-06-16 07:33:35 +02:00
Jacques Lucke
b11d8d2e74 Fix #121559: bad node tree zone visibility with frames
The fix is to support interleaving the drawing of zones and frames.
The draw order is determined by the width of the zones/frames.
Larger areas are drawn before smaller ones. This makes sure that
everything is as visible as possible.

The zone border outlines are still drawn on top of all frames.
Solving that is technically more challenging, because we don't want
to use transparency for zone backgrounds because that results in
many possible mixed colors which we want to avoid. Fortunately,
drawing the outlines on top seems to be quite useful anyway.
2024-06-15 19:51:15 +02:00
Jacques Lucke
a6628fc299 Fix #123255: flickering background in node tree zones 2024-06-15 19:08:16 +02:00
Miguel Pozo
a11d3c6c01 EEVEE: Add Ray Visibility > Camera support
FIx #122980.

Pull Request: https://projects.blender.org/blender/blender/pulls/123248
2024-06-15 08:54:20 +02:00
Hans Goudey
9266fbab02 Fix: Complete recent fix to array_utils boolean mix utility
1d53025868 missed the fix to the VArray case.
2024-06-14 18:44:03 -04:00
Jacques Lucke
6edeae5c90 Fix #122601: unexpected scaling in Curve to Mesh node with custom curve normals
The issue was that we used `from_orthonormal_axes` which obviously expects that
the axes are orthonormal. However, with custom curve normals this is not always the
case. Math wise, an additional normalization is necessary because the cross product
is not automatically normalized anymore.

This change also means that `point_matrix` may have a shearing component. But I
think that's fine here because the matrix is only immediately applied on vertex positions.
This shouldn't affect any case where the normal and tangent are orthonormal.

Pull Request: https://projects.blender.org/blender/blender/pulls/123238
2024-06-14 20:42:50 +02:00
Jacques Lucke
1beca12b2a Fix #121750: drawing from python can disable smoothing for node zone borders 2024-06-14 20:39:00 +02:00
Clément Foucault
3b4422a94b Fix: EEVEE-Next: Improve lookdev float precision
Do this by:
- Removing depth and depth test.
- Scale the sphere to the covered pixels size.
- Use infinite orthographic matrix

We can still improve this by scaling the sphere
bigger depending on the accuracy at its position.

Fix #123165
2024-06-14 20:25:55 +02:00
Clément Foucault
8a778dac25 EEVEE-Next: Shadow: Make screen_pixel_radius not use View
This allow to reuse the function in other area.
2024-06-14 20:25:54 +02:00
Jacques Lucke
1d53025868 Fix #121806: smooth shading not updating correctly
`booleans_mix_calc` was incorrect. While it computed the correct result in
many common cases, under some specific circumstances, at was wrong.
Whether it was wrong also depended on how the range was split up for
multi-threading which is not deterministic.

The function was used in `Mesh::normals_domain` which then also returned
the wrong domain in some cases.
2024-06-14 20:12:03 +02:00
Miguel Pozo
a22a4810c7 GPU: Use size_t for GPU buffer sizes
Update all GPU buffer size-related functions to use `size_t` for
consistency.

Pull Request: https://projects.blender.org/blender/blender/pulls/123240
2024-06-14 19:27:33 +02:00
Jacques Lucke
59b13fb364 Fix #121978: use identity quaternion as default value
Generally, we don't want quaternions that are all zeros, because a proper
rotation has to be a normalized quaternion.
2024-06-14 19:25:07 +02:00
Jacques Lucke
811c75e8b7 Fix #122121: index switch does not work in some cases
Looks like a copy paste error from the normal Switch node.
2024-06-14 19:04:43 +02:00
Jacques Lucke
1bd97b8310 Fix #122164: wrong warning in geometry nodes
Avoid warning the user that there is a geometry, if it does not have any points/data.
Such geometry components shouldn't just be removed generally. because they
still contain information (such as the set of existing attributes).
2024-06-14 18:57:26 +02:00
Clément Foucault
c5ba48427e Fix: EEVEE-Next: Lights with large radius do not work
The threshold is way too high as the light power gets very small.
It still make sense to include the power here because
some lights might be disabled for some BSDF types, and
skipping the LTC eval code can be beneficial.
So reducing the threshold to very low value near FLT_MIN
to fix the issue.

Fix #123193
2024-06-14 18:09:20 +02:00
Jacques Lucke
f168ae73a8 Fix #122356: don't show link drag search for deprecated texture socket 2024-06-14 17:37:20 +02:00
Clément Foucault
e23e5443e7 Fix: EEVEE-Next: Missing mandatory combined pass
Cycles and EEVEE-Next disregard `use_pass_combined` option.
Avoid changing the behavior.

Fix #122188
2024-06-14 16:26:23 +02:00
Brecht Van Lommel
bda53799d5 Cleanup: make format 2024-06-14 15:47:49 +02:00
Christoph Lendenfeld
7e9b580546 Fix #119360: Precision issue with cycle modifier
The issue was a floating point precision issue
between the number of the cycle and the time
within the cycle (`cycle` and `cyct`).
Due to that the `cycle` would advance to the
next whole number while the `cycle time`
is still slightly under that.

This is fixed by calculating the `cycle` with double precision.

This has a measurable performance
impact (for `fcm_cycles_time`)

| Before | After |
| - | - |
| 39ns | 44ns |

For fcurves with a cycle modifier,
this code is run at every evaluate call.
The only time when that would be an issue is
in the graph editor, where there is an evaluate
call for roughly every pixel for curves that have a modifier.
However even in that scenario the performance
is the same within run to run variance (for `graph_draw_curves`)

| Before | After |
| - | - |
| 91565ns | 91430ns |

Pull Request: https://projects.blender.org/blender/blender/pulls/123222
2024-06-14 15:43:34 +02:00
Michael Kowalski
6c29892909 USD export: ignore selected-only for dome lights
Updated the dome light export logic to disregard the selected-only
option, since the world material can't be selected as an object.

Pull Request: https://projects.blender.org/blender/blender/pulls/123199
2024-06-14 14:00:23 +02:00
Crax97
5afd84b960 Fix #122763: ensure Vector socket is the default on 'Transform Point'
Ensure that the input socket `Vector` on node `Transform Point` is marked as the default socket.

Pull Request: https://projects.blender.org/blender/blender/pulls/123042
2024-06-14 12:45:58 +02:00
Jacques Lucke
f2a372b44e Fix #122870: quaternions not interpolated correctly in subdivision surface 2024-06-14 12:35:21 +02:00
Jacques Lucke
66e5004d95 Fix: handle unknown node types more gracefully
I found this assert to be not helpful a couple of times in the past already.
Now it was triggered again by #122928.
2024-06-14 11:50:24 +02:00
Jacques Lucke
086f6f07d9 Fix #122960: multiple geometry outputs connect to single input on viewer 2024-06-14 11:33:29 +02:00
Jacques Lucke
8ee231b6f6 Fix: crash when interpolating subframes of baked caches
`get_simulation_item_cpp_type` returns `SocketValueVariant` for these types
nowdays, which is not what we want here.
2024-06-14 11:27:36 +02:00
Jacques Lucke
d088c3dfe5 Fix #123098: rotation attribute in baked data not loaded correctly 2024-06-14 11:27:36 +02:00
Aras Pranckevicius
d61db84153 Fix #123136: Very narrow VSE strips flicker when zoomed out
Make sure they are at least 1px wide when evaluating the rounded rectangle SDF.

Pull Request: https://projects.blender.org/blender/blender/pulls/123221
2024-06-14 11:19:43 +02:00
Campbell Barton
e93f0ee53a Extensions: add network timeout and connection limit preferences
These settings are used when running extension updates but may be
used for any operations that perform online access.
2024-06-14 15:32:07 +10:00
Bastien Montagne
5dfc197262 IDProp: BPY: Support assigning large int values to float properties.
Allow assigning integer values beyond int32 range to float/double
IDProperties. Extract the py object value into a temporary int64 value
in these cases.
2024-06-13 20:47:46 +02:00
Clément Foucault
7a7f64cf9d Fix: EEVEE-Next: Broken area and spot light culling in planar probes
These two lights have a second culling pass that
uses some shapes defined in view space.

These shapes need to have their handedness flipped
otherwise the test fails.

Fix #122614
2024-06-13 20:40:02 +02:00
Bastien Montagne
9c41bf4fa2 IDProps: Make GeometryNode modifier properties statically typed.
Conceptually, these are the same as IDProps used for regular dynamic RNA
data (should have been done that way from the beginning). At least make
them statically typed, to avoid all kind of issues when the IDProp type
change and does not match expectations from the geometry nodes anymore.

Ref. #122743.

Pull Request: https://projects.blender.org/blender/blender/pulls/122891
2024-06-13 19:58:23 +02:00
Bastien Montagne
76f03eb141 IDProps: Make overridable IDProps systematically statically typed.
LibOverride gets practically useless when types of 'matching' data
differs between the linked reference data and the overridden one.

Ref. #122743.
2024-06-13 19:58:22 +02:00
Bastien Montagne
b278e37f70 IDProps: Make 'dynamic RNA' IDProperties statically typed.
All IDProperties generated as part of 'storage backend' for dynamic RNA
properties are now statically typed.

Also adds some basic unittests for the new statically typed IDProperty
system, based on py-defined RNA data.

Ref. #122743.
2024-06-13 19:58:22 +02:00
Bastien Montagne
4d1fe98604 IDProps: Add 'static type' option to IDProperties.
This implements (most of) the proposal in #122743:

* Add a new `IDP_FLAG_STATIC_TYPE` IDProperty flag.
* Update `BPy_IDProperty_Map_ValidateAndCreate` and related to never
  change an existing property type if statically typed.

The biggest change happens in bpy assignement code, since instead of
replacing the old exisitng property by a newly created one, and copying
over a few settings, now the old property is kept if possible, and a new
one is only created if needed.

And in case the existing property is statically typed, if it cannot be
re-used to store the given value, and error is reported and it remains
unchanged.

`IDP_ARRAY` is also supported for basic numeric types, so 'vector'
properties and such work as expected. Lentgh is considered as part of
the static type (i.e. one can only assign a 3 components py sequence to
a 3-len array property, etc.).

Such in-place update is not yet implemented for `IDP_IDPARRAY` and
`IDP_GROUP` types. While important (especially the group one), they are
not that critical for the current issues related to changing IDProperty
types.
2024-06-13 19:58:22 +02:00
Bastien Montagne
a6d3feda8e BKE IDProp: Add utils to get string version of an IDProp type/subtype. 2024-06-13 19:58:22 +02:00
Harley Acheson
8481696337 Fix #94060: Update Stats When Deleting Object Data in Outliner
Update statistics in the viewport and/or status bar when deleting
object data in Outliner. See bug report to recreate issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/123157
2024-06-13 19:57:32 +02:00