Age | Commit message (Collapse) | Author |
|
Outliner would frame the armature object instead of the bone if the bone
was on a hidden armature layer.
Similar to issues reported in e.g. T58068 and T80464, this is due to the
fact that `BKE_pose_channel_active` always checks for the armature layer
(and returns NULL if a bone is not on a visible armature layer).
Now propose to make this layer check **optional** (and e.g. from the
Outliner be more permissive). This also introduces
`BKE_pose_channel_active_if_layer_visible` which just wraps
`BKE_pose_channel_active` with the check being ON.
Maniphest Tasks: T92930
Differential Revision: https://developer.blender.org/D13154
|
|
Initialise the BKE callback system in
`BlendfileLoadingBaseTest::SetUpTestCase()`. This allows certain tests
to run in debug mode (when `BLI_assert` is enabled).
|
|
|
|
Do not also instantiate a collection in the view layer, if it is already
instantiated through an empty object.
|
|
r7acd3ad7d8e58b913c5 converted a pointer to a reference,
but an assert still compares the variable to a pointer.
|
|
This happens because in `SEQ_time_update_sequence` function
`SEQ_get_meta_by_seqbase` returns uninitialized value. This isn't nice,
but it shouldn't happen in first place. Problem is, that
`SEQ_edit_strip_split` does move strips into detached `ListBase`, so
other functions can't see them anymore. Detached `ListBase` is used
solely to preserve relationships during duplication.
Move strips to original `ListBase` immediately after duplication and
return `NULL` if `SEQ_get_meta_by_seqbase` can't find meta strip.
Splitting itself can still rely on fact, that number of original and
duplicated strips is same and they are placed next to each other in
exactly same order at the end of original `ListBase`.
|
|
This is a followup to the previous commit.
|
|
In this commit I changed many loops to range-based for loops.
I also removed some of the redundant iterator variables, using
indexing inside the loop instead. Generally an optimizing compiler
should have no problem doing the smartest thing in that situation,
and this way makes it much easier to tell where data is coming from.
I only changed the loops I was confident about, so there is still more
that could be done in the future.
Differential Revision: https://developer.blender.org/D13637
|
|
This was visible outside of camera view and was not respecting the
"Depth of Field" checkbox on the Camera properties.
Now return early if DoF should not be visible.
Maniphest Tasks: T94262
Differential Revision: https://developer.blender.org/D13631
|
|
|
|
Sculpt.c is now three files:
* Sculpt.c: main API methods and the brush stroke operator
* Sculpt_brushes.c: Code for individual brushes.
* Sculpt_ops.c: Sculpt operators other than the brush stroke operator.
TODO: split brush stroke operator into a new file (sculpt_stroke.c?).
|
|
The duplicated edges were caused by 'oversubdivided' edges, i.e. edges
where some of the vertices on them are only connected to two polygons.
The fix finds these vertices and 'dissolves' them so that only one edge
is created.
For most 'normal' meshes this shouldn't occurr, or only very little, so
the performance impact of this change should be neglegible. In practice
this is also avoidable by triangulating the mesh first.
Differential Revision: https://developer.blender.org/D13445
|
|
These are useful for development, but when the primitive nodes
aren't actively changing, the performance cost is not worth it.
|
|
This fix provides better conditions for asserts in `NURBSpline::knots`
method accounting for cyclic NURBS curves.
Differential Revision: https://developer.blender.org/D13620
|
|
This flag was checked, but not set anywhere.
|
|
Also remove a SCOPED_TIMER I added by mistake in a previous commit.
|
|
On a Ryzen 3700x, this ended up 2.5x faster than before. More
benchmarking details are included in the differential revision.
For smaller grids, all this should do is increase the
code size a bit, and add a few more if statements.
Differential Revision: https://developer.blender.org/D13617
|
|
|
|
Using `&&` there was a typo. With `&&` the `prepend` method
could not be called with a const reference as argument.
|
|
This was basically not implemented, do this via
`ED_autokeyframe_property` in a new dedicated function in
special_aftertrans_update.
Maniphest Tasks: T93570
Differential Revision: https://developer.blender.org/D13608
|
|
Differentiate doc-strings from title/section text.
|
|
Differentiate doc-strings from title/section text.
Also use explicit doxygen references to struct members
so it's not ambiguous which member is being referenced.
Note that these changes aren't complete (some files weren't touched).
|
|
The text editor no longer accumulates changes.
|
|
Caused by `NULL` dereference in `SEQ_meta_stack_active_get()`.
Check if `Editing` is `NULL` before accessing meta stack.
|
|
Meta add function wasn't updated. All strips now use alpha over
blending, so set it in `SEQ_sequence_alloc()`.
|
|
Similar to the previous commit, this allowed removing a function to set
a single pixel of a node preview.
|
|
When adding multiple movie strips and sound stream is longer than video,
this results in gaps between video strips, which is undesirable.
|
|
This is a follow-up to rB43875e8dd1d76ee, removing some
processing of non-existent node previews in the shader and
texture nodes systems.
|
|
|
|
|
|
This moves `MOD_weld.cc` to C++, fixing compiler warnings
coming from the change. It also goes a little bit further and converts
the code to use C++ data structures: `Span`, `Array`, and `Vector`.
This makes the code more shorter and easier to reason about, and
makes memory maneagement more automatic.
Differential Revision: https://developer.blender.org/D13618
|
|
|
|
When dragging from the inputs of function nodes, other function
nodes wouldn't connect, because their socket declaration field types
weren't set correctly. Instead, they relied on code properly checking
the *node* declaration's `is_function_node()` method. However,
that increases complexity and requires passing the node instead of
just the socket in more places. Instead, set the proper field types
in the socket declaration during building.
Differential Revision: https://developer.blender.org/D13600
|
|
Before d56bbfea7b420d7, nodes were updated (size calculated and
buttons added) in reverse order. Instead, now calculate the size of
frame nodes after all other nodes. Separating the drawing further
may be a good step to removing the O(n^2) loop later on.
|
|
Includes use of memcpy to avoid warnings about deprecated members.
|
|
After recent refactoring in 4e98d974b596.
|
|
This adds memory barriers to use with `GPU_memory_barrier` to ensure that
writes to a vertex or index buffer issued before the barrier are
completed after it, so they can be safely read later by another shader.
`GPU_BARRIER_VERTEX_ATTRIB_ARRAY` should be used for vertex buffers (`GPUVertBuf`),
and `GPU_BARRIER_ELEMENT_ARRAY` should be used for index buffers (`GPUIndexBuf`).
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D13595
|
|
Add a function that returns a list of keyframe segments
A segment being a continuous selection of keyframes
Will be used by future operators in the graph editor
Reviewed by: Sybren A. Stüvel
Differential Revision: https://developer.blender.org/D13531
Ref: D13531
|
|
In the context of the dragdrop tooltip, the event referenced to the window
is out of date and contains invalid `mval` values.
Avoid using `win->eventstate` as much as possible.
|
|
The RNA setter now ensures that driver variables are uniquely named
(within the scope of the driver).
Versioning code has been added to ensure this uniqueness. The last
variable with the non-unique name retains the original name; this
ensures that the driver will still evaluate to the same value as before
this fix.
This also introduces a new blenlib function `BLI_listbase_from_link()`,
which can be used to find the entire list from any item within the list.
Manifest Task: T94116
Reviewed By: mont29, JacquesLucke
Maniphest Tasks: T94116
Differential Revision: https://developer.blender.org/D13594
|
|
The node group alpha theme was used for the overlay drawing in the node
editor. Since this was removed (919e513fa8f) the alpha channel doesn't
need to be exposed anymore.
Reported as part of T93654.
|
|
The style guide mentions that unsigned integers shouldn't be used to
show that a value won't be negative. Many places don't follow this
properly yet. The modifier used to cast an array of `uint` to `int` in
order to pass it to `BLI_kdtree_3d_calc_duplicates_fast`. That is no
longer necessary.
Differential Revision: https://developer.blender.org/D13613
|
|
|
|
|
|
Using the `MEM_*` API from C++ code was a bit annoying:
* When converting C to C++ code, one often has to add a type cast on
returned `void *`. That leads to having the same type name three times
in the same line. This patch reduces the amount to two and removes the
`sizeof(...)` from the line.
* The existing alternative of using `OBJECT_GUARDED_NEW` looks a out
of place compared to other allocation methods. Sometimes
`MEM_CXX_CLASS_ALLOC_FUNCS` can be used when structs are defined
in C++ code. It doesn't look great but it's definitely better. The downside
is that it makes the name of the allocation less useful. That's because
the same name is used for all allocations of a type, independend of
where it is allocated.
This patch introduces three new functions: `MEM_new`, `MEM_cnew` and
`MEM_delete`. These cover the majority of use cases (array allocation is
not covered).
The `OBJECT_GUARDED_*` macros are removed because they are not
needed anymore.
Differential Revision: https://developer.blender.org/D13502
|
|
The previous size was too small for common object names.
Differential Revision: https://developer.blender.org/D13604
|
|
The patch fixes some misalignments in the nodes' sockets/options
recently introduced in 26d2caee3ba0, while maintaining the original
fix for T92268.
The original fix made the top padding always of the same size; while
that works when the first row of the other node is `Socket | Socket`,
it doesn't for other more common cases, `like Socket | Node Option`,
where the text results misaligned.
Differential Revision: https://developer.blender.org/D13451
|
|
The eraser checks the current, previous and next point (and sets pc0,
pc1 & pc2 corresponding to that for futher occlusion/brush/clipping
checks). For the very first point, it sets pc0 to pc1 [which makes sense,
there is no previous point, so we should assume the previous segment is
"visible" as soon as the first point is], but does so *before* pc1 is
even calculated. This makes following occlusion/brush/clipping checks
work with zero values [which leads to no earsing in most cases].
Now *first* calculate pc1, *then* set pc0 to pc1.
Maniphest Tasks: T94137
Differential Revision: https://developer.blender.org/D13593
|
|
The correct type should be set by invoke already, changing it to a non-
matching type (e.g. trying to remap Mesh users with a Camera block) does
not really make sense afaict, reason being that we would be presented
with the "Invalid old/new ID pair" message in such case anyways (code
checks GS(old_id->name) == GS(new_id->name)).
This alone wouldnt be a pressing issue, but since doing this with an
object ID type crashes atm., it seems to make sense to clean this up now
(of course the crash should be looked into, but this is for a separate
patch -- if that is solved, we could also think about adding the "Remap
Users" entry back in the context menu for objects as well [which was
removed in rB17bd5c9d4b1e for some reason]).
Part of T93799.
Differential Revision: https://developer.blender.org/D13512
|
|
The versioning code was accidentally put not at the very bottom.
That lead to a situation where it wasn't run on some files that happened
to be within a specific short time frame.
Since the versioning code is idempotent, it can just run again on existing
files. Therefore, this commit just moves it back to the bottom so that it
is executed on all files again.
Broken Commit: rB5b61737a8f41688699fd1d711a25b7cea86d1530.
|