Commit Graph

136765 Commits

Author SHA1 Message Date
Alaska
03d09a35c8 Issue template: Add guidelines surrounding content restrictions
Add information surrounding content restrictions to issue template.

Pull Request: https://projects.blender.org/blender/blender/pulls/122492
2024-05-31 17:22:07 +02:00
Jacques Lucke
5a43eb0cbc Add-ons: make node wrangler a core add-on
Making node wrangler a core add-ons means that it will ship with Blender, but it still has to be enabled explicitly. It won't be available on the extensions platform anymore.

We'll still continue to move parts of its functionality out of the add-on into default Blender. However, that takes a little bit longer, because we need to go over the design and code quality in more detail first. Once, the most important functionality (#121749) is merged, the remaining node wrangler features can be put on the extensions platform.

Ref !122557
2024-05-31 16:53:26 +02:00
Bastien Montagne
8501472c81 install_linux_packages: Update some lib versions for 4.2 release.
* OpenEXR: 3.2.4
* OIIO: 2.5.11
* USD: 24.05
* Embree: 4.3.2
* OIDN: 2.3.0
* Level Zero: 1.16.1.

Ref. #118455
2024-05-31 16:34:49 +02:00
Lukas Tönne
b588daa68b Fix #122538: crash calling curves_copy_point_selection with empty selection
This is accessing curve offsets, which don't have entries for empty
geometry.

Pull Request: https://projects.blender.org/blender/blender/pulls/122499
2024-05-31 16:24:35 +02:00
Jacques Lucke
28cef56ad2 Geometry Nodes: support capturing multiple attributes at once
By capturing multiple attributes with one node, the user can make sure that those
are evaluated together in the same context. This can be quite a bit more efficient
compared to capturing multiple fields separately (also because we don't optimize
grouping multiple capture nodes together yet).

The change is fully backward compatible. Forward compatibility has been added
for some cases. Especially, files created in older versions that are saved with this
newer version will still work in the older version.

Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/121665
2024-05-31 16:23:31 +02:00
Brecht Van Lommel
d568abea62 Extensions: Install From Disk operator handling both legacy and new
When a user has downloaded an add-on as a zip file, it's not clear in
advance if this is a legacy add-on or a new extension. So they would
have to use trial and error, or inspect the zip file contents.

This uses a simple heuristic to check if the file is a legacy add-on,
and if so automatically calls the legacy operator instead.

The operator now show both extension and legacy add-on properties,
with the latter in a default collapsed subpanel.

Pull Request: https://projects.blender.org/blender/blender/pulls/121926
2024-05-31 16:22:08 +02:00
Clément Foucault
62bfb3623d DRW: Invalid clip data if view is from planar reflection
The plane and corner extraction code was just not correct.

Fix #122067
Pull Request: https://projects.blender.org/blender/blender/pulls/122516
2024-05-31 16:15:52 +02:00
Sergey Sharybin
5f11ae70ea Fix: Cycles is not responsive to cancel render in complex scenes
In some of the complex scenes it could a very long time for Cycles
to respond to cancel request. This is because Cycles only cancels
render at a consistent state of render buffer: when all scheduled
samples are rendered.

This was caused by the render scheduler over-scheduling the number
of samples in an attempt to improve occupancy of the GPU.

This fix makes it so the scheduler only compensates for the low
occupancy if rendering can happen within a desired update time.

There is no visible difference in the benchmark scenes with this
change.

Pull Request: https://projects.blender.org/blender/blender/pulls/122543
2024-05-31 15:54:14 +02:00
Sergey Sharybin
c4d413fdad Fix: Cycles assert when having volumes and objects with displacement
Delay calculation of volume step until bounds are known, avoiding access
to non-valid bounds and fixing assert in debug builds.

This seems to be an oversight from the #121042

Pull Request: https://projects.blender.org/blender/blender/pulls/122549
2024-05-31 15:53:12 +02:00
Alaska
42581be240 Update bug report template version info
Pull Request: https://projects.blender.org/blender/blender/pulls/122462
2024-05-31 15:47:02 +02:00
Campbell Barton
a21f75d04d Extensions: improve checks for packages to upgrade
- All remote repositories are included in the check for outdated
  packages, the check-for-updates setting is only used to sync with
  the remote before checking for outdated packages.
- Defer checking for repositories to notify until after Blender
  has opened since checking for installed packages & outdated
  repositories could add some noticeable overhead.
2024-05-31 23:26:28 +10:00
Omar Emara
1c315c62d2 Fix: Crash when duplicating node editor
Blender crashes when duplicating a node editor with an active
compositor session. That's because the runtime data of the editor is
nullptr upon duplication. This is a regression in 51a7961e09, where the
runtime data was set to nullptr upon duplication, while it should be
assigned a newly allocated structure or duplicate the existing
structure. To fix this, we do the former and allocate a new structure
because that's what the developer intended in the original patch.

