Commit Graph

124313 Commits

Author SHA1 Message Date
Philipp Oeser a7afce347d Fix #104597: Knife relative angle constaint wrong on rotated objects
The face normal was used in local space whereas it is needed as a global
direction (since other vectors here are in worldspace as well --
knife_input_ray_segment() returns worldspace).

Could go into 3.3 LTS.

Pull Request: https://projects.blender.org/blender/blender/pulls/108938
2023-06-14 08:58:28 +02:00
Philipp Oeser c99dd96731 Knife: remove redundant recreation of a ray
This was done prior with no altering it and had a misleading comment.
Part of PR #108938 (split into a separate commit).

Pull Request: https://projects.blender.org/blender/blender/pulls/108938
2023-06-14 08:56:30 +02:00
Richard Antalik b77e7480ef VSE: Remove retiming tool for 3.6 release
This reverts commits:
e1f6587f12
b4100ed377
6749593aec
a97cae3efc
559898709f
e4eb9e04e0
bb1c503bee
b21695a507
7bf56e5c75
4dc026ec8e
354ef89d20

Reason for reverting is to not introduce this feature with current UI.

Pull Request: https://projects.blender.org/blender/blender/pulls/108870
2023-06-14 04:25:52 +02:00
Lukas Stockner 962331c256 Fix #105555: Cycles: Baking only indirect lighting is broken
The problem here was that when direct light contibutions to baking were
disabled, the kernel just skipped all direct lighting evaluation.

