Commit Graph

132649 Commits

Author SHA1 Message Date
Lukas Tönne
dfec8171cc Modifiers: Increase the length of name strings in ModifierTypeInfo
These name fields run out of space for some of the new Grease Pencil
modifiers, like "GreasePencilEnvelopeModifierData". Only one of these
strings is stored for each modifier type, so this should have almost no
impact on size.

Pull Request: https://projects.blender.org/blender/blender/pulls/117980
2024-02-08 12:34:27 +01:00
Julian Eisel
fa8c7e1dfe Merge branch 'blender-v4.1-release' 2024-02-08 12:07:53 +01: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
Lukas Tönne
92cadc24b1 Cleanup: Use generic RNA_MOD_OBJECT_SET for GP3 modifier RNA setters. 2024-02-08 11:55:43 +01:00
Lukas Tönne
73d4b148a3 Cleanup: fix formatting. 2024-02-08 11:40:56 +01:00
Clément Foucault
763b3b3b12 EEVEE-Next: Change light_attenuation_facing
Take light shape into consideration and do a small
fade to avoid abrupt lighting changes.
This fixes quite a lot of light leak but doesn't
fix all of them since light can still leak
during the fade. We could do this fade on the
lit side but then it break the working cases.
This does however fix the appearant sharp shadowing
that was visible on big light source.

Co-authored-by: Weizhen Huang <weizhen@blender.org>
2024-02-08 11:36:22 +01:00
Philipp Oeser
cb514b9e9d Merge branch 'blender-v4.1-release' 2024-02-08 10:02:15 +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
000bed915d Cleanup: replace magic numbers with event value, improve function name
Use a more concise name for event type conversion.
2024-02-08 16:57:36 +11:00
Campbell Barton
b28e6751f9 Merge branch 'blender-v4.1-release' 2024-02-08 16:27:51 +11:00
Campbell Barton
debf0b52c2 Merge branch 'blender-v4.1-release' 2024-02-08 16:27:45 +11: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
089c389b5c 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
aead8a0428 Merge branch 'blender-v4.1-release' 2024-02-08 15:08:27 +11: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
Campbell Barton
510a7ff452 Merge branch 'blender-v4.1-release' 2024-02-08 12:42:23 +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
Campbell Barton
412b279629 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 10:12:22 +11:00
Julian Eisel
8f553391e5 Fix division by 0 in tree view drawing
Would happen when there is no View2D data, like in popups.
2024-02-08 00:03:34 +01:00
Campbell Barton
67c12236e6 GHOST/WIN32: remove start time offset from getMilliSeconds
This isn't necessary and has been removed from macOS & X11,
Wayland never did this.

Besides removing the offset GetTickCount() has been replaced by
GetTickCount64 to prevent 32bit rollover when high resolution timers
aren't supported.

Ref !117618
2024-02-08 08:53:34 +11:00
Harley Acheson
b503a37808 Merge branch 'blender-v4.1-release' 2024-02-07 12:20:48 -08: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
Nikita Sirgienko
661e0e5fdc Merge branch 'blender-v4.1-release' 2024-02-07 20:12:34 +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
680b9a9c35 Merge branch 'blender-v4.1-release' into main 2024-02-07 19:32:39 +01:00
Hans Goudey
2a2eeb8195 Fix: Operator popup crash with default arguments
Caused by a227f08343.
Thanks to Guillermo Venegas for reporting.
2024-02-07 13:12:52 -05: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
Bastien Montagne
43726134c3 BKE_idtype: Add access to IDTypeInfo from idtype index. 2024-02-07 19:07:06 +01:00
Bastien Montagne
55cb73a938 Cleanup: Minor improvement to comment in DNA_ID.h 2024-02-07 19:07:06 +01:00
Nikita Sirgienko
18218a5e1d Merge branch 'blender-v4.1-release' 2024-02-07 17:58:36 +01:00
Attila Afra
8e80b44796 Cycles: Fix initial OIDN GPU denoiser quality 2024-02-07 17:54:50 +01:00
Hans Goudey
b19bd19660 Cleanup: Make format 2024-02-07 11:45:59 -05:00
Falk David
bd22059752 GPv3: Add initial weight paint mode support
This makes it possible to enter and exit weight paint mode in Grease Pencil 3.
No other functionality is added for now.

Pull Request: https://projects.blender.org/blender/blender/pulls/117945
2024-02-07 17:19:43 +01:00
Hans Goudey
b88e40d1df Fix: Stack use after return in RNA preprocessing after recent commit
Issue with dddc69d0be
2024-02-07 11:08:17 -05:00
Hans Goudey
10a258b564 Cleanup: Remove unnecessary .c_str() calls 2024-02-07 10:53:28 -05:00
Hans Goudey
a227f08343 Cleanup: Use std::string for operator props popup arguments
The title and confirmation text are stored in a string anyway,
we might as well use that type for the arguments.
2024-02-07 10:28:45 -05:00
Falk David
0a45acbe3b GPv3: Layer Parenting/Transforms
This implements layer parenting and layer transforms.

* Adds a new "Transform" panel in the object-data properties with the (local) translation, rotation and scale.
* Adds a new "Relations" panel with the parent property (and also bone name in case the parent is an armature).
* When converting from GPv2 to GPv3, the parent and transforms are converted too.
* Bone names are updated if they are renamed in the armature.

Implementation details:
* The positions in the drawings are always in layer space. During extraction, we transform the positions to object space. Note that this could be optimized further and done in the render engine itself.
* This means that e.g. the selection code (which needs to know where the positions are on screen) now takes this transform into account.
* The layer transform is calculated when accessed (from the location, rotation, scale properties).
* Code that needs to know where the positions are on screen now takes this new transform into account.

Pull Request: https://projects.blender.org/blender/blender/pulls/117247
2024-02-07 16:28:14 +01:00
Hans Goudey
1f55365ed1 Merge branch 'blender-v4.1-release' 2024-02-07 10:22:38 -05: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
Hans Goudey
631a44afc3 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:19:59 -05:00
Hans Goudey
6702f74d0b Curves: Improve copy and move assignment
Previously the default constructor ran, then the copy or move
assignment. This resulted in extra creations of runtime data,
including allocations of all the shared caches, only for them
to be immediately replaced by the new ones. Move assignment also
didn't clear the source curves completely, which could result in
higher memory usage or worse, extra users for attribute arrays,
which could lead to unnecessary copying.

In a very simple test repeatedly copying a tiny Curves data-block,
I observed a 30% performance improvement.

This also fixes a memory leak of the offsets in the copy assignment.

Pull Request: https://projects.blender.org/blender/blender/pulls/117932
2024-02-07 15:40:29 +01:00
Falk David
84b9fe3dbe Cleanup: Curves Selection: Rename coords argument to lasso_coords 2024-02-07 15:12:17 +01:00
Hans Goudey
fbf47b9a12 Refactor: Use std::string for keymap string return values
The main simplification is using return values rather than return
arguments, and the additional semantic clarity from std::optional.
Also use `fmt` for formatting and use lambdas instead of macros
as helpers in a few modal keymap formatting functions.

Similar commits:
- a1792e98a4
- f04bc75f8c
- 6abf43cef5
- 7ca4dcac5a

Pull Request: https://projects.blender.org/blender/blender/pulls/117785
2024-02-07 14:22:54 +01: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
e690210e4f Merge branch 'blender-v4.1-release' 2024-02-07 08:19:18 -05: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
Falk David
b3418f688c Refactor: Use new math API for ED_view3d_ob_project_mat_get_from_obmat
No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/117938
2024-02-07 14:04:26 +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