Commit Graph

150077 Commits

Author SHA1 Message Date
Clément Foucault
f8195e0bb4 Fix: Overlay: Broken shader compilation
Caused by the changes in UBO members.
This removes the duplicated lib used by overlay
and reuse the same side clip plane UBO mechanism
as workbench.
2025-02-19 17:46:47 +01:00
Dalai Felinto
9d06f32761 Point Cloud: Select Random
Move the mask_random function to BLI_index_mask.hh, so it can be shared between curves, grease pencil and point cloud.

Copied/inspired by the curves select code.

Pull Request: https://projects.blender.org/blender/blender/pulls/134624
2025-02-19 17:23:37 +01:00
Dalai Felinto
1584cd9aa5 Cleanup: Rename point cloud to pointcloud / POINT_CLOUD to POINTCLOUD
Though "Point Cloud" written as two words is technically correct and should be used in the UI, as one word it's typically easier to write and parse when reading. We had a mix of both before this patch, so better to unify this as well.

This commit also renames the editor/intern/ files to remove pointcloud_ prefix.
point_cloud was only preserved on the user facing strings:

* is_type_point_cloud
* use_new_point_cloud_type

Pull Request: https://projects.blender.org/blender/blender/pulls/134803
2025-02-19 17:11:08 +01:00
Miguel Pozo
d6682af786 Fix: Compiler warnings on Mac
Caused by #133557

Pull Request: https://projects.blender.org/blender/blender/pulls/134776
2025-02-19 17:08:38 +01:00
Jacques Lucke
234810f01d Fix: Geometry Nodes: support relative paths in import nodes
Previously, the code would assert in `BLI_fopen` when the path is relative.

There are two main options to make the path absolute:
1. Always use the path of the current .blend file as base.
2. Is the path of the .blend file "owns" the current node as base. So when
  the Import node is part of a linked node tree, the path of the linked .blend
  file is used as base.

Both options are useful depending on the specific use-case, but the latter
seems more consistent with other places in Blender. For more advanced
functionality, we might need nodes that give the current .blend file path
and one node to join paths.

Pull Request: https://projects.blender.org/blender/blender/pulls/134794
2025-02-19 15:33:37 +01:00
Hans Goudey
0fd79c3613 Point Cloud: Implement join operator
Similar to !134691.

Pull Request: https://projects.blender.org/blender/blender/pulls/134702
2025-02-19 15:30:12 +01:00
Hans Goudey
5a6d2e1ce2 Curves: Implement join operator
Previously the object join operator wasn't implemented for the new
curves type. This commit implements the joining by passing the selected
curves geometry as instances to the realize instances function. That way
the complexity of the new code just relates to dealing with objects.

Pull Request: https://projects.blender.org/blender/blender/pulls/134691
2025-02-19 15:24:29 +01:00
Hans Goudey
2f01da564d Fix: Point Cloud: Properly handle caches in undo step decode
Previously the bounds and BVH caches could be incorrect after redo.
2025-02-19 09:14:33 -05:00
Hans Goudey
cc2d85ae7c Point Cloud: Support view selected operator in edit mode 2025-02-19 09:14:33 -05:00
Philipp Oeser
7847df4686 Pointcloud: Integration with transverts (cursor snapping)
This adds:
- support for snapping for the pointcloud object (selection to cursor/
grid, cursor to selection)
- as usual, "Warp" an "Randomize" operators come along "for free" with
this

Pull Request: https://projects.blender.org/blender/blender/pulls/134799
2025-02-19 15:06:06 +01:00
Philipp Oeser
57ed1e9632 Merge branch 'blender-v4.4-release' 2025-02-19 14:28:38 +01:00
Philipp Oeser
3dc9211b8f Fix #134662: Video Sequencer: reset transforms ignores auto keyframing
Just call the appropriate autokeyframe functions when this operator
changes StripTransform properties.

Pull Request: https://projects.blender.org/blender/blender/pulls/134667
2025-02-19 14:28:14 +01:00
Omar Emara
6946108678 Merge branch 'blender-v4.4-release' 2025-02-19 15:07:23 +02:00
Omar Emara
d5c662a305 Fix #134436: Compositor is much slower on Windows
The new CPU compositor in v4.4 is much slower than the old CPU
compositor in v4.3 on Windows. This is because MSVC does not inline many
of the core methods in the Result class of the compositor. To fix this,
we force inline those methods, adding a new macro for inlining methods
in the process, since the existing macro has the static keyword, which
only works for functions, not methods.

Pull Request: https://projects.blender.org/blender/blender/pulls/134748
2025-02-19 13:56:06 +01:00
илья _
119fc054f8 Cleanup: BKE: Nodes: Pass-by-reference
Restriction of the nodes api to clearly define never-null function arguments.
Side effects: some assertions and null-check (with early return) were removed.
On the caller side is ensured to never derefer null to pass argument (mainly in RNA).
In addition, one pointer argument now actually a return type.

By-reference return types instead of pointers going to be separate kind of
change since also imply of cleaning up variables created from reference.

