Commit Graph

120055 Commits

Author SHA1 Message Date
Miguel Pozo
01fbca876d Revert "Disable EEVEE-Next"
This reverts commit a8f29e8e36.
2024-02-08 17:38:18 +01:00
Miguel Pozo
cf27e0f3e1 Merge branch 'blender-v4.1-release' 2024-02-08 17:38:09 +01:00
Miguel Pozo
a8f29e8e36 Disable EEVEE-Next 2024-02-08 17:37:53 +01:00
Pablo Vazquez
25b71bc9c1 Merge branch 'blender-v4.1-release' 2024-02-08 17:18:06 +01:00
Sybren A. Stüvel
756ae1eb3e Cleanup: run make format
No functional changes.
2024-02-08 17:16:56 +01:00
Jacques Lucke
2e4a3bae67 Geometry Nodes: use Still mode by default in Bake node
Currently, the geometry nodes modifier always creates a time dependency
if there is a bake animation node, even if there is no bake. Changing this is
not entirely trivial, because it is only known during evaluation if there is baked
data. Making `Still` the default works around that issue in many cases where
the Bake node is in a node group asset that does not depend on time.

Furthermore, it's nice to have the "cheaper" version of the node by default,
which is baking a single frame, instead of baking everything.

Pull Request: https://projects.blender.org/blender/blender/pulls/117999
2024-02-08 17:04:38 +01:00
Sergey Sharybin
4196cbd175 Merge branch 'blender-v4.1-release' 2024-02-08 17:03:19 +01:00
Sean Kim
fdf37275b6 Fix: Prevent erroneous values for detail_size and detail_percent
This PR applies the UI range for the Dyntopo `detail_size` and `detail_percent` to the actual property range. Previously, 0 and negative values were allowed if manually entered into the field, the former leading to blender hanging upon the next stroke, and the latter leading to potentially odd or unwanted behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/117976
2024-02-08 17:02:55 +01:00
Hans Goudey
a39e8a4ab9 Cleanup: Use StringRef instead of C strings in CustomData API
This simplifies some code. It may improve performance slightly too,
because of faster string comparisons with a known length.

Pull Request: https://projects.blender.org/blender/blender/pulls/117996
2024-02-08 16:56:42 +01:00
Miguel Pozo
74b8f99b43 Render: Merge EEVEE and Cycles motion blur settings
Merge duplicated motion blur settings between Cycles and EEVEE,
and move them to `RenderData`/`scene.render`:
* `scene.cycles.motion_blur_position` -> `scene.render.motion_blur_position`
* `scene.eevee.use_motion_blur` -> `scene.render.user_motion_blur`
* `scene.eevee.motion_blur_position` -> `scene.render.motion_blur_position`
* `scene.eevee.motion_blur_shutter` -> `scene.render.motion_blur_shutter`

On the C/C++ side, this also renames `RenderData::blurfac` to
`RenderData::motion_blur_shutter`.

Pull Request: https://projects.blender.org/blender/blender/pulls/117913
2024-02-08 16:49:18 +01:00
Lukas Tönne
1f35dc9d48 Grease Pencil: Fix zero default hardness created by the opacity modifier
Opacity modifier can also change hardness. It was creating the curve
"hardness" attribute but using the default zero value. Hardness should
be 1.0 by default.

Pull Request: https://projects.blender.org/blender/blender/pulls/118000
2024-02-08 16:45:38 +01:00
Jacques Lucke
7b44c2ffb3 Merge branch 'blender-v4.1-release' 2024-02-08 16:20:58 +01:00
Jacques Lucke
faaa8d4c79 Fix: crash when separating grease pencil in geometry nodes 2024-02-08 16:03:05 +01:00
Lukas Tönne
2c8de207b7 GPv3: Dash modifier
Reimplements the "Dash" (aka Dash-Dot) modifier of GPv2.

