The interpolate tool was using a linear re-sampling of the curves, which changes
non-uniform point distributions can causes unexpected shifts in points along the
curve, even very close to an input stroke (mix factor ~0 or ~1).
This patch adds an alternative interpolation function with explicit segment
indices and fractions, which can then be computed by the interpolation tool.
The point segment factors are chosen such that each point of the input strokes
has an exact matching point in the interpolation. When the factor is close to
0 or 1 the shape of the curve thus matches the respective input exactly.
This approach is more similar to what GPv2 did, except instead of sub-dividing
each segment it simply generates a _local_ uniform sample to fit more points
into the same segment. These extra points are colinear at the extremes of the
mix factor range, so the curve matches the input curves visually.
Pull Request: https://projects.blender.org/blender/blender/pulls/130594
GPv2 used the depth buffer at the end of a stroke drawing operation to project points and interpolated between detected values. This does not work in GPv3 because the strokes are added directly to drawings. Depth projection has to happen continuously, updating points between the last depth value and the next when a new hit is recorded.
Resolves#125258.
Pull Request: https://projects.blender.org/blender/blender/pulls/131842
This patch automatically grays out input values which can't affect the output
currently. It works with inputs of group nodes, geometry nodes modifiers and
node tools.
To achieve this, it analyses the node tree and partially evaluates it to figure
out which group inputs are currently not linked to an output or are disabled by e.g.
some switch node.
Original proposal: https://devtalk.blender.org/t/dynamic-socket-visibility/31874
Related info in blog post:
https://code.blender.org/2023/11/geometry-nodes-workshop-november-2023/#dynamic-socket-visibility
Follow up task for designing a UI that allows hiding sockets: #132706
Limitations:
* The inferencing does not update correctly when a socket starts being
animated/driven. I haven't found a good way to invalidate the cache in a good
way reliably yet. It's only a very short term problem though. It fixes itself
after the next modification of the node tree and is only noticeable when
animating some specific sockets such as the switch node condition.
* Whether a socket is grayed out is not exposed in the Python API yet. That will
be done separately.
* Only a partial evaluation is done to determine if an input affects an output.
There should be no cases where a socket is found to be unused when it can actually
affect the output. However, there can be cases where a socket is inferenced to be used
even if it is not due to some complex condition. Depending on the exact circumstances,
this can either be improved or the condition in the node tree should be simplified.
Pull Request: https://projects.blender.org/blender/blender/pulls/132219
It is possible that the valid range computed from `theta` and the range
visible to the current pixel do not overlap. In this case the hair
section has no contribution.
Pull Request: https://projects.blender.org/blender/blender/pulls/133337
Add icons to better identify data types in the Batch Rename type menu.
Makes it easy for users to recognize icons they are already familiar
with, especially when following tutorials in English while using a
translated UI.
Also fixes 'Light' being singular, while others were plural.
Pull Request: https://projects.blender.org/blender/blender/pulls/130300
This PR adds new RNA properties that deprecate and replace any `sequence` property.
The old prooperties are still there and fully functional, but the description is changed
to indicate that these will be removed in the future and that the new properties should
be used instead.
| Deprecated property | Replacement property |
| --------------------------------- | ----------------------------------- |
| `context.active_sequence_strip` | `context.active_strip` |
| `context.selected_editable_sequences` | `context.selected_editable_strips` |
| `context.selected_sequences` | `context.selected_strips` |
| `context.sequences` | `context.strips` |
| `SequenceEditor.sequences` | `SequenceEditor.strips` |
| `SequenceEditor.sequences_all` | `SequenceEditor.strips_all` |
| `MetaStrip.sequences` | `MetaStrip.strips` |
Previously, rna paths for animation data on strips started with `sequence_editor.sequences`.
This PRadds versioning for the rna paths to make sure to use
the new naming scheme. This does mean that in previous versions of blender,
the animations don't show but the data is not lost (even if the file is saved in the older version).
Also do some cleanup of existing python scripts inside the source to use the
new properties.
Part of #132963.
Pull Request: https://projects.blender.org/blender/blender/pulls/133156
If source drawings are on different frames, operator is squashing them in
first frame on dst layer. Now fixed with corrected condition. If value
does not exist at given frame_number/key inside frames() map, add a new
frame on dst layer.
Pull Request: https://projects.blender.org/blender/blender/pulls/133361
Baking could fail to access an objects evaluated mesh data (see #107426),
while the error remains, prefer an error instead of crashing.
Since the depsgraph runs Python callbacks I don't think we can
provide a guarantee the mesh data will available, so even if #107426
is fixed, it's reasonable to have a check here.
`GPENCIL_draw_scene` uses `pd->tobjects.first == nullptr` to determine
whether to early return (draw nothing). When there's only "In Front"
grease pencil objects in scene, `tobjects.first` can be `nullptr` but
`tobjects_infront.first` is valid, in which case no grease pencil would
be drawn. Becase `gpencil_object_cache_sort` will link those two command
lists both to `tobjects` and allow `infront` ones to draw after others,
thus move it before the early return to allow drawing to proceed
normally.
Pull Request: https://projects.blender.org/blender/blender/pulls/132155
In Cycles, the subsurface scattering shader will switch to a
diffuse shader under a few different conditions to improve performance
and reduce noise.
This commit removes the "switch back to diffuse if the scattering
radius is less than a quarter of a pixel" optimization because in some
scenes, this can result in noticable lines as the shader transitions
between subsurface scattering and diffuse.
Pull Request: https://projects.blender.org/blender/blender/pulls/133245
Slight displacement in mouse position triggers timer reset (pass=1).
With such condition, new redraw call to tooltip sets non zero timer
value (`r_pass_delay`) and `is_label=true` inside `ui_but_tooltip_init`.
This label boolean further skips drawing of description (for example, see:
`ui_tooltip_data_from_tool`).
To resolve this situation, inside timer_reset function keep `pass=0`
when tooltip region exists (i.e label is already visible on tooltip)
Pull Request: https://projects.blender.org/blender/blender/pulls/133258
Changes to the formatting of the OS window title for MacOS platform to
better follow their guidelines. Some refactoring, but there should be
no changes seen on other platforms.
Pull Request: https://projects.blender.org/blender/blender/pulls/132410
While the RecentFile struct itself was removed from the list of recent
files, the `filepath` field was not freed. Use the already existing
`wm_history_file_free` function to perform the cleanup.
Pull Request: https://projects.blender.org/blender/blender/pulls/133354
`wm_keymap_item_find_props()` finds the keyitem for respective operator.
This function expects opcontext to be `WM_OP_EXEC/INVOKE_REGION_WIN`.
Set operator_context to `INVOKE_REGION_WIN` in UI drawing code for pack
island button, this will allow drawing shortcut key infront of the label.
Pull Request: https://projects.blender.org/blender/blender/pulls/133298
Previously, when evaluated on the face corner domain, the normal input
node just returned the face normals, as if the mesh was completely flat
shaded. This ignores face and edge smoothness, and custom face corner
normals. In the past couple years the expected behavior of accessing
normals has become much clearer and this behavior is clearly a mistake
in retrospect.
This commit exposes the same face corner normals used everywhere else
in Blender when the node is evaluated on the corner domain. The old
behavior is accessible with a node property in the sidebar. There is
versioning so old files have the property set and get the same results.
This is split from !132583.
Pull Request: https://projects.blender.org/blender/blender/pulls/133340
Now the output socket checks if the corresponding inline socket that it should
be aligned with is visible.
This is an alternative to #133271 which had the problem that it resulted in
`flat_item::Socket` instances for which the input and output is `nullptr`.
Pull Request: https://projects.blender.org/blender/blender/pulls/133325
Happens after f79cae2c59. Seems that Metal pre-processing could not
figure out that the inclusion is guarded behind `#ifdef`, so the
included file is expanded here and never again afterwards.
The pre-processing should be fixed, but for now just always include the file.
Pull Request: https://projects.blender.org/blender/blender/pulls/133336
`super()` is using the MRO to find the first `__init__()` function, if the blender-defined type is not the first inherited type, it may never be called that way.
See #133183
Similar to `bpy.data.user_map`, it returns a mapping of IDs to all the
filepaths they use.
Fairly basic still, may need to be refined with more options to
control which filepaths are included etc.
Mainly intended to make handling of a production blendfile dependencies
more easy.
Also adds some basic testing of the new feature.
Pull Request: https://projects.blender.org/blender/blender/pulls/127252
With an asset library configured in the Preferences that had an empty
path, the catalog tree of the "Current File" asset library would be
empty. That is because the path-less library would incorrectly be
considered as containing the current file's path (`BLI_path_contains()`
returned true for the empty path).
Before slotted actions, it was only useful to stash an action once on a
data-block: that was all that was needed to keep the action's channels
associated with the data-block, and stashing it multiple times was redundant.
Therefore Blender would simply refuse to stash an action if it was already
stashed.
However, now with slotted actions the user may legitimately want to stash an
action more than one time: if the action has multiple slots, the user may want
to keep the channels of multiple slots all associated with a data-block. Doing
that requires stashing each action+slot combination separately.
This PR addresses this use case by now allowing each action+slot *combo* to be
stashed once. Stashing a given action+slot combo more than once per data-block
is still prevented, however, since that is still redundant.
Pull Request: https://projects.blender.org/blender/blender/pulls/133307
For points with locked material, add them to `src_to_dst_points`
as in they are outside the eraser ring to avoid deleting these points.
A new function is introduced to deal with it.
For stroke eraser mode, pass true in Indexmask `strokes_to_keep`.
Pull Request: https://projects.blender.org/blender/blender/pulls/133137
The name `id_root` was not descriptive, and was just a hold-over from the
equivalent (now deprecated) property on the Action itself. `target_id_type`
is more clear, reflecting that this is the type of ID the Slot is intended
to animate.
This PR also renames the corresponding `id_root_icon` to
`target_id_type_icon`.
Note that this PR updates the GLTF import/export core addon to adhere to
these name changes as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/133164
Did a pass through the code base to make sure the uses of `Action.idroot`
are correct in the context of layered actions.
I found and fixed one issue in Grease Pencil v2 -> v3 conversion code
where the idroot was being set to a non-zero value without checking if
the action was layered or not first. Other than that, I also cleaned up
a couple of dodgy-looking things I found.
Pull Request: https://projects.blender.org/blender/blender/pulls/133205
This allows users to manage the Action and Slot assignment of a Scene's
compositing nodes. The selector lives in the Animation Panel in Scene
Properties, alongside the Action+Slot selector of the Scene ID itself.
Pull Request: https://projects.blender.org/blender/blender/pulls/133141
After using the Fix to Camera operator, restore the transform matrices
of the fixed-to-camera objects/bones. This is necessary as the
autokeying options (like 'Only Available') may limit the keys that are
set, and thus going to the original scene frame may not be enough to
restore the full transform.