Also good future improvement would be to mark a copy-constructor as
explicit for DNA node types.

Pull Request: https://projects.blender.org/blender/blender/pulls/134627
2025-02-19 13:44:11 +01:00
Jacques Lucke
3263dd6333 Fix: Geometry Nodes: unescape column names after csv import 2025-02-19 12:36:19 +01:00
Clément Foucault
3968be08b5 Merge branch 'blender-v4.4-release' 2025-02-19 11:52:36 +01:00
Clément Foucault
4d17638212 Fix: EEVEE: Broken Metal blocklist
This was the cause of the tests not passing on buildbot.
2025-02-19 11:51:57 +01:00
Brecht Van Lommel
e166c25c0b Merge branch 'blender-v4.4-release' 2025-02-19 11:47:19 +01:00
Brecht Van Lommel
3004848372 Fix #134756: Internal text datablock filepath considered missing
When the text datablock was marked as external at one point and the
filepath was allocated, it would be considered missing.
2025-02-19 11:26:57 +01:00
Jacques Lucke
ac2cd6c1ef Geometry Nodes: make CSV parser more reliable and faster
This reimplements the CSV parser used by the (still experimental) Import CSV
node.

Reliability is improved by:
* Properly handling quoted fields.
* Unit tests.
* Generalizing the parser to be able to handle customized delimiter, quote and
  escape characters (those are not exposed in the node yet though).
* More accurate detection of column types by actually taking all values of a
  column into account instead of only the first row.

Performance is improved by designing the parser in a way that supports
multi-threaded parsing. I'm measuring about 5x performance improvement which
mainly comes from multi-threading. Some files I wanted to use for benchmarking
didn't load in the version that's in `main` but do load fine with this new
version.

The implementation is now split up into two parts:
1. A general CSV parser in `blenlib` that manages splitting a buffer into
   records and their fields.
2. Application specific parsing of fields into e.g. floats and integers which
   remains in `io/csv/importer`.

This separation simplifies unit testing and makes the core code more reusable.

Pull Request: https://projects.blender.org/blender/blender/pulls/134715
2025-02-19 11:10:59 +01:00
Bastien Montagne
4ec5d600cd Refactor: Core: Make BKE_libblock_alloc_notest return ID pointer. 2025-02-19 10:55:05 +01:00
Campbell Barton
8cad69a138 Merge branch 'blender-v4.4-release' 2025-02-19 11:51:46 +11:00
Campbell Barton
efe02a9943 Cleanup: function argument flags for UIList.draw_item
Correct two mistakes in [0] which accidentally assigned
flags to the previously declared parameter as well as assigning an
argument to `prop`, then setting the flags on `parm`.

While it seems that "active_property" only became optional by accident
leave this as-is to avoid breaking scripts.

[0]: 113997a03c

Ref #134379.
2025-02-19 11:47:44 +11:00
Campbell Barton
e1a4269ee1 Merge branch 'blender-v4.4-release' 2025-02-19 11:14:13 +11:00
Harley Acheson
e850a09762 UI: Add Icons to Represent Error Conditions
This PR adds three SVG Icons. One to represent that an icon is not
found - ICON_NOT_FOUND - so represent when an out-of-range value was
used to specify an icon. The second - ICON_CHAR_NOTDEF - is to
represent that a text character is not found in the specified font or
font stack. The third - ICON_CHAR_REPLACEMENT - is to indicate the
portion of a text string that contains invalid bytes.

Pull Request: https://projects.blender.org/blender/blender/pulls/134008
2025-02-19 01:11:24 +01:00
Campbell Barton
9e0c8a41cd Object Mode: conversion no longer depends on the active object
Conversion was only possible if the active object was editable &
selected, this complicated overriding the operator from Python
since it wasn't enough to override the selection & active-object.

Now it's possible to use bpy.ops.object.convert() from Python
overriding the selected_editable_objects only.

For users the difference isn't so significant:

- Having an active object is no longer required.

- It's possible there are no objects to operate on,
  as previously the active object was used to check at least one
  object could be converted, although this check wasn't fool-proof
  as it didn't check the objects data-type.

Resolves #100664.

Ref !134728.
2025-02-19 11:06:31 +11:00
Harley Acheson
0dce68333f UI: Vertically Aligned Grip Icon
Add a variation of the current Grip icon that is vertically-aligned.
the current ICON_GRIP works great when it has lots of horizontal space,
but ICON_GRIP_V might be needed for horizontally constrained uses.

Pull Request: https://projects.blender.org/blender/blender/pulls/134777
2025-02-19 00:19:08 +01:00
Sean Kim
a613d971b9 Merge branch 'blender-v4.4-release' 2025-02-18 13:22:19 -08:00
Sean Kim
c07f37287c Fix #134706: Vertex & Weight Paint do not respect clipping
This commit adds the `filter_region_clip_factors` call to each of the
brush types in vertex and weight paint modes to ensure that the region
clip state is accurately handled.

