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
This adds several new node-group assets bundled with Blender for Geometry Nodes. Those include high-level nodes to be used as modifiers, as well as medium and low-level nodes to be used in the node editor.
Co-authored-by: Hans Goudey <hans@blender.org>
Co-authored-by: Simon Thommes <simon@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/145645
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
This PR enables strip curve drawing when performing the workbench
rendertests. On Intel/vulkan the lines are to far off. Using strip will
reduce platform differences. Downside is that (basic) line rendering is not
covered anymore by a render test.
Pull Request: https://projects.blender.org/blender/blender/pulls/146820
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
Previously it was only working for the single layer case. For multipart
we write the colorspace in each part. For single part we write the first
non-data colorspace, and hope data passes will be identified based on channel
name like Blender does (e.g. XYZ instead of RGB).
Reading is unchanged and still the same as before, in that it only reads the
colorspace from the first part. There is only one color space per image
datablock, so we can not store anything more currently. In practice it
would be unusual for all passes in a file not to either have the same
colorspace or be data.
All the compositor file output test images were updated to include the
metadata, so that the test will check if the metadata is there.
Ref #144911
Pull Request: https://projects.blender.org/blender/blender/pulls/146809
New "Interleave" option in image format settings, enabled by default in old
files and disabled by default in new files to write multi-part files.
By not storing all channels interleaved, it is possible for other applications
to load individual passes more efficiently. This might also work better with
compression.
We follow the OpenEXR docs in that the channel name is the full
Layer.Pass.Channel rather than just Channel. Some other renderers
(e.g. Houdini Karma) write just the channel and that is what our reading
code assumed so far.
I've verified that Nuke can read the multipart EXR files produced by Blender,
including multiview and cryptomatte.
Fix#123727
Pull Request: https://projects.blender.org/blender/blender/pulls/146650
* Read directly into ExrChannel, eliminate intermediate MultiViewChannelName
* Pass multiple channels to EXR writer together in IMB_exr_add_channels
* Avoid various channel name parsing by passing components separately
* Simplify logic for writing multichannel and multiview metadata
* Remove unused global EXR handle storage
* No longer use void pointer for EXR handle.
* Use blender::Vector and std::string.
* Slightly reshuffle code so multipart support will have smaller diff.
* Add various comments.
Pull Request: https://projects.blender.org/blender/blender/pulls/146650
The reading code currently assumes that the part name may be for example
"ViewLayer.Combined" and then the channel within the part may be "R". For
example Houdini writes files like this.
However according to the docs the part name should be ignored and the
channel name in each part should be complete like "ViewLayer.Combined.R".
https://openexr.com/en/latest/MultiViewOpenEXR.html
To support both cases we now only prepend the part name if it's not already
there.
Pull Request: https://projects.blender.org/blender/blender/pulls/146650
Adds support for importing arbitrary 32-bit float properties on Alembic
point clouds.
This includes the following Alembic property types (with their imported
Geometry Nodes attribute types):
- `IFloatArrayProperty` -> `Float`
- `IV2fArrayProperty` -> `2D Vector`
- `IV3fArrayProperty`, `IN3fArrayProperty` -> `Vector`
- `IC3fArrayProperty` -> `Color`
See PR for further details.
Co-authored-by: pavel <sevecek@sirrah.troja.mff.cuni.cz>
Pull Request: https://projects.blender.org/blender/blender/pulls/145946
In very old OpenEXR version there was a limit on the channel names, which meant
the pass names needed to be short like "DiffDir". Change them to be longer like
"Diffuse Direct".
* This breaks forward compatibility. Old Blender version will lose links when
reading compositing node setups with such passes, but #146571 will fix it
for 4.5 LTS.
* Add-ons, scripts and compositing setups in other applications that rely on these
names will also break.
* The find_by_type function for render passes has also been removed, as this was
already deprecated and replaced by find_by_name.
* We assume spaces in the name are ok, since we have passes with them already
and have not seen reports about compatibility issues.
Pull Request: https://projects.blender.org/blender/blender/pulls/142731
IMPORTANT: This will force-enable this option in user preferences, as
part of the 5.0 versioning process. Users that do want to keep saving
uncompressed blendfiles will have to edit their user preferences
accordingly, and re-save them.
This commit does _not_ change the setting for an existing blendfile:
uncompressed blendfiles will keep being saved as uncompressed.
Implements #135735.
Pull Request: https://projects.blender.org/blender/blender/pulls/146172
Signed integer overflow is undefined, but works reliably enough for us
anyway, so just silence it like the Blender implementation already does.
This also caused some tests like cycles_displacement_cpu to run much slower
(3s -> 42s) due to the overhead of detecting and ignoring repeated warnings.
Pull Request: https://projects.blender.org/blender/blender/pulls/146783
Add theme settings for the Curve and CurveProfile widgets.
Even though the curve widget is used all over Blender, it never had its
own theme settings. It was using a mix of colors from the “regular”
toggle widget with text colors inherited from the editor.
Thanks to the recent cleanup and removal of so many redundant theme
options, we can now add new/missing settings without overwhelming
the theme.
See PR for details and screenshots.
Pull Request: https://projects.blender.org/blender/blender/pulls/146274
The Grid Info node was not exposing the other supported socket types
(`Integer` and `Boolean`). The other Sample Grid, Sample Grid Index and
Get Named Grid nodes were updated to use the same enum filtering as the
Grid Info node and ensured tooltips were consistent.
Pull Request: https://projects.blender.org/blender/blender/pulls/146785