Add new "Soft Falloff" option on point and spot light that uses
the old light behavior from Blender versions before 4.0. Blend
files saved with those older versions will use the option.
This option is enabled by default on new lights.
Fix#114241
Co-authored-by: Weizhen Huang <weizhen@blender.org>
Co-authored-by: Clément Foucault <foucault.clem@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/117832
The problem was calling a "for eval" function on an original mesh
in the main data-base. The parameters are already copied anyway,
so the call was unnecessary. Also reorder some changes to happen
before the geometry is moved to the original mesh.
This simple operator set the edge sharpness attribute on edges,
either extending the existing values or replacing them completely.
It's meant to make it more convenient to manually control the
sharpness now that there can be more reason to do that after
auto smooth became a modifier.
Pull Request: https://projects.blender.org/blender/blender/pulls/117918
Make sure bf_rna is compiled prior to bf_editor_space_userpref,
so that the RNA_prototypes.h can be included.
Solves possible compilation error when building Blender from
scratch.
Pull Request: https://projects.blender.org/blender/blender/pulls/117937
Although the information displayed in the status bar is strictly
speaking reports, it makes sense to translate them using the Interface
setting instead of Reports, as the tool names and stats terms are
also translated in other UI places (toolbar, menus).
This change includes status bars statistics and keymaps, and viewport
statistics.
The change is quite extensive as it is all or nothing. Translating
keymaps using Interface means some status messages will include them
indirectly, and thus cannot use Reports without having a weird mix of
original and translated words. In turn, having only some messages
translated would be even more confusing.
The result is that all messages related to input are now translated with
Interface, which I think also makes sense.
Discussed as a followup to !116804.
-----
cc. @gtitaev
Pull Request: https://projects.blender.org/blender/blender/pulls/117234
This came up in #117747.
Unless an object was of OB_VOLUME type, the setting was not updating the
viewport accordingly since the introduction in 365bf103d1. So if for
example a mesh has a "Mesh to Volume" node, the update did not take
place.
If we use context, we can check the evaluated GeometrySet on any object
type with a geometry nodes modifier though and if it has a volume, we
can also tag for update.
Pull Request: https://projects.blender.org/blender/blender/pulls/117848
This header is for 'internal' USD code only (also needed by the hydra
code), and uses references to the USD library itself, so its previous
name was a bit too generic.
First step to move the main public Blender USD API header (`usd.h`) to cpp.
Adjust ymax of action in frame range so that height will match with the
channel's height. Use same ymax as in `acf_nlaaction_backdrop`.
Also fixed `ycenter` value.
Pull Request: https://projects.blender.org/blender/blender/pulls/113490
When moving keys in the Graph Editor animators
usually only want to move them on one axis.
While this is possible in a few ways (G+X, or G + Middle Mouse Button click),
we could default the behavior to always lock on an axis.
This was suggested by Dreamworks animators during the
Animation & Rigging module meeting.
https://devtalk.blender.org/t/2024-01-26-animation-rigging-module-meeting/33081#patch-review-decision-time-5
This PR adds an option with which the movement is
always locked to a single axis by default.
The option can be found in the Graph Editor under "View->Auto-Lock Axis".
The movement will then be restricted to the axis along
which you've moved the cursor the most.
You can still manually override the lock behavior by pressing `X` or `Y`.
I am piggybacking off the auto locking feature you get when pressing the middle mouse button.
When the new feature is enabled I call that at the start of the transformation.
Except when:
* only handles are selected
* the tweak mode has been started on a handle
This is to not snap handles, which is a behavior that has
been requested by the artists.
Pull Request: https://projects.blender.org/blender/blender/pulls/117669
Animators (especially for film and TV) often need
to track the movement of things in screenspace.
At the end of the day, the pixel motion is what counts.
But motion paths were always in world space,
which made it hard to use when the camera
is also animated (during action scenes e.g.)
This PR introduces the feature of projecting a motion path into the screen space of the active scene camera.
Limitations
This makes the motion path only useful when looking through the active scene camera.
Switching the scene camera using markers is not yet supported.
Technical Implementation
This is achieved by baking the motion path points into the
camera space on creation. For every point calculated,
the camera is evaluated through the depsgraph and
the resulting world matrix is used.
Then I pass in the current frame's world matrix of the
camera into the shader to make sure the points follow it.
As can be seen in the video, it looks quite odd when
viewed at another angle but this is expected.
I mentioned that in the tooltip, so it shouldn't be an issue
Pull Request: https://projects.blender.org/blender/blender/pulls/117593
The assert attempted to guard against file formats declaring themselves
as "requiring a float buffer" but outputing to a "byte buffer". However,
DPX seems to permit this and the code seems to support it correctly.
The assert was originally added in 2022 by 5baa3ecda6. Subsequently the
test which exposed the problem was added in 2023 by 7699c7407d. But the
issue at hand has existed since DPX was added; it's the only format with
this combination of capabilities.
Pull Request: https://projects.blender.org/blender/blender/pulls/117914
Currently, internal I/O operators can be invoked with drag-n-drop path
data, and when this happens a quick popup menu is shown to customize
import settings.
If these operators support operator presets, using a preset can
override path data given by drag-n-drop, and that can be unwanted
behavior.
While this can be fixed by setting path properties to SKIP_SAVE, doing
this would make these properties also to stop using ghost values. These
ghost values are used by the file select window to open operator last
import directory, and using this flag makes the file select windows
always open the home directory.
To fix that, add an explicit flag PROP_SKIP_PRESET that skips properties
writing to presets. Also clarify that PROP_HIDDEN and PROP_SKIP_SAVE
also avoid writing to presets.
Added a operator that can clean operator's specific property presets.
Importing presets from previous versions runs an automatic cleanup.
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/117673
In 4.1 we deprecate the `Rotate Euler` node in favor of the `Rotate Rotation`
node which uses the new rotation socket type. The node is not removed
(for now) because that would come with compatibility issues. More generally,
we'll likely run into the situation where nodes are deprecated more often in the
future, without actually removing them to keep compatibility. This patch improves
how such nodes are handled in the UI.
The patch does three things:
* Adds a new `Utilities > Deprecated` entry in the add node menu in geometry nodes.
* Moves search items which are deprecated to the bottom in the search results
(currently, this only works in English, can be fixed in bcon3).
* Adds a new `bNodeType->deprecation_notice` that will result in a deprecation
warning when the node is used.
Pull Request: https://projects.blender.org/blender/blender/pulls/117905
This makes the socket names in the sample nodes a bit more aligned.
Specifically, the following names are changed:
* Geometry Proximity: `Target > Geometry`, `Source Position > Sample Position`
* Sample UV Surface: `Source UV Map > UV Map`
Pull Request: https://projects.blender.org/blender/blender/pulls/117908
Since 1497005054, there is a new `ModifierData.persistent_uid` which
has more use cases than the old `session_uid`. This patch removes
`ModifierData.session_uid` and replaces its usages with the new `persistent_uid`.
Pull Request: https://projects.blender.org/blender/blender/pulls/117909
Adds a function that deduplicates operator paths properties reading.
-----
There are other places where this function can be useful, but I'm not sure whether to include `BLI_vector.hh` in RNA_access.hh
Pull Request: https://projects.blender.org/blender/blender/pulls/117644
This adds a new `ModifierData.persistent_uid` integer property with the following properties:
* It's unique within the object.
* Match between the original and evaluated object.
* Stable across Blender sessions.
* Stable across renames and reorderings of modifiers.
Potential use-cases:
* Everywhere where we currently use the name as identifier. For example,
`ModifierComputeContext` and `ModifierViewerPathElem`.
* Can be used as part of a key in `IDCacheKey` to support caches that stay
in-tact across undo steps.
* Can be stored in the `SpaceNode` to identify the modifier whose geometry node
tree is currently pinned (this could use the name currently, but that hasn't been
implemented yet).
This new identifier has some overlap with `ModifierData.session_uid`, but there
are some differences:
* `session_uid` is unique within the entire Blender session (except for duplicates
between the original and evaluated data blocks).
* `session_uid` is not stable across Blender sessions.
Especially due to the first difference, it's not immediately obvious that the new
`persistent_uid` can fulfill all use-cases of the existing `session_uid`. Nevertheless,
this seems likely and will be cleaned up separately.
Unfortunately, there is not a single place where modifiers are added to objects currently.
Therefore, there are quite a few places that need to ensure valid identifiers. I tried to catch
all the places, but it's hard to be sure. Therefore, I added an assert in `object_copy_data`
that checks if all identifiers are valid. This way, we should be notified relatively quickly if
issues are caused by invalid identifiers.
Pull Request: https://projects.blender.org/blender/blender/pulls/117347
Extract:
- Operators' poll messages, including Python-defined ones.
- Use default translation context for the region toggle pie menu.
- Newly created F-Curve modifiers.
- Newly created video tracker track.
- Grease Pencil UV area status message
- Status messages in the graph slider operators.
- Status message "Text <text.py>" when opening .blend with
auto-executing Python file.
Disambiguate:
- Track: can mean NLA track, video tracking, a tracking marker, or
a track constraint.
- Tracking: can mean video tracking, or a track constraint.
Issue reported by Gabriel Gazzán.
Pull Request: https://projects.blender.org/blender/blender/pulls/117855
All the option does internally is reverse the order of the rotations,
but this is the same as old "Rotate Euler" node, and it's a bit more
intuitive this way. Also use the same socket names, "Rotation" and
"Rotate By" which are much more intuitive.
Technically it would be better to not have to duplicate the multi-
function just to switch the order of the arguments. But the
evaluator assumes that the order always matches the socket
order currently.
Pull Request: https://projects.blender.org/blender/blender/pulls/117899
Continuation of bdfb1f6a04. Adds derived classes for the essentials and
preferences asset libraries, to allow specialized classes with a simple
and common interface. This should help untangling the asset library
service code.
In sculpt mode vertex and face normals are updated explicitly, but
corner normals, which are cached now, aren't updated for performance
reasons. This means that when the mesh is deformed, they need to be
cleared. See b339e3937d for some background on the complexity
of this area.
Copies vertex group names from the GPv2 object to the new GPv3 GreasePencil data block.
Copies only those names to the drawings that are actually used by any of the strokes.
Updates group indices in `MDeformVert` data to point to local Drawing groups.
Pull Request: https://projects.blender.org/blender/blender/pulls/117860
This patch adjusts the Bokeh Blur node such that it matches between CPU
and GPU. The GPU implementation is followed for the reasons stated
below.
The first difference is a bug in the CPU implementation, where the upper
limit of the blur window is not considered, but the lower limit is.
The second difference is due to an additional weight of 1.0 for blur
size less than 2, which was apparently in place to workaround the
aforementioned bug, since for zero sized blurs, the blur loop will not
run due to the missing upper limit.
The third difference is due to CPU ignoring outside pixels instead of
clamping them to border, which is done until an option is added to the
node to control the boundary condition.
An extra difference existed between Tiled and Full-frame, where the
canvas had different rounding methods, so that was unified.
Pull Request: https://projects.blender.org/blender/blender/pulls/117847
Update the look of image editor Vectorscope widget (design #116973):
- Colored and Luma options for the point cloud,
- The circles are no longer very low poly,
- Overall grid/background colors are tuned.
- Primary color locations have text labels.
Images in the PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/116974
This patch ports the newly redesigned GPU Inpaint node to the CPU. The
code is mostly identical to the GPU code with the necessary adjustments
to make it work with CPU.
See #114849 for more information.
Pull Request: https://projects.blender.org/blender/blender/pulls/117716
This PR adds the "Separate" operator from GPv2.
Changes:
In GPv2 there were three modes: Selected Point, Selected Strokes and Active Layer. For better consistency with meshes Separate Operator, there are now three modes:
- Selected (point or strokes is determined by mode selection)
- By Layers (not only the active one)
- By Materials (new)
Also Multiframe selection is now supported.
Pull Request: https://projects.blender.org/blender/blender/pulls/116715
The viewport compositor crashes when in camera view, passepartout is
opaque, and camera region is empty, that is, out of view. That's because
operations didn't handle zero sized compositing regions.
This patch fixes that by allocating invalid results for relevant
operations when the compositing region is invalid.
There is no reason to allow this currently, and the underlying code is
not designed to support it right now.
Kept liboverrides IDs names editable though through RNA API, think this can
be valuable for advanced processing or debugging.