Commit Graph

128850 Commits

Author SHA1 Message Date
Philipp Oeser cdd122cd74 Fix #113885 : Drag and Drop colors misses an undo push
Since the operator can also act on e.g theme colors [and changes to these shouldnt send undo pushes], dont do a general `OPTYPE_UNDO`, but instead be a bit more specific and only do an undo push for buttons with `UI_BUT_UNDO`.

Probably good for LTS.

Pull Request: https://projects.blender.org/blender/blender/pulls/113887
2023-10-19 16:02:34 +02:00
Julian Eisel e7abced86e Fix #113726: Unable to open N panel for the first time with click drag
View2D isn't initialized in these regions yet, which is a valid state
for hidden regions. So consider that when calculating the region zoom
factor in the region scale operator.
2023-10-19 15:44:16 +02:00
georgiy.m.markelov@gmail.com d6b8422193 Fix #113880: Vector Curve node crashes Hydra render
Fix incorrect input name.

Pull Request: https://projects.blender.org/blender/blender/pulls/113928
2023-10-19 14:35:46 +02:00
Alaska 37ab9bb1ed Fix unnecessary mix nodes for Principled BSDF specular tint
If the specular tint is 0 in a 3.6 file, and the base color has a
node input, then don't add a mix node in versioning.

Pull Request: https://projects.blender.org/blender/blender/pulls/113893
2023-10-19 13:36:34 +02:00
Lukas Stockner c71e18054c Fix: Cycles: Non-physical layering weights can lead to negative closures 2023-10-19 13:13:48 +02:00
Lukas Tönne 52e6106d28 Fix #113860: Incorrect conditionals for node group socket names
Nested conditions broken by #113924.

Pull Request: https://projects.blender.org/blender/blender/pulls/113929
2023-10-19 12:21:47 +02:00
Julian Eisel 838aca5f18 Fix #102856: Too small draggable area of asset view template items
For historic reasons buttons don't use the full button size as draggable
area by default, only a small part of it that is assumed to contain the
icon (e.g. of a label button). This isn't what we want for the big
preview buttons used here, their entire surface should be draggable.
We already have a workaround in place for this historic behavior, so we
can just enable that.
2023-10-19 12:09:55 +02:00
Lukas Tönne dfc3f75e77 Fix #113860: Nullptr checks for node socket and panel name pointers
In 3.6 the names of node group sockets were using char arrays, but now
use allocated strings. The RNA system assigns nullptr to such strings
when assigning an empty string through python (UI assignment appears to
always generate a valid string). This creates issues with many STL
functions, in particular assigning nullptr to `std::string` will crash.

We have to check for valid pointers before using them in places that
don't handle nullptrs.

Pull Request: https://projects.blender.org/blender/blender/pulls/113924
2023-10-19 11:48:08 +02:00
Sergey Sharybin 78b2e9071f Fix #113875: 2D Animation template's view transform set to AgX
Pull Request: https://projects.blender.org/blender/blender/pulls/113903
2023-10-19 11:02:01 +02:00
Iliya Katueshenock e6a0b4404c Fix #110415: Crash with single point curves in Interpolate Curves node
Single point curves should be handled separately, because they don't
have any curve segments.

Pull Request: https://projects.blender.org/blender/blender/pulls/110477
2023-10-19 10:41:33 +02:00
Hans Goudey f6d45d248c Fix #113894: Node tool crash with deleted group output node 2023-10-19 10:02:30 +02:00
Hans Goudey eb41a7ec9d Fix: Misleading node tools popover label
Use "Hair Curves" instead of just curves, to clarify that it's just the
new curves system that's supported, not the legacy one. When the
old one is removed, the label will be changed to just say "Curves"
again.
2023-10-19 09:50:17 +02:00
Jason Fielder 62219f8da9 Metal: Re-enable workbench NEXT shadows
With the shift to GPU-driven rendering pipeline,
the SSBO vertex fetch paradigm used to
implement workbench shadows on Metal
instead of utilising the geometry shader
path no longer worked correctly.

This is because the draw submission
required vertex amplification up-front,
based on the expected output geometry
amount for a given input geometry.

This patch aims to resolve this
issue through addition of API to
enable the features within the
GPU driven pipeline.

