Commit Graph

150077 Commits

Author SHA1 Message Date
Hans Goudey
e522a6c826 Cleanup: GPU: Use StringRef for vertex format function arguments
And slightly simplify two string processing functions in this API,
`GPU_vertformat_safe_attr_name` and `copy_attr_name`.
This makes the API easier to interface with from C++ code,
and can avoid unnecessary string length measurements.

Pull Request: https://projects.blender.org/blender/blender/pulls/134882
2025-02-25 14:53:51 +01:00
Clément Foucault
1b902e305c Refactor: Select: Use IndexRange for the element selection
This cleanup naming convention and code clarity. There
is no functional change.

- `elem_ranges` is changed to a `Map` to avoid relying on
`sel_data->drawn_index`.
- `select_draw_utils.cc` is merged with `select_engine.cc`
- `index_drawn_len` is renamed to `max_index_drawn_len`
- Remove the usage of `DrawData`

Rel #134690

Pull Request: https://projects.blender.org/blender/blender/pulls/134940
2025-02-25 14:40:04 +01:00
Thomas Dinges
c03ee7f6a8 Merge branch 'blender-v4.4-release' 2025-02-25 14:18:14 +01:00
Thomas Dinges
dfb416b4c4 Build: Patch OpenEXR 3.3.2 for dwa bug
Upstream commit: df162955c6

Ref #134802

Pull Request: https://projects.blender.org/blender/blender/pulls/135037
2025-02-25 14:17:19 +01:00
Aras Pranckevicius
b02f2e8c59 Merge branch 'blender-v4.4-release' 2025-02-25 14:16:13 +02:00
Nikita Lisitsa
e1bcd08f61 Fix #135073: OBJ import of emissive colors
The emissions strength was only set when using an emissive texture.
Additionally, for colors brighter than 1.0, normalize the color
into 0..1 range and set the strength accordingly.

Pull-Request: https://projects.blender.org/blender/blender/pulls/135094
2025-02-25 14:15:18 +02:00
Campbell Barton
285c7b9212 Merge branch 'blender-v4.4-release' 2025-02-25 23:04:38 +11:00
Kamil Galik
dccdca2a22 Fix #134730: incorrect pan-speed with NDOF auto-center enabled
Regression in [0] caused the pan speed to be incorrectly calculated
when NDOF auto-center was enabled.

[0]: b113e848ef

Ref: !134868
2025-02-25 22:56:00 +11:00
Christoph Lendenfeld
6e4413d50f Merge branch 'blender-v4.4-release' 2025-02-25 12:14:52 +01:00
Christoph Lendenfeld
5100a80f7f Fix #110650: Drivers not removed if removing their container
This applies to modifiers, constraints and shape keys.
Any driver on such data was not removed with it,
leaving invalid drivers on objects.

With this patch, the drivers are removed, but animation is left untouched.
This is because animation might be reused somewhere else and we don't
want to introduce potential side effects there.

This also adds unit tests for the fixed cases

Pull Request: https://projects.blender.org/blender/blender/pulls/134511
2025-02-25 12:11:15 +01:00
Sybren A. Stüvel
196df97213 Merge remote-tracking branch 'origin/blender-v4.4-release' 2025-02-25 11:38:15 +01:00
Pratik Borhade
d961f8f9ec Grease Pencil: Remove legacy object type references
Remove GP legacy obtype and unused functions
Few hidden bugs are fixed with that:
- Outliner drag-drop for GP material/effect elements now works
- Correct stats are shown in status bar.

Pull Request: https://projects.blender.org/blender/blender/pulls/133957
2025-02-25 10:46:27 +01:00
Sybren A. Stüvel
ba149680a2 Fix #134810: animating Grease Pencil layer "hide" option doesn't un-hide
Only remove a grease pencil layer from the evaluated copy when its
visibility is not animated.

Animation evaluation does not recreate the evaluated copy from scratch,
and thus once a layer is removed due to it being invisible, it never got
back.

The animatedness of the `.hide` property is determined once, when the
evaluated copy is created. This is subsequently used during evaluation
to determine whether the layer can be removed or not.

