Commit Graph

130310 Commits

Author SHA1 Message Date
Omar Emara
b71cddb6b4 Fix: Link errors due to different linkage in recent refactor 2023-11-16 16:16:08 +02:00
Jeroen Bakker
782e2e5f9a Vulkan: Make Command Pool, Descriptor Sets Context Specific
In Blender a context should not be shared between threads. In Vulkan a
command pool must not be shared between threads. In the current
implementation the command pool are stored on device level and could
therefore be shared between multiple context which made the implementation
not matching these rules.

This PR moves the command pool from device to command buffers where it
would not conflict between other contexts. This PR doesn't make the Vulkan
backend fully multithreaded. The access to the queue is still missing.

Pull Request: https://projects.blender.org/blender/blender/pulls/114977
2023-11-16 15:03:47 +01:00
Omar Emara
c5eb420c74 Viewport Compositor: Allow access to depth pass
This patch allows access to the depth pass in the Viewport Compositor.

Since the depth information require full precision, making use of the
pass requires the full precision option for now. In the future, this
pass will always be stored using full precision regardless of the
precision option.
2023-11-16 15:04:47 +02:00
Hans Goudey
f27aee857b Cleanup: Remove unnecessary keywords from newly C++ headers 2023-11-16 12:00:26 +01:00
Amelie Fondevilla
d2e40185d3 GPv3: Frame selected channels for grease pencil
Update the code for framing selected channels to take into account grease pencil channels.

Pull Request: https://projects.blender.org/blender/blender/pulls/111512
2023-11-16 11:49:34 +01:00
Hans Goudey
3d57bc4397 Cleanup: Move several blenkernel headers to C++
Mostly focus on areas where we're already using C++ features,
where combining C and C++ APIs is getting in the way.

Pull Request: https://projects.blender.org/blender/blender/pulls/114972
2023-11-16 11:41:55 +01:00
Hans Goudey
451c054d9b Fix #114822: Data transfer modifier doesn't work for face corner normals
In 89e3ba4e25, the preprocess step was removed because the
normals are lazily calculated. But now we need to fetch the source normals
from the correct placed-- they still were looked for in `CD_NORMAL`.
2023-11-16 11:41:33 +01:00
Christoph Lendenfeld
f52d026151 BLI: Two digit ms precision for SCOPED_TIMER macro
When using `SCOPED_TIMER` or `SCOPED_TIMER_AVERAGED`
the display would switch from ns to ms
once the value is over 0.1 ms with a precision of 1.
So when the timer value is hovering in the range of 0.1 - 0.2 ms it is
not giving any useful information.

Fix this by adding another digit to the precision of ms.

Pull Request: https://projects.blender.org/blender/blender/pulls/114724
2023-11-16 10:42:35 +01:00
Sergey Sharybin
5ef5567b82 Fix Strip->Split menu entry not working after recent change
Caused by bfe6128748.

The split frame logic actually became inverted in the update:
when the cursor position is true, then the frame is supposed
to be initialized in the invoke().

The menu does not use cursor position, so the code path where
the frame is retrieved from the RNA properties was used, and
the frame was never initialized in that case.

Pull Request: https://projects.blender.org/blender/blender/pulls/114973
2023-11-16 10:40:37 +01:00
Hans Goudey
31c1207c1a Fix #114830: Sculpt line project inverted
Caused by 44b79af4fc
2023-11-16 10:31:58 +01:00
Pratik Borhade
4ee531cf26 Fix #114848: Crash when adding specular texture slot in texture paint mode
This is because the idname for specular node is changed in 1d265eed5d.
Hence `nodeFindSocket` was returning invalid socket.

Pull Request: https://projects.blender.org/blender/blender/pulls/114884
2023-11-16 09:55:53 +01:00
Sergey Sharybin
fa0d3d2b58 Fix #114661: Incorrect display of Rec.1886 and Rec. 2020 view transforms
Seems that the ExponentWithLinearTransform with offset=0 does not render
properly on GPU on Apply Silicon GPUs. Likely, it is possible to use plain
ExponentTransform in this case, which should also be faster.

Candidate for 4.0.1 corrective release.

Pull Request: https://projects.blender.org/blender/blender/pulls/114853
2023-11-16 09:47:49 +01:00
Philipp Oeser
578b479998 Fix #114892: crash opening old files with text objects
Exposed by 16e4eeb9c0.

In (rare) occasions, a Curve's `CharInfo` can be NULL.
This also crashed going into editmode on affected text objects in
previous versions, however opening and rendering these files was still
fine.

