Commit Graph

136618 Commits

Author SHA1 Message Date
Clément Foucault
fb85ea535f Fix: EEVEE-Next: Broken sun soft shadows
The soft shadows were only getting blurred up to a radius
of 1 unit.
2024-05-24 18:41:18 +02:00
Clément Foucault
4c75babf03 EEVEE-Next: Shadow: Improve shadow tagging debugging
The tilemap debug mode now shows updates in the
viewport and cached pages in the bottom tilemaps.
2024-05-24 18:41:18 +02:00
Bastien Montagne
6426de4489 Core: IDManagement: Refactor how 'never unused' IDs are defined.
A few ID types are considered as 'never unused' in Blender (UI related
ones, the Libraries and the Scenes). Local IDs of this type are always
considered as used, even if no other ID links to them.

This was previously fairly weekly defined and implemented (mainly in the
writefile code and the 'tag unused' libquery functions).

This commit formalize this characteristic of ID types by adding a new
`IDTYPE_FLAGS_NEVER_UNUSED` flag, and using this in the few places in
the code that handle unused IDs.
2024-05-24 17:43:22 +02:00
Sergey Sharybin
1b18e07232 Fix #121480: Cryptomatte shows some objects as black
The issue originates to the change in default view transform from Filmic
to AgX, which does slightly different clipping, and clips color to black
if there is any negative values.

This change implements an idea of skipping view transform for viewer
node when it is connected to the Pick output of the cryptomatte node.
It actually goes a bit deeper than this and any operation can tag its
result as a non-color data, and the viewer node will respect that.
It is achieved by passing some extra meta-data along the evaluation
pipeline. For the CPU compositor it is done via MetaData, and for the
GPU compositor it is done as part of Result.

Connecting any other node in-between of viewer and Cryptomatte's Pick
will treat the result as color values, and apply color management.

Connecting Pick to the Composite output will also consider it as color,
since there is no concept of non-color-managed render result.

An alternative approaches were tested, including:

- Doing negative value clamping at the viewer node.
  It does not work for legacy cryptomatte node, as it needs to have
  access to original non-modified Pick result.

- Change the order of components, and store ID in another channel.

  Using one of other of Green or Blue channels might work for some view
  transforms, but it does not work for AgX.

  Using Alpha channel seemingly works better, but it is has different
  issues caused by the fact that display transform de-associates alpha,
  leading to over-exposed regions which are hard to see in the file from
  the report. And might lead to the similar issues as the initial report
  with other objects or view transforms.

- Use positive values in the Pick channel.

  It does make things visible, but they are all white due to the nature
  of how AgX works, making it not so useful as a result.

Pull Request: https://projects.blender.org/blender/blender/pulls/122177
2024-05-24 17:25:57 +02:00
Julian Eisel
ae7edf26ed UI: Remove Outliner element collapse chevron for empty scene elements
Scenes that have no children displayed (either because there was nothing
to display or because we didn't expand the sub-tree, such as in the
"Unused Data" display mode) would always have a chevron icon indicating
the collapsed state, but it wasn't interactive. As such it just felt
broken. This explicit exception to always draw the chevron for scene
elements was added a long time ago (13 years ago or longer), and I
couldn't find any good rationale for it.
2024-05-24 16:34:28 +02:00
Campbell Barton
97e017d89c Unbreak build from missing fmtlib reference on some systems 2024-05-25 00:32:23 +10:00
Julian Eisel
341281627d UI: Don't expand sub-trees in Outliner "Unused Data" display mode
For example scenes would make the entire collections & objects hierarchy
show up, even if these collections/objects are linked into other scenes.
So this was misleading, and from what I can tell not intentional, as a
comment in `TreeDisplayIDOrphans::build_tree()` indicates. Also
validated with Bastien.
2024-05-24 16:27:15 +02:00
Julien Duroure
1e802d971a glTF exporter: Draco: fix normalized draco accessors
Fix exporting normalized accessor with Draco enabled.
json was ok, but accessor data itself was not flagged as normalized

