Commit Graph

1679 Commits

Author SHA1 Message Date
Campbell Barton
a8a976e09b Extensions: separate URL drop message when offline mode is forced 2024-05-30 17:35:55 +10:00
Campbell Barton
8f97419561 Extensions: show a dialog when dropping a URL while offline
The dialog notifies the user that online access is required with a
button to go to the system preferences.

See #120665.
2024-05-30 16:07:59 +10:00
Campbell Barton
ed2b8e9c5c Fix file-load causing syncing extension repositories to hang 2024-05-30 10:42:11 +10:00
Campbell Barton
d2049f0aa7 Fix checking for extension updates while modifying repositories
It's possible the user frees or change the repository after a check
for updates starts because synchronizing repositories isn't blocking.

Resolve by using a copy of the repository when checking for updates,
only applying updates if the copy still matches the preferences once
the update is complete.
2024-05-30 10:28:17 +10:00
Campbell Barton
b05958ba02 Extensions: avoid syncing the repos when there the list is empty 2024-05-30 10:20:12 +10:00
Campbell Barton
515d8b9a0d Cleanup: minor tweaks to comments for extensions notifications 2024-05-29 21:33:24 +10:00
Campbell Barton
33622c7546 Fix extensions makefile on systems without a GNU userland 2024-05-29 21:28:40 +10:00
Pratik Borhade
781f9b9886 GPv3: Extrude operator in points menu
Similar to gpv2, move this operator inside points menu.
Also, this is an operator executed on selected "points".

Pull Request: https://projects.blender.org/blender/blender/pulls/122257
2024-05-29 13:10:13 +02:00
Campbell Barton
e991154ddb Extensions: sync remote extensions when displaying preferences
When online mode is enabled and the preferences are shown,
the users needed to manually check for updates.

Now this runs in the background, sharing logic with checking for
updates on startup.

When updates run status text is currently shown in the preferences
window, eventually this should be displayed in the status bar.

To avoid conflicts when updating a queue is used to avoid problems
caused by check for updates on startup & the preferences window also
checking for updates. Since checking for updates is optional it's
possible some repositories wont be handled by checking on startup
so both updates run for now. De-duplicating update checks can be
supported eventually.
2024-05-29 21:04:55 +10:00
Falk David
bf676e8973 GPv3: Draw Tool: Replace "Input Samples" with "Spacing"
The GPv2 draw tool used a setting called "Input Samples" to
generate points (subdivisions) when two samples are far apart
from one another.

In GPv3 we have the same feature, but with a bit more control.
Users can now specifiy the maximum distance between two
points based on a percentage of the brush size (in pixels).
2024-05-29 11:55:59 +02:00
Campbell Barton
051e10d39a Extensions: make "test_blender" less noisy 2024-05-29 15:31:44 +10:00
Campbell Barton
3f5f5eb2c0 Fix invalid URL's causing extension operations to fail to run
URL's without a known prefix now use error reporting that shows up in
the status bar.
2024-05-29 15:26:30 +10:00
Campbell Barton
f0ebc310c8 Extensions: update tests after changing UI text 2024-05-29 15:11:55 +10:00
Brecht Van Lommel
5de8ea74c4 Extensions: Only check for updates on startup every 24 hours
To reduce network bandwith and to only bother users once a day with
add-on updates. All repos are checked together so that there is only
one notification per day.

Also tweaked the wording so that it's more clear this will not actually
install the updates.

Ref !121888
2024-05-29 15:07:04 +10:00
noodlebox
fa4e26f1ee Fix: Node assets are missing from the Add menu for certain catalog names
Add > Utilities submenus for Color and Field do not include assets from the
correctly named catalogs due to typos: "Utilties/Color" and "Utilties/Field"
respectively.

Pull Request: https://projects.blender.org/blender/blender/pulls/122416
2024-05-29 05:44:47 +02:00
Campbell Barton
ddb00ad5e4 License headers: add SPDX header 2024-05-29 12:49:07 +10:00
Damien Picard
4b4ae72837 Import Images as Planes: improve option panels
- Layout changes
  - Use panels instead of boxes resulting in a more compact UI,
    more suitable to the drag-and-drop UI.
  - Make all enum options to drop-down menus.
  - Rename the title of `Position` box to `Transform`.
  - Remove sub-headers `Plane dimensions`,
    `Orientation` under Transform box.
  - Move offset related options to the bottom. Importing a single
    plane would be more common use case.
- Rename "Animate Image Sequences" to "Detect Image Sequences".
- Rename several labels and option names. Since drop-down allows more
  space, make some option names verbose.
