Commit Graph

106508 Commits

Author SHA1 Message Date
Jacques Lucke
49f4b643b9 LibOverride: avoid unnecessary GHash lookup
In my test file with many bones (very few of which have an override) this leads
to a 5-10% speedup when saving the file.

Pull Request: https://projects.blender.org/blender/blender/pulls/117803
2024-02-06 13:53:03 +01:00
Jacques Lucke
74971e06f0 Fix #117887: fix asan alloc-dealloc-mismatch
Pull Request: https://projects.blender.org/blender/blender/pulls/117891
2024-02-06 13:49:36 +01:00
Aras Pranckevicius
9958cbf614 Fix: UI: fix off by one error in new image vectorscope code
New code in 567455124d was reading one vertex too many while
drawing the colored vectorscope background
2024-02-06 13:55:11 +02:00
Lukas Tönne
ee9a0f6014 GPv3: Handle vertex groups in the GPv2 conversion operator
Copies vertex group names from the GPv2 object to the new GPv3 GreasePencil data block.
Copies only those names to the drawings that are actually used by any of the strokes.
Updates group indices in `MDeformVert` data to point to local Drawing groups.

Pull Request: https://projects.blender.org/blender/blender/pulls/117860
2024-02-06 12:36:17 +01:00
Campbell Barton
70fa30007f Extensions: tweak wording for updating operators 2024-02-06 22:28:10 +11:00
Campbell Barton
9996d95ab9 Cleanup: spelling in comments 2024-02-06 22:28:10 +11:00
Campbell Barton
6154e511ab Cleanup: quiet missing-declarations & unused variable warnings 2024-02-06 22:28:10 +11:00
Omar Emara
a433adda8e Compositor: Unify Bokeh Blur between CPU and GPU
This patch adjusts the Bokeh Blur node such that it matches between CPU
and GPU. The GPU implementation is followed for the reasons stated
below.

The first difference is a bug in the CPU implementation, where the upper
limit of the blur window is not considered, but the lower limit is.

The second difference is due to an additional weight of 1.0 for blur
size less than 2, which was apparently in place to workaround the
aforementioned bug, since for zero sized blurs, the blur loop will not
run due to the missing upper limit.

The third difference is due to CPU ignoring outside pixels instead of
clamping them to border, which is done until an option is added to the
node to control the boundary condition.

An extra difference existed between Tiled and Full-frame, where the
canvas had different rounding methods, so that was unified.

