Commit Graph

1246 Commits

Author SHA1 Message Date
Jacques Lucke
f0c7e52ff2 Core: extract blendfile_header.py as common utility for parsing .blend files
This new file can parse the file header (first few bytes) as well as the block
headers.

Right now, this is used by two places:
* `blendfile.py` which is used by `blend2json.py`
* `blend_render_info.py`

This new module is shipped with Blender because it's needed for
`blend_render_info.py` which is shipped with Blender too. This makes using it in
`blendfile.py` (which is not shipped with Blender) a bit more annoying. However,
this is already not ideal, because e.g. `blend2json` also has to add to
`sys.path` already to be able to import `blendfile.py`.

This new file could also be used by blender-asset-tracer (BAT).

The new `BlendFileHeader` and `BlockHeader` types may be subclassed by code
using it, because it wants to store additional derived data (`blendfile.py` and
BAT need this).

New tests have been added that check that the file and block header is parsed
correctly for different kinds of .blend files.

Pull Request: https://projects.blender.org/blender/blender/pulls/140341
2025-06-23 12:53:55 +02:00
Bastien Montagne
8f4f94aabc Tests: Fix file removal failure from Python in unittests.
Caused by changes in da4eda148b. Did not realized we have a few
duplicate blend-file names in `tests/files`, these ended up stepping on
each other's toes at random during testing.

Now ensure that the generated temporary 'save & reload' blend-file names
are unique, by adding a hash of the whole file path.
2025-06-22 15:41:19 +02:00
Bastien Montagne
da4eda148b Tests: Add basic save & reload to the 'versioning' tests.
This should allow us to catch significantly more 'sneaky' issues with
writefile and versioning codes in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/140735
2025-06-21 14:06:43 +02:00
Michal Krupa
fdaaea6328 Core: Increase MAX_ID_NAME length from 66 to 258 (Blender 5.0)
Change the maximum data-block name from 64 to 256 bytes by increasing MAX_ID_NAME value.

Also increase a few related non-ID data name max size, essentially the action slots identifiers, as these are the primary key used to match an Action's slot to an ID by name.

Other sub-data (bones, modifiers, etc.) lengths are not modified here, as these can be made actual dynamic strings in the future, while keeping (a reasonable level of) forward compatibility, during the course of Blender 5 release cycles.

Implements #137608.

Co-authored-by: Bastien Montagne <bastien@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/137196
2025-06-19 16:39:20 +02:00
Piotr Makal
870f75b790 Fix #79163: Bevel operation produces disconnected UVs #139595.
Fix #79163 bug related to the bevel operation producing disconnected UVs for
new bevel faces. This change replaces previous approach using scattered and
selective usage of functions: bev_merge_uvs, bev_merge_edge_uvs and
bev_merge_end_uvs with one coherent technique for all stages of the bevel operation.
It is utilizing a concept of loop (BMLoop) buckets to keep track of UV vertices
that should be merged at the end of bevel operation by a single call to
bevel_merge_uvs function. This approach doesn't touch initial UV position
calculation done by interpolation algorithm in bev_create_ngon function and
keeps the concept of representative faces (called frep, facerep or rep_face in
code) to help decide to which bucket specific loops should be assigned.

This is from PR https://projects.blender.org/blender/blender/pulls/139595,
which has more explanation and discussion.
2025-06-19 10:00:58 -04:00
Jesse Yurkovich
fe45895064 Merge branch 'blender-v4.5-release' 2025-06-18 11:26:07 -07:00
Jesse Yurkovich
bcd5af34f9 Fix: USD: Traverse through UsdShadeNodeGraph nodes during material import
Follow connections through `UsdShadeNodeGraph` nodes when reading
materials rather than looking only for `UsdShadeShader` nodes.

Found while investigating the Intel Sponza research sample:
https://www.intel.com/content/www/us/en/developer/topic-technology/graphics-research/samples.html