- Remove the warning `'Opaque' does not support alpha`. It should be
  obvious from usual Blender usage, and doesn't need a special warning
  from the add-on.
- Disable Alpha Mode options instead of hiding it when use alpha is
  unchecked.
- Hide Track Camera option instead of disabling it when supported
  align modes are selected.
- Fix or rewrite several tool-tips.

Original PR by Sun Kim: blender/blender-addons!104936

Ref: !122345

Co-authored-by: Sun Kim <perplexing.sun@gmail.com>
2024-05-29 10:02:52 +10:00
Campbell Barton
7dc5b7c134 Fix error upgrading/installing extensions for the active repository
Removing the check for an empty repository list isn't correct when
only polling the active repository. Restore the check with a more
detailed error message.
2024-05-29 09:48:14 +10:00
Campbell Barton
6360edc867 Cleanup: quiet unused argument warning, line wrapping 2024-05-29 09:48:14 +10:00
Dalai Felinto
8d79a24075 UI: Only show offline mode if launched with --offline-mode
Blender is offline by default. There is no need to mention that unless the user
went out of their way to make it offline (with the --offline-mode argument).

This is still waiting for the offline icon #122225. Using the internet
icon meanwhile.

Co-authored by Pablo Vazquez.

---

Pull Request: https://projects.blender.org/blender/blender/pulls/122392
2024-05-28 23:29:24 +02:00
Hans Goudey
33a5b47735 Cleanup: Make format 2024-05-28 13:35:44 -04:00
Dalai Felinto
4b57951604 Extensions: New status message when checking for update
```
- Sync repo: {remote_url}
+ Checking repository "{remote_name}" for updates...

- Sync downloading remote data
+ Refreshing extensions list for "{remote_name}"...

- sync: invalid manifest ({error_msg}) reading {remote_url}!"
+ Repository error: invalid manifest ({error_msg}) for repository "{remote_name}"!

- Sync complete: {:s}".format(remote_url)
+ Extensions list for "{remote_name}" updated
```

---

Note, this is working as expected (from Blender anyways), however I can't test test_cli.py at the moment here.

---

Old messages:

<img src="https://projects.blender.org/attachments/9d4db8f5-ef9a-48c8-9e56-cb534aa9aed5" width=650>

New messages:

<img src="https://projects.blender.org/attachments/0245bcb7-6c4e-47e4-a616-0cf831761b47" width=450>

---

Co-authored by Pablo Vazquez

Pull Request: https://projects.blender.org/blender/blender/pulls/122378
2024-05-28 18:39:42 +02:00
Clément Foucault
53797a2ed3 EEVEE-Next: UI: Move fast GI to the bottom of raytracing panel
This avoid to mistakely think that the denoising is applied
to the Fast GI. Fast GI has its own internal denoising.
2024-05-28 18:38:23 +02:00
Sean Kim
025df21a0f Sculpt: Add Polyline Mask, Face Set, and Trim
This PR adds the *Polyline Mask*, *Polyline Face Set*, and
*Polyline Trim* tools.

## Limitations
* *Polyline Face Set* is not added to either of the *Sculpt*
or *Face Sets* menu as none of the other face set gestures are in
either.

Pull Request: https://projects.blender.org/blender/blender/pulls/122248
2024-05-28 18:33:45 +02:00
Dalai Felinto
18cf4e9d09 Correct tooltip for bl_pkg.extensions_show_for_update 2024-05-28 18:12:00 +02:00
Dalai Felinto
7ac762241e Extensions: Fixup for Install/Update operator
The same tooltip is used for Update. Which didn't make much sense as it
was (since it was suggesting that it was enabling the extension).

Simplifying the message now.

Fixup for: 31f7016ba9

Co-authored by Pablo Vazquez.
2024-05-28 18:12:00 +02:00
Sean Kim
9d3e2de76e Cleanup: make format 2024-05-28 08:47:58 -07:00
Sean Kim
7726e7f563 Sculpt: Add Line Face Set Tool
This PR adds the `Line Face Set` tool and adds it to the following
location:
* Sculpt Mode toolbar

## Limitations
None of the existing Face Set gesture operators exist in either the
Sculpt dropdown or the Face Set dropdown, this PR does not add the Line
Face set tool in either location as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/122245
2024-05-28 17:17:10 +02:00
Sean Kim
1ab3fffc1d Sculpt: Add increase / decrease visibility operator
This PR adds a new operator: `PAINT_OT_visibility_edit` to support
iteratively expanding or shrinking the visibility of a mesh, similar to
the *Grow / Shrink Mask* actions and the *Grow / Shrink Face Set*
options. This operator is exposed via two new entries in the *Sculpt*
toolbar entry as *Show More* and *Show Less* and have also been
assigned to Page Up and Page Down in the default Blender keybinds for
Sculpt Mode.

