Commit Graph

109238 Commits

Author SHA1 Message Date
Jason Fielder
e97e06ea2c Metal: Re-enable loadstore config for EEVEE Next framebuffer
A previous PR resolved the loadstore config setup on bind, so
we can now re-enable load-store config with clearing of the
header texture via render pass.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/121610
2024-05-09 11:27:37 +02:00
Omar Emara
b42e973320 Cleanup: Clarify Fog Glow Glare code 2024-05-09 11:44:21 +03:00
Campbell Barton
742a8b47cd PyAPI: expose the popup region in the context
Expose the region used for a temporary popup to the context so it's
possible for scripts to access the popup-region they're being drawn in.

Note that the internal naming is currently "menu" which is misleading
as these are used for all kinds of dialogs & popups. The RNA member is
called `region_popup` in this commit,
we could consider changing the name internally too.

Needed so it's possible for scripts to access the splash screen
so it can be refreshed, see: #120612.
2024-05-09 12:56:43 +10:00
Campbell Barton
fa27d2fe65 PyAPI: expose Region.tag_refresh_ui
Expose ED_region_tag_refresh_ui to the Python API.
This allows scripts to trigger regions to refresh which was previously
only accessible indirectly (via wmOperatorType::check).

Needed so scripts can make the splash screen refresh using a timer,
see #120612.
2024-05-09 12:50:09 +10:00
Campbell Barton
cdc0d422a0 Cleanup: use capitalized type names for RNA callbacks
Follow surrounding code by capitalizing the type prefix of callbacks.
2024-05-09 12:23:58 +10:00
Campbell Barton
9e481b484e Cleanup: don't use boolean literals to set flag members
This could be renamed as it reads like a boolean but is a flag.
2024-05-09 12:11:46 +10:00
Campbell Barton
38d11482f5 UI: set the context's menu on creation
Set the context menu when first creating the popup,
not only when refreshing it.

Previously `Context::wm::menu` was set when a popups draw function ran
after being tagged RGN_REFRESH_UI, however the first time the draw
function ran this would be null. Ensure this is set in both cases
so logic that requires accessing the popup region can rely on it
being set.

Needed so the splash region is always accessible to implement #120612.
2024-05-09 12:03:21 +10:00
Ahmed Essam
0ca1386426 Fix assert in debug mode when built as Python module
Ref: !121500
2024-05-09 09:51:11 +10:00
Harley Acheson
03cd8b359b UI: Edge Slide Status Display
While using Edge Slide show only changing values in the area header and
only keymap entries on the Status Bar

Pull Request: https://projects.blender.org/blender/blender/pulls/121585
2024-05-09 00:06:31 +02:00
Jacques Lucke
4dfc1ede58 Geometry Nodes: output transform matrix from object info node
This adds a new `Transform` output socket of matrix type to the Object Info node.

This is clearly useful, but we did not do this before for a couple of reasons:
* It's redundant with the location, rotation and scale outputs.
* We might want separate `Object Transform` and `Object Geometry` nodes.

For now just adding the socket is probably useful enough to justify it. Even more
so because it's addition doesn't really block other designs in the future either.

Pull Request: https://projects.blender.org/blender/blender/pulls/121437
2024-05-08 22:03:09 +02:00
Jacques Lucke
f4b9ca758a Nodes: add color tag to node groups
This allows setting a color tag for node groups which affects the header
color of group nodes. With this, node groups can look even more similar
to built-in nodes. The only remaining difference is the node group icon in
the node header.

Blender has quite a few different built-in color tags. Most of those are
exposed with very few exceptions. For example, the layout, interface
and pattern categories are not exposed because they are only for built-in
nodes or are not used anymore.

It's generally agreed upon that the set of different color tags is likely too
large. Some differences between color make more sense in some contexts
than in others. In the interest of consistency, it was decided to expose all
these categories anyway. If we ever decide to consolidate them, the worst
that can happen is that a group looses it's category, which wouldn't be too bad.

Pull Request: https://projects.blender.org/blender/blender/pulls/121385
2024-05-08 22:00:35 +02:00
Clément Foucault
7859e0f606 EEVEE-Next: Rename engines and set it default in startup file
Finally.

Pull Request: https://projects.blender.org/blender/blender/pulls/121592
2024-05-08 20:57:00 +02:00
Jacques Lucke
2f289857af Object: add Shade Auto Smooth operator
Based on the design in #120230.
* Replaces the `Shade Smooth by Angle` operator with `Shade Auto Smooth`
  in the object context menu menu.
* The new operator automatically adds and removes the modifier instead
  of being a destructive operation.
