Commit Graph

134930 Commits

Author SHA1 Message Date
26c5881cc2 Anim: change experimental flag label & linked issue on Gitea
Changed the experimental flag label from "Animation: Project Baklava" to
"New Animation System" to be more self-explanatory. Also I changed the
associated item on project.blender.org to #120406, which tracks the work
that is still to be done.
2024-04-08 17:34:11 +02:00
Omar Emara
3a551a859a Compositor: Allow inter-operation canceling
This patch adds support for inter-operation canceling. Though it should
be noted that canceling will actually not take place except in certain
circumstances because operations are already submitted to the GPU by
this point and can't be canceled.

However, for operations that do CPU<->GPU transfers, like OIDN denoise,
which is one of the most expensive operations, this will actually cancel
the evaluation and greatly improve interactivity.

Pull Request: https://projects.blender.org/blender/blender/pulls/119917
2024-04-08 16:23:58 +02:00
Iliya Katueshenock
942ca6be6d Fix #120071: quadratic complexity for dangling reroute check
To know if link is connected to dangling reroute and can be skipped
as value-less, we need to know if reroute is dangling. This requires
graph traversal. Currently this is done by non-recursive iteration.
But this can lead quadratic complexity for some of the cases.
Other way is to make this linear while cache building.

Pull Request: https://projects.blender.org/blender/blender/pulls/120375
2024-04-08 16:19:40 +02:00
Campbell Barton
2b595e7bcc Cleanup: quiet missing-declarations warnings 2024-04-08 21:57:41 +10:00
Pratik Borhade
782d096905 Fix #120374: Knife crashes when displaying measurements
Caused by 7ed02da2bef4b6f174851242e15f9a4ccb2077ba.
`curr.ob_index` is -1 when the ray does not hit any face
(`knife_find_closest_face`). This will lead to crash when mouse
is not over any faces. To avoid crash, use `bvh.ob_index`.

Pull Request: https://projects.blender.org/blender/blender/pulls/120392
2024-04-08 13:31:54 +02:00
Jacques Lucke
936fb7488e Cleanup: move runtime data to Library.runtime
Having a better separation between runtime and non-runtime data makes
it easier to reason about the code.

Pull Request: https://projects.blender.org/blender/blender/pulls/120271
2024-04-08 13:08:36 +02:00
694e5b50f4 Anim: show animated properties with the appropriate color in the GUI
Use the `Animation` data-block to find F-Curves, for drawing the
background color of properties in the GUI (green for 'animated', yellow
for 'keyed on this frame', etc.).

This assumes (correctly) that the `Animation` is limited to a single
layer with a single strip. As such, there is only one set of F-Curves
for every animated ID, which means that the correct F-Curve will be
found. This will need adjustment when the same property can have
multiple F-Curves (due to layers) or when an F-Curve may not be
applicable for each point in time (due to the use of finite strips).

Pull Request: https://projects.blender.org/blender/blender/pulls/118677
2024-04-08 12:53:32 +02:00
631f72265d Anim: add evaluation of Animation data-blocks
Include Animation data-block handling in Blender's animation evaluation
stack. If an `Animation` is assigned to an `ID`, it will take precedence
over the NLA and/or any `Action` that might be assigned as well.

For more info, see #113594.

Pull Request: https://projects.blender.org/blender/blender/pulls/118677
2024-04-08 12:53:32 +02:00
8879654dd0 Anim: allow inserting keys in Animation data-block
Allow inserting keys into Keyframe strips (which is the only type of
strip that is currently implemented).

Note that the data model is currently limited to a single layer, with a
single infinite strip. Because of this, the strip will not be shown in
any UI, as there is no way to manipulate it anyway.

Note that the inserted keys are not yet evaluated, so the animation
isn't visible in the 3D viewport yet. That's for an upcoming commit.

For more info, see #113594.

Pull Request: https://projects.blender.org/blender/blender/pulls/118677
2024-04-08 12:53:32 +02:00
a5d0ae9644 Anim: Add a simple GUI for assigning Animation data-blocks
Add a 'Baklava' panel to the 3D Viewport side-panel. It's a
developer-GUI, not meant for animators (or for inclusion beyond the
experimental feature, for that matter).

Note that this GUI shows all layer properties, even though the data
model is currently limited to a single layer. This means that things
like 'influence' and 'mix mode' are irrelevant, as there is no
underlying layer to mix with.

Also key insertion and animation evaluation are not implemented yet (but
will be in upcoming commits).

For more info, see #113594.