### Technical Details
Each of the PBVH types is solved slightly differently, though the
general principle for each is as follows:

1. Make a copy of the current mesh visibility state
2. Iterate over elements (faces & corners if available, otherwise
   vertices) to look at adjacency information
3. Apply appropriate visibility change to vertices
4. Sync face visibility

### Limitations
* Currently, like all other operators in the `paint_hide.cc` file. This
  new operator is limited to Sculpt mode only.

Based off of [this](https://blender.community/c/rightclickselect/pz4y/)
RCS request.

Pull Request: https://projects.blender.org/blender/blender/pulls/120282
2024-05-28 17:12:45 +02:00
Nika Kutsniashvili
61178b22a2 Nodes: port "Connect to Output" operator from Node Wrangler
As Node Wrangler add-on is moving to extensions platform and maybe isn't shipped
with Blender from 4.2 onwards, some of it's more important functionalities which are
crucial for Blender UX can be ported inside core. Also see #121749.

This PR ports "Preview Node" operator from add-on inside `scripts/startup/bl_operators`.

When Shift-Ctrl (or Shift-Alt) clicked on the node operator connects output socket of the
node to active Output node in the tree (group, material, light, or world output). For Geometry
Nodes this is just handy operator, but in Shader Nodes, because Viewer Node isn't
implemented, this has always been the only way to quickly preview nodes by connecting
it to Material Output.

Changes made from Node Wrangler version:
- Renamed operator from "Preview Node" to "**Connect to Output**", because node previews
  already mean a different thing in context of compositor and shader editor, and viewer node
  is used for previewing in geometry nodes. Connect to Output is correct name because in every
  context it's called that's what it does.
- Assigned shortcut Shift-Alt-Click in shader editor as well. Even though Shift-Ctrl click already
  works, it's good to have consistency with geometry nodes, so that users can use same shortcut
  in both contexts.

Operator doesn't work in compositor. It's not clear if that's wanted (to connect to Composite node),
and if it is it'll be added in separate PR.

Original authors of the add-on: Bartek Skorupa, Greg Zaal, Sebastian Koenig, Christian Brinkmann, Florian Meyer

Pull Request: https://projects.blender.org/blender/blender/pulls/122016
2024-05-28 16:42:55 +02:00
Campbell Barton
be4788a9bd Extensions: pass platform to the remote URL
Add the platform to the URL when connecting to the remote server.

Based on !122234.

Co-authored-by: Dalai Felinto <dalai@blender.org>

----

This follows documented platform ID's from: https://docs.blender.org/manual/nb/dev/advanced/extensions/getting_started.html

Co-authored-by: Dalai Felinto <dalai@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/122371
2024-05-28 16:35:41 +02:00
Jacques Lucke
905aaf439c Geometry Nodes: new Set Instance Transform node
This node allows replacing the transformation of every instance by providing a matrix.

Before, this was only possible by using the Store Named Attribute node. It's more common
in Blender to have specialized built-in nodes for built-in attributes (e.g. Set Position, and Set ID).

Pull Request: https://projects.blender.org/blender/blender/pulls/121473
2024-05-28 16:34:37 +02:00
Clément Foucault
c9c95e7e64 EEVEE-Next: RNA: Rename horizon property to fast_gi
This avoid discrepancy between the UI and the API.
2024-05-28 16:09:00 +02:00
Clément Foucault
117bfc870d EEVEE-Next: Fast GI: Add angular thickness
While easier to understand, the conventionnal global
scene thickness parameter have some downside:
- It doesn't scale with larger scenes since the
  distant samples have small thickness
- It doesn't handle fine geometric variation in
  foreground.

The proposed angular thicknes makes all sample
have the same angular span. This makes it
distance independant and capture different occluder
thickness with less artifacts. The downside is
that the occluders have the same angular span
at any distance which makes the same occluder inflate
with distance.

A downside is that the geometry near the shading point is
under-represented. Leaving light leaking or lack of AO
at contact points. To fix this, we introduce back a
geometric thickness parameter.

Pull Request: https://projects.blender.org/blender/blender/pulls/122334
2024-05-28 16:00:38 +02:00
Campbell Barton
b15bc1b5bb Extensions: add the blender version to the remote URL
Add query arguments to the URL when connecting to the remote server.

This information is stripped to create relative paths and for error
messages to prevent overly verbose URS's.

Based on !122234.

Co-authored-by: Dalai Felinto <dalai@blender.org>
2024-05-28 21:41:43 +10:00
Campbell Barton
171319d9ef Extensions: send access token for HTTP requests
- The access token is used when connecting to the server.
- Mention an invalid access token as a possible cause for 403 errors.

Based on !122234.

Co-authored-by: Dalai Felinto <dalai@blender.org>
2024-05-28 21:36:23 +10:00
Campbell Barton
c33b03fe68 Fix extension tests running after operator poll() changes
Enable "--online-mode" when running tests which require it.
2024-05-28 21:31:25 +10:00
Dalai Felinto
31f7016ba9 Extensions: Tooltip and poll for Install and Update operator(s)
Co-authored by: Pablo Vazquez.
2024-05-28 13:01:07 +02:00
Dalai Felinto
651621da0d Extensions: Tooltips and disable poll message for Check for Updates
This includes checks for offline-mode.

Co-authored by Pablo Vazquez.
2024-05-28 13:01:07 +02:00
Jacques Lucke
c10de354ac Curves: add edit mode context menu 2024-05-28 11:38:17 +02:00
Jacques Lucke
afec41e8d3 Curves: add extrude operator to menu 2024-05-28 11:37:22 +02:00
Campbell Barton
8366ea8798 Extensions: makefile tweaks
- Add a top-level "test" target that runs all other tests.
- Order "watch_*" convenience targets directly after the tests
  they watch.
2024-05-28 16:18:35 +10:00
Campbell Barton
aea2ac4c78 Fix images-as-planes potentially using linked-library data-blocks
Ensure data-block lookups never return linked-library data.
2024-05-28 16:00:22 +10:00
Campbell Barton
b776d2f5c5 Cleanup: avoid exception handling 2024-05-28 15:58:46 +10:00
Campbell Barton
ca9b105e6c Cleanup: spelling in comments 2024-05-28 13:47:43 +10:00
Damien Picard
3865eb5cdb Fix: error when selecting Size Mode in Import Images as Planes
When importing images as planes, on Size Mode update, this error would
be raised in the console because the update tried to assign a value to
a nonexistent member of the class:

Ref: !122343
2024-05-28 12:01:43 +10:00
Damien Picard
b37d121e0a I18n: extract and disambiguate a few messages
Extract
- Add to Quick Favorites tooltip.
- "Mask", the name of a newly created mask (DATA_).
- "New" in the context of the new mask ID button.
- A few strings using BLI_STR_UTF8_ defines were not extracted.
  Take the special characters out of the translation macros.
- "External" menu items from the filebrowser's Files context
  menu (right-click on a file). These items were already extracted,
  but not translated.

Improve
- Separate formatted error message "%s is not compatible with
  ["the specified", "any"] 'refresh' options" into two messages.

Disambiguate
- Use Action context for new F-modifiers' names. This is already used
  for the "type" operator prop.
- Translate ImportHelper's default confirmation text using the
  Operator context, as it uses the operator name which is extracted
  with this context.
- "Scale" can be a noun, the scale of something, or a verb, to scale
  something. The latter mostly uses the Operator context, so apply
  this context to verbs, and the default contexts to nouns.
- "Scale Influence" can mean "Influence on Scale" (tracking
  stabilization) and "to Scale the Influence" (dynamic paint canvas).
- "Object Line Art" as type of Line Art to add, as opposed to the
  active object's Line Art settings.
- Float to Integer node: use NodeTree context for the node label, as
  this is already extracted and used for the enum.

Do not translate
- Sequencer labels containing only a string formatting field.

Some issues reported by Gabriel Gazzán and Ye Gui.

Pull Request: https://projects.blender.org/blender/blender/pulls/122283
2024-05-27 19:33:35 +02:00
Damien Picard
f5c4372531 Extensions: expose extension tagline to bl_info
An extension's optional "tagline" field is equivalent to a legacy
add-on's "description". This allows exposing the tagline as a
description in `bl_info`.

The main goal of this change is to expose extension taglines to the
translations, since the legacy description was already extracted.

Pull Request: https://projects.blender.org/blender/blender/pulls/122327
2024-05-27 19:30:14 +02:00
Damien Picard
8b8d58a7e5 I18n: extract UILayout headings with context
Some UI elements (row and column) can define a heading text.
Optionally, this text can use a custom translation context specified
through `heading_text`. This changes allows extraction of those
headings using the appropriate context instead of the default one.

Pull Request: https://projects.blender.org/blender/blender/pulls/122326
2024-05-27 19:28:23 +02:00
Harley Acheson
392ac52ebb UI: Toggle Camera Guides in Viewport Overlays
Allow toggling camera composition guides in the 3DView Overlay popover.

Pull Request: https://projects.blender.org/blender/blender/pulls/121923
2024-05-27 18:16:04 +02:00