Fix a few small mistakes in the action baking code:
- Assigning an action slot should only happen after the action itself has
been assigned.
- `_ensure_channelbag_exists()` didn't actually ensure the channelbag
always exists; now it also creates the layer & strip if necessary.
Pull Request: https://projects.blender.org/blender/blender/pulls/135853
The main issue of 'type-less' standard C allocations is that there is no check on
allocated type possible.
This is a serious source of annoyance (and crashes) when making some
low-level structs non-trivial, as tracking down all usages of these
structs in higher-level other structs and their allocation is... really
painful.
MEM_[cm]allocN<T> templates on the other hand do check that the
given type is trivial, at build time (static assert), which makes such issue...
trivial to catch.
NOTE: New code should strive to use MEM_new (i.e. allocation and
construction) as much as possible, even for trivial PoD types.
Pull Request: https://projects.blender.org/blender/blender/pulls/135852
The main issue of 'type-less' standard C allocations is that there is no check on
allocated type possible.
This is a serious source of annoyance (and crashes) when making some
low-level structs non-trivial, as tracking down all usages of these
structs in higher-level other structs and their allocation is... really
painful.
MEM_[cm]allocN<T> templates on the other hand do check that the
given type is trivial, at build time (static assert), which makes such issue...
trivial to catch.
NOTE: New code should strive to use MEM_new (i.e. allocation and
construction) as much as possible, even for trivial PoD types.
Pull Request: https://projects.blender.org/blender/blender/pulls/135813
This patch adds the ability to snap to the frame range bounds in the VSE
timeline, on by default. End frame snap location is offset by 1 to
ensure the snap point aligns with the visible end frame boundary
(otherwise e.g. right handle of strip would be one frame short).
Timeline and preview snapping is also turned on by default using the
same versioning block.
Pull Request: https://projects.blender.org/blender/blender/pulls/135753
* Share vertices between patches instead of using stitch map
* Switch to OpenSubdiv compatible counter-clockwise indexing
* Simplify patch edge reverse direction logic
* Add more comments to splitting and dicing
Pull Request: https://projects.blender.org/blender/blender/pulls/135681
* Add SubdAttributeInterpolation class for linear attribute interpolation.
* Dicing computes ptex UV and face ID for interpolation.
* Simplify mesh storage of subd primitive counts
* Remove kernel code for subd attribute interpolation
* Remove patch table packing and upload
The old optimization adds a fair amount of complexity to the kernel, affecting
performance even when not using the feature. It's also not that useful as it
does not work for UVs that needs special interpolation. With this simpler code
it should be easier to make it feature complete.
Pull Request: https://projects.blender.org/blender/blender/pulls/135681
There is a bug in OpenEXR bug where it requests at least 4096 bytes even
if the file is smaller than that. Work around it by padding with zeros.
This was fixed upstream in commit 97f857131e6b4c43ab after the 3.3.2
release, but not in any official release yet.
Pull Request: https://projects.blender.org/blender/blender/pulls/135796
This replaces the implicit use of the `radius` attribute on the input
curves with an input field `Scale` that gets evaluated on the point
domain of the input curves to scale the profile.
It wasn't super intuitive that the `radius` would actually act as
a scale of the profile. E.g. if the radius of the input curve was
`1 meter` the resulting profile was unscaled (scaled by 1), but
wouldn't necessarily have a size of `1 meter` (only if the profile
also had a size of 1m)! If imperial units were used, `3.28084 ft`
would correspond to a scale of 1.
This change makes this behavior a lot more clear and potentially
removes the need for the assumption that the default curve radius
is `1.0f` (Ideally, the default curve radius should be `0.01f`).
While we did consider making the `Scale` input use the `radius`
field implicitly by default, we decided against it, because it again
"hides" the dependency on the radius and the fact that the radius
is used as a scale. Letting the user make this decision seems better.
Pull Request: https://projects.blender.org/blender/blender/pulls/134187
The issue was that the `FCURVE_DISABLED` flag is set when an
RNA path cannot be resolved, and that skips evaluation.
However in the specific case, that is actually something expected as
the property only exists on one ID and not the other.
Pull Request: https://projects.blender.org/blender/blender/pulls/135782
Part of #134755 / #134766.
Add the blend file name and directory path to the tooltip of assets in
custom asset libraries (as configured in the Preferences), for the asset
browser and asset shelf. This information is often important when
dealing with production assets. In the asset shelf it wasn't available
at all.
Based on feedback from the Blender Studio.
Using `UI_but_func_tooltip_custom_set()` to create a custom tooltip
would completely disable the quicker label tooltip, even when explicitly
set using `UI_but_func_tooltip_label_set()`. Instead the quick label
should show first, and then the full tooltip once the usual tooltip
timer is reached.
**How to reproduce:**
1. Add Cryptomatte Node
2. Enable 'Object' render passes
3. Connect Cryptomatte to output (composite or viewer node)
4. Optional: set matte ID
5. (Do not connect input image)
6. Render
7. Observe invalid output image (or assert in debug build)
(see also PR for an example blend file)
Only CPU is affected. The solution follows the behavior of the GPU backend, where the input color of the single value input image is multiplied with the matte result to produce a non constant output.
Pull Request: https://projects.blender.org/blender/blender/pulls/135786
Add an explanation to the keyframe insertion function
`animrig::insert_keyframes()` as to why it does not use
`ID_RECALC_ANIMATION`:
Animation flushing would be quite annoying in the following case:
- Key Cube's loc/rot/scale.
- Go to another frame.
- Translate, rotate, and scale the cube.
- Hover over the loc/rot/scale properties and one by one press 'I' to
insert a key there.
If `ID_RECALC_ANIMATION` were used, keying the location would immediately
cause a flush of the animation data, popping the rotation and scale back
to their animated values.
No functional changes.
**How to reproduce:**
1. Add Cryptomatte Node
2. Enable 'Object' render passes
3. Connect Cryptomatte to output (composite or viewer node)
4. Optional: set matte ID
5. (Do not connect input image)
6. Render
7. Observe invalid output image (or assert in debug build)
(see also PR for an example blend file)
Only CPU is affected. The solution follows the behavior of the GPU backend, where the input color of the single value input image is multiplied with the matte result to produce a non constant output.
Pull Request: https://projects.blender.org/blender/blender/pulls/135786
When saving a file, move the catalog service from the runtime asset library into the new on-disk
asset library. This makes all catalog data like the undo history and deleted catalogs be preserved.
The fact that a new asset library type gets allocated is an implementation detail that shouldn't
affect behavior.
Once the service is moved, an undo push is added (so this state can be restored to), and if the new
.blend file location can be associated with a catalog definition file, its catalogs are merged in.
Includes unit tests.
Pull Request: https://projects.blender.org/blender/blender/pulls/135589
This removes the use of `system_gpu_context_mutex`
which was making render command submission threadsafe.
The only issue is the concurent usage of GPUShader objects.
To fix this, we only guard the submission section which
are the only parts that uses the GPUShaders.
Removing this critical section all together requires some changes
in the GPUShader. See #135406
Rel #134690
Pull Request: https://projects.blender.org/blender/blender/pulls/135595