Pull Request: https://projects.blender.org/blender/blender/pulls/118677
2024-04-08 12:53:32 +02:00
13f3a81842 Anim: allow assigning Animation data-blocks
Expand the `AnimData` struct with an `Animation *` + an
`binding_stable_index` field, and properly handle those relations.

This also adds functionality for actually pointing animated IDs to
`Animation` data-blocks, and automatically hooking up the relevant
`Binding`.

The Depsgraph code is extended to take these new relations into account,
but doesn't trigger any animation evaluation yet.

For more info, see #113594.

Pull Request: https://projects.blender.org/blender/blender/pulls/118677
2024-04-08 12:53:32 +02:00
38878b4ac2 Anim: add Animation data-block management functions
Add code (including RNA wrappers) for:

- Creating, removing, and accessing `Animation` data-blocks.
- Creating and removing layers, strips, and bindings on those `Animation`
  data-blocks.
- Accessing those via RNA.

Note that this does not include assignment to any animated data-block,
so it is of limited practical use.

For more info, see #113594.

Pull Request: https://projects.blender.org/blender/blender/pulls/118677
2024-04-08 12:53:32 +02:00
Iliya Katueshenock
f8efd4fad0 Fix #120367: Attach to root panel if new parent is null
If pointer to new parent is null, use pointer to root panel of interface.

Pull Request: https://projects.blender.org/blender/blender/pulls/120369
2024-04-08 12:42:34 +02:00
Sergey Sharybin
040855654f Cycles: Add various light tree tests 2024-04-08 12:22:36 +02:00
Campbell Barton
6b14b67a29 Cleanup: spelling in comments 2024-04-08 16:23:25 +10:00
Campbell Barton
27d8eb25bb Cleanup: pass const arguments in freestyle functions
Also move implementation notes into the funciton body.
2024-04-08 12:03:15 +10:00
Campbell Barton
430d7961a2 Cleanup: remove redundant checks & struct declaration 2024-04-08 12:03:08 +10:00
Campbell Barton
3c183e426a Cleanup: pass const arrays for default boolean arguments 2024-04-08 12:03:05 +10:00
Campbell Barton
bce2cf5f92 Cleanup: use const EnumPropertyItem pointers 2024-04-08 12:03:03 +10:00
Campbell Barton
01187dfc8e GHOST: add missing check for end full-screen failing 2024-04-08 12:03:01 +10:00
Campbell Barton
76c7d1c66b Fix assert in the case of a null library_reference items
Missing return allowed a null return (which asserts) & ignored the
r_free assignment.
2024-04-08 12:03:00 +10:00
Campbell Barton
51fd558be2 cppcheck: suppress noisy output
Some of these could be enabled if there is an interest to consider
them warnings, until then they're noisy and don't often hint at errors
in the code.
2024-04-08 12:02:58 +10:00
Harley Acheson
2d5a83f294 UI: Show Maximize Area on Asset Browser Header Context Menu
On the Header Context Menu, show "Maximize Area" for Asset Browser and
File Browser.

Pull Request: https://projects.blender.org/blender/blender/pulls/118060
2024-04-07 23:03:16 +02:00
Germano Cavalcante
727979c1a8 Fix #120366: Snap to Grid is affected by geometry occlusion
To maintain the previous and more useful behavior, disable the
occlusion test in the snap to gird.
2024-04-07 11:23:55 -03:00
Germano Cavalcante
115a925ffe Fix: Incremental snap not matching grid resolution
Caused by f0479e915f

`t->snap_spatial` is still required for Incremental snap.
2024-04-07 10:26:21 -03:00
Harley Acheson
e5e6aa0bbf UI: Menu Status Text Clears Incorrectly
When we open dropdown (and context) menus we often show "Press spacebar
to search..." or "Type to search..." in the status bar. The status text
is set when menus are opened, and cleared when closed, but this means
that they are cleared when closing a submenu. This PR corrects this to
only clear then the base menu is freed.

Pull Request: https://projects.blender.org/blender/blender/pulls/120351
2024-04-07 03:02:01 +02:00
Lukas Tönne
68060a9ccf GPv3: Implement UV rotation mode for the noise modifier
UV rotation in the noise modifier was a todo since UVs were not
supported yet at the time the modifier was added. This patch adds the
missing UV rotation feature.