In 4.0, opening those kind of files crashed.

It is not entirely clear how this can happen (there are comments in code
dating back to 97df61a7e5 mentioning "old file", there might be other
reasons, too), still, avoiding the crash on file open seems like good
practice.

Pull Request: https://projects.blender.org/blender/blender/pulls/114916
2023-11-16 09:42:34 +01:00
Hans Goudey
d46d1bbe6a Fix #114948: Parenting crash blender since ObjectRuntime refactor
Caused by 4bcdc57fc8
2023-11-16 09:16:48 +01:00
Jeroen Bakker
81eec5ff44 Cleanup: Make format 2023-11-16 07:59:20 +01:00
Harley Acheson
d0c073898a UI: Add Area Split Icons to Header Context Menu
With addition of area splitting icons in #114433,
also use them in Region Context menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/114935
2023-11-15 20:33:49 +01:00
Stefan Heinz
153dd76d22 UI: Icons for Horizontal and Vertical Split
Adding new icons to represent horizontal and vertical area splitting.

Pull Request: https://projects.blender.org/blender/blender/pulls/114433
2023-11-15 20:16:49 +01:00
Harley Acheson
8e691ad5be Cleanup: Arrow Operator Required
Just two changes from dot operator to arrow operator, required because
of recent refactor.
2023-11-15 10:23:45 -08:00
georgiy.m.markelov@gmail.com
d3971628e1 Hydra: Use BKE_camera_params to simplify camera code
Ref #110765

Co-authored-by: Bogdan Nagirniak <bodyan@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/114370
2023-11-15 19:03:22 +01:00
Harley Acheson
06404082b5 Cleanup: Synchronizing Icons
Mostly just the result of running `blender_icons_update.py` without adding or changing any icon source files. Removal of three unused icons and adding three others to the project to resolve conflicts between them.

Pull Request: https://projects.blender.org/blender/blender/pulls/114874
2023-11-15 18:59:19 +01:00
Hans Goudey
600a133521 Geometry Nodes: Convert four nodes to use rotation socket
Convert the vector socket from four nodes to a rotation socket, adding
versioning to insert the conversion nodes and change the default values
where necessary.
- Distribute Points on Faces
- Instance on Points
- Rotate Instances
- Transform Geometry

Implicit conversions from vectors and floats, and to vectors have been
added, though using rotation sockets directly can be faster, since converting
to and from Euler rotations is slow. Conversion nodes are not inserted
by versioning if the implicit conversions can be used.

This change is not forward compatible with 3.6, and socket values
are lost when opening 4.1 files in 4.0. The correct socket types are
added back in old versions, though newly added conversion nodes
may have to be removed.

Pull Request: https://projects.blender.org/blender/blender/pulls/111482
2023-11-15 18:56:00 +01:00
Hans Goudey
4bcdc57fc8 Refactor: Move object runtime data to separate allocation
Move object runtime data to a separate header and allocate it separately
as `blender::bke::ObjectRuntime`. This is how node, mesh, curves, and
point cloud runtime data is stored.

Benefits:
- Allow using C++ types in object runtime data
- Reduce space required for Object struct in files
- Increase conceptual separation between DNA and runtime data
- Remove the need to add manual padding in runtime data
- Include runtime struct definition only in files that require it

Pull Request: https://projects.blender.org/blender/blender/pulls/113957
2023-11-15 18:46:07 +01:00
Harley Acheson
97d1233bad Cleanup: Make format
Formatting changes resulting from running Make Format
2023-11-15 09:38:01 -08:00
Ray Molenkamp
a277ca3d3d Fix #114906 invalid reuse of shell_link
shell_link was being reused, sometimes returning the previous
data causing links that were not ours to be updated.

Co-authored-by: Harley Acheson <harley.acheson@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/114924
2023-11-15 18:32:45 +01:00
Brecht Van Lommel
fa3c283780 Build: fix ffmpeg dependency build failing with new texinfo
There is an incompatibility in the latest texinfo that makes our current
ffmpeg version fail to build. Disable unnecessary ffmpeg docs building.
2023-11-15 17:40:05 +01:00
Brecht Van Lommel
25cfd64afa Build: remove outdated bf-committers email from bpy package
Mailing lists are no longer active.
2023-11-15 17:40:05 +01:00
Hans Goudey
3fcd9c9425 Geometry Nodes: Support node tools in object mode
Extend node tools to display tool assets in object mode as well
as edit and sculpt modes. For consistency with existing Blender
design, selection cannot be set and is just "true" in object mode
because it can't be visualized. The visibility of tools can be
customized per object type in object mode as well.

