The issue here is that originally, the step count for the geometry's
motion and the object transform's motion were tied together, so a
single variable is used to store that step count.
However, when using the velocity attribute, it's possible for the step
counts to differ, which will lead to an incorrect interpolated object
transform in the kernel.
Pull Request: https://projects.blender.org/blender/blender/pulls/133788
Small changes to the status bar display when the active object has non-
uniform or negative scale. Use CTX_data_active_object rather than
BKE_view_layer_active_object_get. Case correction for a text string.
Small spacing change. Improved comments.
Pull Request: https://projects.blender.org/blender/blender/pulls/133834
The original function did extensive calculations to get the nearest handle,
even though none of the calling functions used that information.
Its functionality was very similar to `mouseover_strips_sorted_get`, except
that it was less precise and did not factor in `STRIP_OFSBOTTOM/OFSTOP`.
`mouseover_strips_sorted_get` is called by
`ED_sequencer_pick_strip_and_handle`, so update all of the calling functions to
use this instead.
Refactor and replace `find_nearest_seq` into `mouseover_strip_get`, which does
not factor in padded strip handles, and is used only by
`ED_sequencer_special_preview_set` as a static function for scrubbing over
strips.
Pull Request: https://projects.blender.org/blender/blender/pulls/133744
The opengl_draw_tests.py render test had a number of issues when
running, likely due to test data restructuring:
* Invalid CMakeLists.txt specification preventing tests from being added
* Invalid parameters to the `screenshot` function
This commit fixes both issues as well as renames the related files and
folders to better indicate their usage.
Pull Request: https://projects.blender.org/blender/blender/pulls/132838
Adds new function `foreach_content_slice_by_offsets` that gathers mask's
indices into `IndexRange` lists grouped by given offsets. New approach
doesn't need temporary `points_to_duplicate` array of size
`curves.points_num()`. Traversal is more effective as only selected
indices get visited. Also point data is copied by point ranges instead
of point by point.
Performance was tested with following code:
```cpp
TEST(curves_geometry, DuplicatePoints)
{
CurvesGeometry curves = create_basic_curves(100000, 100);
IndexMaskMemory memory;
IndexMask every_second = IndexMask::from_predicate(
curves.points_range(), GrainSize(100), memory, [](const int i) {
return bool(i % 2);
});
for (const int i : IndexRange(1000)) {
CurvesGeometry copy = curves;
const int expected_point_count = copy.points_num() + every_second.size();
ed::curves::duplicate_points(copy, every_second);
EXPECT_EQ(copy.points_num(), expected_point_count);
}
}
```
| | main | mask slices | slices & copy by ranges |
| -------- | -------- | ----------- | ----------------------- |
| full copy| 3346 ms | 2270 ms | 1614 ms |
| `i % 2` | 8084 ms | 5918 ms | 5112 ms |
| `!((i % 10 == 0) or` <br/>`(i % 10 == 1) or` <br/>`(i % 10 == 2))` | 4522 ms | 2860 ms | 2343 ms|
| `(i % 10 == 0) or` <br/> `(i % 10 == 1) or` <br/> `(i % 10 == 2)`| 4088 ms | 1961 ms | 1639 ms|
| `IndexRange(50020, 70)` <br/> <sub>(one small range in the middle)</sub>| 1966 ms | 100 ms | ~75 ms |
Pull Request: https://projects.blender.org/blender/blender/pulls/133101
This adds support for Transform MouseInputMode INPUT_ERROR using a new
transform cursor HLP_ERROR (dashed line ending with WM_CURSOR_STOP.
This is shown when attempting an object rotation or scale when
transforms are set to "Affect Only Locations". At this time the status
bar is also cleared and an warning message is shown.
Pull Request: https://projects.blender.org/blender/blender/pulls/132957
Operators should not act on non-visible entities really.
Posemode already did the combination of "visible and selected" via
`FOREACH_PCHAN_SELECTED_IN_OBJECT_BEGIN`, editmode didnt.
To resolve, add `EBONE_VISIBLE` as a condition (as done elsewhere).
Pull Request: https://projects.blender.org/blender/blender/pulls/133660
Previously, the global storage of these types either used a GHash or a
blender::Map. VectorSet is preferrable to GHash because it's type safe,
clearer, and faster. It's preferrable to Map because the key doesn't
have to be duplicated and because iteration is faster.
This PR moves these registered types to VectorSet, just like the
node, node socket, and node tree types. Note that none of these types
use RAII for allocation, so freeing is still done manually.
Testing was manually interacting with each of these systems, including
with addons that register their own types.
Pull Request: https://projects.blender.org/blender/blender/pulls/133778
This was caused by the subpass input workaround for non-tilebased
GPU using `texelFetch` on an `image`. This was supported before
the cleanup 9c0321ae9b4be72a9f5e572471f2814ac2f6dfef.
But is against the GLSL specification and was removed inside the
cleanup.
Using `imageLoad` instead of `texelFetch` fixes the crash.
However rendering seems to be broken for other reasons.
Currently the "Show All" layer operator operator only enables visibility
for layers only. If the Grease Pencil object has layers that are children
to a Layer Group that is hidden, these layers would not be revealed
to the user.
This pull request modifies the grease_pencil_layer_reveal_exec function
to iterate through Layer Groups present in the object and sets them visible.
Pull Request: https://projects.blender.org/blender/blender/pulls/133613
10/12bpp movie writing code assumes that input image is properly
floating point for these cases. That is always true for regular
rendering, however VSE can produce 8bpp images, if there
are no float/HDR strips in there. Make these convert into a float
image in the render pipeline when needed.
Pull Request: https://projects.blender.org/blender/blender/pulls/133802
Was just getting the default name, but if we also have a bone selected
in weightpaint mode, these should be named after the bone (otherwise the
armature modifier does not deform accordingly).
To resolve, basically do the same we do for meshes in
`ED_wpaint_ensure_data`.
Pull Request: https://projects.blender.org/blender/blender/pulls/133804
This adds another operator mode for changing brush radius and opacity while the
modal primitive operator is running. It's based on the `wm.radial_control`
operator but only implements simple mouse control for these two properties.
Pull Request: https://projects.blender.org/blender/blender/pulls/133675
In renderdoc the debug stack got corrupted when render graphs where
reused. The previous usage didn't clear the stack. This PR clears
the debug stack when render graphs are reset.
MSVC does this by default, and is a good way to see build progress
indication, when using msbuild. clang-cl also got that option back
in 2018, but it is off by default.
Pull Request: https://projects.blender.org/blender/blender/pulls/133810
Box select is broken for all node editors. It ignores selection modes and always uses the mode `Set a new selection`.
The operator `NODE_OT_select_box` works fine, but clicking anywhere in the node editor calls `NODE_OT_select` first, so we need to make sure it has no undesired side effects when it is not run.
Pull Request: https://projects.blender.org/blender/blender/pulls/133736
This patch adds support for drag and dropping colors (from color buttons) into
the Compositing, Shading and Geometry node trees.
Additional support was added for dragging and dropping colors with an Alpha
component (which was previously ignored), both in the context of the Node Editor
and for Color Buttons in general. This handles cases like drag and dropping a
color from an RGB to an RGBA button, which recreates the color with a default
Alpha value of 1.0.
Pull Request: https://projects.blender.org/blender/blender/pulls/129026
Changes to the compositor Normal node does not propagate and the
compositor result is not updated. That's because the node is a special
case since its output socket value is used as its input property, which
is not tracked by the node update code.
Apparently, a similar node exists in shader nodes, and a workaround is
implemented for that node in the node updater, so we just need to extend
that check to include the compositor node as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/133803
When developing and testing add-ons it can be useful to get to the
folder containing such add-on.
When Developer Extras is enabled, show a folder icon next to the
extension's path to quickly open it using the system file browser.
Also display it in the list of duplicate add-ons, if any, so user can
access them more conveniently.
Pull Request: https://projects.blender.org/blender/blender/pulls/128474
Caused by fd83be0fa5. Following `if()` condition doesn't seem useful. Entire
curve range is returned when no material is locked and active material
index is ignored.
Pull Request: https://projects.blender.org/blender/blender/pulls/133798
Refactor the keyframe copy-paste code to prepare for supporting action slots.
This is a non-functional change, as the slots are stored but otherwise completely ignored. This way the refactor to the new data structure can be reviewed & tested before actually changing the behaviour.
Related: #129690
Pull Request: https://projects.blender.org/blender/blender/pulls/133497
There were three methods with succinct but slightly unclear names:
- Action::slot_move()
- Channelbag::channel_group_move()
- Channelbag::fcurve_move()
The ambiguity is due to other functions with similar names that e.g.
move fcurves *between* Channelbags, etc. Whereas these methods only move
items to other positions within the array they're already in.
To make this clearer, this PR adds `_to_index` to the end of these
array-oriented methods.
Pull Request: https://projects.blender.org/blender/blender/pulls/133730
The current poll function uses `ED_view3d_context_user_region` [which
falls back to `ED_view3d_area_user_region` if the context region is
flagged `RV3D_LOCK_ROTATION`, so it finds the non-locked region in quad
view]. So in a way it is permissive to do the roll even when we are
within one of the quad regions which is actually locked. This can be
useful if we just want to roll by a specific angle or use one of the
types `V3D_VIEW_STEPLEFT`/`V3D_VIEW_STEPRIGHT` - these are then executed
in the non-locked region.
However for mouse-interacting roll, we should not do this at all when
initiated from a locked region.
To resolve, we could use `view3d_rotation_poll` (instead of
`ED_operator_rv3d_user_region_poll`), but that would prevent us from the
useful scenarios mentioned above. So instead, once we reach the mouse-
interacting code path, check again if we are really in a non-locked
region and only proceed if we are.
Pull Request: https://projects.blender.org/blender/blender/pulls/133643