Commit Graph

3554 Commits

Author SHA1 Message Date
Julien Duroure
6a684cf4f8 glTF exporter: avoid crash for big WebP images 2025-06-17 12:38:39 +02:00
Julien Duroure
d00e01e663 glTF: Fix missing unregister 2025-06-17 12:34:10 +02:00
Julien Duroure
d4aa04d442 glTF: Fix action/inactive UI for export options 2025-06-17 12:30:12 +02:00
Julien Duroure
f9b3baa984 glTF exporter: Take (new) light temperature into account 2025-06-17 12:24:38 +02:00
Julien Duroure
71275fc218 glTF exporter: Take (new) light exposure into account 2025-06-17 12:16:23 +02:00
Julien Duroure
41f1df2ad5 glTF exporter: Fix Variants export when Apply modifiers
Was a regression in 4.4
2025-06-17 12:10:12 +02:00
Julien Duroure
064d3a5730 glTF importer: Fix importing some file
Where special nvode creation is mandatory.
2025-06-17 12:00:31 +02:00
Nathan Vegdahl
941d2ac1e1 Anim: Add action + slot selector to node tree editor's side panel
Previously there was no way to select/manage the action and slot
assigned to most kinds of node trees. This addresses that oversight.

This applies to all node trees that are not embedded IDs.