Co-authored-by: Michael Parkin-White <mparkinwhite@apple.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/113498
2023-10-19 08:01:17 +02:00
Richard Antalik c7384ba6f3 Fix #110878 VSE duplicating first frame and offsetting rest.
Conversion from timeline frame to frame index was done by casting to
integer, which followed logic of ffmpeg seeking. However this is not
best approach in some cases - for example when FPS of scene and movie
differs by a very small amount. In this case the first frame could be
duplicated and all other frames will appear as offset by one frame.

In particular this may happen scene is set to 29.97 fps and movie is
encoded at 30000/1001 fps. A frame will still have to be duplicated, but
it should be frame where decimal of frame index crosses 0.5 to keep
audio and video in sync as best as possible.

Pull Request: https://projects.blender.org/blender/blender/pulls/113870
2023-10-19 02:08:20 +02:00
Richard Antalik d4fd65ffc9 Fix issues when adding retiming key outside of strip boundary
When retiming key is added to frame before strip starts, this causes
crash on null dereference. After adding null check, this creates
retiming data, even though operation is not valid. To prevent creating
empty retiming data, `SEQ_retiming_data_ensure()` is only executed, when
operator actually adds a keyframe.
2023-10-19 02:02:52 +02:00
Brecht Van Lommel e11f031d62 Fix performance regression on Metal/AMD due to new BSDFs
The increased amount of BSDF code from Principled BSDF v2 and the
microfacet BSDF led to a big performance regression on Metal and AMD.
We have not been able to find a good workaround for all scenes.

This change disables the Principled Hair BSDF code when it is not used
in the scene. This makes common benchmark scenes faster, but
performance is still bad in scenes that do use it.

Ref #112596

Pull Request: https://projects.blender.org/blender/blender/pulls/113904
2023-10-18 22:17:05 +02:00
Brecht Van Lommel 15d316a51a Fix #113777: Cycles IES texture not working for sphere lights
This was a regression after the sphere light changes, where the normal
now is the normal along the geometry of the light and no longer suitable
for the IES texture direction.

This not only fixes point lights with non-zero radius, but makes the IES
texture direction work consistently across light types and meshes,
always rotated by the object transform.
2023-10-18 20:40:07 +02:00
Brecht Van Lommel b867f16e27 Cleanup: compiler warnings 2023-10-18 16:57:08 +02:00
Brecht Van Lommel 50cabead7f Fix #113871: Cycles shader with volume shader and AOV output renders black 2023-10-18 16:57:08 +02:00
Julian Eisel f622b4ce96 Fix #113201: Assets in same folder as current file ignored in All library
Note: Initially committed as 7705e49bcd, but got reverted with
1f0520034a. Note includes fixes for unit tests.

If an asset library was pointing to the same path as the current file is saved
in, the assets from this library wouldn't be loaded. This is because the asset
library service assumed the absolute library root path is a way to uniquely
identify an asset library.

Instead, identify the asset library using both the root path and the library
type.
2023-10-18 16:10:42 +02:00
Michael B Johnson 686487ca17 Fix: USD: Use color3f for color nodes
Blender was writing out color attributes on USDPreviewSurface as
float3 instead of the more accurate color3f.  While this is somewhat
technically okay, since color3f is a role alias for float3, it does cause
issues in applications that are correctly expecting color3f.

The material writer code actually expects color3f in other
sections, but was using float3 in this section erroneously.

Co-authored-by: Dhruv Govil <dgovil2@apple.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/113695
2023-10-18 14:52:06 +02:00
Philipp Oeser ad0b9dbdd2 Fix #113763: Float2 attributes on curves not rendering in Cycles
Regression from 2fac2228d0.

Above commit was missing an AttributeConverter for `blender::float2`,
now added.

Pull Request: https://projects.blender.org/blender/blender/pulls/113884
2023-10-18 14:21:09 +02:00
Hans Goudey b2fe1bf624 Fix #113824: Setting curves select mode changes active attribute
Currently the active attribute is stored as an index. This should be
changed to a string, but until then, adding or removing an attribute
changes the indeices. The workaround is to store the name and fix
the active attribute after the change.
2023-10-18 11:31:34 +02:00
Hans Goudey cdae07dccf Fix #113842: Curves Info node length output always zero
Caused by a1cc621e1e. The "is_hair_length" value needs to be
set before `attr_input_name` is called because it uses the value to set
the attribute name with the "l" alias.
2023-10-18 11:13:38 +02:00
Jacques Lucke 969dd7b985 Geometry Nodes: add forward compatibility for map range socket identifiers
Also see 0ea193bdb3.
2023-10-18 10:17:43 +02:00
Jacques Lucke 4f3262a128 Fix: update curve types before using them 2023-10-18 09:56:22 +02:00
Campbell Barton 3eda5a114f Fix Wayland/LIBDECOR window size on startup without a hack
The USE_LIBDECOR_FRACTIONAL_SCALE_HACK worked on my system but made
window size issues worse in older versions of GNOME, see: #109194.