Pull Request: https://projects.blender.org/blender/blender/pulls/140565
2025-06-18 20:25:29 +02:00
Thomas Barlow
dc8e2c09d9 Fix #109024: Off-by-1 in rna_access for non-array props without raw access
The `a + array_len > in.len` check was off-by-1 whenever accessing a
non-array property without raw access. This was because `array_len` was
actually the array length of the property, which is `0` for non-array
properties.

Given an array which was too short, this would cause the slower loop to
overrun the end of the array by one item. When getting items this would
cause a crash on a debug build with `Fatal Python error:
_PyMem_DebugRawFree: bad trailing pad byte`.

So use `item_len` instead, wichi is always set to `1` for non-array
properties.

Also do not assume that an `array_len` of `0` means that the property is
an array. While this may be true currently, it is cleaner and safer to
use the dedicated RNA API to check that.

This PR also adds some basic checks for expected failure of `foreach_set`
/`foreach_get` API when the provided array is too small.

Co-authored-by: Bastien Montagne <bastien@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/115967
2025-06-18 11:03:27 +02:00
Jacques Lucke
1bb49edf7f Geometry Nodes: add structure type inferencing tests
The way these tests work is similar to the existing field inferencing tests.
There is a .blend file that is opened and then we check the inferred structure
types from Python. A new `NodeSocket.inferred_structure_type` property is added
to be able to access this information. Other then the field inferencing tests,
this patch does not directly check the socket shapes, which are not always
exactly determined by the inferred structure type.

This also fixes a few issues I found while adding the tests.

Pull Request: https://projects.blender.org/blender/blender/pulls/140520
2025-06-18 08:39:01 +02:00
Bastien Montagne
e28a714245 Merge branch 'blender-v4.5-release' 2025-06-16 16:31:38 +02:00
Bastien Montagne
b6cccca661 BMesh: Python: Add minimal API test for bmesh.
Hopefully will avoid critical failures like #140451 in the future.
2025-06-16 16:18:41 +02:00
Clément Foucault
decd88f67e Python: Remove deprecated BGL API
The API was in a deprecation state for many years now.
This API was not compatible with Metal nor Vulkan.

This also remove `Image.bindcode`.

Pull Request: https://projects.blender.org/blender/blender/pulls/140370
2025-06-16 12:50:50 +02:00
Brecht Van Lommel
b920f6f1a7 Shaders: Remove point density texture node
This is replaced by geometry nodes, where volumes can now be generated from
point clouds and meshes with more control, and more efficient rendering as a
sparse volume.

No backwareds compatibility is provided, as this would be complicated, and
probably this feature was not used much in the past few years.

This node was supported in Cycles only, not by EEVEE.

Pull Request: https://projects.blender.org/blender/blender/pulls/140292
2025-06-16 12:06:02 +02:00
Jesse Yurkovich
3fa1344dd7 Merge branch 'blender-v4.5-release' 2025-06-13 16:11:31 -07:00
Michael B Johnson
07342407d3 USD: Add support for Point Instancing during Export
Adds a Point Instancing exporter based on the existing
USDPointInstancerReader. Covers both round-trip and Blender-native
workflows. Exports 'Instance on Points' setups as USDGeomPointInstancer,
supporting objects, collections, and nested prototypes.

A warning is shown during export if invalid prototype references are
detected. These would occur if an instancer attempts to instance itself.

This feature is currently gated behind an off-by-default export option
(`use_instancing`) as there are still a few cases which can yield
incorrect results.

Further details in the PR.
Ref: #139758

Authored by Apple: Zili (Liz) Zhou

Pull Request: https://projects.blender.org/blender/blender/pulls/139760
2025-06-14 01:10:55 +02:00
Clément Foucault
1c29a2e2e5 EEVEE: Rename and move old gtao properties
- Move `gtao_distance` to view layer and rename to
  `ambient_occlusion_distance` (API change).
- Remove `gtao_quality` from the RNA (API change).
- Remove `use_gtao` (unused) from the RNA (API change).
- Rename `gtao_focus` to `fast_gi_bias` in the DNA (no API
  change).