The crash is rare and went unnoticed because the runtime data is
initialized in the init method as well, which typically gets called
quickly right after the area is duplicated.

Pull Request: https://projects.blender.org/blender/blender/pulls/122506
2024-05-31 15:22:21 +02:00
Pratik Borhade
c80e30684c GPv3: Lock material layer property
This ports the `lock_material` layer property to GPv3.
For this, the `layer_index` is also required in `retrieve_editable_points`
and `retrieve_editable_strokes` to choose strokes based on
the `lock_material` property.
In `retrieve_editable_elements` we now pass the `MutableDrawingInfo`
to get both the `drawing` and `layer_index`.

Pull Request: https://projects.blender.org/blender/blender/pulls/119913
2024-05-31 15:13:35 +02:00
Dalai Felinto
26d7fb3df3 UI: Extensions: Status bar offline not showing if updates were available
How to reproduce it:
* Launch Blender
* Make sure there are updates available
* Disable "Allow Online Access"

The offline icon would not show on the status bar.
2024-05-31 14:40:14 +02:00
Dalai Felinto
96424cd2a5 UI: Extensions: Fix status bar
* Show offline icon when offline.
* Don't show the vertical split when there are no updates (since we
  don't draw any information in this case.

Reviewed by Campbell Barton.

Ref !122548
2024-05-31 14:33:21 +02:00
Campbell Barton
fd4a69660b Correct sub-version check for status bar update flag 2024-05-31 21:46:55 +10:00
Campbell Barton
8bd3be2160 Extensions: show extension updates in the status bar
Move extension update display from the splash screen to the status bar.
Based on !122413 with minor changes & removal of splash text.

Co-authored-by: Harley Acheson <harley.acheson@gmail.com>
2024-05-31 21:37:37 +10:00
Dalai Felinto
40b882437e Extensions: Use the INTERNET_OFFLINE icon for the offline mode message 2024-05-31 13:07:41 +02:00
Dalai Felinto
711b722ec1 Extensions: Fix missing operator
This was probably borked during one of the recent renames.
To reproduce the original issue:

* Go to Preferences > Extensions
* Check the console:

rna_uiItemO: unknown operator 'extensions.show_online_prefs'
4.2/scripts/addons_core/bl_pkg/bl_extension_ui.py:354
2024-05-31 13:06:29 +02:00
Iliya Katushenock
fb6b9092a7 Geometry Nodes: new Instance Transform attribute input node
New node to access `instance_transform` built-in attribute of instances.

Pull Request: https://projects.blender.org/blender/blender/pulls/122477
2024-05-31 12:55:40 +02:00
Falk David
a8d395388d Cleanup: GPv3: Remove uses of layers.first_index
Remove uses of `GreasePencil::layers().first_index(...)`.
Use `GreasePencil::get_layer_index` instead.
2024-05-31 12:28:18 +02:00
Sergey Sharybin
1a9db9992a Fix #122451: Crash on animated viewport visibility + animated mesh positions
Move the bounding box synchronization to the geometry evaluation component.
This way it is ensured that it is only done when the geometry is actually
evaluated, solving the problem of accessing stale data when object level
flags are modified.

Pull Request: https://projects.blender.org/blender/blender/pulls/122509
2024-05-31 11:51:36 +02:00
Sergey Sharybin
6359464507 Fix #122263: Pause Preview icon does not update
Happens when opening a file saved file with preview paused.
This fix covers the typical use-case when the property is modified
from the space it comes from.

Pull Request: https://projects.blender.org/blender/blender/pulls/122502
2024-05-31 11:46:15 +02:00
Jacques Lucke
ee8e195946 Nodes: allow identifier lookup in nodes which use dynamic declarations now
This check was added for 4.0 where we knew that some identifiers will change soon.
Now those identifiers have changed (mostly as part of 8149678d5e1d6e0d00668c3),
so it's ok to support identifier lookup now.
2024-05-31 11:00:16 +02:00
Bastien Montagne
dd3222d2f8 BLI math: Do not use BLI_ASSERT_ C-style checks in modern cpp code.
The old C-style `BLI_ASSERT_UNIT_V...` assert macros have a few issues:
* They are named `unit`, but also consider a zero-length vector as valid.
* They use a fairly high epsilon value, which was defined because
  vertex normals used to be stored as shorts.

Fortunately, these are used only in one place in the modern BLI_math C++
code AFAICS, which is `math::rotate_direction_around_axis`.

This commit adds some utils to check for vectors being (almost) unit
or zero length, using more modern bases for epsilon values (from
`std::numeric_limits`).
* `is_zero` keeps its existing default arror of `0` (i.e. strictly null
  vector by default). That way, current behavior is not changed, and in
  most cases null vectors are explicitely created as exactly null.
