Commit Graph

1575 Commits

Author SHA1 Message Date
Bastien Montagne
82f9501a4a Collada: Mark the I/O operators as legacy in the UI.
Ref. https://devtalk.blender.org/t/moving-collada-i-o-to-legacy-status/34621
2024-05-21 17:02:00 +02:00
Christoph Lendenfeld
3a40d2813f Anim: Pose Library - Allow blending flipped from the context menu
This adds the `Blend Pose Flipped` option to the
context menu of the pose library.
The operator already accepted a flipped property,
it was just missing a dedicated menu entry for that.

In order for this to work, the modal operator had to be modified.
Instead of setting the flipped state, pressing `Ctrl` now acts as a toggle.
That means that if the operator has been started in flipped mode,
pressing and holding `Ctrl` will unflip it.

This has been a point of discussion in the A&R module meeting
https://devtalk.blender.org/t/2024-05-14-animation-rigging-module-meeting/34614#ux-quirks-in-the-pose-library-shelf-5

Pull Request: https://projects.blender.org/blender/blender/pulls/121857
2024-05-21 11:08:22 +02:00
Colin Basnett
2fe92c63d3 Geometry Nodes: Add Active Element tool node
This pull request adds an "Active Element" node that exposes the active
vertex, edge, or face index to the geometry node tool context. The
presence of an active element is available as a boolean.

This node enables the creation of "active-to-selected" style operators.

Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/121333
2024-05-20 21:01:30 +02:00
Campbell Barton
e0b043d076 Cleanup: minor changes to the splash "Quick Setup"
No functional changes.

- Remove unnecessary variable declarations.
- Declare wm & prefs at the function beginning
  to prevent noisy patches in case they're used elsewhere in the future.
- Correct invalid comment.
2024-05-20 12:51:20 +10:00
Campbell Barton
096eed9d7f Cleanup: spelling in comments 2024-05-20 10:23:54 +10:00
Clément Foucault
e0b3dee35a EEVEE-Next: Jittered Soft Shadows
Jittered Soft Shadows support.
Improves soft shadow quality at the cost of re-rendering shadow maps every sample.
Disabled by default in the viewport unless enabled in the Scene settings.

| Tracing-only | Jitter-only | Jitter+Over-blur |
| --- | --- | --- |
| ![imagen](/attachments/e5ca6120-0666-4e86-b6e0-3d7512587b86) | ![imagen](/attachments/a72631aa-14f8-4e10-a748-848fc4bd4ab2) | ![imagen](/attachments/07c5de65-61d2-48e7-b78c-9c3cbdcaf844) |

Tracing-only is the method used by default in EEVEE-Next.
Jitter-only is the method used by EEVEE-Legacy Soft Shadows.
Jitter+Over-blur combines both.