- Rename `gtao_resolution` to `fast_gi_resolution` in the
  DNA (no API change).

Pull Request: https://projects.blender.org/blender/blender/pulls/140298
2025-06-13 15:36:17 +02:00
Clément Foucault
4fe75da973 EEVEE: Remove all remaining reference of EEVEE next
This changes the engine identifier back to `BLENDER_EEVEE`.

We keep the `BLENDER_EEVEE_NEXT` identifier around for
versioning reasons (have to detect when it is the active
engine of a older file).

This also rename a bunch of pannels that were using `next`
in their name.

This is a breaking change for Addons compatibility.

Pull Request: https://projects.blender.org/blender/blender/pulls/140282
2025-06-13 12:36:14 +02:00
Sean Kim
187d27b2ec Merge branch 'blender-v4.5-release' 2025-06-12 11:28:37 -07:00
Sean Kim
f77b1e871d Tests: Add UI tests that verify loading all default workspaces
While individual modes have UI tests related to undo, this new set of
tests in this new file is intended to be a set of very broad sanity
tests that catch the most egregious errors that cause crashing on start
up, whether due to python errors, UI rendering issues, or otherwise.

Running these tests takes approximately 4 seconds currently as it adds
and verifies the loading of each of the workspaces available "out of
the box" to a blender user.

Pull Request: https://projects.blender.org/blender/blender/pulls/139318
2025-06-12 20:27:38 +02:00
Aras Pranckevicius
68111db969 Nodes: Speedup Voronoi by changing the hash function
The 2D->2D, 3D->3D, 4D->4D hash functions used in Voronoi node were
using quite an expensive hash function. Switch these to dedicated
2D/3D/4D hash functions (pcg2d, pcg3d, pcg4d) -- these are still very
good quality, but the hash function itself is 3x-4x faster.
Which makes Voronoi node calculation overall be around 2x faster. In
some cases when using OSL, the speedup is even larger.

This visibly changes output of the Voronoi noise however. The actual
noise "behaves" the same, just if someone was depending on the noise
pattern being exactly like it was before, this will change the pattern.

Images, more performance results and details wrt OSL are in the PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/139520
2025-06-12 20:07:52 +02:00
Jesse Yurkovich
283666675c Merge branch 'blender-v4.5-release' 2025-06-12 10:33:38 -07:00
Jesse Yurkovich
37f8616bd5 Fix #140225: Always ensure mesh topology is up to date during USD import
It is possible for a mesh to change topology across frames but still be
detected as not needing a topology update.

Until we can make a finer-grained check against the before and after
topology, unconditionally ensure it's updated for now.

Adds a new test that checks a few frames of changing topology that is
similar, but not the same.

Pull Request: https://projects.blender.org/blender/blender/pulls/140253
2025-06-12 19:32:43 +02:00
Laurynas Duburas
3c407ebeaa Curves: Enhance tesselation of NURBS with corners
Current NURBS evaluation handles corners or sharp angles poorly. Sharp
edges appear when a knot vector value is repeated `order - 1` times.
Users can make sharp corners by creating NURBS curve with `Bezier` knot
mode or by setting `order` to 2 for legacy curves. The problem occurs
because current algorithm takes all the curve's definition interval,
divides it into equal parts and evaluates at those points, but corners
are exactly on repeated knot's. To hit those, the resolution has to be
increased higher than required for the rest of the curve.

The new algorithm divides non zero length intervals between two adjacent
knots into equal parts. This way corners are hit with a resolution of 1.
This does change the evaluated points of NURBS curves, which is why some
test results have to be updated in this commit.

Pull Request: https://projects.blender.org/blender/blender/pulls/138565
2025-06-12 16:22:21 +02:00
Bastien Montagne
bc80ef136e Big Endian Support Removal.
This commit implements #125759.

It removes:
* Blender does not build on big endian systems anymore.
* Support for opening blendfiles written from a big endian system is
  removed.

