Commit Graph

123294 Commits

Author SHA1 Message Date
Sergey Sharybin
63c20e08c4 Fix set but unused variable in Libmv 2023-04-19 10:02:09 +02:00
Sergey Sharybin
4f7dc1e4b6 Fix set but unused variable in IK solver 2023-04-19 10:02:09 +02:00
Sergey Sharybin
8ed543c6f2 Fix set but unused variable in dualcon octree 2023-04-19 10:02:09 +02:00
Sergey Sharybin
daaed83a32 Fix set but unused variables in Cycles 2023-04-19 10:02:09 +02:00
Sergey Sharybin
7982d86117 Fix unqualified access to std::move in Cycles 2023-04-19 10:02:09 +02:00
Sergey Sharybin
33e5cd4e2f Fix bitwise operation used on boolean in Mantaflow 2023-04-19 10:02:09 +02:00
Sergey Sharybin
8365bce958 CMake: Add extra strict flags cancellation for Clang 2023-04-19 10:02:09 +02:00
Philipp Oeser
b0ec4d889a Fix #106998: selection of bones in grease pencil weightpaint mode fails
Caused by 2eeec49640.

Above commit would early out when falling through the specialized
greasepencil selection operator to view3d_select_exec. But in order to
select posebones in grease pencil weightpaint mode, we still have to
continue with view3d_select_exec.

Now check this special case [with convenient
`BKE_object_pose_armature_get_with_wpaint_check`] and DONT early out in
that case.

Should go into 3.3 LTS as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/107076
2023-04-19 09:13:21 +02:00
Omar Emara
c10e8e4166 Fix #106751: No implicit conversion for group inputs
When a node input is connected to a group node input that is unlinked
and is of a different type, no implicit conversion takes place, so the
value is unexpected.

This patch fixes that by considering the types of both sockets and do
implicit conversion if necessary.
2023-04-19 06:24:39 +02:00
Ankit Meel
ed590e9181 macOS/GTests: simplify blender_test library linking
Reverts dcb2821292f962951e88f146cb304160f21f73da but handles
the linker error by relying on target_link_libraries deduplication.

Reverts 18a15bafe8bcab9d367fc830cb77019ce1a69816 but handles
blender_test linking after dependency change by passing
lib to target_link_libraries itself.

Closes #107033
2023-04-19 09:05:43 +05:30
Campbell Barton
26a194abbd BLI_path: add BLI_path_extension_strip as an alternative to replace
While replacing the extension with an empty string works,
it required a redundant string-size argument which took a dummy
value in some cases. Avoid having to pass in a redundant string size by
adding a function that strips the extension.
2023-04-19 12:59:43 +10:00
Campbell Barton
9e6757f20f Cleanup: expand on why the extension isn't replaced for blend-file save 2023-04-19 12:58:54 +10:00
Campbell Barton
61fe8da989 Cleanup: avoid changing the filepath for alembic frame range calculation
The internal utility get_sequence_len would make it's filename
argument absolute so as to scan it's directory for files.

Perform this on the directory instead so the filename can be const.
2023-04-19 12:33:28 +10:00
Campbell Barton
643f8bcedd Cleanup: avoid redundant string copy
This may have been done because BLI_path_frame_get used to take a
non-const string.
2023-04-19 12:32:42 +10:00
Campbell Barton
f8e23e495b BLI_path: improve behavior of BLI_path_extension
Finding the extension included hidden files (starting with a '.'),
now finding the extension matches Python's `os.path.splitext` behavior
which has the advantate a hidden file is not considered one long
extension - with an empty name part.

Also update code to use BLI_path_extension in cases which previously
in-lined this logic.

BLI_path_frame_get path argument is now const,
it was being manipulated unnecessarily.
2023-04-19 11:33:26 +10:00
Campbell Barton
7f241fc773 Tests: add test for BLI_path_suffix & BLI_path_sequence_decode 2023-04-19 11:33:26 +10:00
Damien Picard
6d2351d26b Text object: operators to move cursor to the top or bottom
This adds new movement types TEXT_BEGIN and TEXT_END to allow
FONT_OT_move and FONT_OT_move_select operators move the text
cursor (caret) to the top and bottom of the text.

