The goal here is to simplify working with the common pattern where a Menu Switch
node is followed by an Index Switch node. This is achieved by detecting this
pattern and drawing the item names from the menu switch node in the index switch
node.
This slightly refactors the custom socket drawing callback to make it easier for
it indirectly call the default drawing function.
Pull Request: https://projects.blender.org/blender/blender/pulls/145710
This node outputs tangent values for face corners. There are two methods:
- **Exact** is the same MikkTSpace calculation used elsewhere in Blender.
- **Fast** (from #131308) is over 4x faster, and useful in many of
the same situations, though not necessarily tangential to the surface.
The reason to include both methods is that there are use cases where the
quality of the tangents don't matter (though the results are actually very
similar visually), we just need some continuous values across faces.
Pull Request: https://projects.blender.org/blender/blender/pulls/145813
This extends the ctrl+F search to also support searching for some socket values.
The original motivation for this came from the need to search for a Warning node
by its warning (instead of node name or label). However, I found this to be more
generally useful as it can also be used to search for places where e.g. certain
attribute names are used or where e.g. some object is referenced in an input
socket.
Pull Request: https://projects.blender.org/blender/blender/pulls/146882
This is a small usability feature to simplify adding additional inputs in the
Index Switch and Menu Switch nodes without having to go to the sidebar.
Technically, something similar can be done for other extend-sockets. However,
here it works best, because one does not have to choose the socket type. For
other inputs we could use a quick popup when pressing the button, but that seems
outside of the scope of this patch.
Later we might also want add the ability to remove existing inputs. But just
adding an icon for that doesn't work so well for socket types that have an input
property.
Co-authored-by: Brady Johnston <36021261+BradyAJohnston@users.noreply.github.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/145915
Currently, matrix attributes in the spreadsheet are difficult to inspect.
This PR improves the readability of matrix tooltip, formatting it into
a column-aligned grid. Display floats with 6 significant digits
(3 for abs(x)<1e-4).
Pull Request: https://projects.blender.org/blender/blender/pulls/146207
Previously, the closure and bundle nodes were a bit restrictive when it comes to
socket shapes. Especially the bundle nodes did not support customizing the
socket shape at all, so they always worked with dynamic values. This was
problematic, because it meant that e.g. the outputs of the Separate Bundle node
looked like they couldn't be used as single values, and other similar issues.
With this patch, the following is supported (a few aspects were supported before
but now it all fits better together): * Support manually selecting socket shapes
in Combine Bundle, Separate Bundle, Closure Input, Closure Output and Evaluate
Closure nodes. * Automatic inferencing of shapes in all these nodes, as long as
the socket shape is set to "auto". * A new "Define Signature" option can be
enabled in the nodes. If enabled, linked nodes will also sync the socket shapes
from that node. In the future, we also want to add support for naming the
signature.
Pull Request: https://projects.blender.org/blender/blender/pulls/145550
Currently cameras composition guide colors are defined in theme, and not even by an individual
property. They follow 3D Viewport -> View Overlay color, which also defines many other things,
such as world origin cursor. By default it's black and it's difficult to change, because then other
things stand out. But using default black for composition guides is impossible.
This PR, instead, adds new Composition Guide Color property on camera, and uses it in camera view.
This not only fixes the issue mentioned above, but also allows different cameras in one scene to
have different overlay colors. This is very handy when you have, for example, two cameras, one of
which looks at the black corner, and another at the lit-up white one. Using a single black or white color
in this case makes the other one more difficult to see. Now, each camera can have its own color.
This PR only changes color for Composition Guides, and NOT for Safe Areas and sensor. Reasons are:
- It's important to differentiate between different concepts, having everything one color is distracting
- Safe areas are per-scene and shared with Sequencer preview. The camera shouldn't dictate color there.
I have separate plans about handling safe areas in the future.
Images in the PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/143788
Currently, only the visibility of input sockets can be changed dynamically based
on other menu inputs. However, under some circumstances, it can also be useful
to hide certain outputs. For example, the built-in Curve Arc primitive node does
that.
This patch adds support for automatic detection of unused outputs. How to detect
unused outputs is less straight forward compared to inputs. This patch uses the
rule that an output is unused if it always outputs a "fallback value" (typically
0) irrespective of the currently used inputs. If the output is independent of
all inputs, it stays visible though.
There is a new small utility node called "Enable Output". It replaces a value
with it's fallback value unless it is disabled. This simplifies setting up
unused outputs. In theory, a normal switch node can also be used, but that is
less usable and the user will have to hardcode the fallback value for each type
which is not something that is explicitly exposed yet.
Supporting dynamic output visibility is also a prerequisite for exposing some
menu node options as sockets (e.g. in the Arc node).
Pull Request: https://projects.blender.org/blender/blender/pulls/140856
We did not sanitize the names used for UV maps or Color attributes when
exporting to Alembic. Names containing characters like ':' or '/' would
cause an unhandled exception from Alembic.
Pull Request: https://projects.blender.org/blender/blender/pulls/146867
New `--log-list-categories` command line argument to list all available
logging categories. This improves documentation of logging, allowing
users to understand what logging categories are available for use. It is
also useful for developers to understand what logging categories already
exist before making a change.
Implemented using static initializers to register all logrefs on startup.
Ref #141754
Pull Request: https://projects.blender.org/blender/blender/pulls/146456
In Render properties > Color Management > Display.
* Off: Directly output image as produced by OpenColorIO. This is not correct
in general, but may be used when the system configuration and actual display
device is known to match the chosen display.
* Automatic: Display images consistent with most other applications, to preview
images and video for export. A best effort is made to emulate the chosen
display on the actual display device.
The option is grayed out when the current OpenColorIO config and display/view
does not support emulation.
Ref #145022, #144911
Pull Request: https://projects.blender.org/blender/blender/pulls/146808
Updates the `CurveMapping` `CURVE_PRESET_SMOOTH` curve to more closely
approximate the smoothstep function (y = 3x^2 - 2x^3). This has the
implication of changing what happens when the curve is reset, but does
not change any existing curves already stored in blendfiles.
Notably, this change primarily affects three operators:
* brush.curve_preset (Mesh Sculpting)
* brush.sculpt_curves_falloff_preset (Curves Sculpting)
* render.shutter_curve_preset (Motion Blur)
Pull Request: https://projects.blender.org/blender/blender/pulls/146710
A subset of brushes behave as "anchored" brushes, in that they do not
apply to the surface continually underneath the cursor, but have a
starting point and then are influenced by the mouse movement. These
brushes behave oddly with tablet pressure sensitivity, as they cannot
modulate over the course of the stroke without causing odd behavior.
Currently, the pressure is only sampled at the very beginning of the
stroke, which makes it difficult to control intuitively. Further work
can be done to improve this behavior (e.g. D6603).
The full list of brush types affected is below:
* Grab
* Snake Hook
* Elastic Deform
* Pose
* Boundary
* Thumb
* Rotate
* Cloth with Grab deformation
Resolves#83697
Pull Request: https://projects.blender.org/blender/blender/pulls/146825
Sliding shape key value in dopesheet editor generates keymap but side
panel isn't updated unless we move mouse over it. It has been mentioned
in last Animation module meeting. Fix is to send a notifier from "value"
property whenever edited, this will be listened by `action_region_listener`
to redraw the side region
Pull Request: https://projects.blender.org/blender/blender/pulls/146835
OpenVDB will throw an exception when trying to prune a SDF/Level-Set grid with a
negative background value.
The geometry nodes in this case are constructing a nominal SDF grid from a
generic "density" volume cube. The negative background value results from
processing the background value the same way as all other grid values in the new
field+grid math feature (`blender::nodes::process_background`).
Since any grid can be constructed with a negative background value we have to
check and correct this before calling the OpenVDB prune function.
Pull Request: https://projects.blender.org/blender/blender/pulls/146837
When we directly call `exit()` from `sig_handle_blender_esc`, the
program will try to free up all static variables and terminate all
threads (and do some file handle cleanup).
The destuctor of the static sound `GlobalState` will hang if
`delayed_close_cv` is in use by other threads as it will wait for them
to let go of it before the destructor finishes.
To make sure that it can finish, the destructor now notifies all
potential threads that they should exit.
Pull Request: https://projects.blender.org/blender/blender/pulls/146665
Nodes have many indicators in their header: whether they have a
preview, warnings, whether they are a node group, plus potentially
more such as if the library is linked/overriden or packed data.
Of all indicators, whether the node is a node group or not is often not
so relevant (especially when many nodes will be just node group assets)
so having an icon takes away precious real estate for other indicators.
Draw the node shape slightly different. A subtle "stack" of nodes
behind Node Groups indicate this is more than just one node.
The stack is only drawn at a certain zoom.
It is now possible to double-click a node group to enter.
It also makes some more room for the node label, since the node group
icon in the header is no longer needed.
Plus a few visual tweaks and fixes for broken/non-valid nodes.
See PR for details and screenshots.
Pull Request: https://projects.blender.org/blender/blender/pulls/145674
This PR adds an option "Affect Gizmo" for custom shape transforms to affect
the transform gizmos. If enabled, this will place the gizmo at the
location and orientation of the "Override Transform" (i.e. in its local space).
For Orientations: The gizmo mode *is* respected. I.e. global mode is aligned to the world etc.
There is a special case for "Gimbal" where it will not follow the orientation of the
"Override Transform" bone. I think it makes sense to keep it that way since this
is about the channels of the bone you are actually manipulating.
The other option is "Use as Pivot" with which the bone is actually rotated
around the override bone. This can be useful for rigs in which shapekeys and
armature deformation is combined
Taken over from #136468
For design task #135429
Co-authored-by: Wayde Moss <wbmoss_dev@yahoo.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/142847
Empty idtypes are already handled to be excluded. Still empty group
elements are generated When IDs are linked from other file. This is due
to missing `id->lib` check. Without this, group element of respective ID
is generated even when ID doesn't belong to that library.
If `id->lib` isn't matching, skip creating group tree element for them.
Resolves#145720
Pull Request: https://projects.blender.org/blender/blender/pulls/145779
3D Viewport and Image Editor had theme colors for paint curve handle and pivot.
Paint curves are one of the stroke methods for brushes, and are generally not
widely used. To simplify theming it's best to remove those four properties and
use other shared colors instead.
We could use common curve colors for them, but they don't have point color
and handle point color is black, so we would need to add one more property
anyway and it would look bad as well.
Instead, use gizmo primary and secondary colors. Technically, paint curves
can be treated as gizmos, because they're interactive widgets in the viewport.
Pull Request: https://projects.blender.org/blender/blender/pulls/146777
Python API functions would both report an error through CLOG and throw an
exception. However this is a problem when --debug-exit-on-error is used,
as tests and other scripts will not have the opportunity to catch the exception
before Blender exits.
Now don't print such reports through CLOG. Note that these usages of
BKE_reports_init have their print level set to error, so were already not
printing info and warning reports (which is not something we generally
want Python API calls to do, they should be silent).
Ref #146256
Pull Request: https://projects.blender.org/blender/blender/pulls/146801
The `SCULPT_BRUSH_TYPE_GRAB` and `SCULPT_BRUSH_TYPE_ELASTIC_DEFORM`
types are already handled above the removed lines, generically, without
checking for size pressure. This check of the if statement was
effectively always false as it would never be encountered.
Pull Request: https://projects.blender.org/blender/blender/pulls/146826
Fix camera marker selection logic in the Dope Sheet (and other editors
that show camera markers).
It is now once again possible to select the camera that is bound to a
marker by CTRL-clicking the marker. SHIFT CTRL will extend this
selection.
(SHIFT+) click still (range-)selects the markers, but not the cameras
themselves. This hasn't changed.
Pull Request: https://projects.blender.org/blender/blender/pulls/145324
This adds support for packed linked data. This is a key part of an improved
asset workflow in Blender.
Packed IDs remain considered as linked data (i.e. they cannot be edited),
but they are stored in the current blendfile. This means that they:
* Are not lost in case the library data becomes unavailable.
* Are not changed in case the library data is updated.
These packed IDs are de-duplicated across blend-files, so e.g. if a shot
file and several of its dependencies all use the same util geometry node,
there will be a single copy of that geometry node in the shot file.
In case there are several versions of a same ID (e.g. linked at different
moments from a same library, which has been modified in-between), there
will be several packed IDs.
Name collisions are averted by storing these packed IDs into a new type of
'archive' libraries (and their namespaces). These libraries:
* Only contain packed IDs.
* Are owned and managed by their 'real' library data-block, called an
'archive parent'.
For more in-depth, technical design: #132167
UI/UX design: #140870
Co-authored-by: Bastien Montagne <bastien@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/133801
This PR moves the ownership of vulkan memory allocator from gpu/device
to GHOST/context/device. This will allow in the future a cleaner control
flow between OpenXR and Vulkan. Currently as the ownership is in the gpu
module many objects would need to pass from GHOST to the GPU module to be
shared between the 2 allocators. Moving both (OpenXR/Context) allocator
to GHOST would reduce the complexity.
Pull Request: https://projects.blender.org/blender/blender/pulls/146819
This patch adds a new Compositor modifier that applies a compositing
node group on a sequencer strip. This patch also introduces the concept
of a compositor node tree space subtype, where we now have a Scene and a
Sequencer subtypes. Practically, this just means that node like the
Render Layers node will not be available in the node editor in the
Sequencer subtype.
Future improvements includes:
- The compositor context is recreated on every modifier application,
while it should ideally be persistent somehow to make use of the
compositor static cache. This might require work from the compositor
side by moving the static cache outside of the context and make it
thread safe if needed. See `Render.compositor` for an example on
persistent context.
- GPU execution is not supported. This just needs a GPU context to be
bound before execution, but the tricky part is getting a GPU context.
See `render::Compositor::execute` for an example on bounding a GPU
context and why it is less straight forward.
- Node inputs are not exposed on the sequencer modifier interface. An
approach similar to Geometry Nodes modifier could be used, look at
`update_input_properties_from_node_tree` for reference, but notice
that Geometry Nodes naturally exempt the main Geometry socket because
Geometry inputs can't be exposed, but for the compositor, we will have
to exempt the main Color and Mask sockets manually. !145971
Co-authored-by: Aras Pranckevicius <aras@nesnausk.org>
Co-authored-by: Falk David <falk@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/139634
Small layout and links adjustments to the splash screen.
- Extend list of templates to fit the new Storyboarding template.
- Extend the list of recent files by one row, so it matches templates.
- Add icons to templates.
- Rename `Donate` to `Donate to Blender`.
- Move donate link down so it's more prominent.
- Make separator visible.
- Add "Get Involved" link.
- Remove "Tutorials" link. The Support link already provides help, and
it's been a while since we no longer promote tutorials on blender.org.
See PR for details and screenshots.
Pull Request: https://projects.blender.org/blender/blender/pulls/146730