Commit Graph

1645 Commits

Author SHA1 Message Date
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
Clément Foucault
66af5ed445 EEVEE-Next: Add fast GI max distance
This is implemented as a separate parameter from AO
since the AO can be tweaked for the AO pass.
2024-05-27 18:14:00 +02:00
Clément Foucault
8a7b9f6f66 EEVEE-Next: Add option to turn off GI
This new `Method` property allows to replace Diffuse GI
by simple ambient occlusion. This can be desirable for
performance or look.

This doesn't add the memory savings but there are already
some performance gain by using this option.
2024-05-27 18:14:00 +02:00
Falk David
8269f1dd8a GPv3: UI: Remove active smooth factor
This setting was added for testing purposes early on.
It's now in the right place in the `Advanced` tool setting panel.
2024-05-27 17:27:31 +02:00
Bastien Montagne
a367cf664e Fix (unreported) I18N extraction tooling fully broken by some new strings in code.
Strings built by concatenating literals and pre-processor-defined
strings would lock the code extracting them for i18n forever.

This commit 'fixes' the issue by adding some support for these cases in
the `inbetween` regex snippet part of the 'extract string' complex regex
system, to avoid the lock.

The code has no way currently to extract the value of these defines
though, so they should not be used in translated strings.

NOTE: PR !122283 should do a propoer fix to these issues, by refactoring
the string building such that only actual strings pieces get processed
by the translation code.
2024-05-27 14:48:09 +02:00
Sebastian Parborg
241c19a57a Add "Only project onto selected" for curve, GP3, and annotation drawing
Implementation of the proposal in: #121535

When drawing with "project to surface" turned on, it is now possible to restrict the projection to only the selected objects.
This is really useful for drawing onto surfaces that has a lot of detail meshes that you don't want to project onto.
2024-05-27 13:37:36 +02:00
Damien Picard
446a653cb7 I18n: improve add-on translation tooling
- Allow versions from bl_info to be strings
  Versions are now allowed to be strings in extensions using
  blender_manifest.toml, so this commit prevents them from being badly
  formatted on extraction to add-on translations.

- Do not export Blender copyright text to add-on translations
  This text is only relevant for Blender and maybe core add-ons, not
  for the general case.

- Copy comment lines from add-on .po files to .py translations
  Without this comments added by translators could be lost since they
  were not copied over to the Python files.

- Fix indentation in add-on translations
  Some lines in the translation dict were off by a few spaces. This
  resulted in linting tools complaining about the indentation.

- Do not escape messages in add-on translations multiple times
  When extracting add-on messages, they would get escaped multiple
  times, resulting in invalid strings when they contained quotes for
  example.

  This happened because on updating the messages from the ref
  ones (those actually extracted from Blender), each ref I18nMessage
  would be assigned to the corresponding language I18nMessage, without
  copy. When this message was escaped, it happened once for every
  language since they were actually the same object.

  To avoid this, I18nMessage objects are copied when merging.

-----

Example tuple before PR:
```python
translations_tuple = (
    (("*", ""),
     ((), ()),
     ("fr_FR", "Project-Id-Version: AnimAll 0...1.1...0 (0)\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2024-05-26 17:10+0000\nPO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\nLast-Translator: FULL NAME <EMAIL@ADDRESS>\nLanguage-Team: LANGUAGE <LL@li.org>\nLanguage: __POT__\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit",
               (False,
                ("Blender's translation file (po format).",
                 "Copyright (C) 2024 The Blender Authors.",
                 "This file is distributed under the same license as the Blender package.",
                 "FIRST AUTHOR <EMAIL@ADDRESS>, YEAR."))),
    ),
    (("*", "\\"Location\\" and \\"Shape Key\\" are redundant?"),
     (("extensions/user_default/animall/__init__.py:250",),
      ()),
     ("fr_FR", "",
               (False, ())),
    ),
    ...
```

After:
```python
translations_tuple = (
    (("*", ""),
     ((), ()),
     ("fr_FR", "Project-Id-Version: AnimAll 0.11.0 (0)\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2024-05-26 17:06+0000\nPO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\nLast-Translator: FULL NAME <EMAIL@ADDRESS>\nLanguage-Team: LANGUAGE <LL@li.org>\nLanguage: __POT__\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit",
      (False, ("FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.",))),
     ),
    (("*", "\"Location\" and \"Shape Key\" are redundant?"),
     (("extensions/user_default/animall/__init__.py:250",),
      ()),
     ("fr_FR", "",
      (False, ())),
     ),
    ...
```

