Commit Graph

1293 Commits

Author SHA1 Message Date
Campbell Barton
16919ea5f2 Fix addon_utils.enable() error when the module has no __file__
Although this error isn't specific to extensions, extensions containing
a blender_manifest.toml but no __init__.py would import a module
with the __file__ set to None.
While there is logic to handle this case, it didn't account for modules
already in sys.modules with __file__ set to None.

From a user perspective enabling the extension silently failed raising
an error on the second attempt to enable.
2024-03-21 16:54:15 +11:00
Campbell Barton
98fed4f50c System Info: correct title in background mode 2024-03-21 14:11:30 +11:00
Campbell Barton
0d2c4df346 Fix extensions UI showing when developer extras are disabled 2024-03-21 12:22:28 +11:00
Campbell Barton
57dd9c21d3 Cleanup: spelling in comments 2024-03-21 10:02:53 +11:00
Miguel Pozo
881fd2dbd5 EEVEE-Next: Jittered Shadow Transparency
Smooth transparent shadows by jittering their opacity threshold every
sample.
Always enabled on final renders, optionally enabled in the viewport with
`scene.eevee.shadow_jittered_transparency`.

Pull Request: https://projects.blender.org/blender/blender/pulls/119480
2024-03-20 15:55:58 +01:00
Miguel Pozo
0c8b96d1e0 EEVEE-Next: Shadow resolution scale and adaptive filtering
Allow the user to scale shadow-map resolution per-light.
Adapt the PCF scale based on shadow-map to pixel footprint ratio,
since we can no longer assume that higher LODs don't need filtering.
This allows using much lower shadow resolutions, which can yield
quite significant performance improvements, with relatively little
perceptual quality loss (at the cost of softening shadow edges).
The per-light resolution scale is a literal scale, so for example 0.5
means half the resolution. The Scene Simplify Shadows setting has
been updated to match this behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/119436
2024-03-20 15:54:41 +01:00
YimingWu
3689dfca4f GPv3: Build Modifer migration
Reimplemented build modifier using the new `CurvesGeometry` logic.

Pull Request: https://projects.blender.org/blender/blender/pulls/118739
2024-03-20 13:28:28 +01:00
Campbell Barton
0b13d1f31a Extensions: suppress noisy "bl_info" prints unless --debug-python is set
Ref !119521
2024-03-20 15:43:40 +11:00
Campbell Barton
4ed06c648d Fix #119664: Persistent state not set when disabling add-ons
The wrong persistent attribute was set when disabling an add-on,
also correct the message when disabling an already disabled add-on.
2024-03-20 11:56:25 +11:00
Clément Foucault
23dce15f67 EEVEE-Next: Horizon Scan: Use Spherical harmonics
This uses Spherical Harmonics to store the indirect lighting and
distant lighting visibility.

We can then reuse this information for each closure which divide
the cost of it by 2 or 3 in many cases, doing the scanning once.

The storage cost is higher than previous method, so we split the
resolution scaling to be independant of raytracing.

The spatial filtering has been split to its own pass for performance
reason. Upsampling now only uses 4 bilinearly interpolated samples
(instead of 9) using bilateral weights to avoid bleeding.

This also add a missing dot product (which soften the lighting
around corners) and fixes the blocky artifacts seen at lower
resolution.

Pull Request: https://projects.blender.org/blender/blender/pulls/118924
2024-03-19 19:16:21 +01:00
Hans Goudey
803c783e52 Merge branch 'blender-v4.1-release' 2024-03-19 11:59:26 -04:00
cd476226d8 Fix #119402: Bone collections layers fail with pinned object or armature #119434
Don't assume armature of active object is what is displayed in the properties editor, both in C++ and Python code.

Object pointer was left out from some notifiers, as this means only that object was changed. But an armature datablock can be shared by multiple objects.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/119663
2024-03-19 16:27:06 +01:00
Brecht Van Lommel
7a395e2e7f Revert changes from main commits that were merged into blender-v4.1-release
The last good commit was f57e4c5b98c075f3dfc61faebbcb43c99a778956.

After this one more fix was committed, this one is preserved as well:
67bd678887d7f8aec9f3b23bbf1aaf29f80d0da4.
2024-03-18 15:04:12 +01:00
Jacques Lucke
4842bf1101 Cleanup: make format 2024-03-18 14:44:31 +01:00
Emmett-Lalish
d1cbb10d17 Add Khronos PBR Neutral tone mapper
A tone mapper designed specifically for PBR color accuracy, to get sRGB
colors in the output render that match as faithfully as possible the input
sRGB baseColor under gray-scale lighting. This is aimed toward product
photography use cases, where the scene is well-exposed and HDR color values
are mostly restricted to small specular highlights.

Fixes #118824: Proposal: add a view transform for Khronos PBR Neutral Tone Mapper