Pull Request: https://projects.blender.org/blender/blender/pulls/134717
2025-02-18 22:21:02 +01:00
Brecht Van Lommel
b164f5a86c Merge branch 'blender-v4.4-release' 2025-02-18 21:16:15 +01:00
Brecht Van Lommel
69f16764a2 Fix #134605: Crash when deleting view layer during render
Pull Request: https://projects.blender.org/blender/blender/pulls/134768
2025-02-18 21:11:11 +01:00
Brecht Van Lommel
4571d99edb Fix: Build error with GCC 11.1 after recent changes
Remove the padding optimization, it's not significant with the size
of this struct. And by removing the extra padding for bias the size
is the same as before.

Pull Request: https://projects.blender.org/blender/blender/pulls/134769
2025-02-18 21:10:51 +01:00
Clément Foucault
d5536ffd31 DRW: Do not clear 1D texture in debug mode
Clearing of 1D texture is currently unsupported.
2025-02-18 19:58:28 +01:00
Brecht Van Lommel
6458458c07 Merge branch 'blender-v4.4-release' 2025-02-18 19:46:42 +01:00
Brecht Van Lommel
c650977534 Grease Pencil: Make brush asset pinned materials local
Keeping these as linked datablocks to the brush does not match the idea
that assets should generally be appended, and leads to some confusing
situations with linked materials on objects. Now use either a local
material with matching weak library reference or make a local copy if
it does not exist yet.

This also add weak library references to the materials in the 2D Animation
template, so they will be reused.

A problem is that weak library references include a full path to assets
blend files, including the Blender version for the essentials assets files.
This means weak library references do not work across platforms and
Blender versions.

Another known limitation is that if the (linked) Brush Asset material is
edited, and there is already a local copy of it, this local copy will
remain unchanged and will be used by future strokes as well.

Ref #131186

Pull Request: https://projects.blender.org/blender/blender/pulls/134226
2025-02-18 19:46:07 +01:00
Brecht Van Lommel
1602658461 Refactor: Simplify grease pencil brush material API surface
To make changes in the following commit more clear.

Pull Request: https://projects.blender.org/blender/blender/pulls/134226
2025-02-18 19:46:07 +01:00
Brecht Van Lommel
3e03bc2278 Brush Assets: Add Material to linked editable assets
These are used to define grease pencil brushes. Not having these editable
but the brush and images being editable leads to confusing UI.

Fix #131186
Fix #134268

Pull Request: https://projects.blender.org/blender/blender/pulls/134226
2025-02-18 19:46:07 +01:00
Brecht Van Lommel
3af82d2ea0 Fix: Preserving linked editable asset datablock fails with embedded ID
This is needed to make materials work with this system.

Pull Request: https://projects.blender.org/blender/blender/pulls/134226
2025-02-18 19:46:07 +01:00
Hans Goudey
a99f9496a0 Curves: Separate to object operator
Use the existing "remove_points_and_split" utility added
for grease pencil to implement the operator for the curves
object type. The whole structure is similar to the recently
added point cloud separate operator (4cd3540579).

Pull Request: https://projects.blender.org/blender/blender/pulls/134763
2025-02-18 19:31:30 +01:00
Harley Acheson
e2c1922c60 Merge branch 'blender-v4.4-release' 2025-02-18 10:06:39 -08:00
Harley Acheson
35d14d578c Fix #133413: Don't Use Fallback for Sequencer Text Using Custom Fonts
If a sequencer text strip is using a custom font (not the default one)
then don't use the fallback font. This adds a new font flag to disable
the use of fallback.

Pull Request: https://projects.blender.org/blender/blender/pulls/133510
2025-02-18 19:05:34 +01:00
Clément Foucault
6ae36ea114 Refactor: DRW: Move all volume and pointcloud related data into modules
Rel #134690

Pull Request: https://projects.blender.org/blender/blender/pulls/134754
2025-02-18 18:49:07 +01:00
Clément Foucault
1268774fba Refactor: DRW: Move GlobalsUboStorage handling to Overlay::Instance class
Rel #134690
2025-02-18 18:46:08 +01:00
Richard Antalik
4c2f079cca Merge branch 'blender-v4.4-release' 2025-02-18 18:33:37 +01:00
Richard Antalik
71e2e509ec Fix #134708: Audio render does not change file extension
Caused by case sensitive string comparison between RNA enum
name and pre-defined array with extensions.

The array with extensions was also missing ".aac" string.

Pull Request: https://projects.blender.org/blender/blender/pulls/134761
2025-02-18 18:31:51 +01:00
Clément Foucault
500ebdfc2f Refactor: DRW: Move color ramp texture creation to Overlay::Instance class
Rel #134690
2025-02-18 17:52:03 +01:00
Clément Foucault
cd1c1b1e95 Cleanup: Armature: Use overlay data instead of global G_draw for colors
Rel #134690
2025-02-18 17:52:03 +01:00
Hans Goudey
b520302420 Merge branch 'blender-v4.4-release' 2025-02-18 11:32:47 -05:00
Hans Goudey
4b6a212986 Cleanup: Formatting 2025-02-18 11:30:17 -05:00