Pull Request: https://projects.blender.org/blender/blender/pulls/135057
2025-02-25 10:43:33 +01:00
Pratik Borhade
45f0f93556 Merge branch 'blender-v4.4-release' 2025-02-25 14:15:44 +05:30
Pratik Borhade
e51fff61c5 Grease Pencil: Channel color for groups
`channel_color` property was created for layers in 03b2fc744e. Now
exposed for layer groups too.

Pull Request: https://projects.blender.org/blender/blender/pulls/135088
2025-02-25 09:44:21 +01:00
Omar Emara
16d59b00a7 Refactor: Compositor: Use int32_t as result type
This patches uses an explicit int32_t fixed width integer instead of int
for result types. For consistency with other node systems.
2025-02-25 09:25:48 +02:00
Alaska
88989ed921 Tests: Temporarily block glossy light path tests
Glossy light path tests are unexpectedly failing on build bot.
My current guess is that something changed between when the reference
images were made and when the tests were committed.

While an investigation into what's causing it is going on, these tests
have been temporarily added to the blocklist to avoid unexpected
failures for other developers.
2025-02-25 17:51:48 +13:00
Campbell Barton
f438928501 Merge branch 'blender-v4.4-release' 2025-02-25 15:17:44 +11:00
Campbell Barton
cd9156bb32 Extensions: use dynamically created link to the manual
The literal URL was used before extensions was included in a release.
2025-02-25 15:14:10 +11:00
Alaska
01d80cee28 Tests: Add render tests for outputs of the light path node
This commit adds tests for the outputs of the light path node.

