Expose the "Mute Links" add "Add Reroute" operator as active tools
in the node editor similar to the "Links Cut" tool.
This also works around #134153 by adding additional tools in the same
button group to the toolbar.
Pull Request: https://projects.blender.org/blender/blender/pulls/140429
Minor update to the Video Editing app template.
The main motivation is to better expose Sync Scene Time which sits in
the footer. This could be done via versioning code, but the existing
Timeline gets on the way and it's not easy to remove via code.
A few other small changes were made without affecting the current
functionality.
The changes are:
1. Show Sequencer footer.
2. Remove Timeline editor.
3. Properties: Hide irrelevant tabs, leave only Render, Output, Scene.
4. Rename Scene to Edit.
5. Rendering: Make `Image` tab active so users can see render slots,
instead of the less useful `Tool` tab.
6. Rendering: Hide irrelevant tabs, leave only Render, Output, Scene.
7. Save.
See PR for details and screencaptures.
Pull Request: https://projects.blender.org/blender/blender/pulls/145802
This adds a function that can turn an existing `bNodeTree` into an inlined one.
The new node tree has all node groups, repeat zones, closures and bundles
inlined. So it's just a flat tree that ideally can be consumed easily by render
engines. As part of the process, it also does constant folding.
The goal is to support more advanced features from geometry nodes (repeat zones,
etc.) in shader nodes which the evaluator is more limited because it has to be
able to run on the GPU. Creating an inlined `bNodeTree` is likely the most
direct way to get but may also be limiting in the future. Since this is a fairly
local change, it's likely still worth it to support these features in all render
engines without having to make their evaluators significantly more complex.
Some limitations apply here that do not apply in Geometry Nodes. For example,
the iterations count in a repeat zone has to be a constant after constant
folding.
There is also a `Test Inlining Shader Nodes` operator that creates the inlined
tree and creates a group node for it. This is just for testing purposes.
#145811 will make this functionality available to the Python API as well so that
external renderers can use it too.
This replaces the "Add modifier" type enum UI with a menu,
similar to the object modifiers "Add modifier" menu.
The "Copy to Selected Strips" operator was a bit out of place
and already exists in the "Strip" menu.
Togther with the "Add" menu, these are now moved into a
"Modifiers" submenu, similar to the "Objects" > "Modifiers" menu.
Also updated for the strip context menu (right-click).
Pull Request: https://projects.blender.org/blender/blender/pulls/145981
When collecting operators for the operator cheatsheet (Help menu),
`node.interface_item_new` gave an error because its property
`active_item` could not gather items. This happened because `context`
was unavailable to its `get_items` method at that time.
This commit refactors the method to return early in case the context is not
found.
Pull Request: https://projects.blender.org/blender/blender/pulls/145930
Arranges selected Islands along a selected Axis.
Islands can be aligned to center/left/right/top/bottom.
Initial Implementation of #78408
Ref !139658
Co-authored-by: Campbell Barton <campbell@blender.org>
Introduced in f4e670af2c
The `use_negative_slope` parameter was effectively ignored when `brush`
was also passed in as a parameter, always defaulting to a positive
slope (ascending from left to right).
Additionally, the `use_negative_slope` property was incorrectly
specified for many properties: In general, most brush properties have
positive slope as they correspond to a pressure value being modulated.
This commit fixes the behavior and updates the corresponding
properties so they continue to work.
Pull Request: https://projects.blender.org/blender/blender/pulls/145823
Other code that needs to operate on "the Action that's shown in the
Dope Sheet" now accesses the newly-added
`bAnimContext::active_action`, which is now also used by
`context.active_action`. I've also added
`bAnimContext::active_action_user` in case the ID that is animated by
this Action is needed. That's either the active `Object` or the active
`Key`, again depending on the mode of the Dope Sheet editor.
The active Action can also be obtained via
`ANIM_active_action_from_area(scene, view_layer, area)`. This is a
faster method than the usual `ANIM_animdata_get_context(C, &ac)` and
it doesn't need the entire `bContext`.
The "Stash Action" and "Push Down Action" to the NLA were also
implemented by writing to `SpaceAction::action` via RNA. They now use
`ANIM_animdata_get_context()` to get the active action owner ID, and a
direct call to `blender::animrig::assign_action()` instead.
The remaining use of `SpaceAction::action` was for display &
manipulation of Scene/Action markers. This required some work to get
addressed, as there was quite a bit of spaghetti and duplicate logic
to churn through. More can be improved there, but I had to limit the
time I spent on this.
Python code that was still using `context.space_data.action` to find
the currently-showing Action has been migrated to
`context.active_action`.
Related: #119626
Pull Request: https://projects.blender.org/blender/blender/pulls/145672
This PR adds the `Pen Tool` to `Curves` objects.
The logic and keybinds are shared with the Grease Pencil `Pen Tool`
Unlike the legacy pen tool, this version can works with multiple objects.
Note: Some changes have been made from the legacy curve object's pen tool.
A list of changes can be found at #142646
Pull Request: https://projects.blender.org/blender/blender/pulls/144833
- "grease pencil" -> "Grease Pencil": title case.
- "Display type" -> "Display Type": title case for property name.
- "Bezier" -> "Bézier": proper noun.
- "Mem:%dM, Peak %dM" -> "Mem:%dM, Peak: %dM": missing colon.
- "cannot save image while rendering" -> "Cannot": Sentence case.
- "Linked data cannot text-space transform" -> "Cannot create
transform on linked data": rephrase strange sentence.
- "Unsupported object type for text-space transform" -> "... for
texture space transform": unnecessary abbreviation.
- "Cannot write to asset %s: %s": remove double space.
- "Failed to set tmpact" -> "temporary action": unclear abbreviation.
- "luminance at which the midetones of the image" -> "midtones: typo.
- "Line angle where the image should be split." -> trailing full stop.
- "... instances all the children in the collection" -> "... instances
of all the children...": missing "of".
- "Curves to generated rounded corners on" -> "generate": typo.
- "Instances that converted to a point per instance" -> "Instances to
convert to points": rephrase unclear sentence.
- "Great Pencil to set the depth order of" -> "Grease Pencil": typo.
- "Description to set the smoothness of" -> "Geometry to set the
smoothness of": typo.
- "A cannot use current file as library" -> "cannot use...": typo.
Pull Request: https://projects.blender.org/blender/blender/pulls/145840
Resolve the situation when addon preferences classes which are
inherited from bpy.types.AddonPreferences are not recognized in
online-manual context help
Ref !145799
Numerical inputs have little arrows on the left and right to allow
quick increment/decrement of the value. But these are only shown on
hover, which does not help if using a device that does not have a hover
state (some pens, most touch). This PR adds a user preference to show
them always.
Pull Request: https://projects.blender.org/blender/blender/pulls/145374
Add "Reduce Motion" option to a new `Accessibility` panel under
Preferences, User Interface.
"Reduce Motion" avoids non-essential animation effects, especially
useful for those experiencing motion sickness/vertigo.
It affects:
* Region open/close.
* Pie menus animation.
* Smooth views.
This panel in the future could host common accessibility settings such
as "Increase Contrast" or font size and weight controls that currently
are part of themes.
See PR for details and screenshots.
Co-authored-by: Harley Acheson <harley.acheson@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/140873
* Store scene linear to XYZ conversion matrix in each blend file, along
with the colorspace name. The matrix is the source of truth. The name
is currently only used for error logging about unknown color spaces.
* Add Working Space option in color management panel, to change the
working space for the entire blend file. Changing this will pop up
a dialog, with a default enabled option to convert all colors in
the blend file to the new working space. Note this is necessarily only
an approximation.
* Link and append automatically converts to the color space of the main
open blend file.
* There is builtin support for Rec.709, Rec.2020 and ACEScg working spaces,
in addition to the working space of custom OpenColorIO configs.
* Undo of working space for linked datablocks isn't quite correct when going
to a smaller gamut working space. This can be fixed by reloading the file
so the linked datablocks are reloaded.
Compatibility with blend files saved with a custom OpenColorIO config
is tricky, as we can not detect this.
* We assume that if the blend file has no information about the scene
linear color space, it is the default one from the active OCIO config.
And the same for any blend files linked or appended. This is effectively
the same behavior as before.
* Now that there is a warning when color spaces are missing, it is more
likely that a user will notice something is wrong and only save the
blend file with the correct config active.
* As no automatic working space conversion happens on file load, there is
an opportunity to correct things by changing the working space with
"Convert Colors" disabled. This can also be scripted for all blend files
in a project.
Ref #144911
Pull Request: https://projects.blender.org/blender/blender/pulls/145476
This feature works like the select lasso in other editors. In preview
the user can draw a region they want to select and when a strips origin
is in this lasso region the strip gets selected.
In timeline the user can do the same and the strip gets selected when
the strip is in the lasso or some part of the lasso is in the strip.
The tool can be accessed through in the toolbar or via shortcut.
Pull Request: https://projects.blender.org/blender/blender/pulls/143391
An existing node converts a value (float) to string. This node is intended as a conversion in
the other direction. If parsing is unsuccessful, floating point 0 is output. This node also
outputs the length of the parsed string (i.e. the index of the first character where the
number stopped).
Pull Request: https://projects.blender.org/blender/blender/pulls/112174
This PR allows area maintenance that is compatible with touch
interfaces. The top-left action zone is widened to minimum hitspace,
shown as a "gripper" icon. A simple press brings up a menu with area
maintenance options, including split, docking, tear off, maximize, and
Close.
Pull Request: https://projects.blender.org/blender/blender/pulls/144591
Added support for string sockets in `nw_merge_nodes`, results in
creating "Join Strings" node. Note that the code is slightly different
from most socket types since String Join has a multi-input socket,
but the behaviour is pretty much identical to Geometry sockets with
Join Geometry.
Pull Request: https://projects.blender.org/blender/blender/pulls/145507
This PR updates the VSE strip modifiers interface.
It now uses the same design as the object modifiers.
Changes:
* Except for the "Mask Input" subpanel, the modifier UIs are unchanged.
* Modifiers can now be rearranged using drag & drop.
* Additionally, there is now an active strip modifier. This is exposed
though python via `strip.modifiers.active`.
This is in part for !139634 which needs the concept of an active modifier.
Notes:
* The `modifier.cc` file included all the implementation of all modifiers.
With the addition of a another new callback in this PR, this file was
getting quite big so I split everything out into individual files for all
modifiers. The modifiers are getting registered at launch.
* The modifier panels are getting added using a UI template
(`template_strip_modifiers`) very similar to the object modifiers.
Pull Request: https://projects.blender.org/blender/blender/pulls/145367
A number of panels referred to the `.greasepencil_paint` and
`.greasepencil_sculpt` context members, each of which only correspond to
the legacy tooling. This commit removes such panels and their helper
classes.
Pull Request: https://projects.blender.org/blender/blender/pulls/145708
This feature works like the select circle in any other modes. The user
can press "C" in preview or timeline and then select or deselect strips
by pressing the left or middle mouse button.
It’s an enhancement for the VSE preview because:
1. It makes it more similar to other editors in Blender
2. This behavior makes it easier to select specific overlapping strips
in preview, that is because the select circle only checks for the
origin of the strip.
Pull Request: https://projects.blender.org/blender/blender/pulls/141422
Now that there are Rec.2100 PQ and HLG displays, the additional HDR option
for video export is redundant. Typically you would now select a HDR display
early on and do all your video editing with it enabled.
For saving a HDR video, the encoding panel will now show the name of the color
space, and warn when the video codec or color depth is incompatible.
Since this is now based on interop IDs for the dislpay color spaces, we can
map more of those to the appropriate CICP code. This works fine for Display P3,
in my tests it looks identical to sRGB except that the wide gamut colors are
preserved.
However Rec.1886 and Rec.2020 are problematic regarding the transfer function,
although the latter at least has the correct primaries now. So it should be
a net improvement and this could be looked at later if anyone wants.
---
Background:
* Rec.1886 and Rec.2020 display color spaces in Blender use gamma 2.4.
* BT.709 trc is almost the same as gamma 2.4, so seems like the correct choice.
* We already write sRGB with BT.709 trc, which seems wrong.
* Yet sRGB matches exactly between Blender display and QuickTime, while
Rec.1886 and Rec.2020 do not.
* Display P3 with BT.709 trc matches sRGB with BT.709 trc, just adding the wide
gamut colors. So that is what is used for now. Also using the sRGB trc the
file is not recognized by QuickTime.
There is apparently a well known "QuickTime gamma shift" issue, where the
interpretation of the BT.709 trc is different than other platforms. And you need
to do workarounds like writing gamma 2.4 metadata outside of CICP to get
things to display properly on macOS.
Not that QuickTime is necessarily the reference we should target, but just to
explain that changing the previous behavior would have consequences, and so
it this commit leaves that unchanged.
Pull Request: https://projects.blender.org/blender/blender/pulls/145373
Replace the icons for the "From Socket" and "To Socket" pop-up menus from
`RADIOBUT_OFF` and `FORWARD`, to each socket type's corresponding icon.
This makes it easier to pick out sockets in longer lists, as they could now be
distinguished by their color.
Video and images in PR
Pull Request: https://projects.blender.org/blender/blender/pulls/145648
This commit adds support for users to customize individual pressure
mapping curves for size, strength, and position jitter on a per-brush
basis to improve expression when using drawing tablets. This feature is
already implemented in Grease Pencil, and this PR adds the same
functionality to Texture/Image paint, Vertex/Weight paint, and Sculpt
modes.
The UI and functionality are the same as those in Grease Pencil.
Co-authored-by: Sean Kim <SeanCTKim@protonmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/144428
Add back custom properties to nodes, and properly expose them in the UI
as such (new 'Custom Properties' panel for nodes in the the Node
Editor).
This shows like any other custom property panel in the UI, in the Node editor:
<img width="424" alt="image.png" src="attachments/adb50815-0db0-447f-ac3b-7860d9a3e3fc">
Although not initially intended for this, nodes 'mixed' IDProperties
were quite widely used by py/extensions developers to store per-node
data.
During the initial IDProperties split between User-defined (aka custom
data) and system-defined (runtime RNA properties), this was not known,
so decision was made to only keep system properties for Nodes. The fact
that these properties were not exposed at all in UI also played a role
in that decision. See also discussions in #141042.
This commit instead splits system properties out into their own new
storage, and keep existing ones for user-defined/custom properties
(as done for other IDProperty owners, like IDs, bones, etc.).
Pull Request: https://projects.blender.org/blender/blender/pulls/145424
This applies an OpenColorIO display, view and look transform on a color
in the scene_linear colorspace.
In general, OpenColorIO configurations do not contain a colorspace for
every view + display, especially if they are modern configs using the
display colorspace and shared view mechanisms. Nor do they include looks.
So the Convert Colorspace node is not sufficient.
Additionally, we would like to avoid making the colorspace list too long
in the default config, as we are adding many new views and transforms.
Exposure, gamma curves and white point functionality are not included
in this node, as there are native ways of doing that in the compositor.
These settings are marked non-editable in the Python API.
Pull Request: https://projects.blender.org/blender/blender/pulls/145069
Add the `SKIP_SAVE` option to the 'Paste Global Transform' operator
properties.
This fixes a bug with following repro steps:
- Specify a relative object
- Use relative copy/paste
- Try to use non-relative copy/paste
- It will fail because after you used the relative paste operator, the
`use_relative` property is saved for ever as True.
Pull Request: https://projects.blender.org/blender/blender/pulls/145262
This commit changes the internal storage and user-facing representation
of the brush size values (`size` and `unprojected_size`) from radius
to diameter.
This has a number of benefits:
* While the radius is more helpful for many internal operations, it is
more natural to estimate the size of a brush by the diameter
* Because the pixel size is stored as an integer, users are currently
unable to make brushes that have an odd numbered diameter, notably
preventing the ability to make single pixel brushes.
Internally, the `Brush` and `UnifiedPaintSettings` size values are
versioned to double their on-disk values. The relevant `BKE` functions
that access the data return the radius at runtime, and any internal
`struct`s that stored radius continue to do so.
The 'Radius' text for brushes is changed to 'Size' and all references
to it in descriptions are changed to 'size' as well.
Resolves#134204
Pull Request: https://projects.blender.org/blender/blender/pulls/142495
Continuing #140360
This PR moves keyframe theme properties from editors into Common.
Besides Dope Sheet, keyframe properties were in:
- Sequencer (almost all types, and might use more in the future)
- 3D Viewport, where the active object name overlay used a separate Object Keyframe color when
it had keyframes on the current frame. Now it uses the common Keyframe Selected color, instead
of having its own property just for this little text.
- Keyframes in Movie Clip Editor were hard-coded white, now they use a common Keyframe color.
Selected colors used wrong long key selected color, now they use common Keyframe Selected color.
- Movie Clip Editor also used separate colors for what it called "Strips", but they are visually
the exact same thing as "long keys" in Dope Sheet, so they use common long key colors now.
There are Keyframe Border properties in Dope Sheet, Sequencer, and NLA, but they're not shared
because they're drawn on very different backgrounds, in different sizes, with different fill colors, so
it's difficult to make one color work for all of them, and it can restrict customization and accessibility.
Video in PR
---
Details:
- Long keys in Dope Sheet/Clip Editor and Strips in NLA used the same internal "strip" attribute.
Those needed to be separated to properly use long key colors in common, without worrying
about affecting unrelated things, and those two are as unrelated as they can get.
To properly separate them I added new "long_key" attributes, and corresponding
`TH_LONGKEY` and `TH_LONGKEY_SELECT`.
- Long keys in Movie Clip Editor had hardcoded alpha. Now they use alpha of the theme color.
Pull Request: https://projects.blender.org/blender/blender/pulls/144259
The pose library registered a double-click keymap item for the file
browser keymap, because that was the only way to add keymap items to the
asset browser (which is just the file browser under the hood). Since
450f428434, the pose library apply & blend operators are available in
more contexts, since their check for an active asset was moved from the
operator poll to the operator execution. So the pose apply operator
would end up triggering.
The poll function could be adjusted somehow to return false in this
case, e.g. by checking if it's executed from a file browser (not an
asset browser).
However, the operator should be independent of where it's called from.
So instead this registers a separate keymap for the asset browser, so
the pose library operators can be registered exclusively for the asset
browser.
Selected tracks in the Movie Clip Editor's Dope Sheet used hard-coded color.
Added a new theme property for them, and previously hard-coded color is now just a default.
Pull Request: https://projects.blender.org/blender/blender/pulls/144265