Co-authored by Miguel Pozo @pragma37 (initial patch #119753)

Pull Request: https://projects.blender.org/blender/blender/pulls/121836
2024-05-18 17:21:47 +02:00
Julien Duroure
20d8f48500 glTF exporter: Allow custom attribute UVMap to be on point domain
Fixes the root cause of #121204
2024-05-18 08:54:35 +02:00
Campbell Barton
e0b47f78e8 Extensions: show permissions, validate permission values 2024-05-18 16:52:21 +10:00
Julien Duroure
876bfdcbdf glTF exporter: Fix #121878 crash when exporting without animation 2024-05-18 08:50:21 +02:00
Julien Duroure
733bd00432 glTF exporter: fix typo in Vertex Color Alpha management 2024-05-18 07:00:58 +02:00
Campbell Barton
dc7cfb7905 Extensions: improve colors for the "list" subcommand
The dark-grey tagline on black was difficult to read.
2024-05-17 14:53:17 +10:00
Campbell Barton
c598e8c8a7 Fix #121876: index.json error in console, accumulation of @ files
Fix missing check for the existence of index.json before removal.
Also write errors to the stderr instead of the stdout.
2024-05-17 13:56:52 +10:00
Campbell Barton
bf7267638a Fix #121892: string formatting errors in the clip editor & sequencer
Regression in 0e3b594edb.
2024-05-17 13:24:34 +10:00
Campbell Barton
2391407116 Cleanup: resolve mypy type warnings 2024-05-17 12:15:03 +10:00
Campbell Barton
676ac9cfb1 Cleanup: de-duplicate error handling when downloading extension data 2024-05-17 12:01:25 +10:00
Campbell Barton
489b6aed18 Extensions: always show errors when checking for updates fails 2024-05-17 12:01:07 +10:00
Campbell Barton
05617ed07d Extensions: clarify defaults in extension command line help text
Also don't use `.` for the output-filepath because it's not a directory.
2024-05-17 10:32:20 +10:00
Campbell Barton
64c4c939a9 Fix "missing scripts" being unavailable in the extensions UI
Add-ons which were enabled but not found warn on startup
and were shown under "Missing scripts", where they can be ignored
(the user can choose to restore the paths) or disabled them to suppress
the warnings in future.

This is now available again, with a minor refactor.
2024-05-16 22:55:20 +10:00
Brecht Van Lommel
a926f5b67d Refactor: Replace ID_IS_LINKED by !ID_IS_EDITABLE
Add new ID_IS_EDITABLE macro that checks if the ID can be edited in the
user interface. Replace usage of ID_IS_LINKED where it is used with this
meaning.

Also add a corresponding ID.is_editable property for Python.

This prepares for the ability to edit some linked datablocks for brush
assets.

Pull Request: https://projects.blender.org/blender/blender/pulls/121838
2024-05-16 14:53:09 +02:00
Brecht Van Lommel
430c58bbb2 Fix: Inconsistent use of Add-On in label instead of Add-on 2024-05-16 14:05:29 +02:00
Julien Duroure
b583b6ec39 glTF I/O: Use nodes for alpha clipping
Replace the use of Blend Mode on EEVEE (legacy), not existing on EEVEE-Next
2024-05-16 13:14:41 +02:00
Campbell Barton
3003953e14 Extensions: rename the internal name for repository JSON
Use the name "index.json" instead of "bl_ext_repo.json".

This makes more sense as the name is automatically added to the end
of file:// URL's a little like index.html for web-sites.
2024-05-16 20:44:59 +10:00
Campbell Barton
1e852879c5 Cleanup: remove extensions readme
Some of this is outdated.
Documentation for extensions is now part of developers docs.
2024-05-16 20:43:40 +10:00
Campbell Barton
d91e6f7b14 Extensions: use the modal update when enabling the repository
This allows the user to cancel the update by pressing escape.
2024-05-16 17:01:44 +10:00
Campbell Barton
af996db23a Extensions: use the wait cursor for modal actions
Actions such as update/install now use the wait cursor.
2024-05-16 17:01:44 +10:00
Campbell Barton
30f4a5e051 Fix error checking for updates on startup
Manually deleting the extensions directory caused checking for
updates on startup to fail.

It attempted to create a directory without the parent existing
which raised an error.
2024-05-16 17:01:44 +10:00
Campbell Barton
8ff15f1c70 Cleanup: restore error, exclude extensions tests from bl_load_py_modules
Also remove outdated exclusions.
2024-05-16 16:02:25 +10:00
Campbell Barton
6e6ce17e34 Addons: include addons_core/modules in sys.path when found
Renaming "addons" to "addons_core" should have included this change.
2024-05-16 15:18:42 +10:00
Campbell Barton
744819cf9b Addons: only ever check "addons_core" for bundled add-ons
Avoid checking every scripts directory for add-ons core,
as creating this directory would cause "addons" to be ignored.
2024-05-16 15:06:10 +10:00
Campbell Barton
672d203e67 Extensions: support file URI's for the remote URL
Previously regular paths were supported however supporting both
URL's and file paths isn't very common & complicated internal logic.

Also fixed an error where the server-generate sub-command created the
"archive_url" from the file-name without URL encoding.
2024-05-16 13:41:39 +10:00
Campbell Barton
dd1769088b Fix error dropping a local extension onto Blender 2024-05-16 12:11:46 +10:00
Campbell Barton
ecec9de4e6 Cleanup: remove internal argument to override the support level
This was only ever used for addons_contrib which has been removed.
2024-05-16 09:03:16 +10:00
Dalai Felinto
eab9e05773 Extensions: Update repository listing after enabling Blender repository
Without this the experience was:
* Launch Blender
* Go to Preferences > Extensions
* Click on Enable Repository

Nothing happens...

* Restart Blender
* Go to Preferences > Extensions

You would see an error: Repository ... must sync with the remote
repository.

In theory users had to click on "Check for Updates" for this to go away.
This commit does it automatically for them.
2024-05-15 20:22:43 +02:00
Dalai Felinto
88e76a0667 Remove warning from VR and UI Translate add-ons 2024-05-15 19:39:56 +02:00
Campbell Barton
c4a0bbb1f4 Extensions: Support online extensions and move add-ons outside Blender
The extensions system allows to extend Blender with connectivity to the internet. Right now it means Blender can
discover and install add-ons and themes directly from the internet, and notify users about their updates.

By default this is disabled (opt-in), and users can enable it the first time they try to install an extension or visit
the Prefences > Extensions tab. If this is enabled, Blender will automatically check for updates for
extensions.blender.org upon startup.

When will Blender access the remote repositories:

* Every time you open the Preferences → Extensions: ALL the enabled repositories get checked for the latest info (json)
* Every time you try to install by dragging: ALL the enabled repositories get checked for the latest info (json).
* Every time you start Blender: selected repositories get checked for the latest info (json).

------------------

From the Blender code point of view, this means that most of the add-ons and themes originally bundled with Blender
will now be available from the online platform, instead of bundled with Blender. The exception are add-ons which are
deemed core functionality which just happened to be written as Python add-ons.

Links:
* Original Extenesions Platform Announcement: https://code.blender.org/2022/10/blender-extensions-platform/
* Extensions website: https://extensions.blender.org/
* User Manual: https://docs.blender.org/manual/en/4.2/extensions/index.html#extensions-index
* Technical specifications: https://developer.blender.org/docs/features/extensions/
* Changes on add-ons bundling: https://devtalk.blender.org/t/changes-to-add-on-bundling-4-2-onwards/34593

------------------

This PR does the following:

* Move extensions out of experimental.
* No longer install `scripts/addons` & `scripts/addons_contrib`.
* Add `scripts/addons_core` to blender's repository.

These add-ons will still be bundled with Blender and will be always enabled in the future, with their preferences
moved to be more closely integrated with the rest of Blender. This will happen during the remaining bcon2 period.
For more details, see #121830

From scripts/addons:

* copy_global_transform.py
* hydra_storm
* io_anim_bvh
* io_curve_svg
* io_mesh_uv_layout
* io_scene_fbx
* io_scene_gltf2
* pose_library
* ui_translate
* viewport_vr_preview

Extra: bl_pkg (scripts/addons_contrib)

Note: The STL (legacy) add-on is going to be moved to the extensions platform. There is already a C++ version on core
which is enabled by default.

All the other add-ons are already available at extensions.blender.org. To use them you need to:

* Go to User Preferences > Extensions
* You will be greated with an "Online Extensions" message, click on "Enable Repository".
* Search the add-on you are looking for (e.g, Import Images as Planes).
* Click on Install

Over time their maintaince will be transferred over to the community so their development can carry on. If you used to
help maintain a bundled add-on please read: https://devtalk.blender.org/t/changes-to-add-on-bundling-4-2-onwards/34593

Ref: !121825
2024-05-15 19:26:29 +02:00
Campbell Barton
13a3603578 Move addons from the addons repo to "addons_core"
Ref: !121825
2024-05-15 19:26:29 +02:00
Chao Li
4b59c1bcbf GPv3: Merge by distance Operator
The algorithm to merge points based on distance thresholdhas been
implemented in 8b7d5f8587. This patch moves the function to
`blender::ed::greasepencil` namespace and use it to implement
merge by distance operator.

There are two parameters for the operator:
`threshold`: Distance threshold used for merging.
`use_unselected`: Use whole stroke or only selected points

Resolves: #113917
Pull Request: https://projects.blender.org/blender/blender/pulls/120385
2024-05-15 16:25:41 +02:00
Lukas Tönne
7a3cd753ba GPv3: Fill tool to generate strokes in empty areas
Implementation of the GPv2 Fill tool in Grease Pencil 3.

This tool creates new strokes where the user clicks, by rendering
strokes into an image and then performing flood-fill and boundary
search operations.

This is a minimal first part, several features of the GPv2 tool are
still missing (gap filling methods, smoothing, dilate/erode).

Co-authored-by: Falk David <falk@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/120693
2024-05-15 13:36:06 +02:00
Sean Kim
1cf0d7ca6a Sculpt: Add customizable increment for line tool snapping
Sculpt: Add customizable increment for line tool snapping

This PR exposes the snap increments introduced in #118760 to the base
`WM_gesture_straightline` operators and exposes the increment menu to
allow users to change this value in both Sculpt and Weight Paint mode.

## Details
The full list of operators this affects:
* IMAGE_OT_sample_line
* PAINT_OT_weight_gradient
* MESH_OT_bisect
* PAINT_OT_mask_line_gesture
* SCULPT_OT_trim_line_gesture
* SCULPT_OT_project_line_gesture
* PAINT_OT_hide_show_line_gesture

## Compatibility
Previously, the hardcoded value for this snap increment was 15 degrees,
by using the toolsetting value, this changes the default to 5 degrees.

Pull Request: https://projects.blender.org/blender/blender/pulls/121547
2024-05-14 19:00:58 +02:00
Bastien Montagne
b8febd87e1 Fix #121712: outdated mapping between UI translations and Doc languages.
Both lists got heavily out of sync over the years.

Some day would be nice to have this managed in a single place.
2024-05-14 16:53:00 +02:00
Campbell Barton
2c47937a96 Extensions: add Preferences.extensions
Accessing extensions options in preferences.filepaths didn't make so
much sense.
2024-05-15 00:52:23 +10:00
Clément Foucault
ea5e1fef2a EEVEE-Next: Sunlight Extraction
Sun extraction convert part of light comming from the world to a
sun light which increases the quality of the rendering. The goal
of this feature is to workaround the limitation of the storage
techniques used for environment lighting inside EEVEE.

This first implementation works by clamping the world lighting and
summing the excess lighting and (and its incomming directions) to
deduce the sun position.
All the lighting is then transfered into this light power. The sun
angle is computed based on the directionnality of the excess lighting,
the more divergent the excess lighting is, the bigger the angle.

This has a few benefits:
- It's stable and behave well under animation. This is because we
average a lot of data.
- It's fast as it can be done inside the remap shader in one pass.
- It requires only one parameter, the clamp threshold.

However, it has some issue:
- It modifies the lighting as we change the incomming direction for
excess lighting away from the chosen sun direction. This could be fixed
by masking only lighting around the chosen sun direction (requires 2
passes, slower).
- Given that this only average the direction, it behaves poorly if there
two opposite bright light sources (it puts the sun in the middle). This
could be fixed by extracting more suns, but that becomes more complex
and requires even more passes.
- It looks bad if the summed lighting is not supposed to be a perfect
disk in specular reflections or if the sources are too divergent as the
disk is too big and the approximation fails short. This could be
mitigated by adding an upper bound to the sun radius. For now we
workaround this issue by exposing the sun angle parameter in the UI.

A more precise algorithm can be implemented in the future to avoid
having to deal with these limitations. A possibility is to use
importance sampling to randomize sun position. But that would be only
for final render.

Pull Request: https://projects.blender.org/blender/blender/pulls/121455
2024-05-14 16:36:12 +02:00
Sergey Sharybin
727a90a0f1 Compositor: Make GPU compositor an official feature
Effectively, make GPU compositor available without need to enable
an experimental feature set.

The compositor device is now exposed in the Performance panel of
Render Buttons. It is also still available in the compositor's
N-panel, together with some other options which are more about how
editing works, and not exactly related to render performance.

Pull Request: https://projects.blender.org/blender/blender/pulls/121398
2024-05-14 15:49:20 +02:00
Falk David
5d7e785fdd GPv3: Brush radius unit option
This implements and exposes the `View`/`Scene` brush radius option.

* `View`: Brush units are in pixels. Zooming in and out in the viewport will make the brush stay the same size relative to the view, but grow/shrink relative to the scene.
* `Scene`: Brush units are in meters. Zooming in and out in the viewport will make the brush grow/shrink relative to the view, but stay the same size relative to the scene.

The default radius unit is `Scene`, which is what GPv2 did.

The "2D Animation Template" was updated to disable using the radius in the unified paint settings. This means that using the template by default will use the brush radius, which also mimics the behavior of GPv2.

The user can change the radius brush unit from the `Advanced` panel.

Pull Request: https://projects.blender.org/blender/blender/pulls/120257
2024-05-14 15:20:31 +02:00
Falk David
890105b5ef GPv3: Add empty "Weights" menu in weight paint mode
This menu is just added as a stub for now.
2024-05-14 14:40:40 +02:00
Falk David
16af82a10f Fix: GPv3: Warning in space_view3d.py
The weight paint mode in grease pencil doesn't
have a selection menu. Make sure to not try and
add it.
2024-05-14 14:40:40 +02:00
Falk David
a5a49e8b06 Fix: GPv3: View3D header
There was some duplicated logic in the UI code
for the view 3d header.

This deduplicates the logic and moves the code
to the right place.
2024-05-14 14:40:40 +02:00
Campbell Barton
cdee8627b2 Extensions: rename repository "remote_path" to "remote_url"
Existing repository preferences will be reset to defaults.
2024-05-14 20:59:03 +10:00
Clément Foucault
e72c47751d EEVEE-Next: UI Shadow Resolution Limit
Improve naming and tooltips. Also fix a bug in the UI script.
2024-05-13 18:39:47 +02:00
Brecht Van Lommel
9bc8e438ef Cleanup: make format 2024-05-13 16:54:52 +02:00