Remove the operators to convert a legacy pose library (from Blender 2.93
and older) to the current system (introduced in Blender 3.0).
The removal is mostly because the pose markers do not play well with
slotted Actions. The conversion code was never updated for those, and by
now it's easier to remove them than to update the code to the current
data model.
Technically it was still possible to create a legacy pose library (an
Action with pose markers) in current versions of Blender, and then use
this operator to convert that to a modern pose library. I don't know of
anybody doing that, though.
This is part of #146586
Pull Request: https://projects.blender.org/blender/blender/pulls/147061
Frame variables in File Output paths are not replaced by the frame in
single renders. This is because the path construction function gets
passed false for frame usage to not force append frames, which also
handles frame replacement.
To fix this, we replace frame variables manually without forcing them
before constructing the path.
Pull Request: https://projects.blender.org/blender/blender/pulls/146779
The sequencer scene was set to the active scene in the window
in all cases. This is not great because we really only expect
the sequencer scene to be assigned when it was used.
The fix changes the versioning code to ensure that
1) The window has any VSE open.
2) The active scene uses an `Editing` struct (e.g. the user created
strips, or interacted in some way with the VSE).
This also changes back the test that checks for the usages
of IDs. Before this test had to include the workspace for
the default scene. Now this scene is no longer used
by the workspace, because the versioning that sets
the sequencer scene is no longer run.
Pull Request: https://projects.blender.org/blender/blender/pulls/147044
Use the current Action API (i.e. move away from the to-be-deleted-in-5.0
one) to import and export F-Curves from/to FBX files.
There is a slight difference in functionality for the exporter, in the
selection of which Actions to export for the "All Actions" option. This
is just a minimal change to ensure the legacy API is no longer used.
Old: `action.fcurves` was iterated, and if all FCurves could resolve to
existing properties, the Action was exported. This would only work
reliably for single-slotted Actions, due to the use of the deprecated
`action.fcurves` property.
New: the above check is done for each Channelbag in the Action. The
first Channelbag that match the above check is exported. This does _not_
export all suitable channelbags; it merely improves on the old behaviour
slightly. The new, C++-based FBX exporter is more feature-complete in
this regard.
This is part of #146586
The changes:
1. Add `group_name` to the `channelbag.fcurves.new()` and
`action.fcurve_ensure_for_datablock()` RNA functions.
2. Add `anim_utils.action_ensure_channelbag_for_slot(action, slot)`.
3. Add `channelbag.fcurves.ensure()` RNA function.
This makes it possible to replace this legacy code:
```py
fcurve = action.fcurves.new("location", index=2, action_group="Name")
```
with this code:
```py
channelbag = action_ensure_channelbag_for_slot(action, action_slot)
fcurve = channelbag.fcurves.new("location", index=2, group_name="Name")
```
or replace this legacy code:
```py
fcurve = action.fcurves.find("location", index=2, action_group="Name")
if not fcurve:
fcurve = action.fcurves.new("location", index=2, action_group="Name")
```
with this code:
```py
channelbag = action_ensure_channelbag_for_slot(action, action_slot)
fcurve = channelbag.fcurves.ensure("location", index=2, group_name="Name")
```
Note that the parameter name is different (`action_group` became
`group_name`). This clarifies that this is the name of the group, and
not a reference to the group itself.
This is part of #146586
Pull Request: https://projects.blender.org/blender/blender/pulls/146977
This is caused by the forward_lib including eevee_nodetree_lib
before eevee_ambient_occlusion_lib.
Fixed by splitting eevee_nodetree_lib into the part that is
needed for forward_lib so that eevee_nodetree_lib is only
included from eevee_nodetree_frag_lib and eevee_nodetree_vert_lib.
Pull Request: https://projects.blender.org/blender/blender/pulls/146987
The issue was that the used operator just took the active node into account.
However, clicking in empty space does not make the active node inactive.
Therefore, sometimes clicking on empty space would sometimes remove enter the
last selected group node. Furthermore, double clicking on other nodes may also
trigger exiting the current group.
This is fixed by introducing a new operator that explicitly checks what node is
hovered.
Pull Request: https://projects.blender.org/blender/blender/pulls/147053
This PR introduces grouping of the unit tests inside debug groups.
Previously a capture would contain a single test. But for performance
reasons multiple tests are run in a single process, making it unclear
which commands belong to which test.
This PR will add a debug group for each test that is run.
Pull Request: https://projects.blender.org/blender/blender/pulls/147046
Step by step debugging of unit tests inside renderdoc didn't work as the
debug information wasn't included when running unit tests. This should
have been the case, but was broken when introducing
`--debug_gpu_compile_shaders` startup parameter.
Pull Request: https://projects.blender.org/blender/blender/pulls/147040
Currently, the compositor template ID creates a new node tree. This is
inconsistent with other node editors where the button copies the node
tree.
Also use "New" in geometry nodes operator description instead of "Copy"
Pull Request: https://projects.blender.org/blender/blender/pulls/146222
This patch makes a distinction between passes accessed through nodes
like the Render Layers node, and inputs accessed through nodes like the
Group Input node. Previously, the Group Input node returned the passes
of the active scene and view layer accordingly to the name, while now,
it only returns the Image (Combined) pass and the result will be zeros.
Pull Request: https://projects.blender.org/blender/blender/pulls/146831
Node wrangler has a "delete unused nodes" operator that will delete
nodes that do not contribute to the output of the node network.
Warning nodes, don't contribute to the output of the geometry nodes,
but it does output information to the Geometry nodes UI. So warning
nodes should still be considered nodes that contribute to the output.
This commit adds warning nodes to the list of nodes that contribute
to the output to avoid them being deleted by the "delete unused nodes"
operator.
Pull Request: https://projects.blender.org/blender/blender/pulls/146558
The Node Wrangler addon has a _Reset Nodes_ operator that can remove the input
node of a node zone. This crashes in reference set updates because the code
expects valid input/output node pairs in each zone.
The fix is two-fold:
1. Finding zones for the runtime now returns an empty result to ensure no
invalid node pointers are being accessed. This should not happen in practice,
all operators should make sure zone relationships are not broken.
2. The node wrangler addon is updated to ignore all zone types, including the
newer repeat, closure, and for-each-element zones. The type filtering was
outdated and now uses the `bl_idname` consistently.
Pull Request: https://projects.blender.org/blender/blender/pulls/147028
Currenty, when switching from one scene to another, the mode
of the active objects (before & after) is left untouched.
This becomes a workflow problem when trying to work across
different scenes. E.g. when opening the new "Storyboarding"
template and scrubbing to the next scene strip, the Grease Pencil
object is now in Object Mode, when in the previous shot it was
in Draw Mode.
To solve this, when syncing scenes try to change the mode of
the next active object to the mode of the previous active object
if the type of the object is the same.
Pull Request: https://projects.blender.org/blender/blender/pulls/146981
Fix: correctly update Actions when renaming/re-typing a custom property
When renaming a custom property on a data-block, only update the
animation in a slot for that data-block. Previously all F-Curves were
updated, even when they were meant for other data-blocks.
This also handles the cases where the type of a custom property is
changed, and not just its name.
This is part of #146586
Pull Request: https://projects.blender.org/blender/blender/pulls/146979
Regression in [0] removed checks for indices referencing themselves
which need to be kept but can still be used as targets.
Restore this logic as well as fixing another problem (#147022)
where auto-merge would not merge into the nearest vertex, this
was especially noticeable then the threshold was set to a large value
but would happen at smaller values too.
[0]: bdae3e28a2
Toggles the new `show_presets` option on for the recently added brush
size, strength, and jitter curves across paint modes to allow users
to set these custom curves to any of the defined internal presets.
Pull Request: https://projects.blender.org/blender/blender/pulls/147000
A long overdue pass on editor descriptions/tooltips.
Some editors used a variation of the editor name as description, while
others didn't even have one. In some editors their functionality
changed so use this opportunity to reflect this (UV for example,
no longer depends on "mesh editmode").
See PR for details.
Pull Request: https://projects.blender.org/blender/blender/pulls/146968
To support setting the custom `CurveMapping` to a well defined preset,
there exist a number of operators that are hardcoded to apply a
particular preset to a particular curve.
This commit begins to replace this functionality and make it part of the
template itself, allowing the preset to be applied to any curve. For
now, it only supports either positive or negative slopes, primarily for
the brush usecases.
The `brush.curve_preset` and `brush.sculpt_curves_falloff_preset`
operators are unneeded after this change and have been removed.
Notably, these preset controls have not been added elsewhere, they can
be added on a case by case basis in future commits by interested
modules.
Pull Request: https://projects.blender.org/blender/blender/pulls/146847
Based on extensive testing, this gives matching HDR brighness across most
application, with both PNG and AVIF. Video remains at 100 nits as that
appears to tbe convention there.
This is implemented by adding two modified PQ and HLG color spaces to the
OCIO config on startup, and for the specific cases of image save and loaded
these will replace the regular PQ and HLG color spaces.
This was chosen rather than adding them as color spaces in the OCIO config,
so that it can work for any config with appropriate interop IDs, including
the ACES config. Additionally, it would be unclear how to make this work with
view + display transforms, we wouldn't want to burden the users with having
to pick a different display depending if they are saving images or video.
Ref #145855, #144911
Pull Request: https://projects.blender.org/blender/blender/pulls/146888
The "id" attribute was built-in on curves (point domain), mesh (point domain)
and instances, but not on e.g. point clouds. This mismatch causes issues because
of the special rules regarding built-in attribute propagation. Furthermore, an
implication of this was that the id attribute had to be an integer attribute on
a specific domain, which is not always ideal.
This patch turns the id attribute into a normal generic attribute, except that
some nodes internally modify this attribute in special ways. This may cause some
compatibility breakage in rare cases, but that can generally be easily fixed by
either removing the id attribute or setting it explicitly on the right domain. I
can't think if a feasible way to avoid this unfortunately.
The internal special cases for the id attributes are generally skipped unless
the attribute is an integer attribute on the point/instance domain.
Pull Request: https://projects.blender.org/blender/blender/pulls/146941
This adds three corner types: `Round` `Sharp` and `Flat`.
These control how the corner of `Grease Pencil` line strokes are rendered.
- The `Round` type draws circular arcs, and is what `Grease Pencil`
currently supports and is default.
- The `Flat` type cuts off the tip of the corner.
- The `Sharp` type allows for sharp corners to be created.
If the angle is sharper than `Miter Limit` then the tip will be cut like `Flat`
These three types match the main types of `line joins` present in `SVG`
files.
This data is stored in one `Point` attribute called `miter_angle`.
This stores both the `Corner Type`, the `Miter Limit` and defaults to
the `Round` type.
This PR adds:
- Rendering of the corner types.
- An operator for setting the `Corner Type` and `Miter Angle` attribute.
- Corner types to the `Outline` operator and modifier.
Part of #145380.
Pull Request: https://projects.blender.org/blender/blender/pulls/143688
Built-in nodes already used the functionality to hide the input labels in a few
situations. However, this functionality was not exposed for node groups before.
It required some refactoring to get the semantics of the flag right. The tricky
aspect is that "Hide Label" would be an incorrect name, because the label is
still shown under various circumstances. Instead, the flag merely indicates that
drawing code may skip drawing the label.
This adds a new "Optional Label" input for node group inputs. Other names are
possible like "Requires Label" which would be the inverse.
Overall the implementation is pretty straight forward after
1f489ea31a,
469a70dba9 and
f79896f5b9.
Pull Request: https://projects.blender.org/blender/blender/pulls/146939
Merge changes from blender/blender-assets#29 :
- Fix warning 'No Curve Selected' showing constantly in all shape modes.
- Fix radius extrapolation to work for round/custom profiles on both curve ends.
- Fix merging custom profile round caps to work on both curve ends.
Pull Request: https://projects.blender.org/blender/blender/pulls/146991
In 95259228d9 an optimization was made to
simplify geometry nodes socket names on panels when they contain the
exact group title as prefix, but this leads to issue where `Opening` can
be truncated as `ing` which is not desired. Now will check if a space
character is present after the prefix, then do the truncation.
Note that this implementation still doesn't truncate `CamelCase` or any
CJK name strings because they don't use the space character as
separator.
Pull Request: https://projects.blender.org/blender/blender/pulls/146973
This implements the Menu Switch node in shader nodes. It's the same node that is
used in Geometry Nodes and the Compositor.
The Menu Switch node is purely handled during preprocessing and thus builds on
top of #141936. Hence, it's input has to be a single value, just like the
iteration count for repeat zones. This limitation can be lifted in the future,
but currently there is no way to produce a non-single menu value in shader
nodes. This will become possible if other Switch nodes are added though.
Pull Request: https://projects.blender.org/blender/blender/pulls/146896
Caused by a bad conversion to StringRef in 950a2bb8a3.
Instead pass around StringRef since that's all that's needed by the UI code
anyway. And make the argument to the node socket drawing RNA function
clearer, previously it relied on the char pointer being first in StringRefNull.
Pull Request: https://projects.blender.org/blender/blender/pulls/146985