132613 Commits

Author SHA1 Message Date
Campbell Barton
252ae7029d Fix building FreeStyle with Python 3.12
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.
2024-02-08 23:45:21 +11:00
Julian Eisel
8887955def Fix division by 0 in tree view drawing
Would happen when there is no View2D data, like in popups.
2024-02-08 12:07:28 +01:00
Philipp Oeser
228ee8f1c3 Fix #96458: Add channel processing for UsdUVTexture
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
2024-02-08 10:01:41 +01:00
Campbell Barton
f9e976c899 Fix error suppressing double-click events for modal keymap handling 2024-02-08 16:25:01 +11:00
Hans Goudey
cf5304855f Fix #117632: IME input crash after refactor to use std::string
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
2024-02-08 05:52:19 +01:00
Campbell Barton
899f5e2c94 Fix incorrect use of EVENT_* types as a flag
Also use ISKEYMODIFIER macro.
2024-02-08 15:07:40 +11:00
Campbell Barton
34f64eb35b Build: add additional packages for Linux (cuda-toolkip & autogen) 2024-02-08 15:03:46 +11:00
Koranir
bba1893f67 Fix crash with fractional scaling on Wayland with NVIDIA graphics
Ref: !117531
2024-02-08 12:34:35 +11:00
Campbell Barton
4a50f1d4ee Build: unbreak building flex on Rock8 Linux from aclocal-1.16
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.
2024-02-08 11:10:07 +11:00
Harley Acheson
b6091f134c Fix #117956: Revert Last Chance Placeholder Default
As #117956 shows, guessing default placeholder text based on the
property UI name can have bad consequence. Best to leave this out and
just set custom placeholder when needed.

Pull Request: https://projects.blender.org/blender/blender/pulls/117962
2024-02-07 21:19:28 +01:00
Attila Afra
e7dcad8599 Fix: Release all OIDN GPU resources when recreating denoiser 2024-02-07 19:44:40 +01:00
Brecht Van Lommel
bd8a44e169 Lights: Option to use old point light falloff
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
2024-02-07 19:07:11 +01:00
Attila Afra
8e80b44796 Cycles: Fix initial OIDN GPU denoiser quality 2024-02-07 17:54:50 +01:00
Hans Goudey
5efb35100d Fix #117929: Extract face set operator crash
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.
2024-02-07 10:21:02 -05:00
Jacques Lucke
fc8333089c Fix: duplicate modifier uids with overrides
Keep the `persistent_uid` that is already known to be unique on `ob_dst`
instead of copying the one from `md_src` which may not be unique in
`ob_dst`.

Pull Request: https://projects.blender.org/blender/blender/pulls/117942
2024-02-07 14:21:38 +01:00
Hans Goudey
78963b466b Mesh: Add "Set Sharpness by Angle" operator
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
2024-02-07 14:17:16 +01:00
Attila Áfra
c1f55288e9 Fix: Cycles OIDN GPU denoiser bugs
- 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
2024-02-07 13:34:35 +01:00
Thomas Dinges
4db1426818 Release cycle: 4.1, Bcon3 2024-02-07 12:49:52 +01:00
Pablo Vazquez
537d175289 Outliner: Add shortcut to Add Object and Duplicate
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
2024-02-07 12:00:09 +01:00
Sergey Sharybin
45a73827b0 Fix missing dependency in CMake file
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
2024-02-07 11:39:45 +01:00
Damien Picard
019eb5a35e I18n: use IFACE_ to translate status bar info & viewport statistics
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
2024-02-07 11:17:50 +01:00
Thomas Dinges
2c784664e2 Docs: Update rna manual references 2024-02-07 11:09:49 +01:00
Philipp Oeser
b56192b3bb Fix: Simplify "Volume Resolution" not updating for non volume objects
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
2024-02-07 10:32:06 +01:00
Pratik Borhade
7b405646fc Fix #117915: GP: Assign material button is missing
Accidently changed in c412aa1a1788e72e24ab53004472574d14f491a3

Pull Request: https://projects.blender.org/blender/blender/pulls/117934
2024-02-07 10:01:03 +01:00
Nikita Sirgienko
06dc5363a9 Cycles: Denoise on CPU by default for offline render 2024-02-07 09:43:28 +01:00
Bastien Montagne
7ca62fa54e Refactor: Turn main USD public header into full Cpp one.
Rename `usd.h` to `usd.hh`, and put its declarations in the
`blender::io::usd` namespace.