Pull Request: https://projects.blender.org/blender/blender/pulls/140347
2025-06-16 17:39:28 +02:00
Damien Picard
0bd797a433 I18n: Allow translation of a few reports using formatting
Reports whose message uses string formatting needs to be first
translated, then formatted. Also in one instance, use rpt_() instead
of iface_().
2025-06-16 12:39:02 +02:00
Clément Foucault
c1a028150a UI: Remove unused Depth Picking from the user pref panel
This option does nothing since 4.4. It will be removed
from the DNA and RNA in 5.0 (see #140338).
2025-06-13 12:32:05 +02:00
Clément Foucault
b1f222648d Fix #139740: Overlay: Wire armatures are invisible in pose mode
This PR moves back the wireframe slider option back to the
bones overlay popover. It is only showed in paint weight mode
and only active if in wireframe mode.

It was concluded that this feature should be revisited to maybe
cover all shading modes in the future. But for now it is safer
for 4.5 to limit it to the weightpaint mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/140276
2025-06-12 16:43:03 +02:00
Brecht Van Lommel
2f5c261e69 Fix: Remove missing Grease Pencil lasso selection operator from keymap
This was replaced by GREASE_PENCIL_OT_erase_lasso, and generates warnings
in logs.

Pull Request: https://projects.blender.org/blender/blender/pulls/140279
2025-06-12 16:32:42 +02:00
Jacques Lucke
7b291de3c3 Fix #140193: error when deleting panel with subpanel as first item 2025-06-11 14:26:00 +02:00
Damien Picard
798f85a710 Fix #139838: UI: Improve languages list and labels
Edit the language list to make it simpler to scan.

- Display languages in a form "Language (Variant)", such as
  "English (US)" instead of "American English" and
  "Portuguese (Brazil)" instead of "Brazilian Portuguese".
  This allows alphabetical sorting by language first.
  This does not apply to endonyms (languages in their own language).
- Use a dash instead of parentheses to separate the endonyms.
- Deduplicate languages (Automatic, American English, British
  English), which all are in English and don't appear in another
  language.

- Remove language categories as headers. They are replaced with
  percentages in the language tooltips. The percentages are
  generated in utils_languages_menu.py and stored in
  locale/languages.

Co-authored-by: Bastien Montagne <bastien@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/140087
2025-06-11 13:11:40 +02:00
John Kiril Swenson
82d20f6a22 Fix: VSE: Remove Playhead Snapping menu from Preview
The other snapping menu in the preview is specific to that view type,
so it doesn't really make sense to have a timeline-specific snap
mode listed here.

Pull Request: https://projects.blender.org/blender/blender/pulls/140171
2025-06-11 03:57:25 +02:00
Sean Kim
ee67c098d9 Fix #110879: Multires relative subdivide navigation subdivides mesh
Prior to this commit, the `object.subdivision_set` would prevent
actually applying a subdivision to a multires modifier when the relative
option was set. This is commonly accessed via Alt-1 / Alt-2 or D / Shift
D in Sculpt mode.

However, when the multires modifier did not already exist, pressing
these keybinds would still create the modifier and further subdivide the
mesh.

To fix this, this commit adds a hidden property to the operator:
`ensure_modifier` to indicate if the keybind should create the modifier
or not.

Pull Request: https://projects.blender.org/blender/blender/pulls/130254
2025-06-11 01:34:08 +02:00
quackarooni
633463c586 Fix: Nodes: Add menu entries not in alphabetical order
It is generally expected that items within the same section in the Node
Add menu appear in alphabetical order.

However, certain handful of places in the different node editor menus
don't seem to follow this convention. This patch simply re-arranges the
items in some places to follow alphabetical order.

Pull Request: https://projects.blender.org/blender/blender/pulls/140070
2025-06-10 15:49:31 +02:00
Guillermo Venegas
23ff021d58 Fix #139214: Wrong FBX file imported when dropping with a preset
Exclude operator paths from the preset.

Ref !139309
2025-06-10 07:34:10 +00:00
Campbell Barton
6ed8e1dd96 Fix wm.operator_presets_cleanup failing to exclude collections
Only the collection clearing was removed, adding an item
and assigning values to it was kept - breaking the preset.

Detect collections and removed all lines which add & manipulate items.

Based on the fix from !139309 with fewer changes.

Also include FBX operators when cleaning up presets.

Co-authored-by: Guillermo Venegas <guillermovcra@gmail.com>
2025-06-10 17:32:31 +10:00
Campbell Barton
2e8793b38f WM: prevent the same value being written multiple times in a preset
Presets would write a property multiple times in the case both the class
and it's parent defined a property.

While not a bug, it looks like an error. Only write values once.
2025-06-10 17:32:31 +10:00
Campbell Barton
bcbdd4adb0 Fix #140034: Unhandled Python exception in the spreadsheet UI
Ref !140035
2025-06-09 21:21:22 +10:00
Clément Foucault
1c47e31367 GPU: Enable GL multithreaded compilation by default
This allows to reduce the waiting time caused by
shader compilation on some GPU-driver combo.

A new settings in the User Preferences make it
possible to override the default amount of worker
threads and optionally use subprocesses.

We still use only one worker thread in cases where
there is no benefit with adding more workers
(like AMD pro driver and Intel windows).

It doesn't scale as much as subprocesses for material
shader compilation but that is for other reasons
explained in #139818.

Add some heuristic to avoid too much memory usage
and / or too many stalls.

Also add some heuristic to the default number of subprocess for
the platform that shows scalling.

Historically, multithreaded compilation was prevented by the
need of context per thread inside `DRWShader` module.
Also there was no good scaling at that time. But
nowadays numbers shows different results with
good scaling with reasonable amount of threads on many
platforms.

Even if we are going for vulkan in the next release
most of the legacy hardware will still use OpenGL for
a few other releases. So it is relevant to make this
easy improvement.

See pull request for measurements.

Pull Request: https://projects.blender.org/blender/blender/pulls/139821
2025-06-09 12:36:06 +02:00
Julien Duroure
32f464b3a9 Fix #139966 glTF: Fix unquote uri filenames 2025-06-07 12:12:41 +02:00
Campbell Barton
3d8fc6ba9d PlayAnim: use the same GPU backend as Blender
Since the animation player doesn't read the user preferences,
pass the GPU backend as an argument.
2025-06-07 12:37:12 +10:00
Julien Duroure
12ee7eb18e Fix #139904 glTF: Fix typo regression for uri 2025-06-06 09:26:32 +02:00
Kamil Galik
64696cc699 NDOF: simplify the UI and preferences
- Navigation modes has been redefined a bit and introduced in a form of
  an enum so that new ones can me implemented in the future.
  Additionally switching between modes shouldn't require any additional
  configurations like inverting all the axes.
  Currently there are only 2 modes implemented,
  but 2 more are planned and will be proposed in follow-up PRs.
  Implemented modes are:

  - Object: works like "Orbit" option.
    but has all axes implicitly inverted
  - Fly: works the same as "Free".

- "Turntable" option has been turned into "Lock Horizon".
  This single option works for both normal navigation and Fly/Walk
  modes now.
- Pan and Rotation axes inversion has been removed from default
  configuration.
- UI has been simplified following the design from #136880.
- Zoom Invert has been removed since it looks like a duplication of
  `NDOF_PANZ_INVERT`.

Ref !139343
2025-06-05 21:29:53 +10:00
Pratik Borhade
afa4eaa96c Fix #137942: Grease Pencil: Make layer operators non-editable for linked data
For linked grease pencil data, layer operators are accessible right
now. Grey out them in UI by adjusting poll functions. Also disabled
the individual layer row of tree-view.`

See images in PR description

Pull Request: https://projects.blender.org/blender/blender/pulls/137946
2025-06-05 11:55:38 +02:00
Campbell Barton
6fbef14f4b PyDoc: quiet wanings/prints when building docs 2025-06-05 05:31:51 +00:00
Brecht Van Lommel
2167a65e11 Fix: OSL camera templates should not have copyright and license header
For consistency with other templates, these can be used in new code without
restrictions.
2025-06-04 19:24:52 +02:00
Falk David
889751b0c5 Grease Pencil: Add Convert Curve Type operator
Adds a new operator in Grease Pencil edit mode to convert between curve
types. This acts as a replacment for the `Set Curve Type` operator as
the new operator better aligns with previous workflows and artist
expectations. Specifically using a threshold to adjust how well the
resulting curves fit to the original.

It can be found in the `Stroke` > `Convert Type` menu.

This operator aims at keeping visual fidelity between the curves. When
converting to a non-poly curve type, there's a `threshold` parameter
that dictates how closley the shapes will match (a value of zero meaning
an almost perfect match, and higher values will result in less accuracy
but lower control point count).

The conversion to `Catmull-Rom` does not do an actual curve fitting.
For now, this will resample the curves and then do an adaptive
simplification of the line (using the threshold parameter)
to simulate a curve fitting.

The `Set Curve Type` operator is no longer exposed in the
`Stroke` menu.

This also adds a new `geometry::fit_curves` function.

The function will fit a selection of curves to bézier curves. The
selected curves are treated as if they were poly curves.

The `thresholds` virtual array is the error threshold distance
 for each curve that the fit should be within. The size of the virtual
 array is assumed to have the same size as the total number of
 input curves.

The `corners` virtual array allows specific input points to be treated
as sharp corners. The resulting bezier curve will have this point and
the handles will be set to "free".

There are two fitting methods:
* **Split**: Uses a least squares solver to find the control
                     points (faster, but less accurate).
* **Refit**: Iteratively removes knots with the least error starting
                     with a dense curve (slower, more accurate fit).

Co-authored-by: Casey Bianco-Davis <caseycasey739@gmail.com>
Co-authored-by: Hans Goudey <hans@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/137808
2025-06-04 11:48:15 +02:00
Campbell Barton
47e26bdc0e Revert "Cleanup: remove unused functions in UI scripts"
This reverts most of commit 24eaff6889.

The some functions were used by C++.
2025-06-04 07:12:36 +00:00
Campbell Barton
24eaff6889 Cleanup: remove unused functions in UI scripts 2025-06-04 16:54:12 +10:00
Campbell Barton
6a1fa176ef Cleanup: spelling in comments & duplicate terms (check_spelling.py)
Also minor clarification in doc-string.
2025-06-04 01:51:29 +00:00
Sean Kim
440c6c8b6f Fix #138662: Image Editor View and Mask modes show UVs
With 24d08e0bae, the ability to view UVs
in the Image Editor was introduced in all modes, not just Texture Paint
and Edit Mode. This introduced a new flag that was enabled by default,
causing UVs to be displayed in any of the Image Editor modes.

While this is helpful for some workflows, it is unnecessarily
distracting for many usecases when using the Image and Mask modes of the
Image Editor. To remedy this, this PR adds various polls to ensure
that these are only shown in the Paint Mode of the Image Editor and the
UV Editor. Further thought should be put into the potential separation
between the different usecases of this editor, but that is out of scope
for now.

Pull Request: https://projects.blender.org/blender/blender/pulls/139563
2025-06-02 23:42:01 +02:00
Hans Goudey
77b14f2dcb Cleanup: Grammar: Fallback vs. fall back
The former is a noun or adjective, the latter is a verb.
2025-06-02 17:13:56 -04:00
Habib Gahbiche
5b8f1fb0b9 Nodes: deactivate overlay buttons when no tree is assigned
Deactivate the following buttons when no node tree exists:
- Overlays (all node editors)
- Snap (all node editors)
- Gizmos (compositor only)
- Backdrop (compositor only)

Note: a node tree can exist although compositing is deactivated
(e.g. "Use Nodes" is set to False), in which case the buttons are
active.

Pull Request: https://projects.blender.org/blender/blender/pulls/139526
2025-06-02 19:28:18 +02:00
Habib Gahbiche
c956145530 Compositor: implement toggle for backdrop gizmos
The new gizmo toggle controls backdrop gizmo visibility for the
compositor node editor.

The implementation is consistent with the image editor, where the gizmo
toggle has a menu with a single entry, instead of having no drop down
menu at all.

The new toggle will be set inactive when there is no node tree in a
follow up PR: https://projects.blender.org/blender/blender/pulls/139526

Pull Request: https://projects.blender.org/blender/blender/pulls/139525
2025-06-02 17:48:19 +02:00
Jacques Lucke
0347608121 Nodes: improve "frame" search
This reduces the search weight of the frame node because it is rarely added
through the add menu. It's much easier to add it with the F key.

By reducing its search weight, the Frame output of the Scene Time node shows up
as first result, which is more desirable.

Pull Request: https://projects.blender.org/blender/blender/pulls/139709
2025-06-02 13:49:17 +02:00
Jeroen Bakker
3f8f32bbbc Vulkan: Update limitations
Added WoA support status. Up to now there hasn't been a working stack
that allows Windows+ARM GPU+Blender work well together. There are render
glitches and occasional crashes. Currently we are investigating the
issues together with Qualcomm in order to improve the situation. However
for Blender 4.5 release Vulkan support should not be expected to work.

There have een some issues detected with core vulkan that are not
visible on other platforms.
2025-06-02 07:55:59 +02:00
Alaska
02f5b8242f UI: Note that Vulkan can have VR performance issues
Currently VR can have suboptimal performance when using the Vulkan
backend (#138977). Jereon has run various experiments and was unable
to resolve the issue. So in the meantime work on Vulkan VR performance
has been delayed until Blender 5.0.

Since Blender 4.5 is likely to release without a fix for the VR
performance issue. This commit adds an explicit note about it to the
user preferences.

Pull Request: https://projects.blender.org/blender/blender/pulls/139519
2025-06-02 07:52:05 +02:00
Campbell Barton
0cbcf48e69 Cleanup: move PlayheadSnappingPanel out of tool-system module
This panel is unrelated to the tool-system.
2025-06-01 15:11:51 +10:00
Charles S
96e549c092 Paint: Add color jitter support
Add ability to randomize color of each stroke for or use perlin noise
randomization during the stroke. Works similarly to grease pencil stroke
color randomization. This feature is available for all mesh color
painting modes (Sculpt Paint brush, Texture Paint and Vertex Paint)

This setting is available both as a per-brush setting and a unified
setting on the scene level. Additionally, the equivalent Grease Pencil
options have been migrated to these more generic flags and values.

Based on this [1] RCS request.

[1]: https://blender.community/c/rightclickselect/mwgbbc/

Pull Request: https://projects.blender.org/blender/blender/pulls/128953
2025-05-31 23:48:59 +02:00
Casey Bianco-Davis
2fd5b39a1b Grease Pencil: Edit Mode Outline Strokes operator
This adds an edit mode operator for converting the selected
strokes to outlines, same as it used to work in 4.2 LTS.

Co-authored-by: Falk David <falk@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/139540
2025-05-31 22:38:33 +02:00
Falk David
d332411b21 Grease Pencil: Fill Tool: Draw fill guides
This implements the "boundary strokes" features (from 4.2 LTS).
To make it a bit more clear, the feature is now called "fill guides".
It uses the same `Alt`+`LMB` shortcut.

Fill guides are denoted by a `".is_fill_guide"` attribute set to `true`.
Otherwise they behave as normal strokes.

There is the `Clean Up` > `Remove Fill Guides` operator to remove
the strokes.

This also adds an option to the Fill tool to automatically remove fill
guides once a fill has been created.

Pull Request: https://projects.blender.org/blender/blender/pulls/139293
2025-05-31 12:23:39 +02:00
John Kiril Swenson
0f37863fba Cleanup: VSE: Replace redundant "Change Effect Input" with "Swap Inputs"
The `SEQUENCER_OT_change_effect_input` operator does exactly the same thing
as `SEQUENCER_OT_swap_inputs` . "Change effect input" in the
"Effect Strip" context menu also seems bugged in recent versions.

Since "Swap Inputs" already has a keybind and the name itself is closer
to its intended use, just use that operator over the other one.

Also poll "Swap Inputs" so it is grayed out if the effect does not take
two inputs.

Pull Request: https://projects.blender.org/blender/blender/pulls/139615
2025-05-30 23:28:06 +02:00
Nika Kutsniashvili
975c71d43c UI: Fix incorrect capitalizations
Fixing some incorrect capitalizations I've come across

Pull Request: https://projects.blender.org/blender/blender/pulls/139548
2025-05-30 20:59:20 +02:00
Philipp Oeser
af62f64d48 Grease Pencil: remove "Weights" from editmode menu
All contained operators are using poll functions that check we are in
weight paint mode, so all operators would be disabled in editmode
anyways, better to remove the menu to avoid confusion.

Pull Request: https://projects.blender.org/blender/blender/pulls/139535
2025-05-30 16:31:23 +02:00
John Kiril Swenson
d3d4124ce6 Cleanup: VSE: Standardize "Crossfade" and "Gamma Crossfade" naming
Use these terms over "Cross" and "Gamma Cross" in the UI/RNA
when referring to effect strips.

Keep it as "Cross" for blend modes for now (which is in and of itself
a bit of a weird naming. In the future, we should consider unifying
our blend mode types with compositor ones for consistency).

Pull Request: https://projects.blender.org/blender/blender/pulls/139606
2025-05-30 03:41:10 +02:00
John Kiril Swenson
d90896ebc7 Fix: VSE: Add missing effect types to "change effect type" menu
PR #139514 just copied the "add effect" menu, but forgot the
other possible effect types (crossfade, gamma crossfade, adjustment).
2025-05-30 03:41:09 +02:00
Campbell Barton
50f3240abd Cleanup: spelling & duplicate terms (check_spelling.py) 2025-05-30 11:03:56 +10:00