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
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
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
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
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
* 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
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
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
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
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
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.
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
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>
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
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
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