Pull Request: https://projects.blender.org/blender/blender/pulls/122224
2024-05-24 16:25:56 +02:00
Pratik Borhade
105463e28a GPv3: Change active node after selecting group in outliner
active element in properties panel is not updated after selecting group
from outliner. To fix this, remove the layer specific condition.
Also renamed the function for clarity.

Pull Request: https://projects.blender.org/blender/blender/pulls/121970
2024-05-24 16:22:56 +02:00
Falk David
fc2c078322 GPv3: Consider layer transform in radius_from_input_sample
The `radius_from_input_sample` function did not depend
on the layer transformation. This refactors the code a bit
and makes sure we use the right `to_world` matrix for the
transformation.
2024-05-24 16:01:34 +02:00
Clément Foucault
d15ce8dff5 Fix: EEVEE-Next: Displacement doesn't affect normal map node
While this might not always be the expected behavior,
this at least make it consistent with Cycles.

Fix #122184
Rel #122212
2024-05-24 15:35:51 +02:00
Jeroen Bakker
e5680542aa GPU: Fix GPUStateMutable size
Current size was to big (9X64 bits) when only (3X64 bits) were
needed.

Pull Request: https://projects.blender.org/blender/blender/pulls/122214
2024-05-24 15:19:59 +02:00
Nathan Vegdahl
ec0a3e966c Refactor: Anim: make insert_key_rna() take RNAPath's instead of strings
This allows each path to optionally specify a single array index,
enabling `insert_key_rna()` to optionally insert keys for just a single
element of an array property. This will allow us to use it in more
places, and eventually reduce the total number of keying functions
needed in the code base.

PR #121879

Pull Request: https://projects.blender.org/blender/blender/pulls/121879
2024-05-24 15:06:21 +02:00
Nathan Vegdahl
8c9c88d70c RNA: add RNAPath type for conveniently storing and passing rna paths
This new type was initially motivated by a use case in the animation
code, where we want to pass RNA paths around as a string-index pair.
The final design was reached after discussion and review from Bastien
Montagne (mont29), with the aim of making the type generally useful for
many areas of Blender.

PR #121879
2024-05-24 15:06:19 +02:00
Campbell Barton
b1d98014a0 UI: replace URL icon with INTERNET for extension repository location
These aren't clickable links so the URL icon wasn't correct.
2024-05-24 22:45:02 +10:00
Campbell Barton
ae73c8aa25 UI: order "Network" after "OS Settings" in the System preferences
With the default window size this panel wasn't visible making it more
difficult to discover. Reorder since this is essential for enabling
extensions.
2024-05-24 22:45:02 +10:00
Bastien Montagne
b8a8a97440 RNA: ImageUser path: Add generic 'unresovled' for Screen-owned cases.
E.g. the Image editor can have such an ImageUser data. Ref. #122163.
2024-05-24 14:39:11 +02:00
Julien Duroure
5bf160818f glTF exporter: Cleanup: quiet warning for debug builds on startup 2024-05-24 14:33:16 +02:00
Jeroen Bakker
b6002872a1 Vulkan: Optional device extensions maintenance 4
When VK_EXT_maintenance4 extension is used at device creation its
extension should also be part of the device extension list.

This wasn't the case and would trigger UB in the validation layers.

Pull Request: https://projects.blender.org/blender/blender/pulls/122208
2024-05-24 13:39:04 +02:00
Jason Fielder
81a1570cf5 EEVEE Next: Add imageStore/LoadFast ops to Raytrace passes
Add fast image writing and reading variants for RT passes.
These variants do not perform range checking on values
and should only be used in cases where the written texel is
guaranteed to be in range. This eliminates additional
branching and simplifies shader logic.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/121117
2024-05-24 12:51:21 +02:00
Jason Fielder
f20ad70c08 EEVEE Next: Add imageStore/LoadFast ops to Renderpasses
Add fast image writing and reading variants for render passes.
These variants do not perform range checking on values
and should only be used in cases where the written texel is
guaranteed to be in range. This eliminates additional
branching and simplifies shader logic.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/121116
2024-05-24 12:41:47 +02:00
Jeroen Bakker
94e2880dfb GPU: Fix use after free in draw tests
Pull Request: https://projects.blender.org/blender/blender/pulls/122201
2024-05-24 12:36:30 +02:00
Falk David
d960b922b3 Fix #122151: Undo crash in edit mode if active node is group
This was caused by 8d8d358196f86b7acc7dec1c2580f171b08d0827
(changed the active layer to be an active node)
which overlooked the undo code.

