Part of #118145.
This was implemented three times before. Instead, implement it once
with an interface that can start with a varying number of vertices.
Object types like empties, lamps and cameras don't have geometry that can be
rendered by regular render engines. Attempting to render them for an asset
preview doesn't work.
36c5606fc3 already fixed a crash in this situation, resulting in an empty
preview. But better to entirely disallow this action, with useful feedback in
the UI.
Adds the ability to connect and disconnect strips in the VSE.
- Connected strips have an icon indicating their status, and attempting
to select one connected strip selects all other connected strips in
that chain.
- If the user attempts to connect a strip that is already connected to
other strips, that strip will disconnect itself from others before
connecting to new strips.
- Preview selection also works in bulk if multiple video strips are
connected together in the timeline.
- When adding new strips from the Add menu or the File Browser, strips
from the same file are connected by default. There's an option to
turn this off in Editing > Video Sequencer user preferences.
- It is possible to individually tweak strips/handles and ignore
connections with Alt+Click.
- This shortcut overrides the old keymap item for "Linked Handle"
selection. The property still exists if people want to use that
shortcut for its old purpose.
- To make sure that connections remain valid even after duplication,
I've added a condition to `seq_new_fix_links_recursive` that also
updates connections using the `seq->tmp` var. (A note -- I've updated
the comment for this field in `DNA_sequence_types.h` because the var
is only used for duplication now. It was once present in
`select_more_less_seq__internal` to be used for linked selection but
is gone now).
- There are also functions to cut one-way links and make sure that
all strips are bidirectionally connected after duplicating.
Pull Request: https://projects.blender.org/blender/blender/pulls/124333
In case the general 'locked in 3DView' code does not create an undo push
(e.g. because the 3DView is in camera mode, but is _not_ locked to the
camera), but the walk/fly operator does transform an object, it still
needs to push an undo step.
Resolve the following issues.
- Crash reading a string from uninitialized memory when
the default font directory was not found.
Fall back to the BKE_appdir_folder_default_or_root in this case.
- Memory leak when reading from the default font directory.
- Failure to ensure a trailing slash for the preferences font directory.
- Buffer overflow writing a trailing slash past the allocated size.
Crash when exporting selected frames due to two different reason.
frame returned by frame_at() can be null, so add a null check
before calling `is_selected()` member function.
After depsgraph update, ob_eval.data changes. So cast it to gease_pencil
every frame to avoid the crash (otherwise grease_pencil will point to
invalid memory).
Pull Request: https://projects.blender.org/blender/blender/pulls/126643
Ever since Blender 4.0 when the Principled BSDF was updated to
generally match the OpenPBR standard, it hadn't supported negative
specular ansiostropy.
Update the Principled BSDF tooltip to match this change.
Pull Request: https://projects.blender.org/blender/blender/pulls/126644
Caused by 0f5dd1c55c
The refactor commit changed the arguments to receive a `Listbase` reference
instead of a pointer because in all use cases it was always passed.
As such the check for a `ListBase` null pointer went away.
However by removing JUST the nullptr check in this line
`if ((curves) || (flags & ACT_TRANS_LOC) == 0)`
to
`if ((flags & ACT_TRANS_LOC) == 0)`
I effectively changed the behavior.
Since `curves` was ALWAYS passed, the second condition never triggered.
With the change, this condition would always trigger, effectively only
adding the first FCurve of either location rotation or scale.
Pull Request: https://projects.blender.org/blender/blender/pulls/126642
Metal doesn't support RGB textures and the backend converts them to RGBA textures.
During the conversion missing RGB components should be set to 0 and missing A
component should be set to 1.
In the current implementation this was not the case and A components where also set
to 0.
PR should be backported to 4.2
Pull Request: https://projects.blender.org/blender/blender/pulls/126630
When only rendering the cryptomatte material layer, the meta data wasn't
exported. Note this issue is due to differences not reproducable in 4.3.
But the fix should also be applied there for consistency.
Pull Request: https://projects.blender.org/blender/blender/pulls/126631
Vulkan has different depth limits then opengl. We fix this by
retargetting the opengl limits into the limits that vulkan supports.
This is done in the vertex shader, or in the geometry shader. When
viewport index or layer isn't supported a geometry shader is added to
workaround these missing features. In this case the depth range was
could be done twice (vertex shader and geometry shader).
Pull Request: https://projects.blender.org/blender/blender/pulls/126634
The issue was that the key bounds for determining if a key can be skipped
were initialized incorrectly.
The order of `rctf` is [xmin, xmax, ymin, ymax] but the values were given as
[x, y, x, y].
The correct order is [x, x, y, y]
Pull Request: https://projects.blender.org/blender/blender/pulls/126554
When execvp() failed to replace the stack, the forked process would
return to Blender's WM_main(..) loop then hang when attempting to draw
the window.
Resolve by calling _exit() when execvp fails.
This is a change to the docking process so that the target area SIZE
can be specified at the same time as selecting the location. This also
changes to a drag-and-drop style of mouse pointer indication.
Pull Request: https://projects.blender.org/blender/blender/pulls/126447
Part of #118145.
The maximum and minumum edge length were stored in the BVH tree.
That's unnecessary since the source of truth is elsewhere and the values
are only used during remeshing operations.
Pull Request: https://projects.blender.org/blender/blender/pulls/126571
Non-interactive join - area_join_exec - needs to tag the source area
for redraw. Otherwise Outliner can attempt a partial redraw when a full
is needed, triggering an assert.
Pull Request: https://projects.blender.org/blender/blender/pulls/126615
Provide an appropriate fallback during Import of some incorrect Alembic
curve data and write out valid data during our Export as well.
The buggy file in question has 2 problems:
- The curve data is marked as being `kVariableOrder` but provides no
actual `order` data. This is invalid according to Alembic code [1]
- The curve data is also marked as being `kBezierBasis` but the actual
values are most likely not bezier judging from how many elements are
in each curve array
This PR focuses on the first problem and allows the file to load
"correctly" - or at least as correctly as it did prior to Blender 4.2.
If we encounter such a file, we will fallback to interpreting the data
as linear POLY curves. It also ensures that we only use `kVariableOrder`
when needed during Export.
[1] 23f1c76d7c/lib/Alembic/AbcGeom/ICurves.h (L91)
Pull Request: https://projects.blender.org/blender/blender/pulls/126378
This is just not supported, and typically not doable from Blender UI
(since embedded IDs won't be listed in ID template list).
Add asserts to IDProp code itself, and checks & error reports in
relevant BPY and RNA setters.
Support segment mode in Grease Pencil v3 selection operators.
This is a continuation of #109221.
Segment selection works in multiple stages:
1. When enabled, the 2D evaluated lines for all visible curves are
entered into a BVH tree. This tree is used to find intersections later
on. All the visible drawings are in the tree, an `OffsetIndices` array
is used to record ranges of BVH elements for each drawing.
2. Primary selection functions get alternative versions that produce an
`IndexMask` instead of writing directly to selection attributes. This
makes it possible to detect select actions on points that are already
selected. Using a delta of selection attributes for this is not enough
to detect such user actions (and inefficient).
3. In segment mode the `IndexMask` is extended to fully cover segment
points (or exclude them when deselecting respectively). This first
performs and intersection test using the BVH tree, then finds all point
range with selected elements.
4. Finally the extended index mask is applied to selection attributes as
usual.
Pull Request: https://projects.blender.org/blender/blender/pulls/126027
Without a proper redraw, the outliner (in `Blender File` mode) would
only *partially* update on mouse hover, refreshing the user-count of
the old datablock without listing the newly added datablock.
Pull Request: https://projects.blender.org/blender/blender/pulls/126386
The preview rendering would fall back to the shader preview rendering
pipeline, which is not suitable for objects. Instead, don't render any
preview (use an empty preview) for such object types. This case could be
handled a bit nicer by the code triggering the preview rendering (e.g.
the "Render Active Object" operator poll could return false), but
keeping that separate from fixing the lower level logic to ensure crash
free behavior.
Pull Request: https://projects.blender.org/blender/blender/pulls/126235
Looks like this use to 'work' because lower-level code would refuse to
delete an embedded scene collection, but the operator should not have
been active at all in the first place.
Fixed by adding a proper `poll` callback to the `collection unlink`
operator.
Changes similar to f9c6fe30db.
- Calculate node bounds after building the tree.
- Calculate node visibility after building the tree.
- Avoid redundant normals recalculation. They are already calculated
when first building the dynamic topology BMesh.
- Avoid clearing the default node flags.
Use the default constructor of `Node` to set the default new flag value.
Remove the normals update flag which was added in f9c6fe30db.
This should avoid recalculating all the normals after just building the
BVH tree.
Rather than retrieving the data from the BVH. This opens up the
possibility that the BVH building produces a slightly different
data structure that's then converted to the final format in a
separate pass.
Use the same method for retrieving "all nodes" that we do elsewhere.
Even though this requires a temporary vector, it makes it an easier
target for optimization later and makes the sculpt BVH iteration
easier to refactor in the meantime.