Commit Graph

130296 Commits

Author SHA1 Message Date
Jacques Lucke
f3cd25370c Nodes: ungroup all selected group nodes instead of just the active one
It's useful to be able to ungroup multiple groups at once when trying to
see how much complexity there is in a node setup.
2023-11-17 22:48:53 +01:00
Bastien Montagne
cb06b30587 Add 'rename' unittest for BLI_fileops' BLI_rename/_overwrite().
Pull Request: https://projects.blender.org/blender/blender/pulls/115067
2023-11-17 20:52:03 +01:00
Harley Acheson
c11d5b4180 UI: Color Picker Position Indication
Changes to how the current positions in the color picker are shown.

Pull Request: https://projects.blender.org/blender/blender/pulls/113753
2023-11-17 19:18:28 +01:00
Patrick Mours
697114c4b6 Fix #113325: Zero-sized curve leads to OptiX error
Empty hair geometry in Cycles may still report having one curve, even when
there are no actual segments in that curve. This caused an attempt to build
an acceleration structure with zero primitives, which due to other setup
OptiX rejected with an error. Fix that by checking the number of segments
rather than the number of curves in the hair geometry, since the former will
always be zero for empty geometry.

Pull Request: https://projects.blender.org/blender/blender/pulls/115044
2023-11-17 17:20:57 +01:00
Miguel Pozo
f27e87db7a Fix #114918: Workbench: Negative scaled sculpt mesh artifacts 2023-11-17 16:37:59 +01:00
Iliya Katueshenock
8149678d5e Geometry Nodes: use dynamic declaration for some nodes
This changes a bunch of nodes that have a data type drop-down to using a dynamic
node declaration that changes based on the selected data type instead of always having
all sockets. This greatly simplifies the code and is less weird than having suffixes on
socket identifiers.

Backward compatibility and forward compatibility remain due to #113497 and #113984.

One user-visible change is that changing the data type in these nodes does not break
the link anymore.

It may be necessary to bring back some functionality from link-drag-search afterwards.

Pull Request: https://projects.blender.org/blender/blender/pulls/113553
2023-11-17 16:23:34 +01:00
Christoph Lendenfeld
a4f086ec1b Refactor: move autokeyframe_pose
No functional changes.

Move the function `autokeyframe_pose` from
`transform_convert_armature.cc` to `keyframing_auto.cc`

The function has a lot of overlap with `autokeyframe_object` so it
can potentially be simplified later on.

Pull Request: https://projects.blender.org/blender/blender/pulls/115051
2023-11-17 16:06:15 +01:00
Jacques Lucke
e62179ce04 Fix: assert when running deform modifier tests in debug build
The issue was that `dco` had a different size than was expected
because it was intentionally larger than strictly necessary.
2023-11-17 13:10:51 +01:00
Germano Cavalcante
e581dde40f Transform: remove restricted assert
`t-val` and `t->loc` can share same pointer, as long as `t->loc` is 3D.

This partially reverts 9dcf73c715
2023-11-17 08:55:27 -03:00
Jeroen Bakker
f6569b7726 Cleanup: Make format 2023-11-17 11:54:19 +01:00
Christoph Lendenfeld
10fae637aa Refactor: Extract function to initialize a BezTriple
No functional changes.

The function `insert_vert_fcurve` also initialized a `BezTriple` from the flags it got.
Extract that logic into a separate function so it can be reused elsewhere

Pull Request: https://projects.blender.org/blender/blender/pulls/115039
2023-11-17 11:34:30 +01:00
Falk David
a884968593 GPv3: Use immutable layer references
In `retrieve_editable_drawings` the code was using mutable pointers
to the layers when it could use immutable ones.
2023-11-17 10:43:12 +01:00
Falk David
143b891ff9 Fix: GPv3: Using current frame twice in multi-frame
The function that returns the frame numbers for a layer would
include the current frame twice if multi frame editing was used.
2023-11-17 10:43:12 +01:00
Bastien Montagne
21a54d5b58 Fix 'Make LibOverride' on Empty-instanced collection making everything editable.
Logic handling the 'make everything editable' option was wrong, this is
currently not exposed in 3DView operator, and should always be false.
2023-11-17 10:42:29 +01:00
Bastien Montagne
35cd6397d5 Fix 'Make LibOverride' from 3DView failing in some trivial cases.
Slightly non-trivial linked collections hierarchy could cause 'Make
LibOverride' operation from 3DView fail, reporting that more than one
potential root collections were found.