Replace the hack with logic to set the window size using frational
scaling information from the output.
2023-10-18 14:37:12 +11:00
Campbell Barton bafb36f8bc Fix glitches resizing windows on Wayland, LIBDECOR & fractional scaling
When fractional scaling is used, window sizes from LIBDECOR are still
divided by the window-decorations internal buffer scale which doesn't
match the GHOST window (always 1 in the case of fractional scale).

Also resolve glitches caused by recalculating the window size when
no size change was intended. In this case reuse LIBDECOR's internal
size so there are never any changes (caused by rounding for e.g.).
2023-10-18 14:37:11 +11:00
Campbell Barton 3ad21b2169 Fix invalid surface size under Wayland when GHOST set the window size
When the window manager set the window size, there were no checks
the size is a multiple of the buffer scale (a requirement for Wayland).

This meant setting the window size could exit Blender without warning
if an invalid window size was set.
2023-10-18 14:37:09 +11:00
Campbell Barton 46159c131d Cleanup: add rounding utilities for GHOST/Wayland
Prepare for fixes that use add additional rounding.
2023-10-18 14:37:08 +11:00
Richard Antalik 01612bacfd Fix #113755: Incorrect speed overlay on retimed strips
Caused by off by 1 error in speed calculation.
2023-10-18 01:11:31 +02:00
Harley Acheson 9a3fa4d8cc Fix #113826: Set Explicit Font Size for Overlays
The complaint illustrates how text measurement can be broken by a
drawing callback. This is because overlays are setting global_font_size
value, which is used by subsequent drawing, but does not explicitly set
size on the global_font_default font, which is needed for measurement.

Pull Request: https://projects.blender.org/blender/blender/pulls/113868
2023-10-18 00:50:05 +02:00
Germano Cavalcante 934c2c894b Fix 'Snap Mode' versioning
NEAREST and PROJECT were swapped.
2023-10-17 14:52:42 -03:00
Germano Cavalcante 6bbad6c428 Fix #113801: "Snap to Same Target" don't work as expected
Introduced during snap code refactoring.

It seemed wrong to overwrite the calculated nearest distance based only
on the original distance.

But this is intentional, (the code could be improved since there are
unnecessary tests to detect the closest object).
2023-10-17 14:31:49 -03:00
Germano Cavalcante 6ecef4d176 Fix crash when Transform Extend multiple NLA strips
`tdn` was being incremented even though it wasn't used, which led to
changes in memory outside the HEAP limits.
2023-10-17 11:46:10 -03:00
Miguel Pozo 405a618d88 Cleanup: Workbench: Remove no longer used properties 2023-10-17 15:45:59 +02:00
Pratik Borhade 8867cfc563 Fix #113778: Skip unlinking a linked collection if parent is linked
Similar to 197f3d75d1, do not unlink a linked collection from a linked parent

Pull Request: https://projects.blender.org/blender/blender/pulls/113805
2023-10-17 12:39:01 +02:00
Campbell Barton e21dfb4c42 Correct comment in 5ac392ca40 2023-10-17 19:59:58 +11:00
Campbell Barton 5ac392ca40 Fix #102300: SSL/HTTPS Request Unable to Get Local Issuer Certificate
Resolve an error with SSL using a hard coded path to certificates on
Linux causing HTTPS access to fail.
request.urlopen(..) couldn't access any HTTPS URL's.
2023-10-17 19:58:34 +11:00
Hans Goudey d7e501ce3b Fix #112448: Leading deform modifiers skip adding original coordinates
Previously the first group of deform modifiers didn't need to access
original coordinates explicitly because the deformation wasn't included
in the mesh positions. After d20f992322 the mesh is deformed
directly though, so the original coordinates need to be added first.

In the case of this report, the particle system (which is a "deform"
modifier for reasons) didn't have original coordinates to work with, so
it created the child particles at the deformed positions from the shape
keys every time. Though for some reason it only did that for renders.