* The `Shade Smooth` and `Shade Flat` operators now remove the
  `Smooth by Angle` modifier automatically.
* Add a pin option to modifiers, which limits dragging and keeps the
  modifier after newly added modifiers in the list.

Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/121494
2024-05-08 20:24:10 +02:00
Clément Foucault
b619c1d13a EEVEE-Next: Subsurface indirect lighting for probe only lighting
This avoid black subsurface if only the world is lighting it.
This isn't yet supported when raytracing is on but then
the diffuse reflections are also working.
2024-05-08 20:10:23 +02:00
Charles Wardlaw
2415380061 USD Export: Adding the ability to choose Stage Up Axis at export time.
This patch allows the user to choose the Stage Up Axis at export time,
allowing the export to match another target software package. The most
common is reorienting to Y up. The up axis is written to stage metadata
and a top-level orientation is applied to reorient objects in the Stage.

The new orientation is required because the Stage metadata `upAxis` is,
apparently, not used during certain USD composition arcs. The
recomendation is to only use a single `upAxis` throughout the pipeline
and this option here allows files produced by Blender to more easily
conform to the conventions used as needed.

Co-authored-by: Charles Wardlaw <cwardlaw@nvidia.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/121226
2024-05-08 19:56:52 +02:00
Clément Foucault
8b626c2d79 Fix: EEVEE-Next: Broken punctual shadows lod bias
Broken by be1f527cb4
2024-05-08 19:35:10 +02:00
Clément Foucault
c36f09e7f7 Fix: EEVEE-Next: Volume probe data clipping not starting from 0 2024-05-08 19:06:29 +02:00
Clément Foucault
96ee9e8044 EEVEE-Next: Display surfel density cube
Allows feedback on what is the density without
resorting to show the currently debug only
surfel visualization.
2024-05-08 19:05:51 +02:00
Clément Foucault
d9945a218f Fix: EEVEE-Next: Wrong minimum value for volume probe surfel density 2024-05-08 18:55:07 +02:00
Clément Foucault
0e4e05ec97 EEVEE-Next: Make volume light-probe surfel density scale dependant
This avoids wrong default values and make setup easier.

This changes the RNA and DNA to create a new nice default
depending on resolution.
2024-05-08 18:22:44 +02:00
YimingWu
a987fac1a3 Fix #121548: Use evaluated object for local view
Object with deformations will have different boundbox, this fix made
local view respect the deformation.

Pull Request: https://projects.blender.org/blender/blender/pulls/121552
2024-05-08 18:13:00 +02:00
Harley Acheson
5aa996e49f UI: Knife Tool Missing Iface for Pan View
Knife Tool status bar display is missing translation of "Pan View".

Pull Request: https://projects.blender.org/blender/blender/pulls/121581
2024-05-08 17:14:59 +02:00
Falk David
9a3abe22a3 Refactor: GPv3: legacy_gpencil_to_grease_pencil
This is part of #121565.

Refactors `legacy_gpencil_to_grease_pencil` to use
`GreasePencil::insert_frame` instead of manually creating
the drawing array.

Now `legacy_gpencil_frame_to_grease_pencil_drawing`
actually returns a drawing by value.

Note: This means that we're now resizing the drawing
array for every frame in every layer, but this can be optimized
later.
2024-05-08 17:10:08 +02:00
Sergey Sharybin
149e547de6 Compositor: Remove quality setting from DNA and UI
It was meant to be included into the previous commit in the area,
but was forgotten due to some technicalities.

Also remove the DisplaceSimpleOperation, which is now not used.

Pull Request: https://projects.blender.org/blender/blender/pulls/121580
2024-05-08 16:56:32 +02:00
Falk David
fea091e18e Refactor: GPv3: insert_blank_frame
This is part of #121565.

Renames the `insert_blank_frame` function to `insert_frame`.

Instead of returning a boolean for if the keyframe was created,
return a pointer to the drawing. This aligns more with how
we're using this API. After inserting a keyframe, it's common
to then e.g. write to the newly created drawing.

Also use sensible default parameter values for the duration
(default = implicit hold) and the keyframe type
(dafault = `BEZT_KEYTYPE_KEYFRAME`).

With this change, we're moving closer to the goal of
only allowing to create drawings by creating keyframes.
2024-05-08 16:47:46 +02:00
Sergey Sharybin
9532ea3f8c Compositor: Remove Render/Edit Quality setting
The setting was only affecting some of the blur operations, which
does not typically results in a measurable performance boost in real
compositor setups.

For the simplicity of settings on user level remove setting which
potentially makes compositor output worse, without much benefit.

