Commit Graph

110091 Commits

Author SHA1 Message Date
Miguel Pozo
a27fa7e46c FIx #122085: Optimize iter_shader_to_rgba_depth_count 2024-06-12 17:07:46 +02:00
Miguel Pozo
6a9feebf07 EEVEE: Ensure materials use all available sampler slots
This provides 2 extra sampler slots to users for materials in the cases
of meshes, and 1 extra slot for curves and point clouds.

Pull Request: https://projects.blender.org/blender/blender/pulls/123100
2024-06-12 15:43:46 +02:00
Michael Kowalski
724a674bae USD export: fix malformed joint paths
Fixing a bug which was causing forward-slash separators in
skeleton joint paths to be replaced with underscores, resulting in
invalid skeletons.

This was inadevertantly introduced in 9ad2c7df0b.  I should
have caught this when I reviewed #122471.

Pull Request: https://projects.blender.org/blender/blender/pulls/123031
2024-06-12 15:22:37 +02:00
Weizhen Huang
27041ecaf8 Fix #122877: crash in EEVEE due to negative size of IndexRange
since `min_level` is clamped to 0, `max_level` should be clamped too

Pull Request: https://projects.blender.org/blender/blender/pulls/123131
2024-06-12 15:21:20 +02:00
Sergey Sharybin
7f1a671b2a Fix compilation error of the Lite configuration
This is kind of wrong fix from the perspective of properly maintaining dependencies
of static libraries, but having cyclic dependencies and whole-archive for the test suit
makes it very hard to do things properly.

Pull Request: https://projects.blender.org/blender/blender/pulls/123123
2024-06-12 15:10:00 +02:00
Bastien Montagne
c7bc6ba1f6 Fix #122421: Setting 'render border' is usually not undoable.
Render border is stored either in the current View3D data (UI data, not
undoable), or in Scene's render data when in camera view (only undoable
case).

This commit removes the `UNDO` flag of the related operators, and
instead manually pushes an undo step when executed in camera view.

Pull Request: https://projects.blender.org/blender/blender/pulls/122767
2024-06-12 14:20:13 +02:00
Aras Pranckevicius
b7cd88d502 Fix: VSE strip thumbnails sometimes go 1px outside of boundary
The VSE timeline strip thumbnail code seems to have at least two issues:

Sometimes the thumbnail would go 1px outside of the right side of the strip
itself. This seems to be caused by floating point inaccuracy where current
thumbnail position is tracked in "fractional timeline frames" instead of some
integers like pixels. The last, often clipped, thumbnail would thus spill over
outside of the strip. Fixed this by making sure the last pixel column of the
strip is not included into thumbnail drawing (pointless to draw there since it
is always covered by strip border).

Another problem was that the first thumbnail of the strip was often incorrectly
clipped and the last pixel from it was removed, and so it was leaving a pixel
gap between first and other thumbnails. This was under "Set the clipping bound
to show the left handle moving" comment, where due to inclusive range check it
was always causing the "clipped" part to be set to true for the first thumb.

Also while trying to untangle all of this, moved variables closer to their
usage. Some of them were only used inside the thumb loop but were declared in
whole function (probably coming from when it was C code).

Pull Request: https://projects.blender.org/blender/blender/pulls/123119
2024-06-12 12:42:59 +02:00
Campbell Barton
91d45db8bb Remove use of potentially unsafe strncat & strcpy 2024-06-12 10:52:09 +10:00
Nathan Burnham
6ea1d2131d Fix: PyAPI Doc: unexpected indentation error
7413031dd6 introduced an error and related warning when generating Py API docs:

