Commit Graph

103897 Commits

Author SHA1 Message Date
Iliya Katueshenock
fb57767f78 Cleanup: simplify extracting GField from geometry nodes parameters
Pull Request: https://projects.blender.org/blender/blender/pulls/113743
2023-10-16 19:19:53 +02:00
Harley Acheson
d0e6f894fe Merge branch 'blender-v4.0-release' 2023-10-16 10:18:41 -07:00
Harley Acheson
ffe980afad Fix #113766: Incorrect Cursor With Offset Position
Next character left edge position incorrect when string has
an offset positioning (scrolled within the input box).

Pull Request: https://projects.blender.org/blender/blender/pulls/113784
2023-10-16 19:17:28 +02:00
Jacques Lucke
006380aaca Cleanup: deduplicate field socket type check 2023-10-16 19:13:27 +02:00
Sergey Sharybin
f8ee27c88b Sculpt: Preserve edge attribute on split with dyntopo
Copy custom data and flag from the original edge to the ones created
from it when splitting a long edge.

Unfortunately, can not use generic "example" edge approach as there
is a temporary flag BM_ELEM_TAG is re-applied in a loop: the new
edges can not be tagged with this tag. Additional complication is
that even we clear this tag from the input edge before splitting it
this tag is re=applied via long_edge_queue_face_add().

Hence, use our own simple function to copy minimal subset of data and
tags.

Co-Authored-By: Hans Goudey <hans@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/113783
2023-10-16 19:12:10 +02:00
Sergey Sharybin
a19a36c631 Cleanup: More proper C++ usage in PBVH edge split
- More consistent naming of variables in diagram and code.
- Use C++ array and span, and make them short-lived, without
  trying to reuse them.

Co-Authored-By: Hans Goudey <hans@blender.org>
2023-10-16 19:12:08 +02:00
Sergey Sharybin
529392bb2c Cleanup: Const-correctness in bmesh code
Only handful of functions which are needed for the PBVH edge split.

Co-Authored-By: Hans Goudey <hans@blender.org>
2023-10-16 19:12:08 +02:00
Iliya Katueshenock
bd6db0acea Cleanup: Nodes: unify data type conversion functions
Pull Request: https://projects.blender.org/blender/blender/pulls/113744
2023-10-16 19:09:07 +02:00
Jacques Lucke
b47372356d Cleanup: remove now unused CustomDataAttributes
This is not used anymore, because there are better alternatives:
* Higher level `AttributeAccessor` interface.
* Lower level `CustomData` interface.
2023-10-16 18:44:48 +02:00
Jacques Lucke
ff4d5b6f04 Geometry Nodes: don't use CustomDataAttributes in Instances
This was the last use of `CustomDataAttributes`. It's not very useful
nowadays because we have a lower level (`CustomData`) and higher level
(`AttributeAccessor`) API.

As part of this I removed the ability to `reserve` instances which was
useful when adding instances one by one. Generally, such code should
eventually be rewritten to handle more instances at once, instead of
handling them one by one. This will lead to better performance and
is more in line with how other geometry types (like mesh) are handled.

This also adds the ability to move and assign `Instances` just like we can
move and assign `CurvesGeometry`.
2023-10-16 18:41:32 +02:00
Omar Emara
cea5ea4096 Fix #113768: GPU compositor is leaking memory
The experimental GPU compositor is leaking memory in any setup.

This is because the current implementation of the render texture pool
always created a new texture and only freed the textures upon deletion.
This was a temporary implementation until a proper implementation that
uses the DRW textures pool was used.

This patch implements a small texture pool as a temporary fix until the
aforementioned DRW texture pool implementation is done.
2023-10-16 19:31:06 +03:00
Dalai Felinto
0dcf92f945 GPv3: Fix Curve to Mesh node replacing instances
The code is already replacing instances when needed (when there was no
instances previously created in the file). To do it regardless may lead
to remove instances from the loop.

The other related nodes did not have that issue:
* Curve to Points
* Curve Fill
2023-10-16 17:33:30 +02:00
Clément Foucault
5831913204 Fix EEVEE-Next: SubSurfaceScattering: Invalid buffer format
This fixes issues on NVidia GPUs.
2023-10-16 17:17:18 +02:00
Clément Foucault
69e85382cd Fix #113759: EEVEE-Next: NaN artifacts caused by raytracing denoising
This was caused by spatial denoising pass sampling invalid data.
This patch make it so that there is one padding tile all
around the denoise area.

This simplifies the denoise shader too.

This is a bit wasteful to dispatch tracing tiles for clearing
and a better solution would be to use a separate shader and
tile list only for this purpose.
2023-10-16 17:17:18 +02:00
Germano Cavalcante
dae06c7562 Merge branch 'blender-v4.0-release' into main 2023-10-16 11:48:02 -03:00
Germano Cavalcante
88a6df24aa Fix #113552: NLA Markers do not reset when length reaches 0.0
Before bd00324c26, strip lengths were changed in
`rna_NlaStrip_frame_start_ui_set` and `rna_NlaStrip_frame_end_ui_set`
so as not to be shorter than NLASTRIP_MIN_LEN_THRESH.