It keeps:
* Support to generate thumbnails from big endian blendfiles.
* BE support in `extern` or `intern` libraries, including Cycles.
* Support to open big endian versions of third party file formats:
  - PLY files.
  - Some image files (cineon, ...).

Pull Request: https://projects.blender.org/blender/blender/pulls/140138
2025-06-12 10:37:47 +02:00
Sean Kim
c8e5043999 Merge branch 'blender-v4.5-release' 2025-06-11 21:27:13 -07:00
Sean Kim
98739b6b53 Tests: Add Sculpt tests that verify each brush strength curve preset
This commit adds 9 tests that check each of the default brush curve
strength preset options to ensure that none of them cause NaN
propagation. In total this takes approximately 0.7s to run to run.

By design, these tests are very broad and are not a replacement for
other testing, but they should help in reducing the chance of potential
regressions.

Related to #140162

Pull Request: https://projects.blender.org/blender/blender/pulls/140242
2025-06-12 06:26:05 +02:00
Weizhen Huang
ee578cc738 Fix #139753: Discontinuity in mesh tangent without UV map
when there is no uv, we call the function `map_to_sphere()` to create
temporary uv for computing the tangent. It could happen that a triangle
has vertices with the u coordinates going across the line where u wraps
from 1 to 0. In this case, just computing the difference of the u
coordinates results in the wrong triangle area.

To fix this problem, we compute distance in toroidal (wrap around)
space.

This is safe for coordinates generated by `map_to_sphere()` function,
because it is not supposed to map the positions of a triangle to u
coordinates that span larger than 0.5.

Pull Request: https://projects.blender.org/blender/blender/pulls/139880
2025-06-09 13:52:00 +02:00
Sean Kim
ab3c129dd9 Refactor: Paint: Rename brush _tool properties to _brush_type
This commit renames the python Brush properties that end with `_tool` to
`_brush_type` (e.g. `sculpt_tool` -> `sculpt_brush_type`) to better
distinguish the property from the concept of tools in a workspace
context.

Resolves #124201

Pull Request: https://projects.blender.org/blender/blender/pulls/139909
2025-06-06 23:40:13 +02:00
Aras Pranckevicius
5ad6d42c83 IO: Remove Collada import/export
Removes Collada import/export (has been deprecated since 4.2).

Pull Request: https://projects.blender.org/blender/blender/pulls/139337
2025-06-06 08:38:57 +02:00
Jason C. Wenger
e418f7b1f1 Modeling: add an angle threshold that affects vertex dissolve
When dissolving an edge merges faces, use an angle threshold before
dissolving vertices from the face which have become chains as reult
of the merge (connected to 2 edges).

Also fix edge-flag handling when dissolving multiple edges
from a chain into a single edge, previously flags from the
resulting edge was effectively random.
Now flags from all edges are merged.

Resolves #100184.

Ref !134017
2025-06-05 05:33:49 +00:00
Campbell Barton
8094e7c5f0 Cleanup: remove invalid comment 2025-06-04 16:53:07 +10:00
Jesse Yurkovich
04bc3f155e Fix #137662: Auto-validate meshes during USD import if we detect bad faces
A small number of USD files in the wild contain invalid face index data
for some of their meshes. This leads to asserts in debug builds and
crashes for users in retail builds(sometimes). There is already an
import option to Validate Meshes but it turns out that we, and most
other importers, perform validation too late. We crash before getting to
that validate option (see notes).

This PR implements a cheap detection mechanism and will auto-fix if we
detect broken data. The detection may not find all types of bad data but
it will detect what is known to fail today for duplicate vertex indices.

We immediately validate/fix before loading in the rest of the data. The
downside is that this will mean no additional data will be loaded.
Normals, edge creases, velocities, UVs, and all other attributes will be
lost because the incoming data arrays will no longer align.

It should be noted also that Alembic has also chosen this approach. It's
check is significantly weaker though and can be improved separately if
needed.