Logic here was way to simple, now this error should only happen when
there are effectively more than one potential 'good' root collection
(i.e. when two unrelated collections both contain (directly or not) the
selected objects(s).
2023-11-17 10:42:29 +01:00
Antonio Vazquez
00b04e1030 GPv3: Fix Remove Material Slot and Unused Slots
There was two problems because these operators were not supported in GPv3:

* If you remove the slot, the material was not reassigned and the material index attribute could get a wrong index. This also affected the unused slots.
* The Unused Materials operator was executed, but it was doing nothing because there was not support for new GPv3 object.

This PR adds support for new Grease Pencil object.

Pull Request: https://projects.blender.org/blender/blender/pulls/114850
2023-11-17 10:37:56 +01:00
casey bianco-davis
4dfed520a3 GPv3: Delete operator
Adds the delete operator to edit mode grease pencil, and also adds it to the delete menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/111571
2023-11-17 10:35:56 +01:00
Antonio Vazquez
39f30e848c GPv3: Show All Materials Operator
Adds the Show All Materials operator.

Also includes a refresh of despgraph when the hide prop changes.

Note: The actual render engine does not support hiding by materials.

Related to #114997

Pull Request: https://projects.blender.org/blender/blender/pulls/115001
2023-11-17 10:32:35 +01:00
Hans Goudey
865929d4b1 Cleanup: Retrieve sculpt mask without write access
This may reduce memory usage because the mask data wouldn't
have to be duplicated between the evaluated and original mesh.
2023-11-17 10:29:02 +01:00
Omar Emara
7ea54b7472 Fix #114648: Compositor executes upon editing non-compositor trees
The compositor currently executes when editing node trees that are not
compositor related, like geometry and shader node trees.

That's because the node space listener always tags the compositor to
execute for any node edit notifier. To fix this, we add the ID of the
edited node tree as a reference to the edit notifier and only tag for
an update when the space tree matches the reference one.

Pull Request: https://projects.blender.org/blender/blender/pulls/114978
2023-11-17 08:52:47 +01:00
Jeroen Bakker
54e1ee3905 Vulkan: Combine Data Transfer and Compute Commands
Currently we keep track of 3 command buffers. Data transfer, compute and
graphics. The reason is that data transfer and compute commands cannot
be recorded in a command buffer that has an active render pass.

This PR simplifies the implementation by combining data transfer and
compute commands as there is no need to separate those in individual
command buffers.

This is in preparation of improving submission performance.

Pull Request: https://projects.blender.org/blender/blender/pulls/115033
2023-11-17 08:27:44 +01:00
Jeroen Bakker
35db18af2e Cleanup: Remove Never Failing Check 2023-11-17 07:56:56 +01:00
Harley Acheson
be97ed2828 Fix #115023: Error Measuring Null Menu Item Name
Do not attempt to measure the length of a null string.

Pull Request: https://projects.blender.org/blender/blender/pulls/115027
2023-11-17 06:00:28 +01:00
Philipp Oeser
f815484e7d Outliner: add "Expand/Collapse All" to view context menu
This was only in the blender keymap, but seems useful to have this in a
menu as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/114138
2023-11-17 00:49:04 +01:00
Hans Goudey
c56912eade Cleanup: Acess geometry bounds more directly
Similar commits:
- 4eeabd274e
- 6301775f48
- ab9716f058
2023-11-17 00:41:37 +01:00
Hans Goudey
da511f5573 Fix: Incorrect freeing in depsgraph RNA objects iterator
Caused by 4d7274b7f4.
The depsgraph iterator was freed twice, and the "custom"
iterator wasn't freed at all. Thanks to Jesse for investigating this.
2023-11-17 00:41:37 +01:00
Philipp Oeser
4793b4592b Outliner: clarify "Show Hierarchy" context menu entry
Display OUTLINER_OT_show_hierarchy as "Show Object Hierarchy"

Pull Request: https://projects.blender.org/blender/blender/pulls/114139
2023-11-17 00:31:32 +01:00
Harley Acheson
07820b0703 UI: File Browser Display Narrowing
Change the format of columns, and remove columns, as the File Browser
window narrows.

Pull Request: https://projects.blender.org/blender/blender/pulls/112464
2023-11-17 00:11:40 +01:00
Harley Acheson
d3a2673cb8 Fix #102714: Interface Font Selection
When selecting fonts for the interface, show thumbnails
and start in the user-specified fonts directory

Pull Request: https://projects.blender.org/blender/blender/pulls/113259
2023-11-16 22:07:31 +01:00
Harley Acheson
83ce3ef0db Fix #72093: Collapse Wide Enum Lists to One Column
If a multi-column Enum menu gets too wide for the available space,
collapse it to a single column.

Pull Request: https://projects.blender.org/blender/blender/pulls/105386
2023-11-16 21:14:35 +01:00
Brecht Van Lommel
cb9b7eaa34 Build: fix macOS OpenImageDenoise 2.1 library not loading correctly
Version symlinks are not used on macOS due to notarization issues.
2023-11-16 19:21:30 +01:00
Hans Goudey
4d7274b7f4 Cleanup: Use C++ types for crazyspace deform storage
Use float3, float3x3, and Array for data used for mesh crazyspace
calculation. Propagate the change wherever necessary to not add
more casting to the old C types.

Because `ObjectRuntime` (and therefore `DEGObjectIterData`) became
non-trivial structs, the code that swaps iterators for RNA depsgraph
object iteration had to be changed a bit to be more friendly to C++
memory semantics.

Pull Request: https://projects.blender.org/blender/blender/pulls/114998
2023-11-16 18:29:52 +01:00
Iliya Katueshenock
6e2fc77e7f Fix #114993: wrong entry in Split to Instances domain dropdown
Pull Request: https://projects.blender.org/blender/blender/pulls/115005
2023-11-16 18:29:34 +01:00
Nate Rupsis
661e7e451a Anim: Rename NLA "Channels" to "Tracks"
Updating "NLA Channel"  to "NLA Tracks" across board, since the terminology "Tracks" is the most prevalent in operators, code, etc.
2023-11-16 17:59:18 +01:00
Philipp Oeser
7f33a743d8 Fix #114963: Image Editor - Fill Tool doesn't work as expected
Caused by 406cfd214a.

Was only filling a single pixel.

Some pointer magic wasnt working after culprit commit.
Now changed to a more common way of accessing.

Pull Request: https://projects.blender.org/blender/blender/pulls/114989
2023-11-16 17:08:13 +01:00
Hans Goudey
807c076e28 Cleanup: Remove unused edit mesh cage bounding box cache
Unused after ffaf3e30ef.
These days there are better ways to cache bounds anyway.
2023-11-16 16:28:06 +01:00
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