Commit Graph

137502 Commits

Author SHA1 Message Date
Bastien Montagne
ddd366c5b2 Merge branch 'blender-v4.2-release' 2024-06-13 20:48:17 +02: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
Anthony Roberts
bd764a5796 Windows: 4.2 Library updates for ARM64
Pull Request: https://projects.blender.org/blender/blender/pulls/123203
2024-06-13 20:37:43 +02:00
Harley Acheson
fb20e818ef Merge branch 'blender-v4.2-release' 2024-06-13 10:59:05 -07: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
52f42b02f0 Merge branch 'blender-v4.2-release' 2024-06-13 10:55:09 -07: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
Brecht Van Lommel
90f09f016e Fix: Incorrect call to cuCtxPopCurrent
cuDevicePrimaryCtxRetain does not push the context onto the stack,
unlike cuCtxCreate.
2024-06-13 19:41:20 +02:00
Brecht Van Lommel
d72c4f0096 Fix: Cycles build issues when disabling various kernel features 2024-06-13 19:41:19 +02:00
Laurynas Duburas
d954e74963 Fix: Add leftColor variable only to handle shader
Variable `leftColor` is added to global variable `overlay_edit_smooth_color_iface` in current version.
In result it is added to every following shader using `overlay_edit_smooth_color_iface`.

Pull Request: https://projects.blender.org/blender/blender/pulls/122803
2024-06-13 19:32:32 +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
Hans Goudey
c6674bad5c Cleanup: Formatting 2024-06-13 10:49:26 -04: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
Sean Kim
6a5c14e58f Sculpt: Initial data-oriented refactor for mask brush
Part of #118145.

Refactor appears to gain a roughly 20% speed increase in the individual
update step function, from an average of 31ms to 25ms.

Pull Request: https://projects.blender.org/blender/blender/pulls/123115
2024-06-13 16:29:24 +02:00
Hans Goudey
654ead045b Merge branch 'blender-v4.2-release' 2024-06-13 10:29:03 -04:00
Sean Kim
b7975db04f Cleanup: Match toolbar order for sculpt gesture tools
Pull Request: https://projects.blender.org/blender/blender/pulls/123161
2024-06-13 16:28:14 +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
Weizhen Huang
5bb7dc82ae Merge branch 'blender-v4.2-release' 2024-06-13 16:03:31 +02:00
Weizhen Huang
e639c3d6e2 Fix #74816: crash in Cycles light distribution due to integer overflow
`num_distribution` in `KernelIntegrator` has type `int`, which holds a
maximal value of 2147483647. However, when computing the distribution,
`size_t` is used, which can go beyond this value and result in a
negative value when converted to `int`.

This PR handles this case as an error, stops rendering and suggests
alternative solutions.

Also early return when `use_light_tree`. The block was there because
`num_distribution` was needed for light tree before bfd1836861.

Pull Request: https://projects.blender.org/blender/blender/pulls/123177
2024-06-13 15:57:11 +02:00
Miguel Pozo
b0e92cfba6 Merge branch 'blender-v4.2-release' 2024-06-13 15:54:24 +02: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
d1a6ac16a8 Merge branch 'blender-v4.2-release' 2024-06-13 15:27:04 +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
Nathan Vegdahl
d2260ec183 Cleanup: remove ID prefixes from names in animation tests
The functions that create the IDs already take care of this, so it was
redundant and resulted in confusing reports on test failure.

Pull Request: https://projects.blender.org/blender/blender/pulls/123185
2024-06-13 15:14:25 +02:00
68b4139368 Anim: Change how un-assigning an action binding works
Reorder `Action::assign_id()` so that there is a clear "unassign any
previously-assigned binding" step first, and then a clear "assign the new
binding" step. Previously these were a bit too much intertwined.

Also `animrig::unassign_binding()` now simply calls into `Action::assign_id()`
instead of having somewhat overlapping responsibilities.

Finally the RNA setter for `AnimData.action_binding_handle` is changed
to always call `Action::assign_id()` for both assigning and unassigning
the handle. This ensures the API is properly used, instead of modifying
properties directly.