This makes sure we save the name of the active node
in each undo step and set the active node based on this
name when decoding a step.

Pull Request: https://projects.blender.org/blender/blender/pulls/122195
2024-05-24 11:39:42 +02:00
Iliya Katueshenock
788b34649e Nodes: improve tooltip for extend-sockets
Display descriptive tooltip for this socket function in any editor.
In case of geometry nodes, there is no point to display info about
lack of value, so cleanup this.

Pull Request: https://projects.blender.org/blender/blender/pulls/121798
2024-05-24 11:39:08 +02:00
Bastien Montagne
ef8fe6a4ab Fix #122189: Unused IDs with 'extra' usages not shown in Unused Outliner view.
The only ID usages that make it a 'used' ID are its own 'fake user'
flag, and normal refcounting usages from other IDs.

This was already the behavior of the Purge operation, but the Outliner
view would still hide IDs who were only used by shallow 'extra' usages
(typically the UI, e.g. the Image Editor).
2024-05-24 11:32:42 +02:00
Bastien Montagne
63e2124aa9 Core: ID usercount macros: Add ID_REFCOUNTING_USERS.
This new macro return the actual usercount due to refcounting normal
usages of the ID.

Also document all of these 'amount of users' ID macros.
2024-05-24 11:32:42 +02:00
Falk David
4e60b96e87 Fix: GPv3: Crash in draw mode when group is active
Hovering the mouse over the 3D viewport while a layer group
was active would cause a crash if the brush radius unit was `Scene`.

This was because the `DrawingPlacement` helper expected a
layer to be passed to the constructor.

Since it's not always the case that there is an active layer, this
change makes sure that we fallback to "object space" in
the drawing placement.
2024-05-24 11:17:13 +02:00
Falk David
f011d8f508 Fix #122159: GPv3: Missing update after selecting frames in multiframe edit
The `ANIM_animdata_update` wasn't handling the GPv3 cases.
This meant that e.g. changing the selection of keyframes did not
cause an update to be triggered.

This fixes the issue by making sure we call `ANIM_list_elem_update`
for all the grease pencil channel types.

