Commit Graph

100743 Commits

Author SHA1 Message Date
Falk David
0a693165c8 Refactor: Move GreasePencilDrawing functionality
Moves the functions from `GreasePencilDrawing` to a C++ wrapper class.
2023-06-26 14:58:42 +02:00
Jacques Lucke
af476f6a62 Nodes: fix zone detection for some special cases
This fixes crashes in the cases when:
* Two zones have a cyclic parent relationship.
* A node has more than one direct parent zone.
2023-06-26 14:33:37 +02:00
Jeroen Bakker
60a3dbaba9 Cleanup make format 2023-06-26 14:20:31 +02:00
Jeroen Bakker
29ad8750a5 Merge branch 'blender-v3.6-release' 2023-06-26 14:16:22 +02:00
Jeroen Bakker
f7d46d0644 Fix 107322: MacOS/ATI Crash When Starting Eevee
When using ATI GPU on MacOS/Metal compilation of Eevee shaders crashed due to an infinitive
loop in the compiler backend. This change fixes this by using a more reliable loop that
ensures that the loop will be finite.

Thanks for the Apple developers working on finding the root cause and Michael Parking White
for the initial fix.

Fixes #107322
Fixes #107451

Pull Request: https://projects.blender.org/blender/blender/pulls/109358
2023-06-26 14:12:45 +02:00
Falk David
497f9a6941 GPv3: Add operator to reorder the active layer
This operator will reorder the active layer (if there is one) to be above or below the target layer (specified by name).

Pull Request: https://projects.blender.org/blender/blender/pulls/109369
2023-06-26 14:03:28 +02:00
Iliya Katueshenock
d392a8f111 Fix (unreported): Memory leak when adding strip in VSE
Using unsupported movie file when adding movie strip causes memory leak.

Pull Request: https://projects.blender.org/blender/blender/pulls/109078
2023-06-26 13:57:33 +02:00
Damien Picard
9d5ab0a88f I18n: fix translation of undo history
The Undo History menu displays each undo step's name. These are either
operators or property names. Operators are translated upon display,
and they use the operator name. Currently, many of them are not
translated because they do not use the proper translation
context.

This commit changes the translation context to
BLT_I18NCONTEXT_OPERATOR_DEFAULT ("Operator").

Pull Request: https://projects.blender.org/blender/blender/pulls/108872
2023-06-26 12:55:52 +02:00
Bastien Montagne
21f5c7c45f Merge branch 'blender-v3.6-release' 2023-06-26 12:37:11 +02:00
Iliya Katueshenock
5f2368753a Fix #109307: memory leak changing simulation item name
Pull Request: https://projects.blender.org/blender/blender/pulls/109324
2023-06-26 12:33:13 +02:00
Falk David
befe6cb95c Fix: Unlinking GP layer from layer group
The `unlink_layer` function did not clear the parent pointer of the
layer itself.
2023-06-26 12:20:58 +02:00
Falk David
36b6b11d7d Cleanup: Remove unused function
The `bke::greasepencil::LayerGroup::remove_child` function was not used.
2023-06-26 12:20:58 +02:00
Philipp Oeser
f8981b6492 Pyhon API: Add animation playback pre/post handlers
Since d8388ef36a, the "frame_change_post" handler could not be used
anymore to detect when animation playback stopped.

This functionality is needed by certain addons though and is generally
usefull to have, so this is now added.

Related reports : #109168, #109218

Pull Request: https://projects.blender.org/blender/blender/pulls/109232
2023-06-26 12:11:25 +02:00
Miguel Pozo
b14b67db40 Workbench Next: Sculpt Support
Add Sculpt support for the new Draw Manager
and implement Sculpt rendering in Workbench Next.
Instead of using a callback approach, it's now possible to
retrieve a vector of GPUBatches and their material index,
so engines can use them as they see fit.