Co-authored-by: Emmett Lalish <elalish@google.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/118936
2024-03-18 12:16:53 +01:00
Campbell Barton
2de84a77ac Cleanup: include otherwise unused imports in __all__
Suppresses unused import warnings with "ruff check".
2024-03-17 17:25:14 +11:00
Harley Acheson
8770299406 UI: Option for Separate Extension Dev Tools
Experimental flag for "Extensions Development Utilities" that can be
enabled separately from "Extensions". Note this PR does not enable the
use of this flag (coming later) as uses are in addons-contrib. This
flag is requested in #119521

Pull Request: https://projects.blender.org/blender/blender/pulls/119562
2024-03-16 17:24:34 +01:00
Campbell Barton
f347706ecd Cleanup: add "unreachable" message to "assert False" statements
Clarify that these blocks are unreachable so the intention is clear
if they're ever encountered.
2024-03-15 13:20:11 +11:00
Campbell Barton
d07d6f1c10 Cleanup: un-wrap lines that fit within 120 width for Python scripts 2024-03-15 10:04:03 +11:00
Campbell Barton
40ab79c887 Cleanup: format 2024-03-15 09:57:36 +11:00
Harley Acheson
57729aa8bb UI: Improved Operator to Delete Custom Keyconfigs
Changes to python operators that add and remove custom keyconfigs.
Removal gets poll function, separate name and description, and
confirmation.

Pull Request: https://projects.blender.org/blender/blender/pulls/118778
2024-03-14 22:40:04 +01:00
Hans Goudey
726b18eefb Cleanup: Make format 2024-03-14 17:25:36 -04:00
Harley Acheson
a0a2e7e0dd UI: Improved Operator to Delete Custom Themes
Changes to python operators that add and remove custom themes. Removal
gets poll function, separate name and description, and confirmation.

Pull Request: https://projects.blender.org/blender/blender/pulls/118775
2024-03-14 22:01:34 +01:00
Falk David
8b01578826 GPv3: Expose stroke depth order setting in the UI
This exposes the `stroke_depth_order` setting.
The enum is added to a `Settings` panel in the object-data properties.
2024-03-14 17:26:14 +01:00
Sergey Sharybin
74d948097f Merge branch 'blender-v4.1-release' 2024-03-14 17:11:45 +01:00
Harley Acheson
a1fcdf10f2 UI: Timeline Playback Popup Too Narrow
With default sizes the Timeline "Playback" popover clips the text of
two items in English. This PR just makes it just wide enough plus a
bit of breathing room.

Pull Request: https://projects.blender.org/blender/blender/pulls/119474
2024-03-14 17:10:34 +01:00
Harley Acheson
73d76d4360 UI: User Prefs Language Section
Change Preferences panel "Translation" to "Language" and replace
"Affect" with "Translate".

Pull Request: https://projects.blender.org/blender/blender/pulls/119430
2024-03-14 16:32:34 +01:00
Falk David
a5229ed125 GPv3: Add layer masks operators and UI
Layer masks were partly already there. This PR completes the implementation and expose them through the UI.

This also adds three operators to:
- add a layer mask
- remove a layer mask
- reorder layer masks

Note: These are not used by the renderer yet. Will be done in a following PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/119433
2024-03-14 14:07:37 +01:00
Falk David
66968e37fa GPv3: Add layer blend mode to the UI
Adds the `blend_mode` property to RNA and exposes it in the UI.

Note: This is not used by the renderer yet. Will be added in a following PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/119460
2024-03-14 14:05:29 +01:00
Falk David
a07a558ac5 GPv3: Add view layer name property
This adds the `viewlayername` property to grease pencil v3 layers.
It's exposed as `viewlayer_render` in python.

Note: this is not used in the renderer yet. Will be used in a following PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/119422
2024-03-14 10:15:07 +01:00
Campbell Barton
cf1ab3ec6e Cleanup: consistent quotes in Python 2024-03-14 10:38:45 +11:00
Germano Cavalcante
f6a581e28a UV: Vert and Edge Slide UI improvements
Changes:
- Add Vert Slide and Edge Slide to 'UV -> Transform' menu.
- Add a separator for Vert Slide and Edge Slide in the context menu.
- Don't display the "Correct UVs" option in the Redo menu of UV Editor.
2024-03-13 12:16:19 -03:00
Thomas Dinges
ed20c9e302 Merge branch 'blender-v4.1-release' 2024-03-13 15:22:20 +01:00
Thomas Dinges
f911d4217b Release: Update manual references. 2024-03-13 15:11:22 +01:00
Jeroen Bakker
f0f911590e EEVEE-Next: Viewport pixel size with up-sampling
EEVEE-Next performes less on integrated GPUs then discrete GPUs.
Most shaders have been analyzed, but there will always be bottlenecks
related to architectural differences.

In order to make EEVEE-Next run smooth on integrated GPUs this change
will implement viewport pixel size option similar to Cycles. The main difference
is that the samples will still be weighted and up-sampled to the final film
resolution. This makes the pixels not look squared in the viewport but will
resolve to something close to the results without up-scaling.