Pull Request: https://projects.blender.org/blender/blender/pulls/117847
2024-02-06 12:25:34 +01:00
JonasDichelle
567455124d UI: Image Editor Vectorscope Improvement
Update the look of image editor Vectorscope widget (design #116973):
- Colored and Luma options for the point cloud,
- The circles are no longer very low poly,
- Overall grid/background colors are tuned.
- Primary color locations have text labels.

Images in the PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/116974
2024-02-06 12:22:48 +01:00
Omar Emara
291735971c Compositor: Port GPU Inpaint node to CPU
This patch ports the newly redesigned GPU Inpaint node to the CPU. The
code is mostly identical to the GPU code with the necessary adjustments
to make it work with CPU.

See #114849 for more information.

Pull Request: https://projects.blender.org/blender/blender/pulls/117716
2024-02-06 12:18:50 +01:00
Matias Mendiola
d589251905 GPv3: Separate operator
This PR adds the "Separate" operator from GPv2.

Changes:
In GPv2 there were three modes: Selected Point, Selected Strokes and Active Layer. For better consistency with meshes Separate Operator, there are now three modes:

- Selected (point or strokes is determined by mode selection)
- By Layers (not only the active one)
- By Materials (new)

Also Multiframe selection is now supported.

Pull Request: https://projects.blender.org/blender/blender/pulls/116715
2024-02-06 12:06:48 +01:00
Omar Emara
0bd831b087 Fix #117859: Viewport compositor crash for empty camera region
The viewport compositor crashes when in camera view, passepartout is
opaque, and camera region is empty, that is, out of view. That's because
operations didn't handle zero sized compositing regions.

This patch fixes that by allocating invalid results for relevant
operations when the compositing region is invalid.
2024-02-06 13:01:59 +02:00
Bastien Montagne
dbfd54d7c8 Fix (studio-reported) RNA allowing to rename linked IDs.
There is no reason to allow this currently, and the underlying code is
not designed to support it right now.

Kept liboverrides IDs names editable though through RNA API, think this can
be valuable for advanced processing or debugging.
2024-02-06 12:00:34 +01:00
Bastien Montagne
9a1651533d Cleanup: Make io/usd/hydra and render/hydra headers fully Cpp ones.
This code was actually already full Cpp, so it's essentially a massive
filenames cleanup.
2024-02-06 12:00:34 +01:00
Bastien Montagne
21e2dfc6b4 Cleanup: Make io/usd/intern headers fully Cpp ones.
This code was actually already full Cpp, so it's essentially a massive
filenames cleanup.
2024-02-06 12:00:34 +01:00
Clément Foucault
c2ef2daa2c Fix: DRW: Out of bound index in PassSortable
This was caused by hair subpass growing the subpass
vector but not adding anything to the sorting_values_
vector. This means the indices that was return by
`sub_passes_.append_and_get_index` were dereferencing
the `sorting_values_` vector out of bounds on this line:
`float a_val = sorting_values_[a.index];`
2024-02-06 11:15:23 +01:00
Pratik Borhade
289d7fa7d2 Fix #117851: Crash switching to Camera with Background image
Caused by abf4c4d9ef
Wrong memory address passed to `BKE_image_release_ibuf`

Pull Request: https://projects.blender.org/blender/blender/pulls/117884
2024-02-06 10:15:00 +01:00
Sergey Sharybin
7abc1bc7d4 Fix #117760: Regression: Ctrl+Z causes Losing Audio Sound
Cused by 29aaa2922d

This change is more of a work-around, since there should be no such
tagging required. This change brings the behavior closer to what it
was before the offending commit, and solve an immediate user-level
regression.

Pull Request: https://projects.blender.org/blender/blender/pulls/117834
2024-02-06 09:06:46 +01:00
Campbell Barton
f282c6a3ad Extensions: add handlers for synchronizing & downloading updates
The actual implementation is currently in the add-on.
2024-02-06 18:51:01 +11:00
Campbell Barton
7161af74be Extensions: de-duplicate and improve doc-strings 2024-02-06 16:26:36 +11:00
Campbell Barton
2ccada61cb Cleanup: improve naming consistency, use doxy sections for splash screen 2024-02-06 14:44:03 +11:00
Campbell Barton
2bbb460c10 UI: expose the custom directory as a path property
Support changing the directory from the new repository dialog since it
no longer crashes.
2024-02-06 14:43:31 +11:00
Campbell Barton
f1a440abb6 Fix crash browsing file/directory properties within popups
Caused by [0] which closed all popups when adding a file selector event.

This was done so pressing "Open..." from the splash closes the splash
however it caused BUTTONS_OT_file_browse & BUTTONS_OT_directory_browse
to crash when changing the path of an RNA property within a popup.

Move the logic to close popups into the splash screen itself.
Since some actions such as opening a URL's should keep the splash open,
resolve by closing the splash when a file selector is opened.

[0]: b49abbec5f
2024-02-06 14:34:41 +11:00
Campbell Barton
c527056f0c Fix #117783: Allow Multiple Negatives in Numerical Inputs with Units
Support multiple unary operators before a number where only a single
negative value worked in the past.

Ref !117827.
2024-02-06 09:28:30 +11:00
Hans Goudey
72d324bd81 Fix #117865: "Create Face Sets" operator crashes for multires
The same implementation is used for meshes and multires grids,
since face sets are always stored per base mesh fast. We just need
to account for that in one place to avoid the crash.
2024-02-05 15:29:42 -05:00
Jesse Yurkovich
4797773604 Fix #117816: Import USD DistantLight as Blender Sun light
The UsdLuxDistantLight schema was being checked under the wrong
conditional.

Pull Request: https://projects.blender.org/blender/blender/pulls/117820
2024-02-05 21:03:18 +01:00
Hans Goudey
df8c85d3f9 Cleanup: UI Remove more unnecessary a1 and a2 parameters
Similar to 5155feeeb8. These had values without any meeting,
almost completely just 0 or -1 (which meant "find good values if possible"
anyway).
2024-02-05 14:38:11 -05:00
Alexander Gavrilov
3cf1c795ff Fix assertion when creating an override of a enum custom property.
Introduced in 92cf9dd2f2
2024-02-05 21:11:38 +02:00
Aras Pranckevicius
e1f8775807 VSE: default to new "Auto" image filter for strips
Part of "improve filtering situation" (#116980), now strip scaling filter defaults to "Auto" which has logic like:

- No scale, no rotation, integer positions: Nearest (fastest)
- Scaling up by more than 2x: Cubic Mitchell, so you get nicer blending between pixels than with bilinear,
- Scaling down by more than 2x: Box, so that many pixels are averaged properly without too much aliasing,
- Otherwise: Bilinear

Existing strips that use Bilinear (which is default) get switched to Auto when loading older files.

All of this has an advantage that unless you have some special needs for your look, you can leave it at default and it will look decently good at either large up-scaling or large down-scaling, but not waste performance if you don't use any scaling at all. Previously none of the choices were good in "all cases": box (née subsampled3x3) only looks good when scaling down, cubic only looks good when scaling up, default bilinear leaves performance on the table when you don't use any scale/rotation, etc.

On something like Gold movie current edit, most of the strips effectively use Nearest now, except some that are translated into non-integer pixel positions; those stay effectively Bilinear.

Pull Request: https://projects.blender.org/blender/blender/pulls/117853
2024-02-05 20:09:29 +01:00
Hans Goudey
e6188d0976 Camera: Make alpha a factor property
Removes the need to manually specify the slider state when defining the UI.
2024-02-05 12:26:00 -05:00
Hans Goudey
cfc68a1247 Fix #117813: Precision ignored for some slider buttons 2024-02-05 12:26:00 -05:00
Hans Goudey
945dc7c863 Cleanup: Use references and const in interface_layout.cc 2024-02-05 12:26:00 -05:00
Julian Eisel
bdfb1f6a04 Assets: Use inheritance for asset library class
Initial changes to make the asset library class polymorphic, plus using
that to cleanup some basic loading logic. I'm confident that this will
help us improve the asset library management code quite a bit, currently
it's quite confusing. Plus it will be extendable this way in future, so
new kinds of asset libraries (e.g. Blender project asset libraries or
arbitrary online asset libraries) can be added much easier.
2024-02-05 18:25:18 +01:00
Clément Foucault
b351638008 Fix: EEVEE-Next: Broken Normal and AO pass for emissive materials
The deferred combine pass was not rendered for these pixels
since they would not output any BSDF.

The check in pipeline sync have to be removed in order to
support emission only passes.
2024-02-05 18:15:09 +01:00
Hans Goudey
f63a776a40 Cleanup: Use this keyword to access class methods in UI views 2024-02-05 11:42:16 -05:00
Jacques Lucke
db4fd7060f BLI: support content based slicing in IndexMask
This allows slicing an `IndexMask` so that it only contains certain indices.

Pull Request: https://projects.blender.org/blender/blender/pulls/117857
2024-02-05 17:19:27 +01:00
Damien Picard
fa77e9142d UI: fix and improve a few messages
- "can not" -> "cannot" in many places (ambiguous, also see
  Writing Style guide).
- "Bezier" -> "Bézier": proper spelling of the eponym.
- Tool keymaps: make "Uv" all caps.
- "FFMPEG" -> "FFmpeg" (official spelling)
- Use MULTIPLICATION SIGN U+00D7 instead of MULTIPLICATION X U+2715.
- "LClick" -> "LMB", "RClick" -> "RMB": this convention is used
  everywhere else.
- "Save rendered the image..." -> "Save the rendered image...": typo.
- "Preserve Current retiming": title case for property.
- Bend status message: punctuation.
- "... class used to define the panel" -> "header": copy-paste error.
- "... class used to define the menu" -> "asset": copy-paste error.
- "Lights user to display objects..." -> "Lights used...": typo.
- "-setaudio require one argument" -> "requires": typo.

Some issues reported by Joan Pujolar and Tamar Mebonia.

Pull Request: https://projects.blender.org/blender/blender/pulls/117856
2024-02-05 17:08:17 +01:00
Sergey Sharybin
4f0ec384ce Fix incorrect update tag handling in inactive depsgraphs
The dependency graph builder takes the original data-block's recalc
flags to tag IDs after the dependency graph has been built, while
the evaluation of the graph only re-sets tho recalc flag to 0 only
for active dependency graph. This could have caused an inconsistency
of the handled tags: for example, if a headless render modifies some
object's properties and then renders the scene multiple times without
re-creating dependency graph (using Eevee or having Persistent Data,
and rendering multiple view layers, for example).

This change makes it so the recalc flags from the original ID are
only considered by active dependency graph, of when an ID is first
evaluated within a non-active dependency graph. This is a bit of a
conservative change to avoid possible breakage. In theory it should
be possible to never consider original recalc flags for render, and,
eventually, also ignore it for the active graphs. This needs to be
with more care and, so follow safer approach for now.

In practice this change fixes an issue with missing particle hair
when rendering second view layer of rlayer_flags_01.blend with Eevee.

Pull Request: https://projects.blender.org/blender/blender/pulls/117854
2024-02-05 16:59:14 +01:00
Julian Eisel
212d736842 Fix assert when setting default collapsed state of items
Would assert that the reconstruction phase is not completed. In this
case collapsing is modified as part of the construction, so the assert
is wrong. Access the collapsed state directly without using the getter
that does the assert check.
2024-02-05 16:51:32 +01:00
Hans Goudey
cfb4e5a25d Cleanup: Store asset shelf types in vector of unique_ptr
This avoids the need for manual memory management/raw pointers,
improves const correctness, improves type safety, simplifies iteration,
and simplifies the process of registering a new asset shelf type.

Pull Request: https://projects.blender.org/blender/blender/pulls/117770
2024-02-05 16:23:57 +01:00
Jacques Lucke
bb915ae9bd BLI: improve finding elements in IndexMask
Previously, it was only possible to `find` a specific index in an `IndexMask`.
Now it's also possible to find the closest larger/smaller index if an exact
match doesn't exist. This could be used for slicing the mask so that it only
contains certain indices.

Pull Request: https://projects.blender.org/blender/blender/pulls/117852
2024-02-05 16:07:53 +01:00
Nika Kutsniashvili
ff3f396103 UI: Add missing data-block icons in Outliner
Add data-block icons to Outliner's "Blend File" mode for:

* Color Palette
* Particles System
*  Vector Font

Pull Request: https://projects.blender.org/blender/blender/pulls/117850
2024-02-05 15:26:11 +01:00
Lukas Tönne
76e877eaf9 Curves: fix incorrect brackets in assert.
The conditional should be a single expression.
2024-02-05 15:20:34 +01:00
Falk David
b37ee403b2 GPv3: Move to layer: Add popup for entering new layer name
In the `move_to_layer` operator, add a popup when moving to a new layer
to enter the new layers name.

This is consistent with GPv2.
2024-02-05 14:52:54 +01:00
Lukas Tönne
d7127dea02 Fix crashes when connecting cyclic grease pencil curves
Curves draw buffer updates and operations like resampling access the
evaluated lengths cache of curves. However, when the curve has only one
point the evaluated lengths will be empty. This is not a problem for
open curves, because they skip calculation of the last point, but cyclic
curves expect to have as many length entries as there are points.

This crashes in certain cases:
- Grease Pencil v3 edit mode "Toggle Cyclic" operator
- Geometry nodes resampling of cyclic, single-vertex curves

Checking for the single-point case when building draw buffers handles
these corner cases.

Fixes #117833
Fixes #117838

Pull Request: https://projects.blender.org/blender/blender/pulls/117842
2024-02-05 14:47:05 +01:00
Michael Kowalski
ecbf3385c5 USD: basic support for on_import USD hooks
Added support for defining an on_import() function in
bpy.types.USDHook subclasses.  If on_import() is defined
on a given USD hook, it will be invoked in import_endjob().

The implementation closely follows the existing design of
export hooks.  USDHook.on_import() takes as an argument
an instance of an internally defined USDSceneImportContext
class which provides an accessor to the USD stage.

Also updated the USDHook documentation with an example
on_import() callback implementation.

Pull Request: https://projects.blender.org/blender/blender/pulls/117822
2024-02-05 14:26:02 +01:00
Falk David
42fa5fa27f Cleanup: GPv3: Use scoped defer to free allocated string 2024-02-05 13:52:20 +01:00
Lukas Tönne
83ac606088 Curves edit mode: Finish "cyclic" attribute after duplicating. 2024-02-05 13:48:33 +01:00
Brecht Van Lommel
ab75440847 Fix: Missing owner ID in color ramp and sequencer metadata pointers
Found while refactoring for #117640.
2024-02-05 13:43:37 +01:00
Brecht Van Lommel
c14e9fc95b Cleanup: Compiler warnings 2024-02-05 12:59:30 +01:00