Commit Graph

110137 Commits

Author SHA1 Message Date
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
Harley Acheson
2b8da99e59 Fix #77696: Intermittent Fuzzy File Browser Text
Clamp the File Browser main region v2d->cur.ymin and .ymax to integers
to avoid bad text display in the file listing when they are subpixel.

Pull Request: https://projects.blender.org/blender/blender/pulls/123162
2024-06-13 19:53:22 +02:00
Boltzmachine
9b39950c52 Fix #120399: hidden socket in the Viewer is not shown when a new link to it is created
The hidden socket in the Viewer is not shown when a new link to it is created.
This is because the hidden property of the socket is not updated when a new
link to it is created.

Fixing it by simply manually update the property after a new link is created.

Pull Request: https://projects.blender.org/blender/blender/pulls/120503
2024-06-13 19:29:26 +02:00
Clément Foucault
b0eb156344 EEVEE-Next: Volume: Add artificial backface hit to close volumes
This could happen for non manifold meshes (like a water plane)
when using the accurate method.

If last hit in the volume ray is a frontface, we now consider
everything behind it in volume.
2024-06-13 16:38:49 +02:00
Hans Goudey
2d4c624a87 Fix #123171: Mesh edit mode lines index buffer crash with curve modifier
I didn't think the BMesh extraction mode could arrive at the case where
only loose edges are requested, but turns out it can because of the
mesh wrapper system where the evaluated mesh is actually a BMesh with
deformed positions.
2024-06-13 10:22:11 -04:00
Miguel Pozo
f251452a4b Fix #123014: Hundreds of empty folders in the %temp% directory
Use BLI_temp_directory_path_get instead of
BKE_tempdir_base.
2024-06-13 15:53:40 +02:00
Bastien Montagne
ffc89446e7 Cleanup: Remove unused rna_ensure_property_realdata helper.
The last use-case was removed in previous commit.
2024-06-13 15:26:30 +02:00
Bastien Montagne
c6f0d8daa6 Fix 'Copy to selected' on dynamic RNA properties failing in some cases.
Related to #119999 and #122059.

In case the _source_ PropertyRNA was unset (i.e. its underlying
IDProperty storage did not exist), the copy operation would silently
fail.

In fact, the existing code handling IDProperties separately in
`RNA_property_copy` was pretty bad, since it would also bypass all the
RNA 'setting value' code (like custom setters, update handling).

Turns out, liboverride RNA apply code can already handle all of these
cases, so simply pass the raw 'unresolved' RNA property to it, and
remove all this special handling code from `RNA_property_copy`, solves
all the issues.
2024-06-13 15:26:30 +02:00
Sybren A. Stüvel
10c4d71fbe Fix #123107: Memory leak when deleting edit bones
The list of bone collections of an edit bone wasn't freed when deleting
that edit bone.

Thanks @lichtwerk for the fix!
2024-06-13 15:09:54 +02:00
Clément Foucault
f289da5bd5 Fix: EEVEE-Next: Mesh see-through in edit mode with orthographic
The stored depth buffer was not considering orthographic
viewport cameras that have negative Z depth values.

Fix #123146
2024-06-13 14:44:51 +02:00
Pratik Borhade
0100be91b6 Fix #123113: Set Default shadow pool size
Add default pool size value in `_DNA_DEFAULT_SceneEEVEE`

Pull Request: https://projects.blender.org/blender/blender/pulls/123114
2024-06-13 14:19:09 +02:00
Clément Foucault
6147a7703c EEVEE-Next: Enable world sun shadow in default scene
Was disabled by versionning of older scene.
2024-06-13 14:12:13 +02:00
Damien Picard
f87d4e4e40 I18n: Extract and disambiguate a few messages
Extract
- Cycles denoiser enum.
- Extensions user preferences UI.
- Node operator poll message from new node function.

Improve
- Split "(Enabled|Disabled) on startup, overriding the preference."
into two messages.

Disambiguate
- "Add" when describing the action of adding something should use the
  Operator context.
- "Dimensions", in noise textures.
- "Transform" as a noun, the matrix transform type of Geometry Nodes,
  as opposed to the verb to move things in space.
- "Parent" as a noun or verb (the parent of an object, to parent an
  object to another).

Some issues reported by Satoshi Yamasaki, deathblood, and Gabriel Gazzán.

Pull Request: https://projects.blender.org/blender/blender/pulls/122969
2024-06-13 12:15:55 +02:00
Omar Emara
95eb3e13bf Fix #119211: Masks do not update in GPU compositor
Masks are not updated when edited when using the GPU compositor. That's
because the GPU compositor caches static resources and invalidates them
according to the recalculate flags that the depsgraph flushes to IDs.
The issue is that the flags are not flushed to the evaluated IDs of the
compositor depsgraph, but rather to some other evaluated versions of the
IDs.

To fix this, we make the compositor depsgraph persistent and store it in
the scene runtime. This allows us to reliably track changes to resources
used by the compositor and also reduces the overhead of depsgraph
creation in the compositor job.

Patch originally provided by Sergey.

Fixes #121188.

Pull Request: https://projects.blender.org/blender/blender/pulls/123085
2024-06-13 07:43:11 +02:00
Brecht Van Lommel
1d45bb705e Fix: EEVEE assert rendering transparent pass 2024-06-12 19:30:52 +02:00
Miguel Pozo
a27fa7e46c FIx #122085: Optimize iter_shader_to_rgba_depth_count 2024-06-12 17:07:46 +02:00
Miguel Pozo
6a9feebf07 EEVEE: Ensure materials use all available sampler slots
This provides 2 extra sampler slots to users for materials in the cases
of meshes, and 1 extra slot for curves and point clouds.

Pull Request: https://projects.blender.org/blender/blender/pulls/123100
2024-06-12 15:43:46 +02:00
Michael Kowalski
724a674bae USD export: fix malformed joint paths
Fixing a bug which was causing forward-slash separators in
skeleton joint paths to be replaced with underscores, resulting in
invalid skeletons.

This was inadevertantly introduced in 9ad2c7df0b.  I should
have caught this when I reviewed #122471.

Pull Request: https://projects.blender.org/blender/blender/pulls/123031
2024-06-12 15:22:37 +02:00
Weizhen Huang
27041ecaf8 Fix #122877: crash in EEVEE due to negative size of IndexRange
since `min_level` is clamped to 0, `max_level` should be clamped too

Pull Request: https://projects.blender.org/blender/blender/pulls/123131
2024-06-12 15:21:20 +02:00