Pull Request: https://projects.blender.org/blender/blender/pulls/109294
2023-06-26 11:56:10 +02:00
Colin Basnett
7797fcc3c9 Nodes: Don't allow animation for node mute property
Discussions on https://projects.blender.org/blender/blender/pulls/108634 pointed to the idea that the mute property probably shouldn't have been animateable to begin with because of performance concerns.

This simply removes the ability to animate the property.

Pull Request: https://projects.blender.org/blender/blender/pulls/108849
2023-06-26 11:40:12 +02:00
Falk David
c5a8a74f9e Refactor: Convert several animation editor files to C++
Pull Request: https://projects.blender.org/blender/blender/pulls/109251
2023-06-26 11:27:25 +02:00
Falk David
32be07845f Curves: Mask function for end points
This essentially replaces the `ed::curves::select_ends` function by using a new masking function (`ed::curves::end_points`) and manipulating the selection attribute directly in the operators.

Pull Request: https://projects.blender.org/blender/blender/pulls/109293
2023-06-26 11:21:16 +02:00
Harley Acheson
4a80d0b6d5 Refactor: UTF-8 Character Defines
Use defined UTF-8 Universal character names in place of byte escape
sequences and literals.

Pull Request: https://projects.blender.org/blender/blender/pulls/109163
2023-06-26 06:05:18 +02:00
Campbell Barton
54e346f1d5 Cleanup: move run-time VFont enum out of DNA 2023-06-26 13:09:06 +10:00
Iliya Katueshenock
39386175e1 Fix: Incorrect rotation socket hiding in raycast node
The typo was made in 63dae2a105.

Pull Request: https://projects.blender.org/blender/blender/pulls/109352
2023-06-26 03:27:34 +02:00
Campbell Barton
82d9eb09db Cleanup: use term SIZE instead of LEN for defines for buffer sizes
Reserve "LEN" for lengths that don't include the null byte.
2023-06-26 10:09:57 +10:00
Germano Cavalcante
9cbe156d6a Fix snap to origin of objects made behind camera
The clip plane start was being ignored in this case.
2023-06-25 10:30:16 -03:00
Campbell Barton
9a4e823f3f Cleanup: minor changes to string join logic
- When string join truncates, break out of the outer loop too.
- Use BLI_string_len_array when calculating the array size for
  BLI_string_join_array_by_sep_charN.
- Add tests.
2023-06-25 16:45:02 +10:00
Campbell Barton
2c214d5bb5 Fix error in recent removal of BLI_strcpy_rlen
Mistake in caused [0] the string not to be nil terminated.

[0]: b9bf639ba4
2023-06-25 15:25:54 +10:00
Campbell Barton
f4a65cfe5d BLI_string: remove potentially unsafe BLI_sprintf
Replace by BLI_snprintf or string joining.

See #108917.
2023-06-25 13:34:31 +10:00
Campbell Barton
85029da289 Cleanup: compiler warnings 2023-06-25 11:39:25 +10:00
Habib Gahbiche
c8f434e685 Compositor: improve edge detection of Kuwahara filter
Compute edges of image once based on luminance instead of all 3 channels.

This also gives a modest performance improvement of 8%. Measured on intel i9 CPU using a 1920 x 3199 image.

Pull Request: https://projects.blender.org/blender/blender/pulls/108858
2023-06-24 21:39:07 +02:00
Hans Goudey
c1292b4a80 Revert "Fix: Revert changes in Mesh to Volume node and modifier to Blender 3.6"
This reverts commit 537fdbbfa2.

Somehow the revert in 9b708c8650
was undone by the next merge from the 3.6 branch,
9876ff183f.
2023-06-24 14:11:17 -04:00
Weizhen Huang
d4830d711e Cleanup: remove comments regarding Cycles versioning 2023-06-24 19:51:37 +02:00
Clément Foucault
8fd824c4b7 Fix #109314: Metal Debug 'Shaders' Folder appearing in 3.6 &. 4.0
This slipped through a previous Metal PR #107175.

