Commit Graph

140534 Commits

Author SHA1 Message Date
Howard Trickey
8549bc94de Fix #126511: Crash when Bevel + Mark Seam or Sharp
The code for marking seams or sharp in a bevel was nonsense
for terminal edges (beveled edges that are the only beveled
edge at a vertex). It was written assuming that either the
number of segments is 1 or there is a mesh ADJ pattern, which
is not the case if there is a terminal edge with segments > 1.
The immediate fix for infinite loops is to project against trying
to execute this code for terminal edges.
Also made current code clearer and removed duplication.
It is a future TODO to make it do something sensible for terminal
edges instead of a no-op. Incidentally I notice that it also doesn't
work for mitered booleans, but it won't infinite loop in that case.
To fix both of these cases, we should try to count boundary vertices
to skip rather than edges to skip.
2024-09-01 19:21:12 -04:00
Julien Duroure
780721de19 glTF exporter: fix error message if hook failed 2024-09-01 15:16:27 +02:00
Clément FOUCAULT
b13593e0be GPU: Silence warnings when not building with renderdoc support 2024-09-01 13:15:56 +02:00
Aras Pranckevicius
4b76b398d5 Fix: Vulkan code build failure when Renderdoc is enabled
8ae0264459 broke the build when both Vulkan and Renderdoc options
are on
2024-09-01 12:32:02 +03:00
Aaron Carlisle
7675b5a0b4 Fix: MEM_new/MEM_freeN mismatch in menu search code 2024-08-31 15:33:52 -04:00
Pratik Borhade
de487a6712 Fix #126872: Cannot assign custom preview to node asset
Caused by 03ae57dd8b
Custom preview operator uses `lib_id_preview_editing_poll`. To enable
this operator in UI, move the new condition to `lib_id_generate_preview_poll`
poll function so adding custom preview to unsupported type would
still be possible.

Co-authored-by: Julian Eisel

Pull Request: https://projects.blender.org/blender/blender/pulls/126874
2024-08-31 13:14:24 +02:00
Hans Goudey
d31c633f4c Sculpt: Reduce size of undo node struct
This struct should be split in the future, but for now its size matters
since one is created for every BVH node for every undo step. Removing
the inline buffers for the arrays is a simple way to reduce the size
from 672 to 400 bytes.
2024-08-30 23:54:41 -04:00
Hans Goudey
e950bea4df Cleanup: Sculpt: Remove unused field from undo Node struct 2024-08-30 23:49:08 -04:00
Hans Goudey
a7ecca9ed1 Cleanup: Sculpt: Pass mesh as const reference to BVH build 2024-08-30 22:57:37 -04:00
Hans Goudey
ba4a131295 Sculpt: Avoid mutable retrieval of positions when building BVH
This can avoid a copy when the positions are shared at first.
Part of #118145.
2024-08-30 22:57:37 -04:00
Sean Kim
ead0e2d1f8 Cleanup: Sculpt: Remove unnecessary default case statements
Pull Request: https://projects.blender.org/blender/blender/pulls/127003
2024-08-31 04:04:34 +02:00
Aaron Carlisle
a08005f484 Docs: Update rna manual references 2024-08-30 17:18:23 -04:00
Sean Kim
0df133559c Refactor: Store active_vert_ as ActiveVert not PBVHVertRef
This commit changes the raycasting code to store values as the
`ActiveVert` type instead of `PBVHVertRef` to avoid needing to check the
type of the PBVH when retrieving information.

It also fixes a case that did not reset the active vert when performing
a raycast.

Pull Request: https://projects.blender.org/blender/blender/pulls/127000
2024-08-30 21:45:59 +02:00
Harley Acheson
fb651c1613 UI: Show Splash Version Text in White
The version text shown over the splash screen image needs to always be
white regardless of the theme. With "Blender Light" this text is black
and almost impossible to read. This PR adds the ability to set a
specific color for labels without icons and does so for the splash
screen.

Pull Request: https://projects.blender.org/blender/blender/pulls/126340
2024-08-30 20:52:17 +02:00
Bastien Montagne
0ade063f33 Refactor: Move KeyMaps and Operators PointerRNA storage to C++ allocations.
This commit essentially moves allocation of KeyMaps and Operators
PointerRNA data storage to use C++ new/delet, instead of C alloc/free.