There are better ways to gain performance, like compositing on a
lower resolution, exposing "preview" as an input to the node tree
(similar to the geometry nodes) etc.

Pull Request: https://projects.blender.org/blender/blender/pulls/121576
2024-05-08 16:41:23 +02:00
Falk David
a3c9baacae Cleanup: GPv3: Remove drawing_index parameter from Layer::add_frame
This is part of #121565.
Since the function `Layer::add_frame` returns the `GreasePencilFrame`,
the `drawing_index` can be assigned after it's created.

This brings us a bit closer to the goal of only changing drawing indices
of frames in the internal API.
2024-05-08 15:41:21 +02:00
Campbell Barton
41efa30a75 Fix failure to catch errors parsing arguments to Context.temp_override
Resolve unhandled exception when invalid types for StructRNA arguments
were passed to temp_override(..).
2024-05-08 23:37:22 +10:00
Clément Foucault
ad6e553ad8 Fix: EEVEE-Next: Wrong pixel radius calculation for LIGHT_SUN_ORTHO
Fix #121388
2024-05-08 15:24:40 +02:00
Sergey Sharybin
525f3e6fbb Cleanup: strict compiler warnings
Fixes compilation warning about unused lambda capture.

Pull Request: https://projects.blender.org/blender/blender/pulls/121573
2024-05-08 14:55:05 +02:00
Sergey Sharybin
6db8091f45 Compositor: Remove Two Pass option
There are few issues with the logic and implementation of this option:

- While the first pass is faster in the terms of a wall-clock time, it
  is often not giving usable results to artists, as the final look of
  the result is so much different from what it is expected to be.

- It is not supported by the GPU compositor.

- It is based on some static rules based on the node type, rather than
  on the apparent computational complexity.

The performance settings are planned to be moved to the RenderData, and
it is unideal to carry on such limited functionality to more places. There
are better approaches to quickly provide approximated results, which we can
look into later.

Pull Request: https://projects.blender.org/blender/blender/pulls/121558
2024-05-08 14:34:11 +02:00
Pratik Borhade
5df1ee46bc GPv3: Add layer inside active layer group
If a layer group is active in properties panel, add the new layer
inside this group.

Pull Request: https://projects.blender.org/blender/blender/pulls/121568
2024-05-08 14:23:09 +02:00
Sebastian Parborg
0e67f060ee Fix: Don't take overlays into account when drawing curves
Previously when drawing curves and using surface project, the strokes
would snap to gizmos like lights and camera objects. This is not what
most people expect when projecting to surface objects, so disable them
from the depth check.

Pull Request: https://projects.blender.org/blender/blender/pulls/121530
2024-05-08 14:04:43 +02:00
Julian Eisel
d3b2906348 UI: Respect fixed layout width in grid view layout calculations
Fixed layout widths would previously be ignored, resulting in incorrectly sized
grid view items. This is especially relevant for displaying grid views in
popups, where these fixed width are commonly used.

Necessary for the brush assets project which adds a popup version of the asset
shelf, see #116337.
2024-05-08 13:36:11 +02:00
Jacques Lucke
25c134fd08 Geometry Nodes: new Axes to Rotation node
This adds a new `Axes to Rotation` node which creates a new rotation.
In many cases, the primary and secondary axis inputs are a normal and
tangent of a mesh or curve. This provides a simpler and more direct way
to create this rotation compared to using two `Align Rotation to Vector` nodes.

This more direct way of computing the rotation also allows us to optimize
the case better.

The node rotates one axis (X, Y or Z) to the given primary axis direction. Then
 it rotates around that primary direction to align the second axis to the given
secondary direction. Ideally, both input axes are orthogonal. However, the node
still creates the "best" rotation when they are not orthogonal. If one or the axes
is zero or both are (close to) parallel, the resulting rotation is unstable. There is
not too much the node can do to make it more stable.

Pull Request: https://projects.blender.org/blender/blender/pulls/104416
2024-05-08 13:34:14 +02:00
Julian Eisel
b7bb0e94a0 UI: Allow displaying grid views in popups
The optimization to only add grid view items to the layout that are actually in
view relied on View2D information on scrolling. Popups don't use View2D, so
with this change the optimization will be skipped when View2D is not used.

Necessary for the brush assets project which adds a popup version of the asset
shelf, see #116337.
2024-05-08 13:30:27 +02:00
Vitaljok
be1f527cb4 EEVEE Next: Fixing sun shadows in ortho camera
Fix #120566 case.

Moved initial `lod_bias` calculations from `Light` struct to
`ShadowDirectional` and `ShadowPunctual` classes to avoid value
runaway during subsequent syncs. Changed internal functions to
use member variable instead of parameters.