Pull Request: https://projects.blender.org/blender/blender/pulls/122273
2024-05-27 13:33:49 +02:00
Campbell Barton
7911e2614f Cleanup: remove redundant check in image as planes
There was a logical error in some code that didn't run,
remove the check.
2024-05-27 13:02:55 +10:00
Campbell Barton
b5003fa56c Support "Add -> Image -> Mesh Plane" as a built-in operator
Add the operator from the io_import_images_as_planes add-on,
making it a built-in operator.

The main differences with the add-on are:

- Compositor integration has been removed.
- The file handler for dropping images has been removed
  to avoid a popup whenever images are dropped onto Blender.

There were also changes to follow Blender's core scripts more closely:

- Defer imports where possible.
- Use `str.format`.
- Use double-quotes for non-enum strings.
- Remove or "_" prefix unused arguments.
- Avoid unnecessary use back-slashes for wrapping lines.

Otherwise all other functionality has been kept.

Ref !122223

Co-authored-by: Aaron Carlisle <carlisle.b3d@gmail.com>
Co-authored-by: Bastien Montagne <bastien@blender.org>
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Co-authored-by: Brendon Murphy <meta.androcto1@gmail.com>
Co-authored-by: CoDEmanX <codemanx@gmx.de>
Co-authored-by: Dalai Felinto <dalai@blender.org>
Co-authored-by: Damien Picard <dam.pic@free.fr>
Co-authored-by: Daniel Salazar <zanqdo@gmail.com>
Co-authored-by: Florian Meyer <florianfelix@web.de>
Co-authored-by: Jacques Lucke <mail@jlucke.com>
Co-authored-by: Jesse Yurkovich <jesse.y@gmail.com>
Co-authored-by: Jonathan Smith <j.jaydez@gmail.com>
Co-authored-by: Luca Bonavita <mindrones@gmail.com>
Co-authored-by: meta-androcto <meta.androcto1@gmail.com>
Co-authored-by: Philipp Oeser <info@graphics-engineer.com>
Co-authored-by: Pratik Borhade <pratikborhade302@gmail.com>
Co-authored-by: Rick Astley <mrbimax>
Co-authored-by: Sergey Sharybin <sergey@blender.org>
Co-authored-by: Sibo Van Gool <SiboVG>
Co-authored-by: Sun Kim <perplexing.sun@gmail.com>
Co-authored-by: Thomas Dinges <blender@dingto.org>
Co-authored-by: Victor Chedeville <victor-09@noreply.localhost>
2024-05-27 12:42:36 +10:00
Campbell Barton
52d34d1a44 Cleanup: spelling in comments 2024-05-27 12:07:03 +10:00
Jesse Yurkovich
91ad904cca Cleanup: make format 2024-05-26 21:33:28 +02:00
Clément Foucault
0e11f168db EEVEE-Next: Expose Fast GI ray and step count
This allow to reduce the amount of noise and reduce
the lost energy caused by low thickness and large
stride (low sample count).

Actual number of rays is twice the UI count.
2024-05-26 20:23:42 +02:00
Clément Foucault
eaf1454475 EEVEE-Next: UI: Move simplify panel just before post processes
Follow Cycles order.
2024-05-26 19:33:45 +02:00
Clément Foucault
e323a7d391 EEVEE-Next: UI: Rename Horizon Scan to Fast GI approximation
This matches Cycles feature name and is less technical.
2024-05-26 19:29:15 +02:00
Clément Foucault
9f2f1a5c57 EEVEE-Next: Shadow: Remove per light resolution scale
The reasonning is that we already have a resolution limit
slider per light.

The global shadow resolution scale is usefull as a quick
speedup option to reduce shadow cost for viewport regular
work or for quick rendering. For final render, the per
light resolution limit is more suited  than a LOD scale
since it doesn't modify the filtering of based on distance
from the camera.

