BLI_scanfill could remove edges later needed for feathering,
although this would only occur in specific cases.
Resolve by storing edges before triangle filling.
Duplicate was setting the last-duplicated spline as active,
leaving the active vertex set to the original (non-duplicated) spline.
This caused the active spline/point to get out of sync,
while not an error - it is confusing and should be avoided.
Now the active spline & point are duplicated,
matching active behavior elsewhere (objects for e.g.).
The active vertex was only cleared when it was part of the active-spline
(which isn't guaranteed).
Duplicating & deleting left the active vertex pointing to freed memory.
An unsigned int was used for pointer offset calculation which could wrap
around, for large values or when pointer being checked is from a
different allocation.
USD has the concept of material "purposes" which allows different
materials to be associated for a prim and gives special meaning to them.
These are somewhat similar to display purposes, which we already allow
to be chosen, but are distinct concepts. This PR adds an option for
Import allowing the user to chose which material purpose to load.
Blender currently attempts to load purposes automatically. It starts
with "allPurpose" and then moves to "preview" and "full" in that order.
This behavior is now changed and the automated search is removed to
instead give the user control which purpose to load. Additionally, USD
already has its own fallback behavior during material resolution[1]:
- When given "full" it will first check "full" and fallback to
"allPurpose" if not found. An additional, Blender-specific fallback
to "preview" is also implemented here upon request.
- When given "preview" it will first check "preview" and fallback to
"allPurpose" if not found
- When given "allPurpose", it will only check "allPurpose"
I have opt'd to keep this behavior directly as-is to not introduce
differences that may surprise those already familiar with USD elsewhere.
Additionally, I've set Blender's default import purpose to "full" to
ensure we're loading in the highest quality assets first. Though this
has the obvious risk that "full" assets tend to be quite heavy. We can
change to "preview" if this proves too problematic later.
This does not change how Blender exports materials. Blender always uses
the "allPurpose" binding when writing its USD files.
--------
[1] USD docs:
https://openusd.org/release/api/class_usd_shade_material_binding_a_p_i.html#detailshttps://openusd.org/release/api/class_usd_shade_material_binding_a_p_i.html#UsdShadeMaterialBindingAPI_MaterialResolution
Pull Request: https://projects.blender.org/blender/blender/pulls/128206
The asset previews were a little smaller than in comparable popups,
leading to a lot of truncation in the asset names. Increasing the size
mitigates this quite a bit, plus previews get more readable. 3355ca3813
increased the size of the popup so there's more space to put the now
bigger previews in.
Part of the brush assets followups:
ihttps://projects.blender.org/blender/blender/issues/116337
Increasing the width of the popup makes it show more assets on the
screen and reduces the need to scroll in bigger asset libraries. Plus,
in a follow-up commit the size of previews will be increased so that
there's more space to display the full name. Makes sense to increase the
popup size together with that, so a similar amount of assets can remain
visible still.
Increasing the size means it's more likely to overflow the window, so
this also makes sure the popup is clamped nicely by the window size.
This versioning code was introduced in the 4.3 release branch in
71dee64743, but also needs to run for files saved in the main branch. I
already bumped the subversion in 13ef1256a2, but didn't amend this
necessary change into the commit.
Part of: https://projects.blender.org/blender/blender/issues/128066
Adds a "Filter by Active Tool" option for the brush asset shelves,
enabled by default. If enabled, the asset shelf only shows brushes
matching the brush type of the current tool. If the general "Brush" tool
is active, only brushes that are not covered by another tool are
displayed. The popup brush selector always shows all assets.
The option is stored in the Preferences, toggled in the "Display
Settings" popover of the asset shelf.
Note: This is committed to the 4.3 release branch, which was discussed
in advance.
Pull Request: https://projects.blender.org/blender/blender/pulls/128450
This adds a function `layer.frames.move(from_frame_number, to_frame_number)`.
The function will move any keyframe starting at `from_frame_number` to
`to_frame_number`. If there already is a frame at `to_frame_number`
the function will fail and return an error.
Pull Request: https://projects.blender.org/blender/blender/pulls/128544
This adds feature parity with Cycles regarding light and shadow liking.
Technically, this extends the GBuffer header to 32 bits, and uses
the top bits to store the object's light set membership index.
The same index is also added to `ObjectInfo` in place of padding bytes.
For shadow linking, the shadow blocker sets bitmask is stored per
tilemap. It is then used during the GPU culling phase to cull objects
that do not belong to the shadow's sets.
Co-authored-by: Clément Foucault <foucault.clem@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/127514
The radial controls to set the brush size were not working in sculpt and
vertex paint mode.
This was because of a collision with the `cyclical_set` operator in edit mode.
The issue was that the poll function for the edit mode keymaps also
passed in sculpt and vertex paint mode.
To solve this, add a keymap for these common selection operators and
separate them from the general edit mode keymap.
Pull Request: https://projects.blender.org/blender/blender/pulls/128542
Before this, copy-pasting sequencer strips with animation on them would
fail to copy-paste their animation along with them if they were animated
by a slotted action. This fixes that.
There are three remaining known issues in the sequencer when used with
slotted actions that this PR does not fix, and will be addressed in a
follow-up PR:
1. Moving strips fails to move the animation of their fcurves with them,
which it should.
2. Duplicating strips (as distinct from copying followed by pasting)
fails to duplicate their animation with them.
3. Deleting a strip does not delete its animation channels with it.
Pull Request: https://projects.blender.org/blender/blender/pulls/128363
The Fog Glow Glare node produces corrupt images for large inputs in GPU
mode. That's due to a typo where the number of channels was declared as
a float as opposed to an integer, causing rounding errors in indexing
statements.
Caused by ba28469e45.
The `total_size()` function excludes the start offset now, which meant
that the `dst_curve_num` and `dst_point_num` were off.
The fix makes sure to include the src curves and points totals in the
destination if `keep_original` is true.
Pull Request: https://projects.blender.org/blender/blender/pulls/128523
This should free up references to GPv2 types and operators and should
in turn make their removal easier.
- Remove keymaps for GPv2 operators from `blender_default.py` and
`industry_compatible_data.py`
- Remove keymap poll callback assignment from `gpencil_ops.cc`
- Remove keymap handler registration from `area.cc:ed_default_handlers`
Pull Request: https://projects.blender.org/blender/blender/pulls/128480
The metal backend assumes that textures can always be allocated. When
metal later detects that the texture cannot be 'baked' it leads to
undesired behavior as Blender think it has a texture with memory
allocated.
This PR only changes the GPU_TEXTURE_3D case as that leads to issues
when loading large voluetric data. Arrayed textures will still fail
as that requires different checks to be added. I rather re-view the
current implementation in the future.
> NOTE: The max depth is hardcoded to 2048
Change should be backported to 4.2
Pull Request: https://projects.blender.org/blender/blender/pulls/128365
When using AMD pro-drivers the limits reported of the device can be
`UINT_MAX` but are stored in int fields. In this case the limits would
become negative and GPU materials validation failed resulting into errors.
This is fixed by clamping the value to `INT_MAX`.
Pull Request: https://projects.blender.org/blender/blender/pulls/128437
The key insertion code is assigning the target Action to the keyed ID,
which isn't allowed while in NLA tweak mode. This is now skipped when
the Action is already assigned.
Pull Request: https://projects.blender.org/blender/blender/pulls/128446
The crash was caused by infinite recursion. When recursing into sub-strips
of an NLA strip, it helps to actually recurse with the pointer to that
sub-strip.
Pull Request: https://projects.blender.org/blender/blender/pulls/128492
Make the RNA property `prefs.experimental.use_animation_baklava` read-only
when Blender was built without experimental features.
This reverts parts of b46e2e6300, which
completely removed the flag. That was a bit over-zealous, as there is still
Python code that checks it. Now it always stays `False` on non-experimental
builds.
Pull Request: https://projects.blender.org/blender/blender/pulls/128494