Pull Request: https://projects.blender.org/blender/blender/pulls/113679
2023-10-17 10:28:19 +02:00
Hans Goudey bd4c310a19 Fix: Missing edge domain in node tool set selection node
This wasn't implemented in the initial commit because we didn't have
a function to flush edge selections to vertices and faces. But using the
existing domain interpolations makes that trivial, so it may as well be
added now to avoid the arbitrary limitation from the user perspective.

See https://devtalk.blender.org/t/node-tools-feedback/31388/5

Pull Request: https://projects.blender.org/blender/blender/pulls/113367
2023-10-17 09:56:24 +02:00
Hans Goudey 3d236bc858 Mesh: Add operator to select elements based on boolean attribute
Adds a "Select by Attribute" operator as mentioned in the discussion in
#105317. This is done in 4.0 to limit the breaking aspect of the removal
of face maps. The selection storage functionality is replaced by boolean
attributes. We already have a way to control the data in the boolean
attribute with the "Set Attribute" operator, but we didn't have a way to
convert the attribute into a selection.

This operator works on the active attribute if is a boolean attribute
and isn't on the face corner domain. It adds to the existing selection
similar to other existing operators.

While this behavior can be recreated as a node tool, we add it as a
builtin operator here to avoid limitations of the new node-based
tool system and to make the late-in-the-release-cycle change safer.

Pull Request: https://projects.blender.org/blender/blender/pulls/113772
2023-10-17 09:24:51 +02:00
Hans Goudey 820f0c24c4 Mesh: Add versioning to convert old face maps to boolean attributes
See #105317

In 46cf093270, face maps were just converted to an integer
attribute. While the internal data remains the same that way, we lose
the names and some convenient methods of interaction. This commit
additionally converts each face map to a separate boolean attribute
using the old name. This does require that no attributes were using that
name already.

Each boolean attribute can be thought of as a selection, accessible in
geometry nodes and properly interpolated by mesh processing
algorithms. The selections no longer have to be unique, meaning
one face can be part of multiple selections.

Pull Request: https://projects.blender.org/blender/blender/pulls/113769
2023-10-17 09:17:07 +02:00
Germano Cavalcante bbf87ee78c Fix #113786: Snapping to vertex is broken, when instances are used in GN
Missed in ff4f14b21.

For GN instances, we should use `DupliObject::ob_data`.
2023-10-16 17:26:02 -03:00
Brecht Van Lommel 0c958129a3 Fix deps build issues with Ogg/Vorbis on new Xcode, switch to CMake
These were already building with CMake on Windows, do the same for
Linux on macOS.
2023-10-16 20:09:41 +02:00
Brecht Van Lommel 4a376326c9 Fix OpenImageIO wrong dependency builder hash after repository moved
And update to new URL.
2023-10-16 20:09:41 +02:00
Harley Acheson ffe980afad Fix #113766: Incorrect Cursor With Offset Position
Next character left edge position incorrect when string has
an offset positioning (scrolled within the input box).

Pull Request: https://projects.blender.org/blender/blender/pulls/113784
2023-10-16 19:17:28 +02:00
Germano Cavalcante 88a6df24aa Fix #113552: NLA Markers do not reset when length reaches 0.0
Before bd00324c26, strip lengths were changed in
`rna_NlaStrip_frame_start_ui_set` and `rna_NlaStrip_frame_end_ui_set`
so as not to be shorter than NLASTRIP_MIN_LEN_THRESH.

This prevented `BKE_nlameta_flush_transforms` from working with
zero-length strips.

But now, in some cases, strip can be zero length.

Therefore, consider this case and avoid division by zero.

Pull Request: https://projects.blender.org/blender/blender/pulls/110121
2023-10-16 16:46:47 +02:00
Germano Cavalcante 6dda18269c Fix #113650: Vertex Creasing is using Mirror
`Vertex Crease`, like `Edge Crease`, is not supposed to use transform
symmetry.

So remove it.

(`Skin Resize` remains using symmetry since that case seems desirable.
See #84376)
2023-10-16 10:39:31 -03:00
Damien Picard 9c0c9789cc I18n: fix Vector Math and Mix node sockets search
When searching for a new node by dragging from a socket, some results
were untranslated. This is because they did not use a translation
context matching other occurrences, from which the strings were
extracted to the translation files.

Three nodes using operations were affected: Mix and Vector Math.
- Vector Math used the default context when it should have used
  NodeTree.
- Mix and Mix RGB used NodeTree when they should have used the default
  context.

Pull Request: https://projects.blender.org/blender/blender/pulls/113485
2023-10-16 14:45:47 +02:00