```
/blender/doc/python_api/sphinx-in/bpy.app.translations.rst:132: ERROR: Unexpected indentation.
...
/blender/doc/python_api/sphinx-in/bpy.app.translations.rst:132: WARNING: Lexing literal_block 'See :func:`pgettext` notes.' as "python3" resulted in an error at token: '`'. Retrying in relaxed mode.
```

Pull Request: https://projects.blender.org/blender/blender/pulls/123097
2024-06-11 19:55:24 +02:00
Fabian-Herb
354b1a5db9 Fix #122933: Enable Compositor OpenImageDenoise on Linux ARM64
Pull Request: https://projects.blender.org/blender/blender/pulls/123066
2024-06-11 19:29:42 +02:00
Julian Eisel
e02e78d840 UI: Separate job type for asset library and file list loading
Asset library loading uses the file browser backend (file-list), so it
would use the same job type. The job system makes sure that jobs of the
same type (or actually, with the same start callback)
wait for others of the same type to finish. This can be a problem here,
since loading asset libraries (which can take a while) could conflict
with regular file browers. Having both run in parallel is no issue, they
use local data only.

Also see #123033 to address the added TODO comment.

Fixes #121235

Pull Request: https://projects.blender.org/blender/blender/pulls/123027
2024-06-11 18:31:39 +02:00
Aras Pranckevicius
c38951d0f5 Fix #123016: inconsistent VSE timeline strip pixel grid rounding
Previous commit that made VSE strip controls not be blurry (91fa37fecb)
applied "snap to pixel grid" in a wrong place - the rectangle corners
should be snapped, not the center and half-size of it.

Pull Request: https://projects.blender.org/blender/blender/pulls/123065
2024-06-11 18:12:32 +02:00
Miguel Pozo
cfd64f2e85 Fix: EEVEE: Fix valid_N setup 2024-06-11 16:55:33 +02:00
Miguel Pozo
fb5faf3305 FIx #122915: Diffuse normal input isn't normalized automatically 2024-06-11 16:51:04 +02:00
Bastien Montagne
60190a7ea7 Cleanup: Move IDProperty enums (types, flags, etc.) to DNA_ID_enums.h
Allows to use typed enum parameters in functions without having to
include the whole `DNA_ID.h` file into other headers.
2024-06-11 16:37:36 +02:00
Damien Picard
203600d441 Add msgctxt arg to docs 2024-06-11 15:09:09 +02:00
Damien Picard
7413031dd6 I18n: Add Python function to extract messages without translating
The new `pgettext_n` function (typically imported as `n_`) can be used
when there is a need to extract messages, without translating them. It
is essentially a no-op equivalent to the C++ version `N_`.
2024-06-11 15:09:09 +02:00
Jeroen Bakker
0f5ddd5807 Fix #123028: Bloom still available as render pass in API and UI
The bloom render pass has been deprecated in Blender 4.2. It was still
visible in the UI in the shading popover and available in the python API.

This PR removes the UI option and deprecated the parts of the python API.
Current add-ons that use this API should still be able to use the API, but
it would not do anything. Add-ons are encourage to remove these calls.

The flags are not cleaned up so they should still work when switching back
to previous Blender versions.

Release notes have been updated to include these changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/123059
2024-06-11 14:16:43 +02:00
Jeroen Bakker
af34a8a952 GPU: Fix GLSL compilation error on legacy NVIDIA drivers
Somehow the 16K inside a string is parsed as being an integer, leading
to error messages about the `K` suffix.

```
ERROR (gpu.shader): gpu_shader_icon_multi VertShader:
      |
    1 | #version 430
      |
      | Error: C0159: invalid char 'K' in integer constant suffix