Pull Request: https://projects.blender.org/blender/blender/pulls/120336
2024-04-06 14:25:18 +02:00
Lukas Tönne
ee1714136e Fix #119554: Remove links to and from unsupported socket types
#114401 added forward compatibility code to remove unsupported socket
types and avoid crashing with unknown default_value data. However, this
did not update link pointers (which haven't been read at that point),
so the tree can end up with dangling pointers.

To fix this, removal of unsupported sockets is moved further back to a
point where links have been read and can be fixed accordingly.

Ported to main from #119630

Pull Request: https://projects.blender.org/blender/blender/pulls/119650
2024-04-06 11:23:53 +02:00
Hans Goudey
61b28227bb Fix #120309: Remove from Vertex Group operator broken
This check for whether there is vertex group data was mistakenly
reversed in b52a071e7a3a11728821.
2024-04-05 13:41:59 -04:00
Pablo Vazquez
4e90501377 UI: Fix label in Particle System modifier
Fix two issues with the current label:
1. "particle tab" should be "Particles tab" since that's the actual name
    of the tab.
2. "Settings are in..." is inconsistent with similar labels where the
   word used is "inside" instead of "in".

Pull Request: https://projects.blender.org/blender/blender/pulls/120319
2024-04-05 18:50:57 +02:00
Philipp Oeser
0b30cb1929 UI: Clarify Playback "Play In" option
The "Play In" > "Properties Editor" option is not only updating Property
Editors but also the sidebars of other editors (such as the 3DView).

This caused a bit of confusion since we also have "Play In" > "3D
Viewport" (which only updates the 3DView main region but not the
sidebar)

So now call the option "Properties and Sidebars" in the UI ("Editor" has
been stripped to fit the text - but also since the editor is usually
only called "Properties" e.g. in the editor dropdown).

Came up in #120012

Pull Request: https://projects.blender.org/blender/blender/pulls/120305
2024-04-05 18:17:41 +02:00
Sergey Sharybin
958bc91867 Fix #120308: GP3 objects with geonodes renders original data from CLI
The issue was caused by the special code in Cycles which clears object
caches when it thinks they are not needed. We should not free caches of
grease pencils because it is needed later by a separate render engine.

Pull Request: https://projects.blender.org/blender/blender/pulls/120315
2024-04-05 18:13:12 +02:00
Harley Acheson
5bed08fc56 Fix #120133: Incorrect BG color Hovering Inactive
Hovering on inactive menu items combines the colors in a way that does
not work correctly with light themes. This PR changes nothing but how
colors are mixed for hover + inactive, doing so similarly to hovering
active.

Pull Request: https://projects.blender.org/blender/blender/pulls/120262
2024-04-05 18:08:45 +02:00
Clément Foucault
70bd907855 Fix: EEVEE-Next: Broken volume integration shader on Metal 2024-04-05 17:52:59 +02:00
Omar Emara
15e8159cbd Compositor: Update test for GPU Vector Blur node 2024-04-05 17:20:18 +02:00
Clément Foucault
4a7e98be40 EEVEE-Next: Volume: Fragment shader voxelization
This replaces the compute shader pass for volume material properties
voxelization by a fragment shader that is run only once per pixel.
The fragment shader then execute the nodetree in a loop for each
individual froxel.

The motivations are:
- faster evaluation of homogenous materials: can evaluate nodetree
  once and fast write the properties for all froxel in a loop.
  This matches cycles homogenous material optimization (except that
  it only considers the first hit).
- no invocations for empty froxels: not restricted to box dispach.
- support for more than one material: invocations are per pixel.
- cleaner implementation (no compute shader specific paths).

Implementation wise, this is done by adding a stencil texture when
rendering volumetric objects. It is populated during the occupancy
phase but it is not directly used (the stencil test is enabled but
since we use `imageAtomic` to set the occupancy bits, the fragment
shader is forced to be run). The early depth-test is then turned
on for the material properties pass, allowing only one fragment to
be invoked.
This fragment runs the nodetree at the desired frequency: once per
direction (homogenous), or once per froxel (heterogenous).

Note that I tried to use the frontmost fragment using a depth equal
test but it was failing for some reason on Apple silicon producing
flickering artifacts. We might reconsider this frontmost fragment
approach later since the result is now face order dependant when
an object has multiple materials.

Pull Request: https://projects.blender.org/blender/blender/pulls/119439
2024-04-05 16:33:58 +02:00
Philipp Oeser
5f23e0fa8d Fix #120012: 3D Viewport sidebar not updating when playback stops
Since d8388ef36a1d, updates were missing after stopping playback.
As a followup, c774cc0cc097 added a notifier which we can also listen to
from the sidebar.

Pull Request: https://projects.blender.org/blender/blender/pulls/120300
2024-04-05 16:26:27 +02:00
Philipp Oeser
bdf11c7344 Fix #120211: Dynamic paint surface format change resets surface type too
There is no need to reset this since most types are supported for both
formats:
- if format is image sequence: `Paint`, `Displace`, `Waves` are
supported
- if format is vertex: `Paint`, `Displace`, `Weight`, `Waves` are
supported