* `is_unit` uses a default 10 times the type's epsilon, as a zero
  epsilon would virtually never succeed here.

And it modifies `rotate_direction_around_axis` to:
* Assert that `axis` is a unit vector.
* Early-out in case given `direction` is a null vector, or rotating
  angle is zero.
* Assert about `direction` being a unit vector otherwise.

Note that this will make `rotate_direction_around_axis` use much
stricter epsilon error factors. This does not seem to affect any of the
files that triggered asserts prior to recent fix in e18dd894b8 though.

Pull Request: https://projects.blender.org/blender/blender/pulls/122482
2024-05-31 10:58:19 +02:00
Campbell Barton
43a47f39f9 UI: always show text on the splash when running in offline mode
see #119521
2024-05-31 18:47:15 +10:00
Jesse Yurkovich
dce293b62f Fix unreported: wrong serialization of Quaternion during bake
The `w` field is first in the struct.

Pull Request: https://projects.blender.org/blender/blender/pulls/122530
2024-05-31 09:17:16 +02:00
Campbell Barton
e771ea3d98 Fix use of uninitialized stack memory when registering a Macro
The draw callback could be assigned even when it's not in the Python
class.
2024-05-31 15:26:39 +10:00
Campbell Barton
494686b29f Fix potential dangling reference errors 2024-05-31 13:41:11 +10:00
YimingWu
dc69abcb70 Fix #122503: GPv3: Always Initialize vertex_color_ when drawing
Lack of initialization of `vertex_color_` will cause garbled color to
show up in later interpolated points while drawing in material mode with
curves already have `vertex_color` attribute. Now fixed.

Pull Request: https://projects.blender.org/blender/blender/pulls/122528
2024-05-31 04:51:55 +02:00
Campbell Barton
eb59a7f574 Cleanup: correct incorrect internal naming of URL params/query
The "query" component of the URL was misnamed "params".
2024-05-31 11:17:58 +10:00
Campbell Barton
d3850b329c Fix dropping extension URL's failing to match local URL's
Dropping an extensions into Blender would was not finding the meta-data
because the recently added parameter caused the URL lookup to fail.
2024-05-31 11:00:20 +10:00
Campbell Barton
24abd35d14 Extensions: use "extensions" category for operator
Replace use of "bl_pkg" operator category with "extensions",
this naming was used while the functionality was experimental,
not intended to be used once extensions was moved out of experimental.
2024-05-31 10:32:01 +10:00
Campbell Barton
7b8cfc862f Cleanup: correct typo in variable name 2024-05-31 10:32:00 +10:00
Sean Kim
af195f91c2 Cleanup: Remove accidentially added constexpr qualifier
It doesn't hurt, but it doesn't really provide any benefit either
to how we use the value in the code at the moment, so I view it as
kind of misleading, since all the calls here are done at runtime.

Pull Request: https://projects.blender.org/blender/blender/pulls/122419
2024-05-31 02:08:00 +02:00
Harley Acheson
e48eacd672 Fix #122423: Fix Gizmo Map Crash after Area Join
When joining areas, one will be removed which can cause
wm_gizmomaps_handled_modal_update to attempt operation on a region that
is deallocated. This PR just exits if there is no current region.

Pull Request: https://projects.blender.org/blender/blender/pulls/122504
2024-05-30 21:02:02 +02:00
Charles Wardlaw
e1a6749b3d USD: dome light IO
This commit adds logic to convert between USD dome lights and Blender
world materials.

The USD dome light rotation is represented in a mapping node input to the
environment texture.  If the dome light has a color specified in addition to
the texture map, the color will be converted to a vector multiply on the
the environment texture output.

I the imported USD has multiple dome lights, only the first dome light will
be converted to a world material.

Co-authored-by: kiki <charles@skeletalstudios.com>
Co-authored-by: Michael Kowalski <makowalski@nvidia.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/121800
2024-05-30 20:48:43 +02:00
Clément Foucault
3ed825f981 EEVEE-Next: Use RGB9_E5 encoding for storing direct light buffers
The direct lights are usually much smoother and with
higher dynamic range than indirect lighting. Using
the R11B11G10 float format exhibit color shifts and
banding even in simple setups without a way to mitigate
the issue.

Using RGB9_E5 encoding improve the quality while retaining
the storage benefit of 32bit formats. The added overhead
of the software encoding not perceptible in a full lighting
pass.

This affects direct lights and SSS convolution result.

Fix #121937