Pull Request: https://projects.blender.org/blender/blender/pulls/123184
2024-06-13 15:12:25 +02:00
2162af9e7b Merge remote-tracking branch 'origin/blender-v4.2-release' 2024-06-13 15:11:00 +02:00
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
0250844dae Anim: RNA: make 'name' the 'name property' of Action Bindings again
Make `Binding.name` the 'RNA name property' of Action Bindings. This
ensures that the name property is unique (within the Action), and also
used for `action.bindings.keys()` and `action.bindings['BindingName']`.
2024-06-13 14:03:33 +02:00
Christoph Lendenfeld
9dcc63b76c Fix #122372: Keyingsets not keying custom properties of type EnumProperty
The issue was that when applying the keyingsets
`Whole Character` and `LocRotScale & Custom Properties` the
enum property of a rigify rig was not keyed.
The reason it was not keyed was just because
it was not specified in the compatible types in the keying set.
The fix is to just add `bpy.types.EnumProperty` to the list.

Pull Request: https://projects.blender.org/blender/blender/pulls/122377
2024-06-13 13:17:32 +02:00
46d50858d4 Anim: remove invalid assertion
Remove the assertion in `animrig::assign_animation()` that the passed
Action is a layered Action. The code works equally well for legacy Actions.

No functional changes.
2024-06-13 12:59:07 +02:00
34c5c2a6da Refactor: simplify BKE_animdata_free()
Reduce nesting by two levels in `BKE_animdata_free()` by swapping
conditions and returning early.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/123174
2024-06-13 12:38:06 +02:00
Bastien Montagne
de713122f3 Merge branch 'blender-v4.2-release' 2024-06-13 12:17:10 +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
Dalai Felinto
77a69d04f2 Extensions: Changes to the translatable tags table
* Drop the repository - let's combine tags in a single list (per type)
  to avoid duplications in the future.

* Give a more sensitive name for tthe property, to avoid tags.tags.
2024-06-13 10:17:10 +02:00
Jeroen Bakker
22d352dacc Vulkan: Render graph drawing
This PR adds drawing support to the render graph. It adds support for
draw, indirect draw, indexed draw and indexed indirect draw.

Draw commands can only be executed within a rendering scope. Data
transfer commands and dispatch commands cannot be executed within a
rendering scope. Blender can still send in commands in any order and
the render graph needs to find out the best order to minimize context
switches (rendering/begin/end). This is the responsibility of the
scheduler.

The scheduler will push data transfer and dispatch commands outside the
rendering scope:
- data transfer and dispatch commands at the beginning are done before
  the rendering begin.
- data transfer and dispatch commands at the end are done after the
  rendering end.
- data transfer and dispatches in between draw commands will be pushed
  to the beginning if they are not yet being used.
- for all other data transfer and dispatch commands the rendering is
  suspenderd and will be continued afterwards.

Within a rendering context it is not allowed to perform synchronization
commands. Any synchronization commands inside a rendering scope will be
performed before the rendering scope begins. Nodes are now organized
in groups to simplify the code around this area.

Pull Request: https://projects.blender.org/blender/blender/pulls/123168
2024-06-13 09:37:17 +02:00
Omar Emara
8907b52839 Merge branch 'blender-v4.2-release' 2024-06-13 08:44:40 +03: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
Omar Emara
cbabe2d3ef Compositor: Remove Auto Render option
This patch removes the Auto Render option from the compositor. This is
done for the following reason:

- The option didn't really work except in the case of transforming an
  object. So it wasn't really reliable.
- It made little sense to use since the introduction of the Viewport
  Compositor.
- It had a number of UX issues, including the fact that it can't be used
  with animation playback, and the fact that rendering can get in the
  way of the UI depending on the preferences for temporary editors.

Pull Request: https://projects.blender.org/blender/blender/pulls/123132
2024-06-13 07:29:37 +02:00
Sean Kim
ad3c92b660 Cleanup: Remove unnecessary namespace specification
Pull Request: https://projects.blender.org/blender/blender/pulls/123153
2024-06-12 22:45:36 +02:00
Hans Goudey
aae9d44740 Cleanup: Sculpt: Rename and move plane-based brush utilities
These utiltities aren't really specific to the scrape brush; they're used elsewhere
too. With simpler names it feels better to put them in the common utilities file
so they can be shared more easily.

Pull Request: https://projects.blender.org/blender/blender/pulls/123152
2024-06-12 22:23:59 +02:00