This improves the performance especially on integrated GPUs. The improvement
for discrete GPUs are less noticeable. See here the stats when playing
`rain_restaurant.blend` back on a RAPHAEL_MENDOCINO iGPU.

| Pixel size | Frames per second |
|------------|-------------------|
| 1x         | 0.25 FPS          |
| 2x         | 4.14 FPS          |
| 4x         | 6.90 FPS          |
| 8x         | 9.95 FPS          |

Related to: #114597
See PR for some example images.

Pull Request: https://projects.blender.org/blender/blender/pulls/118903
2024-03-13 12:00:24 +01:00
Jacques Lucke
653108068d Merge branch 'blender-v4.1-release' 2024-03-13 10:39:48 +01:00
Jacques Lucke
5c65dba14c Cleanup: make format 2024-03-13 10:39:22 +01:00
Jesse Yurkovich
3762ead281 Merge branch 'blender-v4.1-release' 2024-03-12 21:23:58 -07:00
Jesse Yurkovich
0b19f1f4a0 Fix #119030: Only access Location node input when available
Our `node_shader_utils.py` module needs to be updated to account for API
changes made during the 4.0 release cycle [1].

Here we need to guard against accessing the "Location" node input if not
dealing with the appropriate type of Mapping node.

[1] e4ad58114b9d56fe838396a97fe09aff32c79c6a

Pull Request: https://projects.blender.org/blender/blender/pulls/119354
2024-03-13 05:22:43 +01:00
Harley Acheson
bc70b597fc UI: Use New Internet Icon
We recently added a new "Internet" icon, meant to represent internet
services and protocols generally, in contrast with the existing "url"
icon which can be seen as being http (web link) specifically.  This
PR just uses this icon for cloud storage uses and for remote extension
repository.

Pull Request: https://projects.blender.org/blender/blender/pulls/119409
2024-03-13 02:39:36 +01:00
Hans Goudey
77b6f5d7e3 Merge branch 'blender-v4.1-release' 2024-03-12 17:34:52 -04:00
Hans Goudey
6b81fbced8 Cleanup: Make format 2024-03-12 17:34:08 -04:00
Hans Goudey
23a74f4d49 Merge branch 'blender-v4.1-release' 2024-03-12 16:49:18 -04:00
Sean Kim
b7b7d3a937 Fix #119396: Add toggle for texture paint mask icon
This PR adjusts the behavior of the Texture Paint mask icon to behave
similarly to the automasking icon in Sculpt mode. This behavior was
missed in the original task: #102585

Pull Request: https://projects.blender.org/blender/blender/pulls/119399
2024-03-12 21:34:43 +01:00
Falk David
2ef441d87e GPv3: Show 'Use Lights' object setting in Visibility panel 2024-03-12 17:40:25 +01:00
Hans Goudey
daa1739953 Merge branch 'blender-v4.1-release' 2024-03-12 10:54:14 -04:00
Hans Goudey
91466f71f1 Fix #91256, #112646: IDProperty UI data lost when changing type
With some data-type conversions we can do a best-effort conversion of
UI data like default values and min and max to the new data type.
This can help to make Python scripts simpler and to avoid bugs like
#105965.

Pull Request: https://projects.blender.org/blender/blender/pulls/106161
2024-03-12 15:49:20 +01:00
Falk David
ee9510cdc3 Merge branch 'blender-v4.1-release' 2024-03-12 14:48:44 +01:00
Falk David
998514af7b Fix #115313: GPencil brush direction is not kept
The core of the issue was that `sculpt_flag` was used by three different enums (`eGP_Sculpt_Flag`, `eGP_Sculpt_Mode_Flag`, and `eBrushFlags`). This resulted in the flag getting overriden because `ENUM_OPERATORS` expected the maximum value of `eGP_Sculpt_Flag` to be `(1 << 3)` which it wasn't.

The `sculpt_flag` was exposed through python as `"direction"`.
In the UI this meant that it was effectively used as `brush.direction`. This fix replaces `brush.gpencil_settings.direction` with `brush.direction`.
It also makes sure `sculpt_flag` is only ever used with values from `eGP_Sculpt_Flag`.

Pull Request: https://projects.blender.org/blender/blender/pulls/119373
2024-03-12 14:22:52 +01:00
Sean Kim
68afd22501 Sculpt: Add Lasso Hide tool
This commit adds the `SCULPT_OT_hide_show_lasso_gesture` and the
corresponding Lasso Hide tool.

* Exposes the selection type for both the lasso and box hide tools
  as a option in the header
* Adds functionality into `sculpt_gesture.cc` for handling lasso
  selections with the `Outside` selection type

For `SelectionType::Outside`, the current implementation opts to not
do any filtering on the PBVH node level due to cases where the node
is mostly covered by a single gesture.

Addresses one of the tools in #80390

Pull Request: https://projects.blender.org/blender/blender/pulls/119140
2024-03-12 14:19:02 +01:00