Pull Request: https://projects.blender.org/blender/blender/pulls/117758
2024-02-08 15:35:20 +01:00
Brecht Van Lommel
f312c07a1d Merge branch 'blender-v4.1-release' into main 2024-02-08 15:09:03 +01:00
Brecht Van Lommel
2b0caf00a8 Refactor: RNA property undo push only when there is an owner ID
RNA pointers should always have valid owner IDs. And most structs
using STRUCT_UNDO do not need it because the owner is a UI datablock
which already determines if undo is needed.

With this change, it is possible to have structs used both in UI and scene
datablocks and have undo work depending on the owner. This is needed for
collections storing operator properties for export (#116646).

Pull Request: https://projects.blender.org/blender/blender/pulls/117640
2024-02-08 15:08:09 +01:00
Sean Kim
4df5bcfea9 Sculpt: Disable sculpt brushes on invisible objects
* Brushes no longer affect invisible objects or objects that are entirely
  contained by hidden collections
* The brush cursor no longer highlights vertices of invisible objects and
  the cursor circle remains view-aligned.

Resolves part of #112371

Pull Request: https://projects.blender.org/blender/blender/pulls/117746
2024-02-08 15:06:17 +01:00
Philipp Oeser
137802e6bd Merge branch 'blender-v4.1-release' 2024-02-08 14:49:57 +01:00
Philipp Oeser
cdf5265f69 Fix #117971: wrong indices in sculpt undo/restore colors
Caused by 3e81f66998

Looks like we need to store the unique verts indices here, this goes in
line to what similar code in this area does (but havent checked the data
layout of an Undo node here in depth).

Pull Request: https://projects.blender.org/blender/blender/pulls/117986
2024-02-08 14:49:25 +01:00
Philipp Oeser
98bf7a8d7a Fix #116188: hair puff works incorrect with symmetry
Originally caused by 1b19f62917 .

Solution is the same as ff7b8f3412
Only this time it does the same thing `Sphere` falloff (whereas
ff7b8f3412 fixed it for `Projected` falloff)

Pull Request: https://projects.blender.org/blender/blender/pulls/117987
2024-02-08 14:48:45 +01:00
Julian Eisel
a46d968a8c Merge branch 'blender-v4.1-release' 2024-02-08 14:38:46 +01:00
Sergey Sharybin
8303bb167b Add runtime field on the Scene
For C it is an opaque pointer, for the C++ it is a class which is
defined in BKE_scene_runtime.hh.

The runtime field ensured to exist after file load, and after new
scene is added. The field is not copied when scene is copied, and
instead the copy of the scene has its own runtime field. If any of
the fields in the runtime are desired to be copied it needs to be
done explicitly.

Currently unused, but is planned to be utilized for the upcoming
compositor timing functionality,

Pull Request: https://projects.blender.org/blender/blender/pulls/117978
2024-02-08 14:30:14 +01:00
Julian Eisel
83dbbf9aec Fix #117572: Top vertical scrollbar tool not working properly
Remove ugly/fragile special case in `view2d_masks()` that would clamp
the scrollbar-masks by the scrubbing UI. It's now possible to pass
custom scrollbar-masks to `View2D` via `UI_view2d_scrollers_draw()`. So
use this instead, making region code control its own masks, rather than
relying on special case handling in generic `View2D` code.

Also update comment in `scroller_activate_init()` to make the implicit
relationship explicit.

Alternative to, and based on the investigation in !117685.

Pull Request: https://projects.blender.org/blender/blender/pulls/117984
2024-02-08 14:25:47 +01:00
Lukas Tönne
da2d3be202 GPv3: Lattice modifier
Ported lattice modifier from GPv2.

The `LatticeDeformData` is no longer stored in the modifier data, but calculated on-the-fly like in the mesh deform modifier. This is quite trivial data and only stores deformed positions of the lattice, so not really worth the effort and complexity of caching it.

Pull Request: https://projects.blender.org/blender/blender/pulls/117955
2024-02-08 14:09:11 +01:00
Campbell Barton
9c0bb3d8f9 Merge branch 'blender-v4.1-release' 2024-02-08 23:47:36 +11:00
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
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
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
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
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
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
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