Pull Request: https://projects.blender.org/blender/blender/pulls/122515
2024-05-30 20:41:38 +02:00
Harley Acheson
4e838fdae7 UI: Toggle Camera Guides in 3D View Overlay
Commit of #122337 removed this functionality by removing the exit this
used. This PR just brings back this functionality so you can toggle
both camera guides and passepartout.

Pull Request: https://projects.blender.org/blender/blender/pulls/122514
2024-05-30 20:06:39 +02:00
Clément Foucault
a94b8ade20 GPU: Add library for handling shared exponent format in software
This allows reducing bandwidth at the cost of some instructions
for packing and decoding the texture.

Pull Request: https://projects.blender.org/blender/blender/pulls/122446
2024-05-30 19:59:18 +02:00
Julien Duroure
c05c08cbff glTF exporter: Allow float socket (ex. Alpha) to get data from Color socket
This is how it works in Blender, but before this commit, only R channel was used
Now, we convert RGB to BW to get float data
2024-05-30 18:59:24 +02:00
Christoph Lendenfeld
037ec5dc2e Fix: shader issue due to varying interpolation modes
The interface `overlay_armature_shape_wire_iface`
used both `smooth` and `flat`. This is not supported in Vulkan.
Changing both to `flat` should fix it.

Pull Request: https://projects.blender.org/blender/blender/pulls/122505
2024-05-30 18:37:14 +02:00
Harley Acheson
2a287dc23c UI: Toggle Camera Passepartout in Viewport Overlays
Allow toggling camera passepartout in the 3DView Overlay popover while
in camera view.

Pull Request: https://projects.blender.org/blender/blender/pulls/122337
2024-05-30 18:03:39 +02:00
Dalai Felinto
1d9f12ac43 Extensions: DEFINE values to use for extensions update count 2024-05-30 17:48:21 +02:00
Habib Gahbiche
192d4dc9dc Compositor: implement bicubic interpolation for Stabilize2DNode
This patch also fixes a crash when image input of `Stabilize2DNode` is unconnected and interpolation is set to bicubic.

Differences to GPU compositor:
- ~1px difference is observed due to different rounding of domain size vs. canvas size. This difference is constant for all image sizes.
- If image input is unconnected but other inputs are, CPU compositor doesn't consider the operation to be constant, whereas GPU compositor still outputs a constant result.

Pull Request: https://projects.blender.org/blender/blender/pulls/122288
2024-05-30 17:38:41 +02:00
Sergey Sharybin
2fc2280e0e Fix #122451: Crash on animated viewport visibility + animated mesh positions
If an object is hidden it is unsafe to look deep into its properties, such
as evaluated mesh state. Do early visibility checks to avoid accessing
possibly stake pointers.

Pull Request: https://projects.blender.org/blender/blender/pulls/122496
2024-05-30 17:34:48 +02:00
95966813ae Anim: add 'Frame Scene/Preview Range' to animation editors
blah

Add a new operator 'Frame Scene Range' to the Dope Sheet, Graph Editor,
NLA, and VSE 'view' menus. It is added both to the regular menu and the
pie menu (by default on the ` hotkey).

The operator will only change the horizontal view, to show the scene
range or the preview range, depending on whether the preview range is
active or not.

The label of the operator switches between "Frame Scene Range" and
"Frame Preview Range" to indicate what will happen.

For the VSE this operator is quite similar to the 'Frame All', as that
by default also frames the scene range. There are a few notable
differences though:

- Frame All includes any strip that extends beyond the scene end frame.
- Frame All ignores the preview range.

Pull Request: https://projects.blender.org/blender/blender/pulls/122311
2024-05-30 17:19:10 +02:00
Dalai Felinto
35a3e64141 UI: Icons: INTERNET_OFFLINE
* INTERNET_OFFLINE icon was discussed here: !122225

Ref: !122486
2024-05-30 17:18:33 +02:00
Clément Foucault
ef4644f3bb EEVEE-Next: Implement LOD bias for sun light
This reduces the impact of tagging volumes and transparent
object when a sunlight is present.
2024-05-30 17:14:37 +02:00
Julian Eisel
44e9544199 Refactor: Extract button text editing data for input handling
Introduces a `uiTextEditing` struct to hold most data for handling text editing,
with improved naming. This should help untangling this code a bit, reduce
perceived complexity, and make the relation between data and the button state
more clear.

Generally I'd like to try to minimize use of `uiHandleButtonData`, to reduce
complexity while increasing flexibility. For example it would be good if text
editing code could be independent of the active button, so a text button can
receive input while other UI elements remain interactive (e.g. for search
popups, which have their own ad-hoc layout, event handling and drawing code).

This is a rather conservative initial refactor, I might follow up with further
(more risky) changes in separate PRs. But this seems like enough of an
improvement to get in first.

Pull Request: https://projects.blender.org/blender/blender/pulls/122332
2024-05-30 17:09:13 +02:00