This prevented `BKE_nlameta_flush_transforms` from working with
zero-length strips.

But now, in some cases, strip can be zero length.

Therefore, consider this case and avoid division by zero.

Pull Request: https://projects.blender.org/blender/blender/pulls/110121
2023-10-16 16:46:47 +02:00
Jacques Lucke
5f80242bc2 Cleanup: use CustomDataAttributes from Instances interface
It's still used internally currently. `CustomDataAttributes` will be removed
soon because there are better alternatives (`AttributeAccessor`).
2023-10-16 16:39:39 +02:00
Jacques Lucke
d0342b1782 Cleanup: don't use CustomDataAttributes when realizing instances
`CustomDataAttributes` does not serve much of a purpose nowadays,
since we usually use either the lower level `CustomData` or the higher
level `AttributeAccessor` interface.
2023-10-16 16:27:33 +02:00
Peng Yan
640b0dd6da Cleanup: Remove redundant flag setting in RNA_def_property
In switch-case structure, `PROP_NEVER_NULL` is already set
for String properties. However, the code setting `PROP_EDITABLE`
below was overwriting the flag. Then `PROP_NEVER_NULL` had
to be set for a second time.

Fixed by using proper API function to set these flags, and removed
the redundant second flag setting.

Pull Request: https://projects.blender.org/blender/blender/pulls/113739
2023-10-16 16:09:33 +02:00
Germano Cavalcante
47867549e8 Merge branch 'blender-v4.0-release' into main 2023-10-16 10:40:08 -03:00
Germano Cavalcante
6dda18269c Fix #113650: Vertex Creasing is using Mirror
`Vertex Crease`, like `Edge Crease`, is not supposed to use transform
symmetry.

So remove it.

