Commit Graph

123967 Commits

Author SHA1 Message Date
Campbell Barton
3d45004552 Fix tangent layer extraction using an empty attribute name
The attribute name was always "" as the size argument was `sizeof(char)`
instead of the buffer length.
2023-05-13 17:34:17 +10:00
Campbell Barton
88938f03c7 Fix buffer overflow with seq_proxy_get_custom_file_fname
The file path was 256 bytes, passing in a buffer size of 1792
for string join & making the path absolute could also overflow
as it assumes a size of 1024.
2023-05-13 17:34:14 +10:00
Campbell Barton
7433f34c4d Fix incorrect buffer size passed to BLI_strncpy 2023-05-13 17:34:13 +10:00
Chris Blackbourn
654cfc06c5 Cleanup: format 2023-05-13 11:03:59 +12:00
Weizhen Huang
3d96cab01f Fix wrong area light pdf in Cycles MNEE
Area light sampling use special techniques to reduce noise with small
spread angles; the change in sampled area was not taken into
consideration when computing the pdf in MNEE.

Pull Request: https://projects.blender.org/blender/blender/pulls/107897
2023-05-12 23:07:28 +02:00
Weizhen Huang
9870d8fd27 Fix missing Jacobian in rect area light pdf when in volume segment 2023-05-12 22:40:02 +02:00
Brecht Van Lommel
078b2d7174 Fix #107777: Cycles baking of Shadow not working anymore
After the removal of the Shadow pass this no longer worked. Now it works by
marking the object as a shadow catcher and returning the Shadow Catcher pass.

The result is different than before, since it also takes into account indirect
light now and uses a different method to weight the contribution of lights that
is adaptive to the light strength.
2023-05-12 21:00:52 +02:00
Brecht Van Lommel
36e5157693 Cleanup: remove redundant lerp function, mix already does the same 2023-05-12 21:00:52 +02:00
Marino Toscano
a05a7988dc Fix #106929: Gap in node links when sockets are aligned
Fix an issue when drawing node links that caused gaps, when sockets were
horizontally or vertically aligned.

When the inner and outer points of the node link's bezier control
polygon overlap, the link's tangent can be a zero vector. The shader
didn't check for this before normalizing the tangent leading to an
undefined vector which prevented the outermost segments of the link
from being drawn.
Since this only happens when the end points of the node link are
horizontally or vertically aligned, we can use the vector between the
link's end points instead of the tangent.

Fix #106929
Fix #89282

Pull Request: https://projects.blender.org/blender/blender/pulls/107636
2023-05-12 20:35:22 +02:00
Weizhen Huang
1a1f06bd9a Fix #107365: keep ls->D fixed in MNEE for area light with zero spread 2023-05-12 20:09:23 +02:00
Hans Goudey
ee08b2ddff Geometry Nodes: Add display toggle for simulation cache in timeline
Similar to the existing options for toggling physics cache display.
2023-05-12 13:48:52 -04:00
Hans Goudey
34e29440f7 Fix #107151: Multires data from external file is not loaded
Making the custom data API const correct in 3a3d9488a1 caused
the issue, because it previously relied on non-threadsafe behavior. As a
workaround, just restore the thread-unsafety, and note the issue in a
new comment.
2023-05-12 13:48:11 -04:00
Iliya Katueshenock
995802d68e Fix #107893: Attribute Statistic produces wrong Variance value
The division must be by the amount, not the index of the latter.

Pull Request: https://projects.blender.org/blender/blender/pulls/107894
2023-05-12 19:43:26 +02:00
Bastien Montagne
3b647faec8 Fix (unreported) three wrong next/prev pointers order in ListBase link structs.
There was even one case in BLI ListBase tests!

Order was opposite of the one expected by the BLI ListBase code... Not
sure how, but this did not cause any issue apparently? But would expect
it to at least affect the order in which items in the list would be
iterated.
2023-05-12 19:02:39 +02:00
Bastien Montagne
ddd6e05c8d BKE: Collection: Add a basic validation tool for collections.
Mainly for debug purposes, makes it easy to detect invalid collections
(e.g. having more than once a same collection as child).
2023-05-12 19:02:39 +02:00
Bastien Montagne
d87d2dd4ba BLI: Add basic validation tool for ListBase.
Mainly a debug tool, makes it very easy to detect broken listbase.
2023-05-12 19:02:39 +02:00
Harley Acheson
d9f5ce2546 UI: Changes to NLA Solo Button
Move the NLA Solo button to right side of channel row.

Pull Request: https://projects.blender.org/blender/blender/pulls/107672
2023-05-12 18:55:06 +02:00
Aliaksandr Sharstniou
f5e3ed77c7 Geometry Nodes: Change "Separate Components" node output order to match Spreadsheet
The order of geometry components should match between
the Separate Components node and the spreadsheet editor.
This switches the Curve and Point Cloud outputs.

Resolves #107837