However, at secondary bounces, "direct light" would actually end up
being indirect (since there's an extra bounce along the way), but
we're still skipping it.

Therefore, only apply direct lighting skipping at the first bounce.
2023-06-14 01:42:22 +02:00
Hans Goudey 83ef3bc923 Mesh: Forward compatibility with generic crease in 4.0
e5ec04d73c changed the way crease vakyes are stored in 4.0.
Add versioning for reading the new files that replaces the new generic
attributes with the old non-generic custom data layers. The code is
paranoid with lots fo checks I expect will typically not be necessary.

Similar to f75af7cbf5
2023-06-13 14:31:25 -04:00
Brecht Van Lommel f3c45f5b5a Fix off by one error introduced by me in recent commit 6948a2d 2023-06-13 20:24:17 +02:00
Hans Goudey 89232d52db Fix: Avoid creating uninitialized attribute in distribute points node
Interpolation from edge attributes is unsupported, and the data
of the new point attribute was uninitialized. As a fix, just avoid
interpolating edge attributes in the first place.
2023-06-13 14:09:11 -04:00
guishe 6948a2d613 Fix #98973: Renaming Custom Python Properties is Incorrect
PyUnicode_AsUTF8AndSize is used when renaming a custom python property,
this method stores the size of the string without including the null
terminator in the size.

Renaming a custom python property now includes the null terminator when
copying the new string name.

Pull Request: https://projects.blender.org/blender/blender/pulls/107983
2023-06-13 19:46:11 +02:00
Brad Smith c1d353c17b Build: fix NetBSD error in guardedalloc
Pull Request: https://projects.blender.org/blender/blender/pulls/108831
2023-06-13 19:46:11 +02:00
Brad Smith 57f7721ffc Build: fix NetBSD support in Glog
Pull Request: https://projects.blender.org/blender/blender/pulls/108835
2023-06-13 19:46:11 +02:00
nutti c3514b0eb7 Docs: add data types of missing bpy.types.Object properties
Pull Request: https://projects.blender.org/blender/blender/pulls/108852
2023-06-13 19:46:11 +02:00
nutti 61ead957a0 Docs: Fix bpy.types.Operator.poll_message_set() method to classmethod
Pull Request: https://projects.blender.org/blender/blender/pulls/108854
2023-06-13 19:46:11 +02:00
Brecht Van Lommel 2b327d1c0e Fix realtime compositor unsupported node warnings shown for hidden 3D views 2023-06-13 19:46:11 +02:00
Hans Goudey 4834b301f0 Fix: Crash with "use sharp" turned off in weighted normal modifier 2023-06-13 11:43:30 -04:00
Alaska 623cb023b9 Cycles: Fix light tree sampling of multiple large distant lights
This fixes an issue where the light tree sampling algorithm would
discard light samples from groups of distance lights with an angle
greater than 0 when it shouldn't.

Pull Request: https://projects.blender.org/blender/blender/pulls/108832
2023-06-13 15:36:05 +02:00
Hans Goudey 8a11f0f3a2 Fix #108517: Mesh split edges can give invalid indices
The split edges code had a complex method of merging duplicate edges,
going backwards to avoid shifting elements in a vector. Sometimes it
could result in incorrect corner edge indices though, if it moved an
index that matched one of the local variables (I think! I've bee
 trying to understand this all day and still struggling). Instead,
 replace it with a `VectorSet` that handles the deduplication by
 itself, and avoid creating the new edges until the end.

I think this code could still be simpler if we tried to reduce the
amount of things happening at the same time, making more code
deal with the input or final state rather than an in-between one.
But to avoid making the change too complicated I stopped here.

Pull Request: https://projects.blender.org/blender/blender/pulls/108826
2023-06-13 14:10:13 +02:00
Sergey Sharybin 8013bad084 Fix Cycles on Metal after the recent changes
The address space needs to be specified explicitly.

Pull Request: https://projects.blender.org/blender/blender/pulls/108932
2023-06-13 13:01:58 +02:00
Pratik Borhade dc7678ecfa Fix #108814: Right Click doesn't cancel 3D View navigation
Entry for `VIEW_MODAL_CANCEL` was not included during refactor of
navigation operators (67203c0ec8)

Pull Request: https://projects.blender.org/blender/blender/pulls/108876
2023-06-13 11:46:54 +02:00
Lukas Stockner 4e104d77c7 Fix #108211: Cycles: Correctly split Glass BSDF contributions
So far, each closure in Cycles was either diffuse OR glossy OR
transmissive, and its color and contributions were assigned
to the corresponding direct/indirect/color passes.

However, since Glass is a single closure now, that is no longer enough,
since glass has both a glossy and a transmissive component.

Therefore, this commit adds support for splitting contributions from
the Glass closure between the two types.
For 4.0, we might want to also use this for Principled Hair since it
also technically has both types, but that would be a change from
the existing result so it's not part of 3.6 yet.
2023-06-13 01:34:07 +02:00
Germano Cavalcante f8617fe71b Fix #108880: Skin and Miffor modifiers cause mesh collapse
Before 4369627e71, the Mirror modifier merge did not interpolate
customdata.

Previously, the customdata was simply copied from the original vertex
during the merge, resulting in the retention of flags such as
`MVERT_SKIN_ROOT`.

This fix could just repeat that behavior for mirror. But these flags
can be useful in other cases, so this commit re-adds them to the
resulting merged vertex.

Although this can generate geometries with multiple roots on the same
island, there are different scenarios in which this can happen.
Therefore, multiple roots on the same island is not necessarily
considered a bug.
2023-06-12 19:10:47 -03:00
Ray Molenkamp 7f9021a92f deps_builder: fix deadlock in idiff
idiff sometimes locks up while shutting down when the CPU is
oversubscribed. While blender does not rely on the idiff tool
the tests that run on the CI environment do, which causes tests
to occasionally fail due to a timeout.

The root cause is a bit complex but can be found on the oiio tracker
at https://github.com/OpenImageIO/oiio/issues/3851

This change fixes idiff by :

1- Shutting down the thread pool before the main function exits
2- Have the shutdown wait for the pool threads to actually join, to
prevent the OS from forcefully terminating them while they could
potentially still be holding a lock.
2023-06-12 08:51:51 -06:00
Lukas Tönne f09d465a6d Fix #108376: Copy from geometry to other node tree types resets shapes
Socket shapes are used in geometry nodes to indicate field types.
In other tree types (e.g. shaders) the socket shape is not touched at
all. Since nodes can be copied from geometry node trees, we need to
reset the socket shape when copying to a shader, compositor, or texture
tree.

Pull Request: https://projects.blender.org/blender/blender/pulls/108412
2023-06-12 14:21:50 +02:00
Hans Goudey 18350ba06a Fix #108817: Extrude node crash with vertex-only input
The `.edge_verts`attribute might not exist if there were no edges.
2023-06-12 07:52:00 -04:00
Philipp Oeser d75aeb03e5 Fix #108707: Parent space Transform ignores armature objects rotation
Seems like an oversight in 5c4b0c98d3.

Child bones would calculate their orientation from the parent bone local
alone, now multiply take the armature objects world transform into account as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/108755
2023-06-12 09:59:14 +02:00
Jason Fielder 99931a5154 Metal: Fix failing texture unit tests
Resolves failing unit tests where missing texture read support for
1D/3D textures was required. Also resolves a number of missing
format support cases when determining texture component
count and byte size for reading/writing.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/108751
2023-06-12 08:43:10 +02:00
Jason Fielder 6504ba980e Metal: Resolve zero initialization in failing math shader tests
Math tests failing in Metal due to non-zero-initialized values
and shader compilation error caused by mutli-component
boolean being implicitly evaluated.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/108758
2023-06-12 08:39:11 +02:00
Jason Fielder 91e15ca2fa Fix #107159: Resolve wireframe depth issue in Metal
Bug in Metal when gl_FragDepth is used but not written to by a shader
causing depth-based navigation to fail. Patch ensures gl_FragDepth
is assigned a default value at the current depth from the vertex
shader to catch all edge-cases of this.

Authored by Apple: Michael Parkin-White

Co-authored-by: Michael Parkin-White <mparkinwhite@apple.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/108453
2023-06-12 08:37:50 +02:00
Lukas Stockner d79524e309 Cleanup: format 2023-06-10 15:37:51 +02:00
Lukas Stockner a811ff0374 Fix #108560: Light groups do not work with collection instances
With this change, instances of lamps and emissive meshes which do not
have their own light group assigned will use the light group of the
collection instance.
If an object does have a light group assigned, its instances will
continue to use it regardless of the collection instance's light group.
2023-06-10 15:35:01 +02:00
Hans Goudey 6a3ca93c7e Fix #108788: Data transfer nearest interpolated broken
Copy and paste mistake in d0705bd697.
2023-06-09 11:07:49 -04:00
Bastien Montagne 44e4b5fe33 Fix (unreported) Object's particle 'foreach_id` potentially accessing other IDs data.
Spotted while investigating #107860: Interactions with timeline after undo makes Blender crash.
Cannot reproduce any more crashes from this report.
2023-06-09 16:58:35 +02:00
Philipp Oeser 0696dd636c Fix #108737: Python error in Property Editor search menu
Caused by 5ca65001ea (which was already patched with ae7c71ef09 and
fa5cc84a0a)

Getting the right modifier would still fail / throw errors when not done
from the modifier extra ops dropdown.
Only there,  a 'modifier' attribute is set for context (via
`uiLayoutSetContextPointer` in `modifier_ops_extra_draw`).

So now check if a 'modifier' attribute is set for context (and fallback
to using the active modifier instead).
This way, polling errors in F3 search are gone and you can actually
execute the operators which are also in modifier extra ops dropdown from
elsewhere (e.g. F3 search).

Pull Request: https://projects.blender.org/blender/blender/pulls/108795
2023-06-09 15:07:00 +02:00
Jacques Lucke 5f7be257b8 Fix #107473: make links connected to unavailable sockets invalid
Such links shouldn't be considered at all. In fact, they might be removed
automatically in the future.
2023-06-09 14:14:47 +02:00
Jacques Lucke b344e4ba61 Fix #108704: missing redraw after timeline scrubbing with temporal denoise
The issue was caused by 037b3f87bd.
2023-06-09 13:49:31 +02:00
Pratik Borhade 9735b8ee71 Fix #106966: Register undo-step when unlinking data-block
When unlinking IDs like GN tree, materials, etc. undo step is not created.
To fix this, assign `undo_push_label` a string value for registering an
undo-step (with the help of `ED_undo_push`)

Pull Request: https://projects.blender.org/blender/blender/pulls/108452
2023-06-09 11:20:41 +02:00
Fynn Grotehans bab7548f94 Fix #104628: Rename Texture-paint brush display panel to 'Cursor'
The same Panel was named different in Image editor -> Paint
and in 3D view -> Texture Paint. 'Cursor' is the common name for
this panel in all paint modes.

Co-authored-by: Fynn Grotehans <68659993+Fynn-G@users.noreply.github.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/108544
2023-06-09 06:26:28 +02:00
Chris Blackbourn 31ce143569 Fix #108786: Logic errors with pinned islands inside uv packer
Pinning information was accidentally skipped inside of the
UV packing engine because of their ordering.

This was most noticeable when using the "Bounding Box" shape
method, causing some pinned islands to be moved when they
should have been locked in place.
2023-06-09 15:29:43 +12:00
Hans Goudey fd74b280d9 Fix: Amend previous windows build error fix
Thanks to Ray for helping with this!
2023-06-08 15:55:47 -04:00
Hans Goudey 0dde6ab424 Fix: Build error after previous remesh fix
MSVC requires some coddling to understand these templates.
2023-06-08 15:32:57 -04:00
Hans Goudey 2b45f2d662 Mesh: Fix remesh color attribute propagation, improve performance
Fixes #108730

The call to `CustomData_interp` also interpolated the face corner
topology attributes, which broke the mesh completely. To fix this,
avoid relying on the CustomData API and move the attribute
interpolation to use the attribute API instead. This change also
makes it trivial to support all attribute types in the future.

Also, only retrieve the closest vertex once, instead of doing it
again for every attribute. Combined with building the topology
maps in parallel this approximately doubled the performance
of color attribute propagation in a test with 2 million vertices
and 8 color attributes on both domains (63 to 34 ms).

Pull Request: https://projects.blender.org/blender/blender/pulls/108773
2023-06-08 19:58:13 +02:00
Jason Fielder cddb53558f Metal: Resolve issues with buffer reading and clearing
Ensure buffer read operations wait for pending GPU work to
complete. This is only required for unit tests, but required to
ensure correct results in all cases. Also adds support for staging
buffer if GPU memory type is private.

Buffer clearing routine added to support values above 1 byte.
The previous buffer clearing functionality using fillBuffer writes
values to each byte, rather than the full 32 bit uint used by the
GPU API.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/108757
2023-06-08 18:30:51 +02:00
Leon Schittek 16c9eacf41 UI: Correct default width of toolbars
Correct default initial widths of toolbars

Pull Request: https://projects.blender.org/blender/blender/pulls/108292
2023-06-08 18:27:59 +02:00
Christoph Lendenfeld 2387290e4f Fix #102737: Keyframe jump operator includes hidden curves in Graph Editor
The graph editor has the function to hide the display of FCurves and to only draw keyframes on selected curves.

Both options were not respected when executing the frame jump operator,
meaning it would jump to potentially hidden keyframes.

This patch adds a new operator that is specific to the Graph Editor and that respects those features.

The only possible issue that could arise from this is a slight confusion for the user
why they behave differently between editors.
Especially with only the Graph Editor and the 3D view open.
In general I think it's an improvement and follows the "you can only modify what you see" mantra in blender

Also
Resolves #97701

Pull Request: https://projects.blender.org/blender/blender/pulls/108549
2023-06-08 11:02:19 +02:00
Philipp Oeser 9e598aa0ef Fix #106395: Custom properties dont appear in quick favorites
Issue here was that Quick Favorites use a property's **identifier** when
adding [which is the bare name without brackets etc. from id properties]
but when spawning the actual menu,  `RNA_struct_find_property` expects
the identifier to already include the brackets to know these are id
properties (later on in `screen_user_menu_draw`).

So to solve this, now include the needed syntax when storing the
`bUserMenuItem_Prop` identfier.
Seems the quickest way to append the needed characters is using
`RNA_path_property_py` (not sure if there are better ways to do this).
Also note that we (need to) ignore the actual array index constructing
the string [always pass -1 here] since the index is handled separately [I
tested boolean arrays and these work].

Pull Request: https://projects.blender.org/blender/blender/pulls/108713
2023-06-08 10:37:36 +02:00
Philipp Oeser 7ffd73100e Fix #106759: Error on running blender_icons_geom.py with curve
288e7d0af0 added support for legacy curves, these dont have attributes
though, but code was checking for an active color atttribute.

Now, only do this check (and skip that object) if it has no attributes (or
doesnt have vertex or active color atttribute).

Pull Request: https://projects.blender.org/blender/blender/pulls/108647
2023-06-08 10:21:54 +02:00
Nikita Sirgienko bc5275e204 Fix #107414: Cycles: [3/3] Don't rely on tfar in callbacks with embree
In Embree, tfar modification is taken into account by rtcIntersect1
only when hits are accepted. In order to overcome this, we now check
manually for a max_t value in the filter function.

Pull Request: https://projects.blender.org/blender/blender/pulls/108706
2023-06-08 09:21:32 +02:00
Nikita Sirgienko dd282bd853 Fix #107414: Cycles: [2/3] Fix closest hits recording in embree
Previously, all hits were processed yet ignored as soon as the
hits stack limit had been exceeded, which made miss closer hits.
2023-06-08 09:21:31 +02:00
Nikita Sirgienko 54dd4c0e79 Fix #107414: Cycles: [1/3] Ignore hits beyond the furthest one in embree
We should be recording only the N closest hits in case the number of
hits is exceeding the maximum allowed or the size of the hits stack.
Previously, some cases made it record hits beyond the furthest recorded
one due to lack of hit distance check.
2023-06-08 09:21:31 +02:00
Habib Gahbiche 2ac3e55422 Fix #107265 Compositor: Fileoutput Node does not export Z-Depth in 'singlepass' EXR
Remove the option z-buffer from file output node, because it never worked. Changes to manual are here: https://projects.blender.org/blender/blender-manual/pulls/104458

Pull Request: https://projects.blender.org/blender/blender/pulls/108387
2023-06-08 08:14:14 +02:00
Chris Blackbourn 9d25c4aaa6 Fix #104513: UV packing produces different results on x86 vs apple silicon
During uv unwrapping and uv packing, certain floating point algorithms
have extreme sensitivity to round-off errors. These can produce very
different layouts even when given inputs which are only slightly different.

The root cause is that the two main types of CPUs used to run Blender,
namely x86 and Apple Silicon, produce slightly different results on some
math functions, including `sinf()`, `cosf()` and `atan2f()`.

* sinf(0.8960554599761962890625) = 0.780868828296661376953125 (Intel i7)
* sinf(0.8960554599761962890625) = 0.78086888790130615234375 (Apple M1)

This fix, and others that came before it [0], improve accuracy by using
double-precision to hide the differences between the CPUs.

[0] e.g. 0eba9e41bf
[1] See also #107829
2023-06-08 14:23:44 +12:00