If auto-fix is triggered, it will typically appear as one trace on the
terminal.
```
WARN (io.usd): <path...>\io\usd\intern\usd_reader_mesh.cc:684
read_mesh_sample: Invalid face data detected for mesh
'/degenerate/m_degenerate'. Automatic correction will be used.
```

A more general downside of these fixes is that this applies to each
frame of animated mesh data. The mesh will be fixed, and re-fixed, on
every frame update when the frame in question contains bad data.

For well-behaved USD scenes, the penalty for this check is between 2-4%.
For broken USD scenes, it depends on how many meshes need the fixup. In
the case of the Intel 4004 Moore Lane scene, the penalty is a 2.7x
slowdown in import time (4.5 s to 12.5 s).

Pull Request: https://projects.blender.org/blender/blender/pulls/138633
2025-06-03 19:26:34 +02:00
Alaska
e71a1bbf70 Tests: Allow OptiX to run tests in the OSL folder
In the render test suite there is an OSL folder that contains tests that
need OSL to function.

Previously due to some missed logic, the OptiX OSL test suite would not run
tests in that folder because part of the test code assumed that if you aren't
testing on a CPU, then your device doesn't support OSL.

This commit fixes this issue.

Along with this change, some logic was changed in preparation for allowing
OptiX OSL camera tests to run without OSL shading enabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/139433
2025-06-03 14:46:32 +02:00
Aras Pranckevicius
ba0b1acb4e Fix #139656: FBX importer does not set normalmap textures as "non-color"
Normal maps (and generally all other non-color textures) were not
marked as non-color in the new FBX importer.

Pull Request: https://projects.blender.org/blender/blender/pulls/139725
2025-06-02 15:15:05 +02:00
Maxime-Cots
efd871e9ef USD: Implement new DomeLight_1 Schema for Import
Handle the `DomeLight_1` schema for import and translate to a World
material like what was already done for the original `DomeLight` schema.

The primary difference is that the new schema provides a `poleAxis`
attribute that authoring applications can use to remove ambiguity for
the orientation of the HDRI texture. Some care was made to match
`usdview` with a set of hand-crafted files. However, after matching,
some real scenes ended up displaying differently. These were corrected
but this could mean there's still issues that will need investigation
and fixing in the future.

Co-authored-by: Nig3l <nig3lpro@gmail.com>
Co-authored-by: Jesse Yurkovich <jesse.y@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/137761
2025-05-31 01:15:19 +02:00
Sean Kim
de454c3329 Tests: Add dyntopo brush stroke and toggle undo test
Tests that mixing dyntopo and normal mesh sculpting works as well as
manually toggling dyntopo on and off while undoing / redoing.

Pull Request: https://projects.blender.org/blender/blender/pulls/139315
2025-05-27 17:44:28 +02:00
Jesse Yurkovich
0d531078c6 Tests: More coverage of USD unit and orientation export settings
When exporting without a `root_prim_path` set, the unit and orientation
settings are applied in a slightly different way. Add coverage for these
cases.

Pull Request: https://projects.blender.org/blender/blender/pulls/139468
2025-05-27 05:39:02 +02:00
Aras Pranckevicius
8e8d2e7aec Fix: Make new FBX importer support Light exposure
7e0dad0580 added Light exposure import to Python FBX importer,
but not to the new C++ one

Pull Request: https://projects.blender.org/blender/blender/pulls/139292
2025-05-22 20:31:56 +02:00
Sean Kim
f6abef2aaf Tests: Add undo test for Sculpt trim tool
For Sculpt Undo, certain operators will modify the topology count of the
mesh. These operators are handled separately from normal brush strokes,
and so having tests for an operator that uses this functionality is
beneficial in detecting regressions.

Pull Request: https://projects.blender.org/blender/blender/pulls/139249
2025-05-22 05:48:07 +02:00
Jesse Yurkovich
e84c60561c Cleanup: Remove Dots Stroke material from USD's empty.blend test file
This extra material in what should be an empty file often makes some
checks and text comparisons needlessly more confusing.