(`Skin Resize` remains using symmetry since that case seems desirable.
See #84376)
2023-10-16 10:39:31 -03:00
Falk David
97c5cb19d1 GPv3: Hide points overlay in stroke selection mode
This makes sure that we only show the point selection if the
selection domain is `ATTR_DOMAIN_POINT`.
2023-10-16 15:12:10 +02:00
Damien Picard
9c0c9789cc I18n: fix Vector Math and Mix node sockets search
When searching for a new node by dragging from a socket, some results
were untranslated. This is because they did not use a translation
context matching other occurrences, from which the strings were
extracted to the translation files.

Three nodes using operations were affected: Mix and Vector Math.
- Vector Math used the default context when it should have used
  NodeTree.
- Mix and Mix RGB used NodeTree when they should have used the default
  context.

Pull Request: https://projects.blender.org/blender/blender/pulls/113485
2023-10-16 14:45:47 +02:00
Pratik Borhade
d03d03402b GPv3: Fix problems related to insert/delete keys in edit mode
Send notifiers to redraw dopesheet when keyframe is inserted/deleted.
Change default duration (and soft/hard min) to 0 for inserting
keyframe. This unnecessarily adds extra keyframe.

Pull Request: https://projects.blender.org/blender/blender/pulls/113765
2023-10-16 14:15:46 +02:00
casey bianco-davis
0508e81b79 GPv3: Add edit mode lines to overlay
Adds lines in edit mode to the overlay.

Pull Request: https://projects.blender.org/blender/blender/pulls/111596
2023-10-16 13:59:26 +02:00
Miguel Pozo
54511f59aa Merge branch 'blender-v4.0-release' 2023-10-16 13:49:44 +02:00
Miguel Pozo
e3014ffc27 Fix #113741: Workbench: Reset TAA on overlay toggle
Reset TAA when enabling overlays,
since we won't have valid sample0 depth textures.
2023-10-16 13:49:12 +02:00
Miguel Pozo
465291e716 Merge branch 'blender-v4.0-release' 2023-10-16 13:25:05 +02:00
Miguel Pozo
f2ba12a053 Fix: Workbench: Volume compositing
Regression after fe39456ba5
2023-10-16 13:24:35 +02:00
Thomas Dinges
1f0520034a Revert "Fix #113201: Assets in same folder as current file ignored in All library"
This reverts commit 7705e49bcd.

It broke the bf_asset_system_tests test and this cannot be fixed now so reverting.
2023-10-16 12:32:42 +02:00
Thomas Dinges
6a6308a07a Revert "Fix #113201: Assets in same folder as current file ignored in All library"
This reverts commit 7705e49bcd.

It broke the bf_asset_system_tests test and this cannot be fixed now so reverting.
2023-10-16 11:49:53 +02:00
Dalai Felinto
9c22af32a9 Cleanup: Remove unecesary includes 2023-10-16 11:30:22 +02:00
Dalai Felinto
47cfeb45d8 GPv3: Delete Geometry node
Incorporated the cleanup and tweaks from Hans Goudey to return CurvesGeometry directly.

Part of #113602.

Co-authored-by: Hans Goudey <hans@blender.org>
Ref !113721
2023-10-16 11:29:07 +02:00
Omar Emara
9f1538b586 Cleanup: Move compositor headers to c++
Pull Request: https://projects.blender.org/blender/blender/pulls/113758
2023-10-16 10:45:54 +02:00
Jesse Yurkovich
51846d8173 Merge branch 'blender-v4.0-release' 2023-10-15 19:01:10 -07:00
Jesse Yurkovich
49e4923384 Fix #113697: Fix timer leak from panel drag/animate processing
When clicking or dragging a Panel's drag handle, a PANEL_STATE_DRAG
state transition is followed immediately by a PANEL_STATE_ANIMATE
transition.  Both transitions start a timer.

Unfortunately, a subtle change introduced in
f3ab698951 meant the first timer would no
longer be destroyed before starting the second one.

The fix is to just reuse the timer if it's already present so that a
second one is not created in the first place.

Pull Request: https://projects.blender.org/blender/blender/pulls/113711
2023-10-16 04:00:15 +02:00
Campbell Barton
ed2e42d62c Merge branch 'blender-v4.0-release' 2023-10-16 10:35:39 +11:00
Iliya Katueshenock
4d91c50b62 Fix #113429: Dirty evaluated curve
Tag curve topology as dirty after changing of types of handles.

Pull Request: https://projects.blender.org/blender/blender/pulls/113717
2023-10-15 20:59:21 +02:00
Jacques Lucke
d76263de96 Merge branch 'blender-v4.0-release' 2023-10-15 20:50:12 +02:00
Jacques Lucke
c584b6434f Fix #113691: crash when Interpolate Curves input has zero curves
The crash happened only when there was a `Curves` geometry, but
it was empty.
2023-10-15 20:49:48 +02:00
Hans Goudey
030932e8df Merge branch 'blender-v4.0-release' 2023-10-15 20:31:50 +02:00
Jacques Lucke
38813a7441 Nodes: unify static and dynamic declarations
This helps solving the problem encountered in #113553. The problem is that we
currently can't support link-drag-search for nodes which have a dynamic declaration.

With this patch, there is only a single `declare` function per node type, instead of
the separate `declare` and `declare_dynamic` functions. The new `declare` function
has access to the node and tree. However, both are allowed to be null. The final
node declaration has a flag for whether it depends on the node context or not.

Nodes that previously had a dynamic declaration should now create as much of
the declaration as possible that does not depend on the node. This allows code
like for link-drag-search to take those sockets into account even if the other
sockets are dynamic.

For node declarations that have dynamic types (e.g. Switch node), we can also
add extra information to the static node declaration, like the identifier of the socket
with the dynamic type. This is not part of this patch though.

I can think of two main alternatives to the approach implemented here:
* Define two separate functions for dynamic nodes. One that creates the "static
  declaration" without node context, and on that creates the actual declaration with
  node context.
* Have a single declare function that generates "build instructions" for the actual
  node declaration. So instead of building the final declaration directly, one can for
  example add a socket whose type depends on a specific rna path in the node.
  The actual node declaration is then automatically generated based on the build
  instructions. This becomes quite a bit more tricky with dynamic amounts of sockets
  and introduces another indirection between declarations and what sockets the node
  actually has.

I found the approach implemented in this patch to lead to the least amount of
boilerplate (doesn't require a seperate "build instructions" data structure) and code
duplication (socket properties are still only defined in one place). At the same time,
it offers more flexibility to how nodes can be dynamic.

Pull Request: https://projects.blender.org/blender/blender/pulls/113742
2023-10-15 20:28:23 +02:00
Hans Goudey
601fba20a6 Fix #113619: Incorrect nested group assets in compositor add menu
The menu structure currently needs to be duplicated in the code to avoid
adding assets to more than one menu. This was done for geometry nodes
in b49c84276c but was missed for the compositor and shader
nodes. Also remove an unnecessary separator.
2023-10-15 19:52:38 +02:00
Hans Goudey
e083be6a9c Fix #113737: Missing UI text for geometry nodes handle type properties 2023-10-15 19:19:42 +02:00
Harley Acheson
d578170131 Cleanup: Make format
Format changes resulting from Make Format
2023-10-15 09:09:30 -07:00
Harley Acheson
03655189d7 Fix #113735: Space Characters in UI Text Entry #113749
With #113707 text cursor position is set using the character's visible
bounds, so special care is needed for those without bounds like space.
Forgot this also applies to 4.0.
2023-10-15 09:06:44 -07:00
Harley Acheson
b6131cc338 Cleanup: Make format
Formatting changes resulting from Make Format
2023-10-15 08:45:11 -07:00
Harley Acheson
c6c86b555d Fix #113735: Space Characters in UI Text Entry
With #113707 text cursor position is set using the character's visible
bounds, so special care is needed for those without bounds like space.

Pull Request: https://projects.blender.org/blender/blender/pulls/113749
2023-10-15 17:42:28 +02:00
Harley Acheson
1423ece1eb Cleanup: Compilation Error in wm_playanim.cc
If compiling without WITH_AUDASPACE a structure contains too many
initializers. Caused by 4454561a5f
2023-10-15 07:56:11 -07:00
Clément Foucault
ba89723abc Cleanup: EEVEE-Next: Volume AABB
Make interface a bit more lined up with the
rest of the BLI API. Also use more of the
vector API.
2023-10-15 15:07:44 +02:00