Commit Graph

1315 Commits

Author SHA1 Message Date
Guillermo Venegas 8b6a21c122 IO: Use FileHandlers in the View 3d
Use File Handlers to handle file drag-n-drop in the View 3d. Drop-boxes
still remain since they handle Texture ID drag-n-drop.

This will add-ons to handle drag-n-drop for images and movies while
still providing access to Blender's native support since File Handlers
let users choose which to invoke if there's multiple configured.

Pull Request: https://projects.blender.org/blender/blender/pulls/117728
2024-03-26 20:01:08 +01:00
Sean Kim 881178895b Sculpt: Add fast solver option for trim operations
This PR introduces the ability for users to switch between boolean
solvers while using the sculpt *Trim* tools (*Box Trim* & *Lasso Trim*)
much like the mesh boolean modifier and geometry node. Because the
*Exact* solver has performance issues with larger meshes, the *Fast*
solver is set to be the default.

In my very rough timing tests on my laptop on a mesh with **1.7m**
vertices, a *Trim* operation with the *Fast* solver finishes in roughly
20 seconds as opposed to still being in progress after five minutes
with the *Exact* solver.

Addresses part of #84229

Pull Request: https://projects.blender.org/blender/blender/pulls/119699
2024-03-26 17:25:06 +01:00
Sietse Brouwer 31c194c002 Fix: GPv3: Layer 'Lock All' not working when 'Unlock All' has run before 2024-03-26 10:59:08 +01:00
Sietse Brouwer ca8fc1dea6 Fix: GPv3: Empty drawings with layer 'Duplicate' when 'Duplicate Empty Keyframes' has run before 2024-03-26 10:59:08 +01:00
Campbell Barton 155dae94d7 Cleanup: code-comments, use doxygen formatting & spelling corrections
Also move some function doc-strings from the implementation
to their declarations.
2024-03-26 17:55:20 +11:00
Hans Goudey 9d88fa483c Cleanup: Make format 2024-03-25 09:13:33 -04:00
Germano Cavalcante f66cb1e635 UI: rename 'Snap With' and 'Snap To' to 'Snap Base' and 'Snap Target'
Since the `Set Snap Base` feature has been implemented, it would be
convenient to reflect the use of the term `Snap Base` in other areas in
the UI.

Pull Request: https://projects.blender.org/blender/blender/pulls/119723
2024-03-25 13:35:52 +01:00
Pratik Borhade 2e8259e4d4 GPv3: Clean loose points in draw mode menu
Include `clean loose` operator in draw mode menu.
And move this operator inside `Cleanup menu` (same as GPv2)

Pull Request: https://projects.blender.org/blender/blender/pulls/119782
2024-03-25 12:17:03 +01:00
Jun Mizutani 378d37ed3d Fix #119812: 'Add Child Collection' adds a brother bone collection
Change label from "Add Child Collection" to "Add Bone Collection", as the
newly added collection becomes a sibling, not a child, of the active one.

Pull Request: https://projects.blender.org/blender/blender/pulls/119845
2024-03-25 09:25:24 +01:00
Hans Goudey 73e7023c71 Fix #119816: New curves draw tool options missing in sidebar 2024-03-23 10:51:48 -04:00
Bastien Montagne 4d973d3cf3 GPv3: Optional automatic conversion of legacy GP objects on fileload.
This adds a new exprimental option to automatically convert GP legacy
data to GPv3 one.

It supports also linking and appending cases. Conversion also happens
when opening a file linking GP legacy data saved by an older .blendfile.

Pull Request: https://projects.blender.org/blender/blender/pulls/118705
2024-03-23 03:28:57 +01:00
Julian Eisel d470b65f6d Merge branch 'blender-v4.1-release' 2024-03-22 12:28:46 +01:00
Julian Eisel 303014bfac Fix #108078: Crash when inverting results in pose library sidebar
a958ae36e8 introduced support for UI lists to reference items that would
never be shown, regardless of filter settings. This was to skip assets
in the asset view template that were not of the requested type. UI list
sorting code wasn't updated to account for such items that should be
entirely ignored.

Pull Request: https://projects.blender.org/blender/blender/pulls/109157
2024-03-22 12:25:39 +01:00
Campbell Barton 6198fac37e Cleanup: use UILayout.panel in extensions repo popover
Replace workaround that's no longer needed since popovers now support
collapsible sections.
2024-03-22 17:46:57 +11:00
Campbell Barton 44defbd2c7 Extensions: add BLENDER_USER_EXTENSIONS user directory
Replace: `{BLENDER_RESOURCE_PATH_USER}/extensions`
With:    `{BLENDER_USER_EXTENSIONS}`

This follows BLENDER_USER_CONFIG & BLENDER_USER_SCRIPTS conventions.
Reading the environment variable and accessible via
`bpy.utils.user_resource('SCRIPTS')`
2024-03-22 16:08:25 +11:00
Campbell Barton 6bfc8612bf Cleanup: remove BLENDER_USER_AUTOSAVE
This was only used on WIN32 when the temporary directory didn't exist.
When the check was added [0] this made some sense because it relied on
`U.tempdir` existing, since then additional checks have been added to
ensure a temporary directory can be used. Further, this fall-back
location isn't documented in the user manual.

[0]: 615db01b01
2024-03-22 16:08:25 +11:00
Aaron Carlisle 02578117cd Merge branch 'blender-v4.1-release' 2024-03-21 23:48:14 -04:00
Aaron Carlisle 365f5f8823 Docs: Update rna manual references 2024-03-21 23:47:15 -04:00
Jeroen Bakker db23e145db EEVEE-Next: Show world volume properties
The Volume input of the world didn't show up inside the property panel.
Reason was that the panel didn't have EEVEE-Next inside its list of compatible
engines.

Pull Request: https://projects.blender.org/blender/blender/pulls/119729
2024-03-21 11:05:13 +01:00
Campbell Barton 1a1905a639 UI: only show a single exception when enabling an add-on fails
The full stack-trace is mainly useful to developers which is printed
to the console. Only include a single exception in the error report.
2024-03-21 16:57:31 +11:00
Campbell Barton 429959e268 UI: always report to the user when an add-ons fail to load
Failure to import the module would print a message but not show
any feedback to the user - failing silently.
2024-03-21 16:57:31 +11:00
Campbell Barton 3cb687c32c addon_utils: show a useful error when loading a module without a file
When loading an add-on without a __file__ set the "cause" was empty.

Now the modules __path__ is included (when available) which points
to the path that failed to load to help with troubleshooting.
2024-03-21 16:54:15 +11:00
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
Sybren A. Stüvel 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 f57e4c5b98.

After this one more fix was committed, this one is preserved as well:
67bd678887.
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