There are two operators added, which are available via a special
content menu next to the plane track image selector:
- New Image from Plane Marker
- Update Image from Plane Marker
The former one creates an image from pixels which the active plane
track marker "sees" at the current frame and sets it as the plane
track's image.
The latter one instead of creating the new image data-block updates
the image in-place.
This allows to create unwarped texture from a billboard from footage.
The intent is to allow this image to be touched up and re-projected
back to the footage with an updated content.
Available from a plane track image context menu, as well as from the
Track menu.
{F13243219}
The demo of the feature from Sebastian Koenig: https://www.youtube.com/watch?v=PDphO-w2SsA
Differential Revision: https://developer.blender.org/D15312
From quick look it doesn't seem to be leading to real issues yet as the
image buffers are created with the default roles, but valid color space
is needed to be ensured for an upcoming development.
The image which source is set to file is not expected to have empty
file path. If it happens it becomes very tricky to save the image on
exit using the standard quit dialog.
This change makes it so if the image buffer does not have file path
then the new image is set to the "generated" source and it behaves
as if the image was created like so and was fully painted on.
Additionally, mark image as dirty, so that quitting Blender after
such image was added will warn about possible data loss.
Issue was caused by using function `SEQ_render_give_stripelem` to obtain
first `StripElem`, but this function now takes retiming into account.
Since first element was meant to be obtained, point to it directly by
using `seq->strip->stripdata`.
This is a follow up to [0], where it was assumed flushing the output
would run the appropriate leave handlers & clear the keyboard & pointer
surfaces. While that's mostly true it's not guaranteed.
Resolve this by clearing the pointers when closing windows and add NULL
checks before accessing the windows.
Tested with Gnome, KDE & River compositors.
[0]: 58ccd8338e53423e223085094af2d35c76285c30
The offsets array that encodes the sizes of each curve must be filled
anyway, or the curves will be in an invalid state. Calloc is unnecessary
here. To make that situation clearer, fill the offsets with -1 in debug
builds. Always set the first offset to zero though, since that can save
some boilerplate in other areas.
The number of points in the source curve was needed, but the offset
(just zero) was passed instead. It's unclear how this worked before.
A mistake in the recent commit 9e393fc2f12583d32dd.
Also use a common utility for retrieving the sizes of curves
in ranges instead of reimplementing it for this file.
The first change is reusing the same vector for all types. While we don't
generally optimize for the multi-type case, it doesn't hurt here. The
second change is avoiding calling the corresponding function if there
are no curves of a certain type. This avoids creating attributes for
types that aren't used, for example.
This is clearer about what is actually happening (VArray is small
enough to be a by-value type and is constructed on demand, while
only the generic virtual array is stored).
The node had incorrect handling of instance attributes. For the instance
component, instead of using the instance domain over the point domain,
it just looked through instances recursively when retrieving attributes.
We never want to do that, since we only work on one geometry at a time.
Instead, just switch out the instance domain for the point domain like
the set position node.
Many thanks to the original Author of this patch: Christian Aguilera
The COLLADA importer was silently ignoring the alpha component in the
vertex data.
The `stride` variable holds the component count (3 for RGB; 4 for RGBA),
and can be used for honouring the alpha channel in the vertex data.
Test plan:
- Open Blender.
- Clear the scene.
- Add a plane.
- Enter **Vertex Paint** mode.
- Switch to the **Erase Alpha** blending mode.
- Select a tone of gray.
- Turn strength down to less than 1
- Paint [some of] the vertices of the plane.
- Export project as a COLLADA file (`.dae`).
- Clear the scene.
- Re-import the COLLADA file again.
- Export the project again (with different name).
**Without** this patch, the second exported project will have lost the
alpha component in their vertex data:
```lang=xml, counterexample
<float_array id="Plane-mesh-colors-Col-array" count="24">1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1</float_array>
```
**With** the patch, the first and the second exported projects retain
the alpha values painted previously:
```lang=xml
<float_array id="Plane-mesh-colors-Col-array" count="24">1 1 1 1 1 1 1 0.5490196 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.5490196</float_array>
```
Reviewed By: cristian64, SonnyCampbell_Unity
Authored by: Christian Aguilera
Differential Revision: https://developer.blender.org/D14246
This modules handles renderpasses allocation and filling. Also handles
blitting to viewport framebuffer and render result reading.
Changes against the old implementation:
- the filling of the renderpasses happens all at once requiring
only 1 geometry pass.
- The filtering is optimized with weights precomputed on CPU and
reuse of neighboor pixels.
- Only one accumulation buffer for renderpasses (no ping-pong).
- Accumulation happens in one pass for every passes using a single
dispatch or fullscreen triangle pass.
TAA and history reprojection is not yet implemented.
AOVs support is present but with a 16 AOV limit for now.
Cryptomatte is not yet implemented.
Removes the following macros for scene/render frame values:
- `CFRA`
- `SUBFRA`
- `SFRA`
- `EFRA`
These macros don't add much, other than saving a few characters when typing.
It's not immediately clear what they refer to, they just hide what they
actually access. Just be explicit and clear about that.
Plus these macros gave read and write access to the variables, so eyesores like
this would be done (eyesore because it looks like assigning to a constant):
```
CFRA = some_frame_nbr;
```
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D15311
Commit 302b04a5a3fc introduced new retiming system, that unified sound
pitch animation with strip speed control. Because sound playback is
handled in different way, this did not work as expected and old files
were broken. In addition animation was not copied to new property.
Revert length position and offset handling for sound strips so their
position does not change and remap fcurves to new `speed_factor`
property.
Previously, it would show "Link inside collection" but move between collections
instead in some cases. Additionally there was no tooltip for the "Link before/
after/between collections" case.
Behavior and tooltip should now be consistent in all cases.
Differential Revision: https://developer.blender.org/D15237
rBb9c37608a9e959a896f5358d4ab3d3d001a70833 moved evaluation of
`versions.cmake` before `options.cmake`, as a result of which
`BLENDER_PLATFORM_ARM` was no longer defined in `versions.cmake`,
causing it to choose the wrong OpenSSL version for aarch64. This
reverts that. Also fixes a compiler crash when building flex with some
glibc versions.
Differential Revision: https://developer.blender.org/D15319
Add more math functions for float4 to make them on par with float3 ones. It
makes it possible to change the types of float3 variables to float4 without
additional work.
Differential Revision: https://developer.blender.org/D15318
It wasn't obvious when direct access or lookups should be used.
Add class methods for direct lookups as well as searching from known
windows when windows are accessed outside Wayland's handlers.
This avoids having to check if the window has been removed in some cases.
Closing a window could leave danging pointers which Wayland
callbacks are responsible for clearing.
However, any calls Blender makes that don't originate from Wayland's
handlers don't have that assurance (key-repeat in this case).
Resolve by using a window lookup on each key-repeat event.
GHOST_GetCursorPosition wasn't working properly under Wayland because
the last focused window didn't necessarily match the window used to call
wm_cursor_position_get(..).
Now the window passed into wm_cursor_position_get is passed to GHOST
so that window is used to access cursor coordinates.
Use client (window) relative coordinates for cursor position access,
this only moves the conversion from window-manager into GHOST,
(no functional changes).
This is needed for fix a bug in GHOST/Wayland which doesn't support
accessing absolute cursor coordinates & the window is needed to properly
access the cursor coordinates.
As it happens every caller to GHOST_GetCursorPosition was already making
the values window-relative, so there is little benefit in attempting to
workaround the problem on the Wayland side.
If needed the screen-space versions of functions can be exposed again.
Each off-screen buffer created a surface and EGL window which was
only freed when Blender exited.
Resolve by freeing the associated data when disposing the off-screen
context.
Grease Pencil animation channels are now also shown in the Dopesheet
mode of the Dopesheet editor and in the Timeline.
Grease pencil related events are now listened not only by container
`SACTCONT_GPENCIL` (Grease Pencil Dopesheet), but also
`SACTCONT_DOPESHEET` (main Dopesheet), and `SACTCONT_TIMELINE`
(timeline).
A new Animation Filter flag was added: `ANIMFILTER_FCURVESONLY`. For now
this only filters out Grease Pencil Layer channels.
**Implemented:**
- Preview range set: now only considers selected Grease Pencil keyframes
when `onlySel` parameter is true. Not only this allows the operator to
work with grease pencil keyframes in main dopesheet, but it also fixes
the operator in the Grease Pencil dopesheet.
- Translation: allocation (and freeing) of specific memory for
translation of Grease Pencil keyframes.
- Copy/Paste: call to both Fcurve and GPencil operators, to allow for
mixed selection. Errors are only reported when both the FCurve and
GPencil functions fail to paste anything.
- Keyframe Type change and Insert Keyframe: removed some code here to
unify Grease Pencil dopesheet and main dopesheet code.
- Jump, Snap, Mirror, Select all/box/lasso/circle, Select left/right,
Clickselect: account for Grease Pencil channels within the channels
loop, no need for `ANIMFILTER_FCURVESONLY` there.
**Not Implemented:**
- Graph-related operators. The filter `ANIMFILTER_FCURVESONLY` is
naively added to all graph-related operators, meaning more-or-less all
operators that used `ANIMFILTER_CURVE_VISIBLE`.
- Select linked: is for F-curves channel only
- Select more/less: not yet implemented for grease pencil layers.
- Clean Keys, Sample, Extrapolation, Interpolation, Easing, and Handle
type change: work on Fcurve-channels only, so the
`ANIMFILTER_FCURVESONLY` filter is activated
Graying out these operators (when no fcurve keyframe is selected) can be
done with custom poll functions BUT may affect performance. This is NOT
done in this patch.
**Dopesheet Summary Selection:**
The main summary of the dopesheet now also takes into account Grease
Pencil keyframes, using some nasty copy/pasting of code, as explained
[on devtalk](https://devtalk.blender.org/t/gpencil-layers-integration-in-main-dopesheet-selection-issue/24527).
It works, but may be improved, providing some deeper changes.
Reviewed By: mendio, pepeland, sybren
Maniphest Tasks: T97477
Differential Revision: https://developer.blender.org/D15003
This commit contains various new features for curves sculpt mode
that have been developed in parallel.
* Selection:
* Operator to select points/curves randomly.
* Operator to select endpoints of curves.
* Operator to grow/shrink an existing selection.
* New Brushes:
* Pinch: Moves points towards the brush center.
* Smooth: Makes individual curves straight without changing the root
or tip position.
* Puff: Makes curves stand up, aligning them with the surface normal.
* Density: Add or remove curves to achieve a certain density defined
by a minimum distance value.
* Slide: Move root points on the surface.
Differential Revision: https://developer.blender.org/D15134
For the Normalize Weights operator, dynamically set the default 'Subset'
parameter so that it is applicable to the current context.
When the user's last use of Normalize Weights was set to "Deform Pose
Bones", and then tries to use the operator on a mesh without armature,
Blender would try to use the previous opertor properties and show an
error message. This is resolved by switching to `WT_VGROUP_ACTIVE` in
such cases.
Reviewed By: zanqdo, sybren
Maniphest Tasks: T95038
Differential Revision: https://developer.blender.org/D14961
Rename and simplify the function for initializing the custom space,
avoiding the need for the calling code to be aware of the internals
of bConstraintOb. This patch should not change any behavior.
This was split off from D9732.
Differential Revision: https://developer.blender.org/D15252