See #101778

Pull Request: https://projects.blender.org/blender/blender/pulls/114819
2023-11-15 17:01:18 +01:00
Hans Goudey
6d18fe76b5 Fix: Incorrect default used when retrieving material indices 2023-11-15 16:16:22 +01:00
Germano Cavalcante
952d74ebbb Fix #114867: 'i' key in Turkish layout is marked as 'EVT_QUOTEKEY'
Different from most layouts. The Turkish keyboard layout treats the `i` as the lowercase `İ` and the `ı` as the lowercase `I`.

So we have 2 different types of i: `ı` and `İ`. And two different I key positions on the keyboard.

This key with a different position is mapped as special and returns the corresponding `event->type` of the US keyboard `"` (`EVT_QUOTEKEY`).

The apparently most appropriate event for this key would be `EVT_IKEY`.

This type of change needs to be treated with care, as it may alter other shortcuts that are already common to Turkish users.

Pull Request: https://projects.blender.org/blender/blender/pulls/114917
2023-11-15 15:45:45 +01:00
Michael Jones
0334ca0617 Cycles: Fix #114919: Disable MetalRT-by-default if macOS < 14.0
This PR fixes the issue of Cycles renders ending in compilation failure on base M3 machines which are still on their factory installed OS, older than14.0.

Pull Request: https://projects.blender.org/blender/blender/pulls/114920
2023-11-15 15:39:27 +01:00
Hans Goudey
9785f2631e Mesh: Add flag to store presence of overlapping topology
For improving performance in the triangulate node (#112264), it's
helpful to know whether the mesh has edges or faces that overlap
each other. If that is known to be false, the node can skip edge de-
duplication.This might apply to the future "Replace Faces" node too.

This information is stored as a flag on the mesh and set in various
places that create "clean" new meshes. It isn't calculated lazily unlike
other other areas, because the point is to improve performance, and
the calculation probably isn't faster than the duplication check it's
meant to replace.

Pull Request: https://projects.blender.org/blender/blender/pulls/113205
2023-11-15 14:02:48 +01:00
Lukas Tönne
ec36296913 Geometry Nodes: Test for field type inferencing
Adds a python test script for the field inferencing mechanism in geometry nodes.

Tests various combinations of field-to-value and value-to-field combinations as well as unconnected base nodes. Zones are tested because they can require multiple passes to resolve, especially when nesting.

Testing is based on socket display shapes as a proxy for field type, since the field type is not exposed in RNA yet. Likewise, testing for red links caused by field dependencies can only be done indirectly currently, because such links are not actually made invalid by the inferencing code, and just drawn red by the editor.

Pull Request: https://projects.blender.org/blender/blender/pulls/114903
2023-11-15 12:26:48 +01:00
Philipp Oeser
bfe6128748 Fix #114891: bpy.ops.sequencer.split ignores passed frame
Caused by 0e01667e25 .

Above commit changed it so that operator properties (set from python)
were ignored for `split_frame` & `split_channel` in case
`use_cursor_position` is False.

Should be the other way around.

Pull Request: https://projects.blender.org/blender/blender/pulls/114905
2023-11-15 12:04:22 +01:00
Bastien Montagne
b416c3da3c Minor cleanup/precision to some comments regarding ID management. 2023-11-15 11:34:09 +01:00
Amine Bensalem
7010a2ee0e Geometry Nodes: Consistent name for points node geometry output
Fixed geometry node socket output name  for issue #113340 to "Points".

Pull Request: https://projects.blender.org/blender/blender/pulls/113353
2023-11-15 11:31:28 +01:00
Hans Goudey
14eb08c3a5 Fix #114870: Object dimensions does not used evaluated geometry
Refactoring of object bounds to make evaluated to original syncing
more explicit wasn't accounted for yet. This was a mistake in the most
recent refactor 1cbd0f5a85.

To fix this, add separate functions to account for `runtime.bb` which
is the data synced from the evalauted object to the original. In future
refactors, `runtime.bb` will be changed more, including a more helpful
name that reflects this purpose.

Pull Request: https://projects.blender.org/blender/blender/pulls/114897
2023-11-15 11:03:04 +01:00
ariva00
d7b7938706 Fix #92287: focal legth not correctly computed when tracking vertial videos
The motion tracking always operates with horizontal sensor mapping, but
conversion code form tracking camera to Blender camera was not setting
the sensor fitting to Horizontal (Python code was leaving sensor fitting
unchanged, C code was setting it to Auto).

Additionally, the Python code was not handling camera shift, making it
so non-centered optical center was not handled correctly.

The reason why the code is written in two places is because C code is
used when conversion from tracking camera to Blender happens after solving
the motion, and the Python code is used for the "Setup Tracking Scene".
It is possible to unify some code, but it is not that much of an importance
at this time.

Pull Request: https://projects.blender.org/blender/blender/pulls/114253
2023-11-15 10:53:30 +01:00
Jesse Yurkovich
3a312babe6 Fix #114847: Skip past more newlines when parsing PLY files
When parsing PLY files it was possible that the buffer would contain
leading newline characters which were not being accounted for.

Ensure we skip past them each time we refill the buffer. Also properly
return an error string when handling such lines in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/114878
2023-11-15 08:31:55 +01:00
Harley Acheson
5c04b477aa Fix #114855: Crash Loading Win32 Quick Access
Replace use of macro FAILED with explicit checks for S_OK returns. Some
of these functions can return S_FALSE, which indicates a negative
condition that is not failure. It is not caught by the FAILED macro.
Therefore this function will fail in circumstances where the quick
access folder is not found or perhaps empty.

Pull Request: https://projects.blender.org/blender/blender/pulls/114866
2023-11-14 21:16:22 +01:00
Clément Foucault
3ead36a8ba GHOST: Cleanup: Remove GHOST_OPENGL_ALPHA
This is never define and has no use in current blender.

If we want to keep this functionality, we should
at the very least rename it to `GHOST_WINDOW_ALPHA`.

Pull Request: https://projects.blender.org/blender/blender/pulls/114815
2023-11-14 20:24:55 +01:00
Christoph Lendenfeld
dac896edd6 Refactor: code style in keyframes_keylist.cc
No functional changes.

Clean up the code by
* returning early where possible
* removing comments that just repeat what the code does
* Make sure comments follow the style guidelines

Pull Request: https://projects.blender.org/blender/blender/pulls/114851
2023-11-14 16:48:04 +01:00
Hans Goudey
1a8b5bcd43 Fix #114841: Sculpt Multires drawing broken with no mask
The GPU buffer type was replaced with `float` in 4151691552,
but the "no mask" case wasn't changed. We still assigned a `uchar` value
to a `float` pointer, which made the drawing look random. Instead do the
same fill we use for other PBVH types.

Pull Request: https://projects.blender.org/blender/blender/pulls/114846
2023-11-14 16:28:46 +01:00
Jeroen Bakker
0bec7f7360 Fix: Vulkan Texel Buffers Texture Format
Due to recent changes texel buffers could not be attached as the texture
format wasn't set.

Pull Request: https://projects.blender.org/blender/blender/pulls/114844
2023-11-14 15:36:52 +01:00
Thomas Dinges
f27dd74986 Fix syntax error in last commit 2023-11-14 13:57:29 +01:00
Jeroen Bakker
0a0689b0b7 Cleanup: Reduce overloaded-virtual warnings
Pull Request: https://projects.blender.org/blender/blender/pulls/114836
2023-11-14 13:55:37 +01:00
Thomas Dinges
f0f5d69516 Release: Update company credits and sort alphabetically 2023-11-14 13:54:04 +01:00
Pratik Borhade
920d9a9165 Fix #114758: keep text field empty for global search
Revert cea02c15f8. This will fix the issue
mentioned in #114758 and it will also allow user to see recent
searches in the list below the search box (F3).

Pull Request: https://projects.blender.org/blender/blender/pulls/114774
2023-11-14 12:31:55 +01:00
Jeroen Bakker
4ecd6abf78 Vulkan: Make Anisotropy Sampling Optional
Anisotropy samplers are optional in Vulkan. This change will disable
anisotropy samplers when the feature isn't available on the device.

The support for anisotropy samplers is around 90% so would not expect
any compatibility issues.

Pull Request: https://projects.blender.org/blender/blender/pulls/114833
2023-11-14 12:24:46 +01:00
Hans Goudey
fdae173ed4 Cleanup: Fix debug build error after recent commit 2023-11-14 12:03:52 +01:00
Douglas Paul
90de0368cd Geometry Nodes: Add a Group ID input to the Fill Curve node
This adds a "Group ID" input to the Fill Curve node, per #102285.

The curve filling operation is performed separately for each group,
so curves associated with different Group IDs do not intersect.

This implementation also supports Grease Pencil 3 curves.

Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/114048
2023-11-14 11:23:19 +01:00