Pull Request: https://projects.blender.org/blender/blender/pulls/106196
2023-04-19 02:18:19 +02:00
Campbell Barton
846d78b09a Cleanup: improve doc-strings for EditFont 2023-04-19 09:06:24 +10:00
Campbell Barton
b132118f89 Cleanup: balance doxygen grouping, minor grouping adjustment 2023-04-19 09:02:21 +10:00
Campbell Barton
88f5dd3c72 Cleanup: format 2023-04-19 08:02:42 +10:00
Campbell Barton
eb2867de90 Cleanup: spelling in comments 2023-04-19 08:02:41 +10:00
Mateusz Albecki
0fd14d659b GHOST/Wayland: Fix disposeContext with VK
During createOffscreenContext with VK backend enabled wl_surface
was not stored in the context's user data. This resulted in nullptr
dereference later on during disposeContext. Added a line that sets
user data and additionally added nullptr checks in disposeContext.

Ref !107057.
2023-04-19 07:44:06 +10:00
Harley Acheson
1469613d65 Fix Build Warnings
A differing const argument and an unused var caused by conditionals.

Introduced in 694f792ee1
2023-04-18 13:59:07 -07:00
Xavier Hallade
4382a0b350 Cleanup: avoid warnings from gcc in oneAPI device compilation
When building using GCC and with Embree without GPU support, there were
a few unused variables and a non-defined macro.
2023-04-18 22:40:40 +02:00
Xavier Hallade
70892e82ac Cycles: oneAPI: use specialization constant to compile with/without Embree on GPU 2023-04-18 22:09:42 +02:00
Xavier Hallade
9821a2d397 Cycles: pass kernel features to get_bvh_layout_mask
This allows to selectively disable Hardware Raytracing in oneAPI
backend, depending on features used.
2023-04-18 22:09:42 +02:00
Nikita Sirgienko
3f8c995109 Cycles: add hardware raytracing support to oneAPI device
Updated Embree 4 library with GPU support is required for it to be
compiled - compatiblity with Embree 3 and Embree 4 without GPU support
is maintained.
Enabling hardware raytracing is an opt-in user setting for now.

Pull Request: https://projects.blender.org/blender/blender/pulls/106266
2023-04-18 22:09:42 +02:00
Xavier Hallade
887022257d Cycles: update DPCPP to 2022-12 release
We also backport a patch to program_manager to it as
61e51015a5
helps avoid unnecessary recompilation when enumerating available
kernels.
2023-04-18 22:09:41 +02:00
Xavier Hallade
5cdf0c9ee9 Cycles: update compute-runtime to 23.05.25593.18
This fixes oneAPI AoT compilation on Linux when using Embree on GPU.
2023-04-18 22:09:41 +02:00
Xavier Hallade
66b4e426cc Cycles: build Embree 4 with GPU support 2023-04-18 22:09:41 +02:00
Harley Acheson
72aeee96ac Fix Build Warning in fileops.c
Marking unused function arguments caused by conditionals.

Introduced in 694f792ee1
2023-04-18 12:53:45 -07:00
Harley Acheson
f7ba61d3a6 Fix #107009: Setting Text Object Styles
This allows toggling of text styles of selected text and at the current
mouse cursor position if nothing is selected.

Pull Request: https://projects.blender.org/blender/blender/pulls/107048
2023-04-18 21:24:38 +02:00
Hans Goudey
70d854538b Curves: Optimize edit mode selection draw extraction
Use the attribute API for domain and type interpolation instead of doing
it manually. I observed a 3.8x improvement in curve selection mode and
an 18x improvement in point selection mode.
2023-04-18 14:57:04 -04:00
Harley Acheson
694f792ee1 UI: OS File Operations Within File Browser
Adds a submenu to the File Browser selected item context menu that
allows opening the item or viewing the location in an OS browsing
window. On Win32 also allows other actions like editing, searching,
opening command prompt, etc.

Pull Request: https://projects.blender.org/blender/blender/pulls/104531
2023-04-18 20:39:30 +02:00
Hans Goudey
4edcae75aa Cleanup: Remove unused using keyword 2023-04-18 13:38:11 -04:00
Xavier Hallade
954c6c0ae6 Revert "Cycles: move oneAPI kernels dynamic library to blender.shared"
This reverts commit df096eab77436c0191f39806b0907aeb9744bee8.
There is a corner case for when WITH_CYCLES_ONEAPI_BINARIES is set to on
and later turned off during config, in case there is no ocloc.
2023-04-18 18:48:37 +02:00
Nathan Vegdahl
3a72442f63 Fix comment style in previous commit.
Pull Request: https://projects.blender.org/blender/blender/pulls/107091
2023-04-18 17:28:53 +02:00
Nathan Vegdahl
5bb3a3f157 Fix: segfault when indexing into some collections with strings.
This happens when the collection's item type doesn't have a
'nameproperty' to index with.  For debug builds we error out with an
assert, since in general this shouldn't happen.  For release builds
Python will report item not found.