Pull Request: https://projects.blender.org/blender/blender/pulls/107868
2023-05-12 18:08:06 +02:00
Sebastian Parborg
846e0801ab Fix crash in transform code if there was no active pose channel 2023-05-12 17:42:46 +02:00
Bastien Montagne
4ecbb3f1d5 Fix IDManagement remapping missing some required remapping with some liboverrides.
`BKE_library_id_can_use_filter_id` would not handle properly cases where
the ID is a liboverride - it's hierarchy root pointer can point back to
virtually any kind of ID (although typically a Collection or Object).

This was breaking liboverride resync process in some rare cases, by
failing to remap the 'hierarchy root' pointer of some liboverrides.
2023-05-12 17:02:18 +02:00
Hans Goudey
6491387fba Fix: Incorrect value retrieval in simulation subframe mixing 2023-05-12 10:40:51 -04:00
Sebastian Parborg
84c5953882 Add the sm_89 arch to the default CUDA binaries
Without this, support for newer NVIDIA cards will not be compiled with pre-compiling the CUDA binaries.

Includes changes needed for the buildbot building pipeline.

Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/107585
2023-05-12 16:30:23 +02:00
Hans Goudey
4d7a93930c Fix: Build error after previous commit 2023-05-12 10:15:57 -04:00
Hans Goudey
e6e6fb3a62 Geometry Nodes: Implement simulation subframe mixing
Generally render engines can do subframe mixing themselves, but the
purpose of subframe mixing in the simulation output node is to support
higher quality motion blur with bakes when there are topology-changing
operations after the simulation output node. Linear mixing can fill the
gaps while maintaining lower memory usage.

All point/instance domain attributes are mixed, but mixing is only
supported when the domain size is unchanged or when an `id` attribute
gives a mapping between elements. Theoretically it may be possible, but
nested instance geometry is not mixed in this commit due to the
difficulty of finding matching geometries across arbitrary instance
hierarchy changes. Attributes that are completely unchanged are ignored
using implicit sharing for better performance.

Pull Request: https://projects.blender.org/blender/blender/pulls/107599
2023-05-12 15:58:54 +02:00
Dalai Felinto
676c6d8e9a utm_source: use blender version as part of the URL
This makes the URL links to blender.org to have more information than
just utm_source=blender

For example:
* utm_source=blender-3.6.0-alpha
* utm_source=blender-3.3.16-release

Pull Request #107849
2023-05-12 15:29:46 +02:00
Dalai Felinto
a15c637e63 Introduce utm_source=blender to urls pointing to blender.org
This fuctionality allow the Blender project to know if users
are reaching our websites from within Blender:

 * User Manual
 * Python API
 * Release Notes
 * Development Fund

Pull Request #107849
2023-05-12 15:29:46 +02:00
Dalai Felinto
cbd838d077 Cleanup: Unify operators to use wm.url_open 2023-05-12 15:29:46 +02:00
Campbell Barton
fb584456e8 Revert "Fix #107759: Crash when running modal operator in load_post handler"
This reverts commit 95a114f3ca.

This broke bl_rigging_symmetrize, it seems likely the window was not
NULL on load in this case, setting it to NULL caused the the active
object not to be recognized.

This needs further investigation, reverting for now.
2023-05-12 23:23:49 +10:00
Xavier Hallade
3d53078dbe deps_builder: update Embree to 4.1.0
This allows to drop patches and workarounds, and reenable Hardware
Raytracing support for MNEE and Raytrace kernels for oneAPI device.

Pull Request: https://projects.blender.org/blender/blender/pulls/107853
2023-05-12 14:53:53 +02:00
Hans Goudey
4f2ac09886 Cleanup: Reduce binary size by deduplicating attribute processing
This makes the Blender binary 350 KB smaller. The largest change comes
from using `FunctionRef` instead of a template when gathering indices to
mix in the extrude node (which has no performance cost). The rest of the
change comes from consolidating uses of code generation for all
attribute types. This brings us a bit further in the direction of
unifying attribute propagation.

Pull Request: https://projects.blender.org/blender/blender/pulls/107823
2023-05-12 14:44:39 +02:00
Xavier Hallade
5ec2495550 Cycles: oneAPI: enable Hardware Raytracing for Raytrace/MNEE kernels
We do so if Embree 4.1+ is present.
2023-05-12 14:17:50 +02:00
Jacques Lucke
38416e7ad2 RNA: use correct ui scale type string in generated rna code
Previously, it printed the elements of `PropertyScaleType` as floats which does
not make sense. It also resulted in compile errors when attempting to compile
the generated code as c++ code.

Pull Request: https://projects.blender.org/blender/blender/pulls/107724
2023-05-12 13:50:06 +02:00
Jeroen Bakker
4cf7b95a15 Vulkan: Fix Compilation Issues on Windows
VKVertexAttributeObject was both defined as a class and a struct.
Settled on being a class.