Pull Request: https://projects.blender.org/blender/blender/pulls/109323
2023-06-24 17:40:46 +02:00
Pratik Borhade
51a5be8913 GPv3: Change poll function of select alternate operator
This operator is only supported in point selection mode.
2023-06-24 17:58:53 +05:30
Omar Emara
c9e6399fe1 Realtime Compositor: Implement Keying node
This patch implements the Keying node for the realtime compositor. To
ease the implementation, some morphological operators were moved into
algorithms and a mechanism to steal data between results was added to
the Result class.

Pull Request: https://projects.blender.org/blender/blender/pulls/108393
2023-06-24 13:02:33 +02:00
Campbell Barton
ec428c3f7f CMake: sort file lists, add missing header 2023-06-24 19:05:09 +10:00
Campbell Barton
baa8450fbf License headers: add SPDX-FileCopyrightText 2023-06-24 19:03:06 +10:00
Campbell Barton
b810fd75a4 Cleanup: use _exec suffix for operator callbacks
This was already the case for all but a few places.
2023-06-24 18:56:25 +10:00
Campbell Barton
b9bf639ba4 BLI_string: remove BLI_strcpy_rlen
Avoid BLI_strcpy_rlen use as this has the same problems as strcpy
(it just returned the length which is useful at times).
Use memcpy instead when the size is calculated immediately beforehand.

Other uses of have been replaced by BLI_string_join_array that prevents
buffer overruns by taking the destination buffer length.
2023-06-24 18:49:29 +10:00
Germano Cavalcante
9876ff183f Merge branch 'blender-v3.6-release' into main 2023-06-23 18:26:53 -03:00
Germano Cavalcante
f2fb22b94b Fix snap normal not in world-space
The algorithm that transforms space from local normal to world space was incorrect.

The problem is only observed with Align Rotation to Target on objects
with shear transformation.
2023-06-23 18:23:31 -03:00
Germano Cavalcante
1ef9c16218 Cleanup: Rename SCE_SNAP_MODE_ to SCE_SNAP_TO_
Also rename:
- `SCE_SNAP_MODE_FACE_NEAREST` to `SCE_SNAP_INDIVIDUAL_NEAREST`
- `SCE_SNAP_MODE_FACE_RAYCAST` to `SCE_SNAP_INDIVIDUAL_PROJECT`

And arrange the enums in numerical order.
2023-06-23 17:16:10 -03:00
Hans Goudey
e570f13616 Cleanup: Move NOD_geometry.h to C++
Pull Request: https://projects.blender.org/blender/blender/pulls/109306
2023-06-23 22:15:42 +02:00
Hans Goudey
9b708c8650 Revert "Fix: Revert changes in Mesh to Volume node and modifier to Blender 3.6"
This reverts commit 0b0a5d21ac.

The breaking changes in that commit have been postponed to 4.0.
2023-06-23 14:14:17 -04:00
Jacques Lucke
537fdbbfa2 Fix: Revert changes in Mesh to Volume node and modifier to Blender 3.6
This brings back the `Fill Volume` and `Exterior Bandwidth` inputs in
the Mesh to Volume node and modifier. Those existed in Blender 3.5 but
were removed in 700d168a5c because the way they were
implemented did not use the openvdb api in the right way.

While it's rare that people turned off the `Fill Volume` option, the
exterior bandwidth was used more and can have significant impact on
the result. Furthermore, there is no clear replacement for the
functionality.

Therefore, we decided to roll back the changes in 3.6 to avoid breaking
compatibility. We intend to keep the changes in 4.0 for now, but need
to work on a more clear short term replacement for the removed
functionality.