Pull Request: https://projects.blender.org/blender/blender/pulls/139228
2025-05-21 20:42:11 +02:00
Sean Kim
4ecde8dc53 Paint: Allow duplicating essential brushes into current file
With the release of the brush assets project in 4.3, most brush
management moved out of the current .blend file into either the
essentials library or user-created libraries.

With this change, a number of workflows became more difficult:
* Handling a large library of texture and texture properties for brushes
  due to ID linkage constraints.
* Having local tweaks to a brush without bloating the the asset library
  and reducing discoverability.

This commit introduces an intermediate step to assist with both of the
preceding pain points. The `brush.asset_save_as` operator is extended
to allow saving into the current blend file via the `Duplicate Asset`
context menu entry.

Additionally, these features help ease authoring brush assets in general
from the UI instead of requiring manual datablock management.

This allows brushes to be stored alongside other data inside a specific
blend file.

Related to #129655 and [1].

[1] https://blender.community/c/rightclickselect/XYMA/

Pull Request: https://projects.blender.org/blender/blender/pulls/138105
2025-05-20 22:02:42 +02:00
Jesse Yurkovich
46ec277713 USD: Add support for UsdPrimvarReader_TYPE in materials
Add support for the UsdPrimvarReader_TYPE templates for both import and
export. These are used by several USD test assets and support here
represents the last major piece of the UsdPreviewSurface spec to be
implemented.

On import these become `Attribute` nodes and on export the `Attribute`
nodes will become `UsdPrimvarReader_TYPE`'s accordingly.

Import:
- `UsdPrimvarReader_float` and `UsdPrimvarReader_int` will use the `Fac`
  output
- `UsdPrimvarReader_float3` and `UsdPrimvarReader_float4` will use the
  `Color` output
- `UsdPrimvarReader_vector`, `UsdPrimvarReader_normal`, and
  `UsdPrimvarReader_point` will use the `Vector` output

Export (only `Geometry` Attribute types are considered):
- `Fac` will use `UsdPrimvarReader_float`
- `Color` will use `UsdPrimvarReader_float3`
- `Vector` will use `UsdPrimvarReader_vector`
- `Alpha` is not considered

MaterialX note:
Hydra-native support is a bit more involved and will have to be done
separately. Hydra w/USD sync is trivial to implement but those changes
have been left out here.

Pull Request: https://projects.blender.org/blender/blender/pulls/135143
2025-05-19 19:47:22 +02:00
Jacques Lucke
16ad67d34c Tests: have test_object active by default in regression test files
When opening Geometry Nodes regression test files I always find a bit annoying
that the `expected_object` and not the `test_object` is active. That's because
only the `test_object` contains the modifier or node tree that is being tested.
Therefore, usually my first step when opening these files is to select the
`test_object` first.

This patch changes it so that when mesh tests are updated, the `test_object` is
made active in the end before the file is saved again.

Pull Request: https://projects.blender.org/blender/blender/pulls/139088
2025-05-19 15:38:17 +02:00
Sean Kim
9e1e9b0859 Paint: Add toggle support for brush.asset_activate
This commit adds a toggle functionality to the `brush.asset_activate`
operator that makes it behave similarly to the `paint.brush_select`
parameter of the same name.

When the operator has this option enabled, using the operator or
pressing the relevant key will either:
* Activate the specified brush and store it if the current brush does
  not match the specified brush
* Activate the previously stored brush if it exists.

This option is exposed in the keymaps and enabled by default for the
Sculpt Mask brush.

This allows, for example, users to press 'M' to switch to the mask brush
and then press 'M' again to switch back to their previously active
brush.

Partially addresses this RCS submission: [1]
[1] https://blender.community/c/rightclickselect/1VwZ/

---

### Notes
This commit does not currently clear the `AssetWeakReference` when switching paint modes.

Pull Request: https://projects.blender.org/blender/blender/pulls/138845
2025-05-16 23:25:45 +02:00
Jesse Yurkovich
3b2bbad609 USD: Add support for Text objects during export
Similar to the existing meta-ball export, and the other exporters,
convert Text objects to meshes for export.

