Move 3D Viewport and Sequencer OpenGL render operators into a
"Render Preview" sub-menu.
The goal is to make the operation more clear, and being able to add
new entries to render the active scene or Sequencer scene (handy when
using the new "Sync Scene").
This also reduces the length of the `View` menu which in some cases
can get quite long.
See PR for details and screenshots.
Resolves#146302
Pull Request: https://projects.blender.org/blender/blender/pulls/146316
Follow up to !146169
- Add versioning so the new sidebar shows up in old files.
- Remove the hidden flag so it shows up in new Preferences editors.
- Add "Sidebar" toggle to the View menu, and expose region toggle.
Pull Request: https://projects.blender.org/blender/blender/pulls/146321
This commit builds off of 5f8311f596 to support collapsing the custom
paint curve to reduce the amount of information shown to the user.
To support this, a new field is added to the `Paint` struct for this
visibility flag. This value is stored on a per-mode level, not a
per-brush level, as a user editing this curve is likely to not need
the visibility granularity on a per-brush basis.
Additionally, changes are included here to draw the curve button
itself as inactive if the parent layout it is part of is inactive.
Notably, this does not make the curve read only - it only changes
the appearance.
Pull Request: https://projects.blender.org/blender/blender/pulls/145699
"Use Nodes" was removed in the compositor to simplify the compositing
workflow. This introduced a slight inconsistency with the Shader Node
Editor.
This PR removes "Use Nodes" for object materials.
For Line Style, no changes are planned (not sure how to preserve
compatibility yet).
This simplifies the state of objects; either they have a material or
they don't.
Backward compatibility:
- If Use Nodes is turned Off, new nodes are added to the node tree to
simulate the same material:
- DNA: Only `use_nodes` is marked deprecated
- Python API:
- `material.use_nodes` is marked deprecated and will be removed in
6.0. Reading it always returns `True` and setting it has no effect.
- `material.diffuse_color`, `material.specular` etc.. Are not used by
EEVEE anymore but are kept because they are used by Workbench.
Forward compatibility:
Always enable 'Use Nodes' when writing blend files.
Known Issues:
Some UI tests are failing on macOS
Pull Request: https://projects.blender.org/blender/blender/pulls/141278
This commit implements the design task #78398
- Box region
- Set Custom UV Region (Ctrl-B).
- Disabled with Custom Region checkbox in the menu or (Ctrl-Alt-B).
- Box Select (Pinned) changed to (Alt-B).
- When the Custom Region enum is chosen the islands are packed
into the bounding box of the drawn region.
Ref !140020
While perhaps it is more accurate to draw the sidebar navigation in a
"Navigation Bar" region, the navigation "tabs" are not real tabs, so
the darker background usually used for tabs doesn't look good here.
Draw the sections radio buttons in a regular sidebar region instead.
See PR for details and screenshots.
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/146169
Continues and depends on #145609, part of #140360 project.
Previously, all 5 animation/video editors had different properties
for Scrubbing/Markers region. This PR adds new Region panel for it,
so that all editors can share one color.
Text color in this region was coming from regular editor text color.
To differentiate between editors (as is the pattern already with other editors),
and allow more modular themeability of regions, new Text color is added
for that region as well.
Video in PR
Pull Request: https://projects.blender.org/blender/blender/pulls/146113
Continuation of #140360
New common properties for Channel and Channel Selected,
used in animation editors.
Previously Dope Sheet, Graph Editor, NLA, and Movie Clip Editor
had separate properties for them.
Video and images inside the PR.
---
> [!important]
- Channels looked different in Dope Sheet and Graph Editor. In the former,
they were same color as the background, so only labels and icons were visible,
in the latter they had a darker color, so their outline was visible. We need to pick
which design we go for now that they're combined. I chose color from Graph
Editor for now, with alpha from Dope Sheet, since only that editor uses alpha.
---
There is a confusion with names of channel colors. In 4.5 there is:
- - "Channel" (singular, blue color) which refers to objects, actions,
and action slots that hold/combine channels.
- - "Channels" (plural, black color) which refers to individual channels.
This goes against how we name things. In theme, especially, we refer to object
colors as "Object", singular, not Objects, plular. Same goes for all elements except
this one, where individual elements are referred in plural.
To lessen the confusion, and also avoid unnecessary breaking changes in the
future (in case we want to rename blue things, which seems likely), in this PR
I swap those names. Main reason is that black color marks individual channels,
so it should be singular, and blue colors are combination of many channels,
so they should be plural. Otherwise even talking about them is awkward.
Note that renaming isn't a breaking change, because we already "broke" them
by moving them to common path from individual editors.
Pull Request: https://projects.blender.org/blender/blender/pulls/146091
Continuing recent attempts to combine theme settings
and reduce complexity. part of #140360
This PR adds new root panel in theme called "Regions" which for now
includes two subpanels:
# Asset Shelf
This is just moving asset shelf from root to regions, where
it's more appropriate and less noisy.
No functional changes. (alternative to #144267)
# Channels
Previously known as "Theme Space List", or "Source List",
but in user interface we refer this region as "Channels".
This region is shared by all animation/video editors, and each had
a separate panel for theme properties. Now they're combined, and all
editors follow settings defined in Regions -> Channels.
Additionally, "Source List Title" property, which was never used is removed.
Properties are also renamed to be more intuitive and shorter.
# Toolbar / Sidebar
Previously was registered separately on every single editor. This allowed
for some extra customization, but in 5.0 need for this is reduced very much,
because elements drawn in those regions (tabs & tools) are also generalized,
so it makes sense to want same background color for them as well.
> This replaces 46 properties with 5, reducing the total by 41.
> Videos in PR
Pull Request: https://projects.blender.org/blender/blender/pulls/145609
This PR introduces a 'Developer Tools' section of the user preferences,
enabled when the `Developer Extras` option is enabled. This menu will
not be hidden when the release cycle is no longer in alpha, allowing
developers to use this for common debug options instead of having to use
`G.debug_value` and arbitrary values.
This has the benefit of allowing for an ease of debugging in non-alpha
builds as well as being able to use multiple options that would have
been considered exclusive debug options at once.
None of the existing values bound to a specific `G.debug_value` have
been migrated yet.
Pull Request: https://projects.blender.org/blender/blender/pulls/145215
Display the active keying set name as label, and an icon to indicate
the current keyframe type.
This also adds a descripition/tooltip to the keying popover, so it's
easier to understand when the keying set name is not clear.
See PR for details and screenshots.
Pull Request: https://projects.blender.org/blender/blender/pulls/145963
This makes the shader node inlining from #141936 available to external renderers
which use the Python API. Existing external renderer add-ons need to be updated
to get the inlined node tree from a material like below instead of using the
original node tree of the material directly.
The main contribution are these three methods: `Material.inline_shader_nodes()`,
`Light.inline_shader_nodes()` and `World.inline_shader_nodes()`.
In theory, there could be an inlining API for node trees more generally, but
some aspects of the inlining are specific to shader nodes currently. For example
the detection of output nodes and implicit input handling. Furthermore, having
the method on e.g. `Material` instead of on the node tree might be more future
proof for the case when we want to store input properties of the material on the
`Material` which are then passed into the shader node tree.
Example from API docs:
```python
import bpy
# The materials should be retrieved from the evaluated object to make sure that
# e.g. edits of Geometry Nodes are applied.
depsgraph = bpy.context.view_layer.depsgraph
ob = bpy.context.active_object
ob_eval = depsgraph.id_eval_get(ob)
material_eval = ob_eval.material_slots[0].material
# Compute the inlined shader nodes.
# Important: Do not loose the reference to this object while accessing the inlined
# node tree. Otherwise there will be a crash due to a dangling pointer.
inline_shader_nodes = material_eval.inline_shader_nodes()
# Get the actual inlined `bpy.types.NodeTree`.
tree = inline_shader_nodes.node_tree
for node in tree.nodes:
print(node.name)
```
Pull Request: https://projects.blender.org/blender/blender/pulls/145811
Always enforce tiling of some size, up to the 8k tile size.
Rendering very big images without tiles have a lot of challenges.
While solving those challenges is not impossible, it does not seem to
be a practical time investment.
The internals of the way how Cycles work, including Cycles Standalone
is not affected by this change.
A possible downside is that path guiding might not work exactly how one
would expect it to due to lack of information sharing across multiple
tiles. This is something that never worked nicely, and camera animation
and border render has the same issues, so it is not considered a stopper
for this change.
Fixes#145900
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/146031
This was added for a fairly specialezed use case and is no longer being used
as far as we know. A future replacement would be to add a USD/Hydra procedural,
for which most of the groundwork already exists.
Pull Request: https://projects.blender.org/blender/blender/pulls/146021
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