This include many typical tests (E.g. Changing the colour of a material
based on if it's a camera ray or not) along with some "unusual" tests.

Examples include:
- Testing many of the light path node outputs on lights.
  - This includes "analytical" lights and mesh lights, which can behave
    differently depending on if Next Event Estimation or forward path
    tracing occurs.
- Adding extra objects using ray portal BSDFs and transparent BSDFs
  just to double check they don't introduce their own issues.

Ref: blender/blender-test-data!55
2025-02-25 04:34:19 +01:00
Campbell Barton
d9eda9322d Cleanup: remove unused prefix from a used argument 2025-02-25 14:05:14 +11:00
Harley Acheson
67ffad53aa Merge branch 'blender-v4.4-release' 2025-02-24 18:51:52 -08:00
Harley Acheson
130c074487 Fix #131779: Display "inf" / "-inf" for Correct Range of UI Values
Our UI code is currently showing the text "inf" when a numerical input
contains _exactly_ the value of FLT_MAX. But this is the max value for
doubles and we enforce a maximum float precision of 6 digits.  This
means that a property can start with "inf" by default but it is
impossible edit, or even keep the same value, by editing in the UI
and show as "inf".  This PR defines values that are the actual minimum
and maximums currently usable in the UI and values greater than or
equal to are shown as "inf" (equivalent for "-inf").

Pull Request: https://projects.blender.org/blender/blender/pulls/131876
2025-02-25 03:50:23 +01:00
Hans Goudey
322b4624d5 Fix: Use matching attribute name for multi-object "Set Attribute"
Currently these operators work on the active attribute for each
selected mesh or curves data-block. That doesn't really make
sense because you can only see the active attribute for the
active data-block. It's better to try to affect the attribute with
the same name for every geometry, regardless of which is active.

Pull Request: https://projects.blender.org/blender/blender/pulls/135067
2025-02-25 01:36:35 +01:00
Campbell Barton
62599317dd Fix #135009: Python: Can't Set PointerProperty to None
Correct own error applying !126755.
2025-02-25 11:04:48 +11:00
Brecht Van Lommel
e813e46327 Cycles: Refactor lights to be objects
This is an intermediate steps towards making lights actual geometry.
Light is now a subclass of Geometry, which simplifies some code.

The geometry is not added to the BVH yet, which would be the next
step and improve light intersection performance with many lights.

This makes object attributes work on lights.

Co-authored-by: Lukas Stockner <lukas@lukasstockner.de>
Pull Request: https://projects.blender.org/blender/blender/pulls/134846
2025-02-24 23:44:14 +01:00
Laurynas Duburas
92c0eb5e66 Curves: Refactor extrude to use foreach_selected_point_ranges_per_curve
Extrude refactored to use `foreach_selected_point_ranges_per_curve`.
This reduces amount of code and increases readability significantly.

Function `curves_extrude_exec` is refactored to follow structure of
other operators. Also to return `OPERATOR_CANCELLED` when extrude was
called with no points selected.

Pull Request: https://projects.blender.org/blender/blender/pulls/135056
2025-02-24 21:21:23 +01:00
Jacques Lucke
3eaccd6c2c Fix: Geometry Nodes: use object names in Import OBJ node 2025-02-24 18:57:41 +01:00
Jacques Lucke
e05ef4c838 Nodes: support filepath filter for import nodes
Currently, when selecting a file path using the file browser opened from the
node socket, there is no filter active making it harder than necessary to find
the correct file. This patch adds the proper filter. Something similar is done
when using e.g. the gltf import from the menu.

Supporting this requires changes in a bunch of places:
* `StringPropertyRNA` now has a callback that returns the file path pattern.
  This has to be a callback, because the same property is used on all file path
  sockets, but the valid extension depends on the node.
* The string socket declaration also has the optional path pattern. This can be
  set in the node declarations.

Pull Request: https://projects.blender.org/blender/blender/pulls/134931
2025-02-24 18:52:10 +01:00
YimingWu
9759a9df5e Fix #134793: Grease Pencil: Set Uniform Opacity cannot set fill opacities
Fill opacities of individual strokes was overlooked when implementing
the Set Uniform Opacity operator, now corrected and also added a
separate property for controlling stroke/fills opacity.

Pull Request: https://projects.blender.org/blender/blender/pulls/134982
2025-02-24 18:15:32 +01:00
Jacques Lucke
589dce871d Merge branch 'blender-v4.4-release' 2025-02-24 17:50:11 +01:00
Jacques Lucke
c6d2a6f856 Fix #134189: geometry name lost when processing instances 2025-02-24 17:49:46 +01:00
YimingWu
03706b6052 Fix #135052: Grease Pencil: "Convert To" missing in object context menu
Adds "Convert To" option back to the object context menu for Grease
Pencil.

Pull Request: https://projects.blender.org/blender/blender/pulls/135054
2025-02-24 17:00:21 +01:00
Falk David
5f220a2dec Fix: Grease Pencil ID data evaluation happening in the wrong function
Grease Pencil ID data was being evaluated in the
`BKE_grease_pencil_data_update` function, but this function
is called from the evaluated objects.

The fix adds a new `BKE_grease_pencil_eval_geometry` function
thats called as a callback from `build_object_data_geometry_datablock`.

Resolves #134980, #135004.

Pull Request: https://projects.blender.org/blender/blender/pulls/135051
2025-02-24 16:50:21 +01:00
Sybren A. Stüvel
e4c2ddb8e1 Merge remote-tracking branch 'origin/blender-v4.4-release' 2025-02-24 16:48:43 +01:00
Jacques Lucke
252a9b63ed Geometry Nodes: support creating import nodes when dropping file paths
Now import nodes are automatically created in Geometry Nodes when dropping
`.obj`, `.stl`, `.ply` and `.csv` files. Note that this is still hidden behind an
experimental feature flag.

Pull Request: https://projects.blender.org/blender/blender/pulls/135036
2025-02-24 16:25:50 +01:00
Omar Emara
27bf89e933 Refactor: Compositor: Use BKE conversions for MF operation
This patch uses the BKE implicit conversion rules to implement implicit
conversion in multi-function procedure operations in the compositor.
Since conversions use ColorSceneLinear4f to represent colors instead of
float4, we need to insert extra implicit conversions around color
sockets.

Special attention was given to variable destruction in the
implementation because it is now possible for implicit variables to be
outputs, so we need to make sure they are not destructed.
2025-02-24 17:20:16 +02:00
Clément Foucault
27c20aaae7 Overlay: Add support for CPP shader compilation
Rel #127983

Also removes some unused shaders.

Pull Request: https://projects.blender.org/blender/blender/pulls/135034
2025-02-24 16:17:18 +01:00
Hans Goudey
d0a6189b50 Refactor: DRW: Centralize and clean up packed normals conversion
Move the code dealing with converting float3 to GPU normals
out of the vertex format header into a separate header. Use a
proper C++ namespace and remove duplication by only using
the more recently added C++ templated conversions.

Most of the diff comes from the removal of the indirect includes
from GPU_vertex_format.hh. A lot of files ended up mistakenly
depending on that.

Pull Request: https://projects.blender.org/blender/blender/pulls/134873
2025-02-24 16:08:30 +01:00
Sybren A. Stüvel
3fd430d1c6 Anim: make BKE_fcurves_id_cb() only report F-Curves for that ID
Update `BKE_fcurves_id_cb(id, callback)` so that it only reports
F-Curves for `id`. With legacy Actions this used to be "all F-Curves in
the Action", but with slotted Actions it should only report the F-Curves
for the assigned slot.

`BKE_fcurves_id_cb()` is used in two places:

1. Updating F-Curve paths in versioning, for example when node sockets
   were added/removed. For this it is vital that the updates only happen
   for those nodes that were actually affected by this versioning code,
   and not blindly for all F-Curves in the Action.
2. Marking properties as 'animated' in the depsgraph, and the 'value
   backup' for those properties. This should also be only done for the
   properties of that ID, and thus be limited to the F-Curves for the
   assigned slot.

Pull Request: https://projects.blender.org/blender/blender/pulls/134851
2025-02-24 15:57:41 +01:00
Pratik Borhade
576d19add7 Fix #134809: Grease Pencil: Proportional edit tweaks locked material strokes
Entire curve points range is passed to transform-container  when
proportional editing is on. Consequence is, strokes from locked
materials are also affected. Use `editable_points` mask to resolve this.

Pull Request: https://projects.blender.org/blender/blender/pulls/134838
2025-02-24 15:17:26 +01:00
Thomas Dinges
c403b654ba Merge branch 'blender-v4.4-release' 2025-02-24 15:02:46 +01:00
Thomas Dinges
da2555e41c Release: Update license.md for 4.4 2025-02-24 15:01:55 +01:00
Dalai Felinto
e7214cbd31 Fix: missed point_cloud for node tools and more aggressive renaming
The issue was introduced on 1584cd9aa5 (see !134911 for details).

This fixes this and rename the remaining point_cloud from the API.
The DNA is left untouched, so users don't need to re-enable the
experimental point cloud feature.

Pull Request: https://projects.blender.org/blender/blender/pulls/134927
2025-02-24 14:43:08 +01:00
Falk David
0db9486057 Merge branch 'blender-v4.4-release' 2025-02-24 14:12:27 +01:00
Falk David
8cf9d01453 Fix #134909: Crazyspace has incorrect deformed positions due to armature modifier
The fix 8af27ce27e assumed that
the `edit_hints->positions()` were always empty and that we would always
fallback to using the evalauted positions instead.

But if the edit hints are populated, this fails. In this case, we populate the
positions in `remember_deformed_positions_if_necessary`.

The fix makes sure that we write to the `edit_hint` positions if they are
populated.

Pull Request: https://projects.blender.org/blender/blender/pulls/135033
2025-02-24 13:52:42 +01:00
Jeroen Bakker
3b5c3e70b1 SubDiv: Use shader create info for stretch overlays
This PR migrates subdiv_vbo_edituv_strech_*_comp.glsl to use
shader create info.

Pull Request: https://projects.blender.org/blender/blender/pulls/135038
2025-02-24 13:32:53 +01:00
Jeroen Bakker
1f0bc6bbe6 SubDiv: Use shader create info for sculpt data
This PR migrates subdiv_vbo_sculpt_data_comp.glsl to use
shader create info.

Pull Request: https://projects.blender.org/blender/blender/pulls/135032
2025-02-24 12:58:13 +01:00
Sybren A. Stüvel
857743db9d USD: import skeletal animation as slotted Actions
The USD importer was still creating legacy Actions, which are no longer
supported in Blender 4.4. This commit updates the code to produce
slotted Actions instead.

This also avoids the need to create F-Curves "from scratch", but rather
uses the available functionality. This makes the code somewhat easier to
maintain.

Pull Request: https://projects.blender.org/blender/blender/pulls/134866
2025-02-24 12:39:52 +01:00
Omar Emara
c29971c688 Fix #135010: Crash when using Denoise node
Blender crashes when using the Denoise node. That's because the code
assumes normal input would have 4-channels, while this may not be the
case. To fix this, use the channels count from the result or the GPU
texture directly.
2025-02-24 13:22:40 +02:00