So the only combination that needs a reset is when we change from vertex
format (weight type) to image sequence.

Pull Request: https://projects.blender.org/blender/blender/pulls/120248
2024-04-05 16:25:50 +02:00
Julian Eisel
3e71cec988 Fix slightly increased layout height for tree-view item rows
Since 427bdc8dcf there is some trickery going on to make the underlying
view-item button slightly bigger, but that unintentionally also scaled
up the layout drawn on top of it. This would be visible whenever the
background is drawn, e.g. by using a different emboss type or when an
animated property was displayed.
2024-04-05 16:15:03 +02:00
Pratik Borhade
129d5a1067 Fix #120278: Anim properties are not highlighted in tree view
Animation state of any property is not colored in tree-view structure.
This is due to wrong emboss value. `widget_color_blend_from_flags`
returns correct theme value if emboss is not `UI_EMBOSS_NONE`.

`UI_EMBOSS_NONE_OR_STATUS` is preferred for animating properties.

Pull Request: https://projects.blender.org/blender/blender/pulls/120298
2024-04-05 16:13:04 +02:00
Jacques Lucke
619ab92c77 Cleanup: quiet warning 2024-04-05 15:38:49 +02:00
Falk David
1c0a278abd Fix: GPv3: Crash on conversion
This was introduced by d7230516c142af522bd4ae94bff0c89c2d02b30c.
The wrong API was used.
2024-04-05 15:34:26 +02:00
Falk David
d7230516c1 Cleanup: GPv3: Add drawing API for fill color
This adds two functions to the `Drawing` class: `fill_colors()`
and `fill_colors_for_write()`.
In places where the attribute API was used directly, these
functions are now used instead.

This is part of #119080. The point is that developers
shouldn't need to remember the name, type, default value,
and domain of built-in attributes (e.g. used by the renderer).

Pull Request: https://projects.blender.org/blender/blender/pulls/120296
2024-04-05 15:28:28 +02:00
Omar Emara
50c92c29ef Compositor: Update Fire2 test to be more useful
It relied on the old clipping behavior of the Translate node, so rewrite
the nodes to produce a result similar to the old one.
2024-04-05 15:22:43 +02:00
Hans Goudey
3ed4e51437 Fix #117338: Texture paint sampling broken with modifiers
e64b3c821252fc8707b4 worked to complete a transition started during 2.8
development to avoid dynamically re-evaluating objects outside of the
dependency graph's control. However, that behavior was used to make
sure the original index mapping was available for the texture paint
sample operator.

Conceptually, sampling a texture on an arbitrary evaluated mesh should
not require original indices at all. All we need to know is the UV map
value under the mouse. This commit changes from using GPU index textures
to a BVH tree raycast. This significantly simplifies the code and makes
it work with GPU subdivision too. Though it may be slower to build the
BVH tree, that should be okay because it's cached and only needs to be
built once, and that's something we're want to optimize anyway.

Removing the reliance on original indices also means we could paint
textures on completely procedurally generated meshes, which may be
an interesting feature in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/120259
2024-04-05 14:17:43 +02:00
Jacques Lucke
548df007a5 Curves: add subdivide curves edit mode operator 2024-04-05 13:50:09 +02:00
Jacques Lucke
6c25c66194 Curves: add switch direction edit mode operator 2024-04-05 13:23:22 +02:00
d6863d43da Cleanup: Anim, re-word the explanation of the term 'binding'
Re-word the explanation of 'binding', as the old explanation was still
based on the old name 'output'.

No functional changes.
2024-04-05 12:45:26 +02:00
85d77b79a6 Refactor: Anim, use eBezTriple_KeyframeType in more code
Instead of using `short key_type`, use `eBezTriple_KeyframeType key_type`,
so that it's clear which type it is, and so that a `switch()` can cause
compiler warnings when it's incomplete.

This also adds missing `case`s to `switch`es where necessary, in a way
that doesn't affect the outcome. There is one change that looks like it
is a functional change, but it should provide the same result:

```diff
- size -= 0.8f * key_type;
+ size *= 0.8f;
```

Since `size = 12` and in this case `key_type = 3`, the numerical values
are the same, but now the code is consistently multiplying and thus should
scale properly.

Furthermore some overly obvious comments are removed and some missing
`const` keywords have been added.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/120178
2024-04-05 11:53:57 +02:00
Campbell Barton
ea567c76ec Unbreak build WITH_GPU_BUILDTIME_SHADER_BUILD
This was valid C++ but not GLSL.

Own error in a00843d5606a659489e83fdd0fe4d738f3047.
2024-04-05 19:27:46 +11:00