Commit Graph

110045 Commits

Author SHA1 Message Date
Damien Picard
de139dd7e4 UI: Fix and improve a few messages
- "Show the result of running commands in the main interface...": add
  punctuation.
- "Re-Installed" -> "Reinstalled" seems more common.
- "increase_" and "decrease_subdivision" in the Grease Pencil
  modal...: use title case instead of snake case for label.
- "Use a automatic number..." -> "an", typo.
- "... points,{} splines": missing space.
- "End Frame is larger than Start Frame": wrong order in error message.
- "Approximate the object as sphere, which diameter is equal to
  thickness the defined...": grammar.
- "Show Seconds" -> "Use Timecode": this option is not necessarily about
  seconds. Suggested by Pablo Vasquez.
- Brightness and contrast node input descriptions: add missing spaces.
- "Gamma controls the relative intensity... full white.": remove
  trailing ".".

Pull Request: https://projects.blender.org/blender/blender/pulls/122972
2024-06-10 13:26:05 +02:00
Sergey Sharybin
a2795852cd Fix ##122962: Regression: Backdrop update triggers crash
Pull Request: https://projects.blender.org/blender/blender/pulls/122991
2024-06-10 11:45:01 +02:00
Nathan Vegdahl
119f764eb9 Fix: Child Of constraint broken after removing target
Fixes #116567

The issue was with a flag that skips a particular post-evaluation step
specially for the Child Of constraint.  The flag wasn't getting properly
unset when the constraint target was removed, and therefore that
post-evaluation step was getting erroneously skipped in some cases.

This commit fixes the issue by always setting the flag appropriately in
the Child Of evaluation function itself.  This is admittedly rather
hacky, but no more hacky than the existence of the flag in the first
place.

Pull Request: https://projects.blender.org/blender/blender/pulls/122881
2024-06-10 10:32:40 +02:00
John Swenson
44641ac5c7 Fix: VSE snapping when both strip handles selected
This patch makes sure that when both left/right handles on a strip are
selected, they are given individal snap points in TransSeqSnapData.

Prior to this change, when both handles were selected, snapping only
worked on the left handle.

Pull Request: https://projects.blender.org/blender/blender/pulls/122931
2024-06-10 11:17:48 +03:00
John Swenson
b469dc04f9 Fix: VSE snap to hold offset is broken
Snapping to hold offsets was broken by 76043bc, this patch restores the
functionality by simply calculating the image data start/end points and
letting existing clamping code take over to make sure this snap target
does not exist outside of the bounds of the strip.

Pull Request: https://projects.blender.org/blender/blender/pulls/122934
2024-06-10 10:15:15 +02:00
Nathan Burnham
c6ec2993b3 PyAPI Doc: vert_pair described as single vert
`BMVert.copy_from_vert_interp()`'s description and the name `vert_pair`
implies two verts, but the argument itself was described and typed as a
single `BMVert`.

Ref: !122974
2024-06-10 16:59:52 +10:00
Jeroen Bakker
1361034c4d EEVEE-Next: Change read-write access lightprobe world
Light volume probe world shader doesn't read from the irradiance atlas
but its create info registered it as a read/write texture. This
raised a validation error on Metal/Intel as the combination
RGBA16F FLOAT3D read write isn't supported.