Pull Request: https://projects.blender.org/blender/blender/pulls/107086
2023-04-18 17:15:22 +02:00
Hans Goudey
d818d05415 Cleanup: Remove unnecessary attribute provider callbacks
We don't use the callbacks that create virtual arrays from the custom data
anymore, they just add extra indirection. The only non-obvious case was
the crease attribute which had a setter function. Replace that with an
attribute validator like the other similar attributes.

Pull Request: https://projects.blender.org/blender/blender/pulls/107088
2023-04-18 17:13:38 +02:00
Pratik Borhade
7c927155b5 Fix #90159: Inconsistent display of active filters for import/export file dialogs
Use `filter_glob` property to list only operator extension files.
PR includes filtering for collada, usd, alembic file formats.

Old Revision: https://archive.blender.org/developer/D16739

Pull Request: https://projects.blender.org/blender/blender/pulls/107034
2023-04-18 15:57:45 +02:00
Sergey Sharybin
63f309df11 Fix #107081: Slow selection with context variables
A solution for an older bug was causing it.

Added a special case to avoid an extra relation for context
variables as they do not change during the dependency graph
evaluation,

Pull Request: https://projects.blender.org/blender/blender/pulls/107082
2023-04-18 15:40:07 +02:00
Falk David
66158498de BLI: Return number of values removed from remove_if
Make the `remove_if` function for `Vector`, `VectorSet`, `Set`, and `Map` return the number of elements it removed.

Pull Request: https://projects.blender.org/blender/blender/pulls/107069
2023-04-18 13:28:14 +02:00
Xavier Hallade
25747301db Cycles: fix SYCL debug library linking on Windows 2023-04-18 12:33:48 +02:00
Campbell Barton
b623be3377 Cleanup: remove clang-format: off for EnumPropertyItem definitions
These aren't special cases so format them as is done with all other
enum-property declarations.
2023-04-18 20:30:00 +10:00
Campbell Barton
77268dbe3b WM: add versioning for 3.5 sculpt brushes (part of fix for #106057)
Add a versioning function for tool ID's which can be used if these
need to be changed in future.
2023-04-18 20:30:00 +10:00
Campbell Barton
7b4d71683f Fix #107060: Curves sculpt mode does not select default tool
Regression in [0] when curve tool names changed to use brush names
with the utility function generate_from_enum_ex().

[0]: 786734e6c8ddab6cbea7d42389f8f8190e59853c
2023-04-18 20:16:31 +10:00
Campbell Barton
58b1c54671 Cleanup: remove "Curves" suffix from curve sculpting enum
This isn't necessary information & types aren't included in other
brush names.
2023-04-18 20:16:31 +10:00
732fa26413 Fix #107032: API Document: matrix_channel (PoseBone) description incorrect
Update the RNA and DNA documentation for two bone matrices:

- `PoseBone.matrix_channel` (`bPoseChannel::chan_mat` in DNA) contains
  the evaluated loc/rot/scale channels, including constraints and drivers.
- `PoseBone.matrix` (`bPoseChannel::pose_mat` in DNA) contains the same
  transform, but then expressed in the armature object space.

No functional changes, just clarifications in comments / tooltips.
2023-04-18 12:01:45 +02:00
Weizhen Huang
4d7a7ce67c Fix #107050: accessing nullptr after progress is canceled 2023-04-18 11:58:07 +02:00
Bastien Montagne
6e75581e65 BKE: Rework ID swap code to properly handle embedded ID pointers.
While embedded IDs are usually considered as private local data of their
owner ID, some areas of code, like the depsgraph, can consider them as
regular IDs in some aspects.

So when swapping IDs, also properly 'counter-swap' their potential
embedded IDs, such that the pointers to the embedded IDs remain as before
swapping, even though the data of the embedded IDs is swapped.

The main target of this change is memfile undo code. There, newly read
IDs are swapped with their oldder version, so that the old address
contains the new data. This allows to avoid rebuilding some of the
depsgraph. Doing the same thing for embedded IDs should reduce even
further the needs for depsgrah rebuilds on undo steps.

This commit also gives more control over the remapping of 'self' ID
pointers inside themselves.

Pull Request: https://projects.blender.org/blender/blender/pulls/107044
2023-04-18 11:09:36 +02:00