Ref #138883

Pull Request: https://projects.blender.org/blender/blender/pulls/138903
2025-05-16 22:12:48 +02:00
Michael B Johnson
af0cfcb01c MaterialX: Export Principled BSDF as OpenPBR Surface
Switch from Standard Surface to OpenPBR as the exported MaterialX surface,
since this is the new standard more renderers are adopting and it more closely
matches the Principled BSDF implementation.

Anisotropy support is improved though still not quite the same, as formulas
are different. Nodes are generated to apply anisotropic rotation to the
tangent vector, as there is no corresponding parameter in OpenPBR.

Fixes #138164

Authored by Apple: Lee Kerley

Pull Request: https://projects.blender.org/blender/blender/pulls/138165
2025-05-15 19:13:36 +02:00
Nathan Vegdahl
8a984f4f4e Anim: Add "replace" mix mode to the Action Constraint
The available mix modes on the Action Constraint only allowed
*combining* the Action's transforms with the input transforms, but
unlike most other constraints lacked a way to completely
override/replace those transforms.

This PR adds a "Replace" mix mode to the Action Constraint, bringing it
in line with most of the other constraints already in Blender.

![action_constraint_replace_mode_screenshot.png](/attachments/51fb09d6-0a87-42dc-a75e-9ae81c856796)

----

Test file: [action_constraint_replace_mode.blend](/attachments/fc3417a8-b60a-4212-9840-5b59191e9ed9)

- The small bone at the top is the action constraint target (translating it right-left triggers the action constraint).
- Both two-bone chains are set up with action constraints.  The base bones of each chain additionally have a copy location constraint to the small sideways bone, placed before the action constraint in their constraint stack.
- The chain on the left has the default mix mode, which allows you to manipulate the bones on top of what the action constraint does, and allows the copy location constraint on the base bone to work.
- The bones on the right have the new "Replace" mix mode, and therefore manipulating them does not affect the final constrained transformation, and the copy location on the base bone is overridden by the action constraint.

Pull Request: https://projects.blender.org/blender/blender/pulls/138316
2025-05-15 14:30:01 +02:00
Omar Emara
79d37720de Nodes: Add Factor and Percentage subtypes for vector sockets
This patch adds support for the Factor and Percentage subtypes for
vector sockets. This is needed by the compositor, since it has some node
inputs that specify locations and sizes relative to image size, and
having factor and percentage subtypes for those improves the UX quite a
bit according to user feedback.

Pull Request: https://projects.blender.org/blender/blender/pulls/138805
2025-05-15 08:29:41 +02:00
Alaska
1c1e2f1371 Fix: Render test failures when building without fluid modifier
When building Blender WITH_MOD_FLUID=OFF, the OpenVDB render tests
would fail as some of them make use of the WITH_MOD_FLUID features.

This commit fixes this by disabling OpenVDB render tests unless
WITH_MOD_FLUID is active.

Pull Request: https://projects.blender.org/blender/blender/pulls/138728
2025-05-13 05:07:45 +02:00
Aras Pranckevicius
a96ecd2834 Fix #137768: new FBX importer does not import some animations correctly
- FBX "root bone" should become the Armature object itself, and not
  an extra bone (follow same logic as Python importer did).
- "World to armature matrix" was not correct for armatures that are
  parented under some other objects with transforms.
- Parenting imported meshes under an Armature was not taking into
  account that the mesh bind transform might not be the same as the
  current mesh node transform (i.e. was not setting "matrix parent
  inverse" to compensate like the Python importer did).
- The repro file in #137768 also exposed an issue that importing custom
  vertex normals was not working correctly in the new importer, when
  mesh is partially invalid (validation alters the mesh, custom normals
  have to be set afterwards).

Pull Request: https://projects.blender.org/blender/blender/pulls/138736
2025-05-12 10:56:07 +02:00