Also removed an assert that is currently failing as workbench has
more attributes defined than actually used.

Pull Request: https://projects.blender.org/blender/blender/pulls/107874
2023-05-12 12:38:42 +02:00
Jeroen Bakker
7a52ad1161 Vulkan: Fix Incorrect Vertex Buffer State
After uploading the vertex buffer the state got corrupted.
Reason of this corruption is an assign-compare operation that should
just be an compare operation.

Pull Request: https://projects.blender.org/blender/blender/pulls/107875
2023-05-12 12:33:37 +02:00
cgtinker
aaf56d7aa5 Refactor: Anim, Symmetrize Armature operator
Remove some nested `if` statements to improve readablilty. My main
intention has been to improve readability and therefore making it easier
to implement changes in the future.

Seperating the symmetrize operator selection logic from the temp pointer
logic may reduces performance but it seems acceptable in this case. The
change allows focussing on the selection logic without taking care of
the temp pointers at the same time.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/106487
2023-05-12 12:13:35 +02:00
Jeroen Bakker
83a2904d1a Vulkan: IndexBuffer as Subrange
Add support for index buffers as subrange. When an index buffer
is a subrange it should bind the source buffer and use the index start
as an offset in the buffer.

Pull Request: https://projects.blender.org/blender/blender/pulls/107871
2023-05-12 12:12:43 +02:00
Jeroen Bakker
f9d094ba9e Vulkan: Initial Draw List
Dummy implementation of the VKDrawList that isn't caching the draw calls
but just execute them when they are appended to the list.

Pull Request: https://projects.blender.org/blender/blender/pulls/107873
2023-05-12 12:09:41 +02:00
YimingWu
149d364307 Fix #107863: Handles NULL pose constraint list
When the the armature doesn't have an active pose bone yet so
`ED_object_pose_constraint_list` returns NULL unhandled during
`edit_constraint_property_get`, now fixed.

Pull Request: https://projects.blender.org/blender/blender/pulls/107864
2023-05-12 10:56:53 +02:00
Campbell Barton
95a114f3ca Fix #107759: Crash when running modal operator in load_post handler
Regression in [0] which caused the window to be NULL when the load_post
handler was called. While this can be worked around using
context.temp_override, keep the previous behavior as this
change wasn't intentional.

[0]: 46be42f6b1
2023-05-12 17:23:56 +10:00
Campbell Barton
cddbd2dfb3 CMake: use a custom message when Python is not found
When Python is not found, inform developers how they can use a newer
version. Even though it's not officially supported - we typically keep
the latest stable version of Python working.
2023-05-12 17:00:12 +10:00
Campbell Barton
b2ebb01255 Fix crash when adding a modal operator from Python with no active window
Reported as part of #107759.
2023-05-12 16:19:24 +10:00
Chris Blackbourn
edc12436c6 UV: During packing, add progress bar and ability to cancel
Uses job system.

Co-authored-by: Campbell Barton <campbell@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/107859
2023-05-12 14:50:40 +12:00
Hans Goudey
85ddc1b0de Cleanup: Use OffsetIndices class in extrude node and merge by distance node 2023-05-11 22:15:41 -04:00
Chris Blackbourn
225d111357 UV: Rename ED_UVPACK_PIN_NORMAL to ED_UVPACK_PIN_DEFAULT 2023-05-12 11:09:27 +12:00
Chris Blackbourn
eb273143c6 Cleanup: format 2023-05-12 11:00:26 +12:00
Habib Gahbiche
7495a1dee1 Fix #98475: Full frame compositor: File Output node using EXR-Multilayer is broken
The same input (original image) was used for all layers. Now the operation correctly assigns the right input to the right output buffer.

Pull Request: https://projects.blender.org/blender/blender/pulls/107709
2023-05-11 21:01:44 +02:00
Erik Abrahamsson
36983fb5e4 Geometry Nodes: Add 'Signed Distance' input node
Adds an input node Signed Distance that can
be used to refer to the distance-grid of an SDF volume.
Right now it's experimental and can be enabled by enabling
"New Volume Nodes" in the preferences.

It returns a float AttributeFieldInput called 'distance' which
can tell Volume nodes which grid to get.

See #103248.
2023-05-11 18:25:34 +02:00
Miguel Pozo
8a9f3b2a68 Shader Nodes: Move socket defaults to node declaration
Solves the same issue that was reported in #108726.
2023-05-11 18:00:12 +02:00
Hans Goudey
2db23d38ca Fix #107826: Missing defaults for principlied volume string sockets
Caused by the dynamic declaration changes in 0de54b84c6.
The fix is to use the declaration to store the socket defaults.
2023-05-11 11:32:42 -04:00
Germano Cavalcante
5d09699d3c Cleanup: use more descriptive names for snap cursor API
Inform in the name that:
- the state is being edited
- the active state is the one used
- a state can be created and freed
2023-05-11 11:46:09 -03:00