This PR adds an extra check to exit from sculpt gesture code early to
avoid attempting to allocate a 3 * (UINT_MAX - 1) amount of elements
inside the trim gesture code.
Pull Request: https://projects.blender.org/blender/blender/pulls/119073
The armature reported had two bones with a `bMotionPath` but its lengths
are zero (which causes trouble in `motion_path_cache` drawing code due
to 0 allocations).
Not exactly sure how we got there, something like
`animviz_verify_motionpaths` should take care of this already in current
code, but this might be from a time where there were not enough sanity
checks.
So now early out in `motion_path_cache` if we encounter such a
"corrupted" motion path.
Pull Request: https://projects.blender.org/blender/blender/pulls/119081
This can happen e.g. when relative "//" is in Preferences > File Paths >
Temporary Files is used.
Now catch the corresponding COLLADASW::StreamWriterException
and cancel export then.
NOTE: 51126fab33 might have prevented the most common case
to run into this crash (but there might be other cases still so being safe
here does not hurt)
Pull Request: https://projects.blender.org/blender/blender/pulls/118958
There's no need for the catalog ID to change ever with the current
catalog system design. If that changes, a new catalog can probably be
created instead. Avoiding modifications also helps avoiding data races.
Also means the currently unused default constructor becomes unavailable.
Fixes behavior of the outline modifier in some edge case:
- When the outline radius gets larger than the input stroke radius it
caused a negative offset, inverting the outline in thin areas like the
tips of the default stroke. The offset should always remain positive
or zero (collapses onto the input curve).
- When the outline collapses the modifier was skipping points on outside
corners, where at least one point should be added in all cases.
Pull Request: https://projects.blender.org/blender/blender/pulls/119084
Regression from 427eed292d, in IDProperty case the 'ensured' PropertyRNA
pointer is some sort of empty template, and cannot be used for many
things.
Instead of calling `rna_ensure_property` twice for each call to
`RNA_property_animateable`, rather add an optional parameter to static
helper `rna_property_editable_do`, and call it directly from
`RNA_property_animateable`.
With the default GPv3 "Stroke" object the outline modifier generates
jittery strokes. It also generates full circles at various points along
the input stroke.
The outline modifier chooses a normal from the camera view. In the
default GPv3 stroke test the camera views the stroke from an angle.
In that case the curve has a significant Z component out of the plane,
which breaks normalization of the 2D component and causes excessive
miter scaling.
The full circles are caused by bad angles, the range should be `(-pi,pi)`
rather than `(0,2*pi)`.
Pull Request: https://projects.blender.org/blender/blender/pulls/119067
Although rare (and not recommended!), it can happen that a same exact
RNA path points to a different type of data.
This can come from an update of the code itself, but this is very
unlikely and discouraged.
However, geometry nodes and their 'modifiers' interface have made it way
more easy to create such conflicting situation, since users are free to
re-arrange and edit the nodes and their 'public' interface as they
want...
Found out while investigating some unrelated issues in some studio Gold
production files (namely,
`pro/shots/090_joining_whale/090_0130/090_0130-anim.blend` r2110
exhibits such issue for `OBGEO-mika-body`
`modifiers["RIG-GN-mask-clothing"]["Socket_3"]`, where the RNA type
changes from integer to bool).
This patch adds the maximum number of supported image units to the GPU
capabilities module. Currently, the GPU module assume a maximum of 8
units, so the patch is not currently particularly useful, but we can
consider committing it for the future anyways.
Pull Request: https://projects.blender.org/blender/blender/pulls/119057
This allows deleting a bunch of duplicate code, since there doesn't
need to be a special single-threaded case anymore. It also just
reduces the necessary boilerplate.
Also change naming a bit and use signed integers instead of unsigned.
I didn't notice any performance difference.
Pull Request: https://projects.blender.org/blender/blender/pulls/119069
Other minor changes:
- Remove reference to `TMP` environment variable in the `--help` text
as this isn't a posix standard and is noted as something that may be
removed in the future.
- Show WIN32 `TEMP` when showing all help text so it will be included
in the user manual.
Compositor outputs are sometimes clipped. That's because consecutive
shader operations in the GPU compositor were assumed to have the same
domain. So make sure to reset the domain during compile unit resets.
Split `BKE_fcurve_blend_write(writer, listbase)` into two functions:
- `BKE_fcurve_blend_write_data(writer, fcurve)` for the data of a single
F-Curve, and
- `BKE_fcurve_blend_write_listbase(writer, listbase)` for writing a list
of F-Curves.
And the same for `BKE_fcurve_blend_read_data()`.
This is necessary for the upcoming Animation data-block, which will
store F-Curves as arrays instead of `ListBase`s.
No functional changes.
Fix for Sculpt: Color Filter crash #117824
This change fixes the crash due to invalid active color layer
in the Undo/Redo stack when redoing from the original state.
Previously when performing a redo to a filter color state from the
original state, it cased a crash because
&((SculptUndoStep *)us_iter)->active_color_start did not contain valid
color data in the original state.
In this PR we check if is the original state and use the
&((SculptUndoStep *)us_iter)->active_color_end instead which is
de correct data to use.
- [x] Fix color update when redo from initial state
Pull Request: https://projects.blender.org/blender/blender/pulls/118885
The arrays `modified_starts` and `modified_ends` was freed early
due to wrong variable scope, this leads to incorrect randomize length
effect in length modifier. Now fixed.
Pull Request: https://projects.blender.org/blender/blender/pulls/119054
This PR implements the Copy and Paste operators for GPv3. The operators
are available in Edit Mode. The Copy operator copies the selected strokes/
points to a clipboard. The Paste operator pastes the strokes/points from
the clipboard to the active layer.
Keyboard shortcuts:
- `Ctrl`-`C` for copy
- `Ctrl`-`V` for paste
- `Ctrl`-`Shift`-`V` for paste in the back (behind all existing strokes)
Pull Request: https://projects.blender.org/blender/blender/pulls/114145
The GPv3 envelope modifier was computing the correct number of strokes
to generate, but then not actually skipping over points. Result is that
all envelope strokes got added at the beginning instead of the whole
point range.
Pull Request: https://projects.blender.org/blender/blender/pulls/119023