This feature is really not hard to add back if there is
a compelling use case for it.
2024-05-26 18:56:03 +02:00
Clément Foucault
b96b87a75c EEVEE-Next: World: Add shadow options
This adds jitter option and filter option.
2024-05-24 18:41:18 +02:00
Julien Duroure
1e802d971a glTF exporter: Draco: fix normalized draco accessors
Fix exporting normalized accessor with Draco enabled.
json was ok, but accessor data itself was not flagged as normalized

Pull Request: https://projects.blender.org/blender/blender/pulls/122224
2024-05-24 16:25:56 +02:00
Campbell Barton
b1d98014a0 UI: replace URL icon with INTERNET for extension repository location
These aren't clickable links so the URL icon wasn't correct.
2024-05-24 22:45:02 +10:00
Campbell Barton
ae73c8aa25 UI: order "Network" after "OS Settings" in the System preferences
With the default window size this panel wasn't visible making it more
difficult to discover. Reorder since this is essential for enabling
extensions.
2024-05-24 22:45:02 +10:00
Julien Duroure
5bf160818f glTF exporter: Cleanup: quiet warning for debug builds on startup 2024-05-24 14:33:16 +02:00
Julien Duroure
4aadff7e97 glTF exporter: Fix retrieving attribute after recent merged 2024-05-24 10:22:40 +02:00
Julien Duroure
0f0a8df8a9 glTF exporter: Option to export VC even if not used in node tree
glTF specification says that VC must be used as a base color multiplier, so you should add it to your node tree to see it.
But seems common usage of VC is to use it for custom data. Custom properties/attribute is the best place for these data,
but in order not to break production workflow/pipeline, we add an option to export active VC
2024-05-24 09:36:14 +02:00
Julien Duroure
d80a1dd5f8 glTF exporter: Fix exporter both VertexColor & colorFactor in the same time 2024-05-24 09:32:42 +02:00
Julien Duroure
f8b8a1a5b6 glTF exporter: cleanup user warnings 2024-05-24 09:30:37 +02:00
Julien Duroure
ac97907841 glTF exporter: Fix UVMap export when is set from an attribute node 2024-05-24 09:28:53 +02:00
Julien Duroure
a71027d37f glTF exporter: UDIM for merged channel textures
Was never implemented
2024-05-24 09:26:27 +02:00
Julien Duroure
c297a9513e glTF exporter: Fix material check on evaluated data 2024-05-24 09:23:36 +02:00
Julien Duroure
be96d5144a glTF exporter: Instanced collection can have regular children 2024-05-24 09:21:43 +02:00
Julien Duroure
f86fe707ce glTF exporter: Fix merge after extra anim feature merge 2024-05-24 09:19:36 +02:00
Julien Duroure
c9daea2d5b glTF exporter: Fix typo in socket name 2024-05-24 09:17:41 +02:00
Julien Duroure
5789031072 glTF exporter: fix invalid escape sequence 2024-05-24 09:15:13 +02:00
Campbell Barton
4f73df2b7b Extensions: enable extensions.blender.org, adjust welcome screen
Splash screen notification text:

- When starting in "Offline mode" with repositories with installed
  packages enabled, the text is clickable unless launched with
  `--offline-mode`, the tooltip notes that the command line setting
  can't be changed at run-time.
- Don's show anything if there are not extensions installed.

Preferences:

- Don't show the welcome message on preferences if:
  - Blender is online.
  - The message was dismissed.
  - There are no enabled remote repositories.

- The option to enable extensions.blender.org has been replaced with
  a button that switches to the "System" tab where Online Access
  can be enabled.

Also expose bpy.app.online_access_override needed for the UI to check
if online access was disabled using command line arguments.
2024-05-24 16:51:36 +10:00
Campbell Barton
91cab8f992 Extensions: remove use of BaseException
This can cause unexpected behavior, even in cases where SystemExit
or KeyboardInterrupt needs to be caught, it's better to list them
explicitly.
2024-05-24 16:16:55 +10:00
Campbell Barton
7f0903fdbf Fix scandir always shown an error
Incorrect use of BaseException meant the generator finishing
would print as an error
2024-05-24 16:16:55 +10:00
Campbell Barton
ad09b175f9 Extensions: only check updates for repos that have packages installed 2024-05-24 14:08:34 +10:00