Pull Request: https://projects.blender.org/blender/blender/pulls/109297
2023-06-23 14:14:17 -04:00
Brecht Van Lommel
16739b92ca Realtime Compositor: cache GPU context for repeated executions
Pull Request: https://projects.blender.org/blender/blender/pulls/108909
2023-06-23 20:13:25 +02:00
Brecht Van Lommel
711fb3e386 Realtime Compositor: cache render compositor for repeated executions
This is cached in Render, and gets cleared along with render pass GPU
textures when there is no editor open using it, or a new final render is
started.

The context and texture pool are cached. But the evaluator is re-created
every time as this only runs on compositing node changes, which require
recreating it anyway (unlike the viewport where e.g. camera navigation
does not need a new evaluator).

Pull Request: https://projects.blender.org/blender/blender/pulls/108909
2023-06-23 20:13:21 +02:00
Jacques Lucke
0b0a5d21ac Fix: Revert changes in Mesh to Volume node and modifier to Blender 3.6
This brings back the `Fill Volume` and `Exterior Bandwidth` inputs in
the Mesh to Volume node and modifier. Those existed in Blender 3.5 but
were removed in 700d168a5c because the way they were
implemented did not use the openvdb api in the right way.

While it's rare that people turned off the `Fill Volume` option, the
exterior bandwidth was used more and can have significant impact on
the result. Furthermore, there is no clear replacement for the
functionality.

Therefore, we decided to roll back the changes in 3.6 to avoid breaking
compatibility. We intend to keep the changes in 4.0 for now, but need
to work on a more clear short term replacement for the removed
functionality.

Pull Request: https://projects.blender.org/blender/blender/pulls/109297
2023-06-23 20:12:17 +02:00
Brecht Van Lommel
7a3a4b58e6 Fix realtime compositor not correctly handling multiple scene render layers
Pull Request: https://projects.blender.org/blender/blender/pulls/108909
2023-06-23 20:00:28 +02:00
Iliya Katueshenock
25c48782e1 Geometry Nodes: Avoid index lookup from index mask
Recent `IndexMask` refactors introduced log(N) complexity for `mask[i]`.
The greater the fragmentation of the mask, the greater the complexity.
Also, new `IndexMask` implementation has new iterators represented
both real index, and position (`index = mask[position]`).
This PR simply replace manual loops by new methods for iterating.
Added `optimized` in some place as slightly speed up.

The Attribute Statistic became 5 times better, due to multithreading.
The Extrude (Faces Individual) has average changed 42 ms -> 36 ms.
Duplicate Elements (Faces) has average changed 220 ms -> 150 ms.
Transform Instances has average changed 12 ms -> 8 ms.
Other nodes have approximately similar improvement numbers.
All tests use Random(50%) selection as mask.

Pull Request: https://projects.blender.org/blender/blender/pulls/109174
2023-06-23 19:20:24 +02:00
Hans Goudey
cd6a428259 Cleanup: Use newer IndexMask implementation in split edges node
Use a utility added in 2cfcb8b0b8.
2023-06-23 13:06:40 -04:00
Omar Emara
c2361381cd Realtime Compositor: Add node previews for shader operations
This patch adds support for node previews for shader operations, making
node previews fully supported.

The patch was started as an effort to refactor the compositor compiler
to split the shader operators when node previews increase past hardware
limits. However, I realized that the better approach would be to remove
those limits altogether by using texture arrays instead of individual
textures for operation results, then use texture views to slice that
array. This is not implemented in this patch and will require some
prerequisites, namely adding target conversion to GPU texture views as
well as support texture arrays in the DRW texture pool.

Pull Request: https://projects.blender.org/blender/blender/pulls/109250
2023-06-23 18:46:18 +02:00
Omar Emara
c6e5be9a36 Nodes: Compute logically linked sockets to outputs
The `logically_linked_sockets` runtime data of sockets is only initialized
for inputs. This patch also initializes it for output sockets through
the inversion the inputs logically_linked_sockets structure.

Pull Request: https://projects.blender.org/blender/blender/pulls/109249
2023-06-23 18:31:49 +02:00