Add helper functions for creating PyLong sup-types.
In Python 3.12 it's no longer practical to manipulate PyLongObject
values directly. Resolve by creating PyLongObject and copying the
values to a newly created sub-type.
This adds the processing required to import and export simple material graphs utilizing the UsdUVTexture outputs channels.
If only r, g or b are specified as output, we hook up a `Separate Color` node and connect the appropriate channel from there.
(if a is specified as output, the Alpha output of an image texture node was used already)
On the export side, we traverse from the socket to the image texture node, and if a `Separate Color` on the way, we are using the channel from there to put on the output.
https://openusd.org/release/spec_usdpreviewsurface.html#texture-reader
Pull Request: https://projects.blender.org/blender/blender/pulls/117901
The IME widget drawing code replaces the button's draw string, but it
did this with a C-style const cast which let this go unnoticed in
089c389b5c00ec279429 which changed the string from a C array to a
C++ std::string, where it's UB to just change the length this way.
To fix the crash, just store the string in a temporary array so we
can use the existing unchanged formatting code.
Pull Request: https://projects.blender.org/blender/blender/pulls/117968
Flex's bundled configure depended on aclocal-1.15 which has been
updated to 1.16.
Resolve by regenerating configure files on Linux which in turn adds a
new dependency on texinfo.
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
- Incorrect accurate prefiltering of albedo and normal (lower than expected quality)
- Changing the prefiltering mode has no immediate effect
- Default memory limit is too high (more than OIDN default)
- Memory limit is applied only to the main filter
- Quality setting applied only to the main filter
Pull Request: https://projects.blender.org/blender/blender/pulls/117930
Add shortcuts to the Outliner for consistency and convenience:
* Add Object (Shift+A)
* Duplicate (Shift+D)
* Duplicate Linked (Alt+D)
More info and images in the PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/117922
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 365bf103d1f6. 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
This is supported on Apple Silicon GPUs and macOS 13.0+.
Co-authored-by: Stefan Werner <stefan.werner@intel.com>
Co-authored-by: Attila Afra <attila.t.afra@intel.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/116124
This makes a change to the debug scripts to make it easier for both
users and those tending to the issue tracker by setting Blender's
temporary directory location to the debug logs location
The is necessary because while the debug output and the system
information file go to %temp%\blender\debug_logs, the crash text file
does not. We then have to spend additional time asking the user to go
fetch it from the other location. Now the crash file ends up in the same
place.
Pull Request: https://projects.blender.org/blender/blender/pulls/116882
OpenImageDenoise API exposes two modes, high quality and balanced.
This currently only has effect on Nvidia devices, on which it
provides a noticeable performance improvement without visible
difference in quality. This change sets quality to balanced for
the viewport, and high quality for final frame rendering, as
it's what makes the most sense.
Ref #115045
Co-authored-by: Werner, Stefan <stefan.werner@intel.com>
Pull Request: #115265
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 7699c7407d0. 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
HWRT checkboxes visibility in the Cycles settings wasn't uniform across devices.
With this change, we unify it and gray out these in case HWRT isn't available.
Pull Request: https://projects.blender.org/blender/blender/pulls/117904
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