Pull Request: https://projects.blender.org/blender/blender/pulls/117897
2024-02-07 09:42:23 +01:00
Bastien Montagne
9363293472 Refactor: USD: Rename usd.hh to usd_private.hh
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.
2024-02-07 09:42:20 +01:00
Pratik Borhade
af27c1feed Fix #113365: Backdrop lines don't match height in nla
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
2024-02-07 08:12:13 +01:00
Hans Goudey
c743213c3b Cleanup: Add missing forward declaration 2024-02-06 21:32:26 -05:00
Ray Molenkamp
ea7c0a4a46 deps_builder: Fix broken hash for sqlite
hash update was missed in ec4b074506fa68754d3353769fc3eb5e6cc027e5
2024-02-06 17:25:18 -07:00
Guillermo Venegas
c00c3c9eac UI: Import dialog popup feedback
For import operators dialog popups shows the name
of the file that is being imported as title, in case of
multiple file import shows the count.

Pull Request: https://projects.blender.org/blender/blender/pulls/117917
2024-02-07 01:00:15 +01:00
Nikita Sirgienko
057b80dc9e Cycles: Log devices that are supported by OIDN 2024-02-06 23:40:57 +01:00
Nikita Sirgienko
b2678156fa Cycles: Unify logging for devices discovery 2024-02-06 23:40:57 +01:00
Christoph Lendenfeld
446b92d2ce Anim: Graph Editor - automatically lock key translation to a single axis
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
2024-02-06 23:31:09 +01:00
Christoph Lendenfeld
79f84775f2 Anim: Motion Paths in camera space
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
2024-02-06 23:14:17 +01:00
Ray Molenkamp
28208cfddb deps_builder: update ffmpeg diff
did not apply anymore
2024-02-06 14:17:42 -07:00
Ray Molenkamp
dfb3482946 deps_builder/win: update perl to 5.38.0.1
5.22.1.3 was incompatible with the latest openssl update.
2024-02-06 14:16:55 -07:00
Ray Molenkamp
0d8710aa2e deps_builder: Update oidn diff
did not apply any more on windows
2024-02-06 14:14:03 -07:00
Ray Molenkamp
95a863a7e7 CMake/MSVC: deploy cuda support for oidn if available 2024-02-06 13:51:58 -07:00
Stefan Werner
31d55e87f9 Cycles: Metal support for OpenImageDenoise
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
2024-02-06 21:13:23 +01:00
Jesse Yurkovich
691584da1b Windows: Enhance our debug batch files
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
2024-02-06 21:12:15 +01:00
Nikita Sirgienko
280b5c89ae Cycles: Set quality parameter for OIDN
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
2024-02-06 20:58:17 +01:00
Brecht Van Lommel
e38f360ddb Cleanup: Unused enum value that should not have been in recent commit
Ref #117673
2024-02-06 20:51:06 +01:00
Jesse Yurkovich
434bb0c93f Fix #108754: remove overactive color management assert
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
2024-02-06 20:50:44 +01:00
Nikita Sirgienko
c174fd4e06 Cycles: Fix Python error in has_oidn_gpu_devices
Was introduced during refactoring in bc886857f34878f2fd79031619a5ff8d10013347
2024-02-06 20:26:05 +01:00
Nikita Sirgienko
0100547515 Cycles: Gray out hardware raytracing checkboxes when not available
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
2024-02-06 20:06:13 +01:00
Guillermo Venegas
0d7282e69b Fix: Presets overriding drag-n-drop data
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
2024-02-06 20:02:27 +01:00
Hans Goudey
42561c2a1c Fix #117903: Copy as driver crash
The copy as driver function assumed that the path was allocated.
Generally we should avoid using `MEM_dupallocN` for reasons
like this.
2024-02-06 13:11:16 -05:00
Jacques Lucke
e1ee422d12 Nodes: improve handling of deprecated nodes
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
2024-02-06 19:08:01 +01:00
Hans Goudey
d9266853c2 Cleanup: Make format 2024-02-06 12:42:26 -05:00