```

Fixed by changing the 16K to the actual number.

Related to #122977 With this PR blender will start, but EEVEE will render pink.

Pull Request: https://projects.blender.org/blender/blender/pulls/123071
2024-06-11 14:07:57 +02:00
Jeroen Bakker
e1ee3ed7df Fix #123045: Accumulate Samples When Navigating
When navigating the samples were always reset. This was introduced
by 7ec59b05ff where samples needed
to be reset when painting.

This PR solves it by separating the navigation and the painting more
clearly in the API. Also cleans up some calls that are also encapsulated
via the EEVEE Instance class.

Validated that painting and navigating still worked with these changes
applied.

Pull Request: https://projects.blender.org/blender/blender/pulls/123064
2024-06-11 14:07:26 +02:00
Christoph Lendenfeld
973d33a278 Fix: Wire Width for bones not copied
When copying a bone, the new
option for wire width was not copied over.

Pull Request: https://projects.blender.org/blender/blender/pulls/123062
2024-06-11 12:37:57 +02:00
Christoph Lendenfeld
9c77598905 Fix: Remove redundant wording in parameter label
The new option on bones to control the wire width had a redundant part
of `Custom Shape`. Since the property is already within a section for
Custom Shape we can shorten the label.

Pull Request: https://projects.blender.org/blender/blender/pulls/123063
2024-06-11 12:02:04 +02:00
Aras Pranckevicius
57f1d11163 Fix: VSE strip shape is not rounded when dragging file into timeline area
Strips still have sharp corners when you're dragging them from file browser and
switch to rounded when dropped. Fix by using the same drawing code (and shader)
as regular timeline drawing path.

Pull Request: https://projects.blender.org/blender/blender/pulls/123013
2024-06-11 11:55:49 +02:00
Campbell Barton
12ff1ffe5b Extensions: remove add-ons which don't have a built-in upgrade opton
Previously these were shown as missing add-ons, since they have been
intentionally removed, remove them as part of versioning instead
of showing them as "Missing Add-ons". This is especially important
for X3D & STL which were enabled by default which meant any user
loading 4.1 preferences would have them shown as missing add-ons.
2024-06-11 19:53:38 +10:00
Campbell Barton
2e00df3ee2 Cleanup: spelling in comments 2024-06-11 19:21:56 +10:00
Sybren A. Stüvel
83311ef96d Fix #122777: The keyframe_insert method throws python exceptions
Just for the `pyrna_struct_keyframe_insert()` function, reduce the
reporting level of keyframe insertion failures from `RPT_ERROR` to
`RPT_WARNING`. This prevents the conversion of these reports to a Python
exception.

`CombinedKeyingResult::generate_reports()` now accepts an option
argument `report_level`, so that the caller is in control over the type
of reports it generates.

Previously only errors were converted to exceptions; warnings were
implicitly cleared and never displayed. To avoid these 'keyframe
insertion failure' reports from becoming invisible, the
`pyrna_struct_keyframe_insert()` function now sends any warnings to
stdout (unless there were errors, in which case the old
error-to-exception behaviour is still there).

Pull Request: https://projects.blender.org/blender/blender/pulls/122827
2024-06-11 11:11:16 +02:00
Omar Emara
b2a58bbdb4 Fix #123007: VSE scene strip crash with GPU compositor
Blender crashes when rendering a scene strip that references a scene
with a GPU compositor active. This is because when rendering a scene
strip, a new render with a nullptr system GPU context is created for the
scene it references, which is then used for compositing.

Ideally, the strip scene would have its own context, but we can't ensure
its context because we are not in the main thread. The alternative is to
then identify scenes that will be rendered before hand and set their
renders before starting the job, which doesn't seem like a great
solution. So for now, we just use the DST context in those cases.

Pull Request: https://projects.blender.org/blender/blender/pulls/123057
2024-06-11 11:02:15 +02:00
Clément Foucault
1882c2df94 EEVEE-Next: Add automatic convertion of Materials without Shadows
This add the cycles compatible way of disabling shadows
on materials using a node setup.

Pretty straight-forward and only done on EEVEE materials.
2024-06-11 10:33:55 +02:00
Clément Foucault
093997037f EEVEE-Next: Add forward compatibility for blend modes
This makes sure to set the legacy properties when setting
the render method and the use transparent flag.
EEVEE-legacy should be able to render these materials
without issues.
2024-06-11 10:33:55 +02:00
Jeroen Bakker
7a8e04fcb1 Fix #122551: Metal displays black screen on ATI/Intel GPUs
When using Metal backend on ATI/Intel GPUs the stencil buffer doesn't
contain the correct information, skipping diffuse and glossy PBR components.

Failing behavior was introduced by e97e06ea2c
This PR works around this by reverting the code when using ATI/Intel GPUs.
The root cause is somewhere the combination of stencil export support, clear
operations and subpass.

**TODO**

- [ ] Validate that this fixes the ATI issue as well

Pull Request: https://projects.blender.org/blender/blender/pulls/122993
2024-06-11 07:58:03 +02:00
Hans Goudey
a0cf59c186 Fix #122770: Crash with "High Quality Normals" and loose edges/verts
Caused by a simple mistake in 84c4ddbbb9.
2024-06-10 22:33:15 -04:00
Damien Picard
739abf3031 Fix: UI: make statistics for Objects display 0 instead of (null)
Display "0" instead of "(null)" for object stats count when there are no objects.

Pull Request: https://projects.blender.org/blender/blender/pulls/123036
2024-06-10 23:38:35 +02:00
Clément Foucault
8a3979b034 EEVEE-Next: Display warning for world volume manual versioning
This adds a hint to what is the correct procedure.
2024-06-10 22:34:26 +02:00
Clément Foucault
3db4367374 EEVEE-Next: Disable shadows in legacy files
Having the sun extracted is mandatory to keep
the same look and avoid too much light
leaking compared to EEVEE-Legacy. But adding
shadows might create performance overhead and
change the result in a very different way.
So we disable shadows in older file.
2024-06-10 22:34:26 +02:00
Clément Foucault
e6ca5f00d5 EEVEE-Next: Rename lightprobe volume single sided to backface cull
This also modifies the RNA access path for consistency.
This was a long standing change that was oversighted.
2024-06-10 22:34:26 +02:00
Clément Foucault
d5ac372715 Fix: EEVEE-Next: Lightprobe display size unit
The unit was still a distance but it was changed to a factor.
2024-06-10 22:34:26 +02:00
Iliya Katueshenock
35ccb08590 Fix: Geometry Nodes: handle sheared matrices in mixing more gracefully
This fix of the assertion related with using `Combine Matrix` and `Sample UV` nodes in some simple cases.

Pull Request: https://projects.blender.org/blender/blender/pulls/122958
2024-06-10 21:26:47 +02:00
Brecht Van Lommel
27f467e028 Draw: Avoid hang when depsgraph update happens during draw
This should not happen and any failure here should be considered a bug.
But for end users better not to hang Blender, and to have a better
diagnostic for developers in bug reports.

Ref #82483

Pull Request: https://projects.blender.org/blender/blender/pulls/123023
2024-06-10 18:11:41 +02:00
Brecht Van Lommel
4f593b5710 Fix: Incorrect layout in vertex color shader node 2024-06-10 17:33:28 +02:00
Brecht Van Lommel
6cccbc8df9 Fix #82483: Random Cycles baking hangs with node editor open
CTX_data_ensure_evaluated_depsgraph should not be used in drawing code.
This triggered a depsgraph updated which in turn called
DRW_notify_view_update. This would bind the GPU context a second time
and hang due to recursive mutex calls.
2024-06-10 17:24:49 +02:00
Ray Molenkamp
28f7a467fa cmake: windows: only install fftw's dlls when available
These are no longer used in 4.2 and need not to be installed.
2024-06-10 09:17:11 -06:00
Julian Eisel
83edd748a2 Fix #120466: Crash when opening file with inactive asset browser
Issue wasn't directly related to material assets or the shader editor.

Simpler steps to reproduce:
- Open Asset Browser
- Change Asset Browser to different editor type
- Open new file (Ctrl+N)

The asset browser would remain in storage as inactive editor, including
pointers to the asset system. When opening a new file, the asset system
would get freed before the asset browser, which would then access
dangling pointers as part of its own freeing process.

Part of the issue is that `SpaceType.exit()` doesn't get called in this
case, which would remove the asset system references before the asset
system is freed. Will address this in a follow up in main, but best to
not depend on the `exit()` callback too much. Easy to do here.
2024-06-10 16:54:03 +02:00
Sybren A. Stüvel
3089ac97b1 Anim: add new keytype 'generated' styling to the Sequencer theme
Add the color for the new keytype 'generated' to the VSE theme settings
as well.

This includes the versioning code that loads the default from the scene.
Without this, the preference would be initialised to black.

Note that the 'Blender Light' theme does not have any colors for any of
the key types, so I also didn't add the 'generated' type there.

Pull Request: https://projects.blender.org/blender/blender/pulls/123005
2024-06-10 15:28:05 +02:00
Miguel Pozo
1ed2779abc Fix #122973: Subprocesses aren't closed if Blender crashes
Assigns all subprocesses to a job owned by the main Blender instance,
so they're closed when it ends.

Pull Request: https://projects.blender.org/blender/blender/pulls/123001
2024-06-10 15:27:14 +02:00
Bastien Montagne
17332da834 Fix (unreported) path_resolve returns string instead of bytes for bytes idprops.
The following code in py console would return a python string object,
instead of the expected bytes one.

```python
value = b"Hello World"
key = "a"
C.object[key] = value
C.object[key]
>>> b"Hello World"
C.object.path_resolve('["%s"]' % key)
>>> "Hello World"
```

Now it will return a byte object as it should.

Found while investigating #122843 .
2024-06-10 14:27:04 +02:00
Campbell Barton
554b3c5bd9 Extensions: support custom-directory for system repositories
While this is reasonably obscure, not supporting this caused the UI
to be confusing and there is no strong reason not to support this.
2024-06-10 22:22:07 +10:00
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