Pull Request: https://projects.blender.org/blender/blender/pulls/121541
2024-05-08 13:07:39 +02:00
Campbell Barton
3290e25dc4 Cleanup: spelling in comments & code 2024-05-08 20:57:05 +10:00
Campbell Barton
e64d067c78 Docs: document why the eventstate is cleared while refreshing a popup
Also correct a comments grammar.
2024-05-08 20:44:36 +10:00
Falk David
737572ed88 Cleanup: GPv3: Use GreasePencil::layer function instead of GreasePencil::layers
This also ensures that there is an assert that checks
for valid indices before accessing the span of layers.
2024-05-08 12:35:06 +02:00
Guillermo Venegas
3a640a4707 Fix #121280: clamp layout panel sub-background color to block region
Pull Request: https://projects.blender.org/blender/blender/pulls/121534
2024-05-08 12:32:51 +02:00
Falk David
bba4555526 Refactor: GPv3: Remove get_eval_grease_pencil_layer_drawing* functions
As part of #121565.

To avoid using drawing indices outside of the internal grease pencil API,
this refactor adds the functions `GreasePencil::get_eval_drawing` to replace
the `get_eval_grease_pencil_layer_drawing*` functions.

Pull Request: https://projects.blender.org/blender/blender/pulls/121567
2024-05-08 12:27:40 +02:00
Pratik Borhade
5f1a31c88a GPv3: Change "active" property to "active_layer"
Rename layer property `active` -> `active_layer` to distinguish
between active layer and active layer group.
The active group property was introduced in d1710f7232.

Pull Request: https://projects.blender.org/blender/blender/pulls/121563
2024-05-08 12:18:00 +02:00
Falk David
2707cc28fd GPv3: Add asserts for drawing access by index
Assert that the index is valid before accessing the span.
2024-05-08 12:09:10 +02:00
Jacques Lucke
6176e66636 Nodes: add node group description
This allows node groups to have a description that is shown in the add menu
or when hovering over the node header.

This new description is stored in `bNodeTree.description`. Unfortunately, it
conflicts a bit with `ID.asset_data.description`. The difference is that the latter
only exists for assets. However, it makes sense for node groups to have
descriptions even if they are not assets (just like `static` functions in C++ should
also be able to have comments). In some cases, node groups are also generated
by addons for a specific purpose. Those should still have a description without
being reusable to make it easier to understand for users.

The solution here is to use the asset description if the node group is an asset,
and to use `bNodeTree.description` otherwise. The description is synced
automatically when marking or clearing assets.

A side benefit of this solution is that appended node group assets can keep their
description, which is currently always lost.

Pull Request: https://projects.blender.org/blender/blender/pulls/121334
2024-05-08 11:25:00 +02:00
Aras Pranckevicius
d66598c16f VSE: Text shadow blur / outline
Text strips in VSE got:
- Configurable shadow angle and offset (previously shadow location relative to
  text was fixed). Currently the shadow position is rounded to integer pixel
  locations; sub-pixel positioning might come later.
- Optional shadow blur amount.
- Optional outline, with color and outline width controls. Outline is
  implemented using jump flooding algorithm.

Images and more detail in pull request.

Pull Request: https://projects.blender.org/blender/blender/pulls/121478
2024-05-08 11:13:20 +02:00
Pratik Borhade
d1710f7232 GPv3: Support layer group selection
Introduce new `active_group` pointer and get/set api functions.
Use RNA to change active group in on_activate() function, similar to
layer selection: 4c12801532

Pull Request: https://projects.blender.org/blender/blender/pulls/121524
2024-05-08 09:05:32 +02:00
Harley Acheson
dfe060ea6f UI: Edit Mesh Knife Status Display
While using the knife tool show keymap entries and statuses in a more
informative and concise way.

Pull Request: https://projects.blender.org/blender/blender/pulls/121506
2024-05-07 22:15:12 +02:00
Hans Goudey
ba9286706a Geometry Nodes: Sample Grid Index node
This (experimental, for now) node retrieve's voxel values
at specific voxel indices for a grid input. It's similar to the
Sample Grid node (77cba3d551), but there is
no interpolation, and it uses indices instead of positions.

Pull Request: https://projects.blender.org/blender/blender/pulls/118690
2024-05-07 21:53:22 +02:00
Harley Acheson
42a8947eb1 UI: Edit Mesh Inset Faces Status Display
Show changing values in the area header, but keymap entries on the
Status Bar.

Pull Request: https://projects.blender.org/blender/blender/pulls/121504
2024-05-07 21:45:34 +02:00