Pull Request: https://projects.blender.org/blender/blender/pulls/122646
2024-06-10 08:36:35 +02:00
Campbell Barton
b4ea8583ed WM: correct logic for resetting add-ons & caching meta-data
All add-ons were being scanned at startup, while this didn't cause
errors it was noticeable with extensions where any errors in the
manifest were being reported at startup, even when running with
factory-startup (including blender's own tests).

Address two issues:

- The logic to "reset" add-ons, so as to match the preferences when
  reverting or resetting preferences always ran on startup.
  This occurred because a check for Python being initialized was
  incorrectly used to detect that this wasn't the first time preferences
  were being loaded (regression in [0]).

- Resetting add-ons scanned all add-ons (including disabled add-ons) to
  ensure their module cache is up to date. Since this the cache is
  lazily initialized, it's simpler to set it as uninitialized as
  resetting the add-ons doesn't require the cached meta-data.

[0]: 497bc4d199
2024-06-10 00:22:56 +10:00
Campbell Barton
db6703d976 Cleanup: remove unused variable 2024-06-09 11:35:07 +10:00
Germano Cavalcante
965a138671 Fix #121025: Edge Slide not picking the correct reference edge
The occlusion test was considering the local position of the vertices
as being in world space.

The solution is to convert to world space first.
2024-06-08 16:07:29 -03:00
Germano Cavalcante
efd3c4b3c9 Fix #122896: Knife snap to edge fails when a vertex is behind the viewer
Although c9fa73a379 made the problem worse. The incorrect to snap to
edges when one of their vertices is behind the viewer is much older.

The problem occurred because, in perspective mode, when we project a
vertex with negative "zfac", its projected value is undefined as it
depends on the position of the other vertex.

Thus, both the distance test and the lambda in these cases were wrong.

The solution was to calculate the snap point directly in 3D, using
`closest_ray_to_segment_v3` and avoiding projecting the edge.
2024-06-08 12:09:25 -03:00
Germano Cavalcante
85f026f478 Cleanup: Move closest_ray_to_segment_v3 logic from snapping code to BLI 2024-06-08 12:09:24 -03:00
Clément Foucault
fb7d5e49d3 Fix: EEVEE-Next: Shadow: Very low resolution shadow in viewport
This was caused by the base page tagging.

Since that the base page is now required for fixing
soft shadows, it would be the first level to be rendered
which, combined with the update throttle, lead to only
the min LOD to be available when the shadow was updated
in viewport.

This was affecting the jittered shadows, animation update
and viewport transform.

The fix is to only request the base page after throttling
the updates and only if there is no other LODs to be
rendered. This mean jittered shadow in viewport might
become affected by the missing base page artifacts, but
this is less noticeable than huge light leaking.
only if
2024-06-08 16:58:52 +02:00
Bastien Montagne
d19d23e91f Cleanup: IDProperty: Add an enum type to idprops flags. 2024-06-08 16:51:20 +02:00
Bastien Montagne
f59f5fd83f Fix #122901: Geonodes modifier- setting an imput as string crashes blender.
Regressions (typo) from 57669600b1.
2024-06-08 16:26:28 +02:00
Campbell Barton
5f06d3aa17 Extensions: consider system repositories read-only
The following operations have been removed for system repositories:

- Installing from disk.
- Uninstall extensions.
- Delete files (when removing the repository).

Also change the operator to remove a repository so the option to
remove files is now a boolean instead of an enum. While a dynamic
enum can be made to work, this option is logically a boolean.
2024-06-08 23:04:17 +10:00
Campbell Barton
4718d68349 Extensions: expose extensions debug option in release builds
These are useful for more verbose output and expose useful utilities
for development.
2024-06-08 13:32:24 +10:00
Germano Cavalcante
4690c69a65 Fix #122787: Grid snap in UV Editor also snaps to vertices
The `Snap to Grid` and `Snap to Vertex` modes were being mixed if
either mode was enabled.

Support for mixed snap modes doesn't yet fully work for UVs.
2024-06-07 17:58:45 -03:00
Jesse Yurkovich
e24eb7d85c Fix #122820: Collection export would dirty the file
The various collection export operators had their flags set for undo.
This isn't necessary and would cause the .blend file to be marked dirty.

Pull Request: https://projects.blender.org/blender/blender/pulls/122864
2024-06-07 22:28:07 +02:00
Germano Cavalcante
2cb8b4b7f7 Fix #122438: Orbit Around Selection drastically moves view
When starting a navigation operation that uses `Auto Depth` or
`Orbit Around Selection` the value of `#RegionView3D::dist` is modified
to match the distance from the new pivot.

This value was incorrect when the pivot was behind the viewer.

In these cases `dist` is negative.

This commit, in addition to fixing `dist`, also limits the execution of
this code to only when `Auto Depth` is used.

Pull Request: https://projects.blender.org/blender/blender/pulls/122795
2024-06-07 21:41:50 +02:00
Miguel Pozo
35cfc71b95 EEVEE: Parallel specialization constants compilation
Convert `Renderbuffers::sync` into `RenderBuffers::init`.
Use `GPU_shaders_precompile_specializations` in EEVEE.

Pull Request: https://projects.blender.org/blender/blender/pulls/122798
2024-06-07 18:53:59 +02:00
Miguel Pozo
22652b305e GPU: Add GPU_shaders_precompile_specializations
Allow precompiling specialization constants variations in parallel.
Only supported in OpenGL as the rest of the batch compilation API,
on the other backends the function is a no-op.
This also moves the `SpecializationConstant` from
`gpu_shader_create_info` (private API) into`GPU_common_types`
(public API).

Pull Request: https://projects.blender.org/blender/blender/pulls/122796
2024-06-07 18:45:31 +02:00
Raul Fernandez
dae3554d5c Fix #122786: Multiresolution > Apply Base produces garbled meshes
This changes fixes a wrong mesh as a result of apply base mesh from the Multires modifier

In the previous code some corner vertices where incorrectly assigned to null and skipped form processing as a safety guard
that was only relevant when the mesh had hidden faces in edit mode. The hidden corner vertices bug is handled now when checking

> if (corner_x_index < 0 || corner_y_index < 0) {
> continue;
> }

Since the patch that caused this error was a fix to a previous infinite loop bug,
I also tested and made sure this updated patch still fixes the original issue it was trying to fix.

Note: This PR replaces #122845 due to a large amount of git rebase issues.

Pull Request: https://projects.blender.org/blender/blender/pulls/122859
2024-06-07 18:35:28 +02:00
Aras Pranckevicius
73d4872f5a Fix: VSE strip outline no longer extends outside of strip bounds
Previously selected strips in VSE timeline were drawing their outline
1px outside of the strip boundaries. This makes outlines of the strips
overlap each other when neighboring strips are selected.

Now the selected outline is fully within regular strip shape.

Pull Request: https://projects.blender.org/blender/blender/pulls/122890
2024-06-07 17:41:56 +02:00
Omar Emara
1e359f4173 Fix #112742: File output node ignores colorspace overrides
The File Output node ignores color space overrides for EXR images. To
fix this, we save the images using save_as_render set to true. We don't
need to provide this as an option similar to other image types because
even when save_as_render is set to true, it will not have an effect
unless the user chooses to override the color space explicitly, since it
is not affected by view transforms and the like.

Pull Request: https://projects.blender.org/blender/blender/pulls/122791
2024-06-07 17:38:18 +02:00
Omar Emara
79da892126 Fix #122587: File Output node can only save one size
The File Output node forces all inputs to have the same size, which
should only be the case for multilayer files. This is a regression in
931c188ce5. To fix this, we allow inputs to have any size, except for
multilayer files, which are realized on the automatic operation domain
of the operation.

Pull Request: https://projects.blender.org/blender/blender/pulls/122824
2024-06-07 17:34:14 +02:00
Omar Emara
d66e3f899a Fix #102240: Viewer node does not work inside group
The CPU compositor does not recognize viewer groups inside node groups
unless a viewer node exists at the top level node group. This is caused
by bad logic when registering viewer node at the node operation builder.
And the fix is just to correct the logic to always register viewers if
no active viewer already exists, which can then later be overwritten if
a viewer node that takes precedence was discovered.

Pull Request: https://projects.blender.org/blender/blender/pulls/122869
2024-06-07 17:33:25 +02:00
Campbell Barton
f1461e157b Fix call to Vector::last when empty (asserted in debug mode) 2024-06-08 00:38:53 +10:00
Miguel Pozo
a9ec92005a Fix: EEVEE: Add missing DRW_viewport_request_redraw() call
Required to keep the compilation process going on.
2024-06-07 16:22:20 +02:00
Miguel Pozo
6a3d9018cf EEVEE: Compile probe passes in parallel
Right now probe passes are compiled one by one, since passes are only
requested if `materials.queued_shaders_count` is 0 and requesting a
pass will increase the number.
This splits the logic into 2 functions, one for checking if sync is needed
and another to check if pass shaders are needed.
This allows compiling the shaders in parallel.

Pull Request: https://projects.blender.org/blender/blender/pulls/122799
2024-06-07 16:19:17 +02:00
Miguel Pozo
12eca8692f EEVEE: Parallel static shader compilation
Use the `GPU_shader_batch` API to compile the EEVEE static shaders in
parallel and without blocking Blender.

Pull Request: https://projects.blender.org/blender/blender/pulls/122797
2024-06-07 16:19:16 +02:00
Aras Pranckevicius
91fa37fecb Fix: VSE timeline strip rounded corner outlines not pixel correct
PR #122576 added rounded corners to VSE timeline strips, but they were not
"snapped" to pixel grid so the outline that is normally 1px was sometimes
falling in between pixels and was blurred out.

Fix by rounding all SDF related coordinates inside the shader to the pixel
grid.

Pull Request: https://projects.blender.org/blender/blender/pulls/122764
2024-06-07 16:18:09 +02:00
Miguel Pozo
fb98edf322 GPU: Add GPU_material_batch_compile
Add `GPU_material_batch` API.
It uses the new `GPU_shader_batch` from #122232 internally and it
works in the same way.

Note: This doesn't implement parallel material optimizations.

Pull Request: https://projects.blender.org/blender/blender/pulls/122793
2024-06-07 16:11:50 +02:00
Miguel Pozo
ec0dd18de5 GPU: OpenGL: Support parallel geometry and compute shader compilation
Support parallel compilation of geometry and compute shaders when
using the `GPU_shader_batch` API.

Pull Request: https://projects.blender.org/blender/blender/pulls/122792
2024-06-07 16:10:43 +02:00
Bastien Montagne
89e790d2a4 Cleanup: Improve/fix some IDProperty comments and TODOs.
Mainly correct/update some comments (e.g. missing reference to Boolean
type), and add some notes essentially about issues with current IDProp
String code (see also #86960 ).

No functional change.
2024-06-07 14:55:40 +02:00
Bastien Montagne
57669600b1 Fix (unreported) GeoNode modifiers keeps 'invalid' IDProps types forever.
In case a 'compatible' old IDProperty exists,
`update_input_properties_from_node_tree` would essentially reuse it
as-is, only keeping the UI data from the freshly new IDProp it created
for the socket.

This commit instead fully re-use the newly created idprop, only copying
(and converting as needed) the value from the old one.

That way, we can be sure that the actual type of the IDProperty is reset
to its expected type, instead of being kept forever in a 'wrong' type.

Having IDProps in a stable, expected type is a sounder behavior in
general, and critical for lower-levels of code to work as expected
(like RNA diffingi, and by extension, Library Overrides e.g.)

NOTE: This is a side-finding from work on #122743 to make some idprops
statically typed, and is a pre-requirement for this to work with the
GeoNodes modifiers case.

Pull Request: https://projects.blender.org/blender/blender/pulls/122876
2024-06-07 14:34:40 +02:00
Jacques Lucke
68db2c8328 Fix #122607: connect deactivated viewer causes crash 2024-06-07 13:39:36 +02:00
Jacques Lucke
34588cd933 Fix: invalid data sharing after loading certain .blend files
This fixes a bug that happens when two drawings in the same grease pencil
data-block reference the same array. In this case, the same attribute array
pointer is written to .blend files for both drawings. However, when loading the
.blend file, it was not detected that the data is shared. Instead each drawing
would think that it was the single owner of the array even though it was shared.

The same problem can technically occur for all kinds of shared data, and not
just for grease pencil. However, only grease pencil shows this issue currently,
because it can easily happen that the same attribute is shared between different
`CustomData` within the same data-block. This very rarely happens with meshes or
curves, because different `CustomData` usually have different sizes and don't
share the same arrays.

A previous fix (cc891aa699) solved pretty much the same issues for the case
when two layers in the same `CustomData` share data. This original fix is now
generalized and is integrated with `BLO_read_shared` which makes it less error
prone. For each data-block, the `BlendDataReader` now remembers which shared
data it has loaded before so that it is not loaded again.

In the future this could be extended to support data that is shared between
data-blocks, but that's not as straight forward as one would hope currently. For
various reasons, different data-blocks could store independent data at the same
pointer. I specifically noticed that with a regression test file:
`blender/tests/data/modeling/geometry_nodes/attributes/attribute_statistics.blend`.
To support it, one solution could be to tag `BHead` in .blend files to indicate
that a specific pointer is shared and unique within the entire file. But that's
for another day.

Pull Request: https://projects.blender.org/blender/blender/pulls/122780
2024-06-07 13:22:39 +02:00
Campbell Barton
dc0e559cbb Extensions: remove intermediate operators for upgrade and sync
The buttons to upgrade or sync extensions called extension
operators via bpy.app.handlers, requiring awkward glue-code
which didn't show error reports in to the user.

Remove these operators and call the upgrade & sync operators directly.
2024-06-07 16:33:03 +10:00
Jesse Yurkovich
06581bde1b USD: use panels for Import and Export
Instead of using "box" layouts for these import/export operators, use
panels instead. Many choices for the layout and organization has come
from the `universal-scene-description` branch though it's not a 1:1
equivalent.

Motivation for using panels is two fold.

Firstly the use of panels instead of boxes is more consistent with other
parts of Blender and with the other IO features.

Secondly, in the case of an Import invoked from drag-n-drop or Export
configured on a Collection, the large number of options exposed results
in a very long layout. Panels allow us to close some sections by default
and allows the user to open/close panels based on their own needs in
general.

Along the way some effort went into standardizing the layout and wording
used as much as possible.

Pull Request: https://projects.blender.org/blender/blender/pulls/122415
2024-06-07 06:35:27 +02:00
Campbell Barton
3acff7a8a1 Correct help text for system extensions
Group `--env-system-extensions` with related arguments.
2024-06-07 12:16:21 +10:00
Campbell Barton
715bbbfa0f Docs: clarification for BKE_appdir.hh folder_id
Also add doc-string for bUserExtensionRepo::flag.
2024-06-07 11:46:40 +10:00
Campbell Barton
dc9430c480 Extensions: support system repositories & BLENDER_SYSTEM_EXTENSIONS
Support for "System" extensions as an alternative to the current
"User" extensions repository.

The purpose of this change is to support bundling extensions for
offline work or in environments where users setting up thier own
extensions isn't desirable, see #122512.

Details:

The default "System" repository on Linux will for example use:
- `/usr/share/blender/4.2/extensions/{system}` For system installs.
- `./4.2/extensions/{system}` For portable installs.

- Blender's default startup now has a "System" repository
  which users or administrators may populate.

- Repositories can select between User/System paths,
  setting a custom path overrides overrides this setting.

- Add "BLENDER_SYSTEM_EXTENSIONS" (matching "BLENDER_LOCAL_EXTENSIONS").

Ref !122832
2024-06-07 11:36:20 +10:00
Campbell Barton
f423ec8848 Correct mistake in last commit, accidental declaration included 2024-06-07 11:12:30 +10:00
Campbell Barton
881d83031e Cleanup: minor changes to extension repository handing
- Add a function to initialize all default repositories.
- Rename function for creating extensions.blender.org repo for clarity.

Prepare for !122832.
2024-06-07 11:02:48 +10:00
Guillermo Venegas
26965a0758 Fix #122802: Drag and droping a .vdb file no longer works
Changes in view3d_id_path_drop_copy from 8b6a21c122 assumed that
drag-drop filepaths was handled only with FileHandlers in View3d. This
adds the missing drop-box to FileHandler conversion for .vdb files.

Pull Request: https://projects.blender.org/blender/blender/pulls/122839
2024-06-07 02:15:34 +02:00
noodlebox
b73b663309 Fix: Redundant submenus are created in the Add menu for certain catalog names
A few of the recently added submenus are not included in the list of builtin
menus, so node assets under those catalog names will generate redundant submenus.
Fixes same issue as b49c84276c for newly added nested menus.

Pull Request: https://projects.blender.org/blender/blender/pulls/122855
2024-06-06 23:39:00 +02:00
Hans Goudey
b5022828d6 Fix #122849: Curve to mesh node crash with non-point builtin attributes
If the mesh has a curve builtin attribute that's not stored on the point domain,
the creation of the attribute will fail and it can't be interpolated. Possibly this
could be supported somehow, by averaging all the values in the curve's points
or so, but for now just avoid the crash.
2024-06-06 17:18:45 -04:00
Sean Kim
afa4523322 Fix #121008: Paint undo causes uncolored mesh
Update PBVH GPU argument initialization to prefer using the PBVH mesh
attributes instead of the evaluated mesh attributes for color.

The values can be out of sync due to differences with the evaluated
and original mesh data.

Pull Request: https://projects.blender.org/blender/blender/pulls/122850
2024-06-06 22:11:30 +02:00
Jacques Lucke
10984c1461 Geometry Nodes: resimulate current frame if it's the last cached one
The goal is to simplify debugging the "current" simulation step. Previously, when a frame
was cached already, one would have to go back to the beginning to cache everything again.
Now, the last cached simulation step is discarded and simulated again if any property that
affects it is changed.

Pull Request: https://projects.blender.org/blender/blender/pulls/122736
2024-06-06 20:47:17 +02:00