Part of the effort to make PointerRNA non-trivial (#122431).

Pull Request: https://projects.blender.org/blender/blender/pulls/126935
2024-08-30 20:44:00 +02:00
Hans Goudey
5be7eae049 Fix: Missing multithreading in PBVH bounds update
Just a performance concern.
Mistake in 52bf292349.
2024-08-30 14:20:45 -04:00
Sean Kim
c2aa9ac9cf Fix #126914: Sculpt crash after unsubdividing has no effect
With c20bb31325 the `active_vert` related
methods added a check against the relevant pbvh type. In certain
situations, the PBVH is freed but is not refreshed prior to the cursor
being drawn.

In the long term, we want the PBVH to be owned by the mesh, not the
`SculptSession`, so adding more logic around ensuring depsgraph tags
with PBVH changes to implicitly regenerate the PBVH is a step in the
wrong direction.

Additionally, it doesn't make sense that we don't ensure the PBVH exists
before accessing the `active_vert`, as its context is dependent on the
PBVH.

Therefore, this commit introduces multiple changes:
* Ensures that the PBVH exists prior to doing a raycast or other cursor
  related actions
* Removes the checks against the PBVH type in `SculptSession` in
  favor of debug asserts to avoid crashes and assist in finding other
  situations where the state of the PBVH is ambiguous.

Pull Request: https://projects.blender.org/blender/blender/pulls/126953
2024-08-30 19:46:12 +02:00
Omar Emara
bb87690549 Fix #126984: CPU/GPU difference in jitter Lens Distort
The Lens Distort node is different between CPU and GPU when jitter is
enabled. That's because GPU incorrectly assumed that jitter with no
dispersion would have no effect. So we fix this by adjusting the
identity condition.

Further more, the green channel was not jittered for the GPU, that's
because the jitter was only seeded by the integration steps and was thus
constant for all channels. And since the green channel is the result of
addition of two opposite accumulations, the green channel was left
unaltered. To fix this, we include the start channel of the integration
in the seed to the jitter to make sure different channels get different
jitter.

Pull Request: https://projects.blender.org/blender/blender/pulls/126993
2024-08-30 18:44:29 +02:00
Laurynas Duburas
ce28af7352 Overlay-Next: Image
Overlay-Next version of image.

Rel #102179

Co-authored-by: Clément Foucault <foucault.clem@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/126243
2024-08-30 18:11:14 +02:00
Julian Eisel
cb03748e45 Assets: Update asset repository hash for brush asset changes
Update to:
https://projects.blender.org/blender/blender-assets/commit/4c14e5a01164bb13.

See 3386761411.
2024-08-30 18:00:39 +02:00
Clément Foucault
cfb261928c Overlay-Next: Fluid
Straight-forward port.

Rel #102179

Pull Request: https://projects.blender.org/blender/blender/pulls/126878
2024-08-30 17:48:52 +02:00
Clément Foucault
e22b931cfb Overlay-Next: Xray Fade
Straight-forward port.

Rel #102179

Pull Request: https://projects.blender.org/blender/blender/pulls/126967
2024-08-30 17:33:28 +02:00
Julian Eisel
3386761411 Sculpt/paint: Write brush types to brush asset metadata
This way we can query the brush types, e.g. to filter out eraser brushes
in the brush asset selector while the eraser tool is selected, see
https://projects.blender.org/blender/blender/issues/126032.

Technically a brush may have different brush types depending on the
mode. So we store a type for all supported modes.

Ideally the name of the custom metadata property would match the name of the
properties in RNA. They will match after #126796, the names here are the new
ones, to avoid having to version asset metadata.

Pull Request: https://projects.blender.org/blender/blender/pulls/124618
2024-08-30 17:00:10 +02:00
Iliya Katueshenock
ba28469e45 Fix: BLI: Correct total_size for sliced offset indices
Its common to have 0 at the begin of an offset indices sequence.
But this is not true for a slice of offset indices.

Pull Request: https://projects.blender.org/blender/blender/pulls/126964
2024-08-30 16:44:33 +02:00
Charlie Jolly
294994e4b9 Geometry Nodes: new Hash Value node
This node hashes various types into an integer. Note that hashes
cannot generally used as unique identifiers because they are not
guaranteed to be unique. It can be used to generate somewhat
stable randomness though in cases where White Noise does not
offer enough flexibility.

It uses hash functions from BLI_noise.hh. These are also used in
the White Noise node.

Pull Request: https://projects.blender.org/blender/blender/pulls/110769
2024-08-30 16:42:29 +02:00
Hans Goudey
b4287a4902 Fix: Sculpt: Smooth brush crash and node data iteration issues
IndexMask iteration from 347ec1acd7 was incorrect
in the cases where we stored temporary data in contiguous sections
per PBVH node. We now call `.local()` once per PBVH node. If that
becomes a bottleneck it's avoidable, for now it's simpler though.
2024-08-30 10:07:30 -04:00
Clément FOUCAULT
870d664e31 Overlay-Next: Edit Curves
Straightforward Port

Rel #102179

Pull Request: https://projects.blender.org/blender/blender/pulls/126892
2024-08-30 16:03:44 +02:00
YimingWu
b98b93ec8f Grease Pencil: Add menu corrections for GPv3
Correct line art icons for add menu in grease pencil v3, also
renamed "Suzanne" back to "Monkey" to keep it consistent with
GPv2.

Pull Request: https://projects.blender.org/blender/blender/pulls/126979
2024-08-30 15:43:40 +02:00
Clément FOUCAULT
8ae0264459 GPU: Add debug scope capture support for Renderdoc
This adds a new launch argument when building with
renderdoc support. It allows to trigger the capture
of a specific capture scope. This allows selective
capture of some commonly captured parts.

Pull Request: https://projects.blender.org/blender/blender/pulls/126791
2024-08-30 15:14:58 +02:00
Jeroen Bakker
f7ea83a32d Bumped data/tests 2024-08-30 15:00:28 +02:00
Jeroen Bakker
e8e89b751d Vulkan: Fix incorrect reordering when copying attachment
Solved by not supporting complex reordering at this moment. It
is currently better to focus on quality and add back performance
later. During tests I didn't detect any user noticeable performance
degradation. Could also be because we support rendering
suspending/resuming.

Fixes artifacts in EEVEE volumes and raytracing.

Pull Request: https://projects.blender.org/blender/blender/pulls/126974
2024-08-30 13:24:57 +02:00
Pratik Borhade
05f2e6f5c2 Fix #125988: File output node not using output node color
`NODE_DO_OUTPUT` flag for file output node is unset which prevents the
node from having the `TH_NODE_OUTPUT` id. Now fixed with node type
comparison.

Pull Request: https://projects.blender.org/blender/blender/pulls/126081
2024-08-30 13:19:53 +02:00
Bastien Montagne
6c7ef54211 Fix (unreported) BKE_main_namemap_get_name not always returning true when modifying given name.
The bug was probably harmless in current codebase.

Also added some basic testing of `BKE_main_namemap_get_name` itself,
and not only higher-level ID renaming code.
2024-08-30 12:58:26 +02:00
Nathan Vegdahl
515843ff3a Fix: crash after saving file with 2+ layered-action channel groups
The issue was that the forward compatibility writing code for channel groups in
layered actions was building a temporary legacy listbase, but was not clearing
it properly afterwards. This was then getting caught by an assert that ensured
that layered-action groups didn't have legacy data in them.

The reason the listbase wasn't getting cleared properly is because the
prev/next listbase pointers were getting cleared using a `LISTBASE_FOREACH`
loop, and thus the loop never progressed past the first item.

Additionally, this mistake wasn't just in the channel groups writing code, but
also the forward compatibility writing code for fcurves.

This fixes the issue in both places by switching the loops to
use`LISTBASE_FOREACH_MUTABLE`.

Based on discussion with @dr.sybren, this also removes the assert that caught
the issue. The situation it guards against is actually completely benign, and
the existence of the assert is contrary to the comments in the forward-compat
writing code explaining why its approach is okay.

Pull Request: https://projects.blender.org/blender/blender/pulls/126970
2024-08-30 12:54:41 +02:00
Jacques Lucke
1ee6a8fad5 Geometry Nodes: support customizing warning propagation
Previously, all errors, warnings and info messages were propagated from the node
that generates it to the top level node group. This is a good default, but may
not always be desirable. For example, someone may build a node group asset that
generates some warning that is irrelevant to the user to the asset. Now, the
asset author can selectively disable propagating warnings from that node.

Each node has a new `Warning Propagation` setting. It controls if warnings from
this node should be propagated to the parent group node. By default, everything
is propagated. One can also choose to propagate nothing, only errors or only
errors and warnings.

Note, this does not affect whether the warning is shown in the node itself, only
if the warning is propagated one level up!
Pull Request: https://projects.blender.org/blender/blender/pulls/126786
2024-08-30 12:06:48 +02:00
Christoph Lendenfeld
b4a6610c88 Fix: Python Errors with id_root enum
The issue was that the enum property expected a default of `Object`
which wasn't present in the default enum.
Error was: `EnumProperty(..., default='OBJECT'): not found in enum members`
Fixed it by constructing a simple `EnumPropertyItem []` with the `Object` entry.

Pull Request: https://projects.blender.org/blender/blender/pulls/126963
2024-08-30 11:03:56 +02:00
Jeroen Bakker
509123c877 Vulkan: Initial support for multiple windows
- Resource pools are shared between multiple swap chains to reduce
  code complexity
- Fix issue where activating a new graphical context could still leave
  the previous context rendering.
- Known issue: opening files with more windows require a redraw.

Reference: #126499
Pull Request: https://projects.blender.org/blender/blender/pulls/126961
2024-08-30 10:01:56 +02:00
Jeroen Bakker
b710194876 Cleanup: Remove unused code
Pull Request: https://projects.blender.org/blender/blender/pulls/126960
2024-08-30 09:23:01 +02:00
Julien Duroure
c132bd896f glTF exporter: children type check refactoring 2024-08-30 06:56:34 +02:00
Julien Duroure
11451a2082 glTF export: Add logging level control for export
This was already the case at import
2024-08-30 06:48:07 +02:00
Julien Duroure
4dad2a567d glTF: Use wait cursor instead of empty % cursor 2024-08-30 06:43:52 +02:00
Julien Duroure
8d575d3c85 glTF exporter: Enable exporting joint leaf at tail of leaf bones 2024-08-30 06:42:26 +02:00
Julien Duroure
5122255739 glTF: Manage Quaternion and Matrix attribute types for custom attributes 2024-08-30 06:39:52 +02:00
Julien Duroure
58141b7396 glTF exporter: set udim material names with tile number 2024-08-30 06:37:34 +02:00
Julien Duroure
69ab986370 glTF exporter: Regression: RGB to Shader socket unlit management 2024-08-30 06:29:42 +02:00
Julien Duroure
7c6975f6c8 glTF exporter: avoid double export
Make sure to not check instances inside instances collection when GN instance is enable.
2024-08-30 06:26:47 +02:00
Julien Duroure
6191eb1e9d glTF exporter: Fix custom prop when apply modifier
Since 4.2, props are Statically Typed
so no need to copy them in that case, because overwriting them will crash
2024-08-30 06:23:11 +02:00
Julien Duroure
42840ded01 glTF exporter: Fix UI after Blender changes 2024-08-30 06:20:04 +02:00
Julien Duroure
4e5093130c Fix #126920 glTF: Cleanup - file renaming
Long filepaths cannot be unzipped (by default) on Windows, so cleaning filenames to avoid too long paths
2024-08-30 06:00:10 +02:00
Sean Kim
b019e4235a Cleanup: Standardize StrokeCache symmetry variable naming
Prior to this commit, variables inside `StrokeCache` used either a
`true_` prefix to indicate that the relevant position / normal /
displacement was not modified by symmetry, or a `_symmetry` / `_symm`
suffix to indicate that it was.

This commit changes all such variables to have a `_symm` suffix, as
that has fewer connotations than the `true_` prefix.

Pull Request: https://projects.blender.org/blender/blender/pulls/126902
2024-08-30 01:10:34 +02:00