Pull Request: https://projects.blender.org/blender/blender/pulls/122167
2024-05-24 10:30:26 +02:00
Julien Duroure
4aadff7e97 glTF exporter: Fix retrieving attribute after recent merged 2024-05-24 10:22:40 +02:00
Sergey Sharybin
a7793a871b Libs: Enable threads support for FFTW library
It originally came from the Compositor work about optimizing Glare
node (#121653), but it might be used in more places later as well.

This PR only contains changes to the build system, the library
itself needs to be re-compiled.

Ref #118455

Pull Request: https://projects.blender.org/blender/blender/pulls/121816
2024-05-24 10:08:14 +02:00
Bastien Montagne
7f1a8f9956 Fix #122162: GPv3: always clamp stroke thickness to positive values for drawing.
While having negative values in the data itself seems fine (at least
there is nothing in the design forbidding it, and it was also allowed in
GPv2 data), drawing code should only accept positive values, and clamp
negative ones to zero:
  * It matches GPv2 behavior.
  * Drawing code uses negative values as some sort of 'flag' for
    rounded tips of strokes.

Note: This is a follow-up of !120840.

Co-authored-by: Falk David <falk@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/122173
2024-05-24 10:02:59 +02:00
Sergey Sharybin
6f560f8f09 Fix compilation error after recent changes in screen 2024-05-24 09:41:39 +02:00
Julien Duroure
0f0a8df8a9 glTF exporter: Option to export VC even if not used in node tree
glTF specification says that VC must be used as a base color multiplier, so you should add it to your node tree to see it.
But seems common usage of VC is to use it for custom data. Custom properties/attribute is the best place for these data,
but in order not to break production workflow/pipeline, we add an option to export active VC
2024-05-24 09:36:14 +02:00
Julien Duroure
d80a1dd5f8 glTF exporter: Fix exporter both VertexColor & colorFactor in the same time 2024-05-24 09:32:42 +02:00
Julien Duroure
f8b8a1a5b6 glTF exporter: cleanup user warnings 2024-05-24 09:30:37 +02:00
Julien Duroure
ac97907841 glTF exporter: Fix UVMap export when is set from an attribute node 2024-05-24 09:28:53 +02:00
Julien Duroure
a71027d37f glTF exporter: UDIM for merged channel textures
Was never implemented
2024-05-24 09:26:27 +02:00
Julien Duroure
c297a9513e glTF exporter: Fix material check on evaluated data 2024-05-24 09:23:36 +02:00
Julien Duroure
be96d5144a glTF exporter: Instanced collection can have regular children 2024-05-24 09:21:43 +02:00
Julien Duroure
f86fe707ce glTF exporter: Fix merge after extra anim feature merge 2024-05-24 09:19:36 +02:00
Julien Duroure
c9daea2d5b glTF exporter: Fix typo in socket name 2024-05-24 09:17:41 +02:00
Julien Duroure
5789031072 glTF exporter: fix invalid escape sequence 2024-05-24 09:15:13 +02:00
Campbell Barton
4f73df2b7b Extensions: enable extensions.blender.org, adjust welcome screen
Splash screen notification text:

- When starting in "Offline mode" with repositories with installed
  packages enabled, the text is clickable unless launched with
  `--offline-mode`, the tooltip notes that the command line setting
  can't be changed at run-time.
- Don's show anything if there are not extensions installed.

Preferences:

- Don't show the welcome message on preferences if:
  - Blender is online.
  - The message was dismissed.
  - There are no enabled remote repositories.

- The option to enable extensions.blender.org has been replaced with
  a button that switches to the "System" tab where Online Access
  can be enabled.

Also expose bpy.app.online_access_override needed for the UI to check
if online access was disabled using command line arguments.
2024-05-24 16:51:36 +10:00
Campbell Barton
91cab8f992 Extensions: remove use of BaseException
This can cause unexpected behavior, even in cases where SystemExit
or KeyboardInterrupt needs to be caught, it's better to list them
explicitly.
2024-05-24 16:16:55 +10:00
Campbell Barton
7f0903fdbf Fix scandir always shown an error
Incorrect use of BaseException meant the generator finishing
would print as an error
2024-05-24 16:16:55 +10:00
Omar Emara
6ae98e43a9 Fix #122070: Crash when calling python render method
Blender crashes when calling the python render operator when GPU
compositor execution is enabled. This is due to a missing system GPU
context, which is not initialized for blocking rendering. So this patch
ensures the system GPU context before compositing. Additionally, it
removes the assert that ensures a non main thread execution, since the
assumption apparently does not really hold.

Pull Request: https://projects.blender.org/blender/blender/pulls/122176
2024-05-24 07:58:39 +02:00
Jesse Yurkovich
1f243f1d36 Cleanup: fix -Wpessimizing-move warning in GHOST_XrGraphicsBinding 2024-05-24 07:28:55 +02:00
Campbell Barton
ad09b175f9 Extensions: only check updates for repos that have packages installed 2024-05-24 14:08:34 +10:00
Campbell Barton
61e4d1818e Cleanup: follow operator callback & argument naming 2024-05-24 14:08:33 +10:00
Campbell Barton
1831e2579a Cleanup: prefix return arguments with "r_" 2024-05-24 14:08:32 +10:00