Commit Graph

3492 Commits

Author SHA1 Message Date
Pablo Vazquez
bb215a37e2 UI: Keymap: Show alert when operator or property not found
When a keymap operator is not found, color the label and input field
in red. This can help identify issues when migrating preferences and
some operators no longer exist.

Screenshots in the pull request.

Pull Request: https://projects.blender.org/blender/blender/pulls/130675
2025-05-01 14:50:49 +02:00
Campbell Barton
bf7d4dca79 Correct error in 229ca9b8f0 2025-05-01 12:18:40 +10:00
Campbell Barton
229ca9b8f0 Cleanup: quiet Python linter warnings 2025-05-01 12:15:23 +10:00
John Kiril Swenson
2ab59859c9 Cleanup: VSE: Replace remaining seq and sequence references
Ref: #132179

Renames:
- `Editing.act_seq` -> `Editing.act_strip`
- `SequenceModifierData` -> `StripModifierData`
  - Its member `mask_sequence` is now `mask_strip`.
- `MetaStack.parseq` -> `MetaStack.parent_strip`
- Remaining function names/parameters that were not dealt with in #132748
- Various references to `seq` or `sequence` throughout code and docs when
  referring to a strip

Also moves `_get` to the end of the renamed function names where
applicable for standardization (unless "by" or "from" are used).

There should be no changes to current behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/138077
2025-05-01 00:22:04 +02:00
Hans Goudey
12e626f31f Shape Keys: Add operator to update keys from selected objects
This operator is very similar to the existing "Join as Shapes" operator,
which updates or adds shape key array values with the positions of
objects with the same name, but instead of creating new shape keys,
it just updates existing ones. The new operator is called "Update from
Objects" in the UI.

Internally, some logic was moved to a poll function shared between the
two operators, and a new argument for whether to ensure keys exist was
added to their shared implementation.

Part of #135095.

Pull Request: https://projects.blender.org/blender/blender/pulls/136853
2025-04-30 20:07:25 +02:00
Bartosz Kosiorek
932fa1afb4 UI: Simplify Volumentric Data settings for Fluids
* Advanced was renamed to Volumetric Data
* Labels shortened to Format, Compression, Precision
* All Volumetric data settings are now under one category

Pull Request: https://projects.blender.org/blender/blender/pulls/137490
2025-04-30 19:43:05 +02:00
Gianluca Giampuzzo
e116038486 Fix: Rigify: Bone collection typo in Cat Metarig
Small typo in the bone collection name used in Rigify addon metarig>animals>cat.
Incorrect collection name `Arm,L (Tweak)` replaced with the correct `Arm.L (Tweak)`.

Co-authored-by: techmadentertainment <tech@madentertainment.it>
Pull Request: https://projects.blender.org/blender/blender/pulls/138120
2025-04-30 08:24:33 +02:00
Campbell Barton
1d80d15b8f UV: support sticky modes when face sync-select is enabled
Previously UV sync-select in face mode would isolate UV selection
so dragging a face would disconnect it from adjacent faces.

Now the sticky mode is respected for face selection.

This is needed for #136817 so storing per-selection doesn't result
in a user visible change in behavior.
2025-04-30 15:54:26 +10:00
Pratik Borhade
127fbaa0e6 Fix: Grease Pencil: Change split stroke shortcut
Change shortcut to `shift + v`. Currently it conflicts with set handle
type key-item.

Pull Request: https://projects.blender.org/blender/blender/pulls/138078
2025-04-29 11:35:18 +02:00
Jacques Lucke
6a90382390 Core: support buffers larger than 2GB in .blend files
This is implements option 1 of #129309. It contains a few changes:
* Split `BHead8` into `SmallBHead8` and `LargeBHead8`. The latter is the new one
  and uses `int64_t` for array sizes instead of just `int`. That applies to to
  buffer size in bytes (`len`) and the array size (`nr`).
* The first .blend file header (the first few bytes of the file) are updated
  according to #129309.
* Support reading files with that use `BHead4`, `SmallBHead8` and `LargeBHead8`.
* New option in the preferences that controls whether new files are written with
  the older `SmallBHead8` or the new `LargeBHead8`. The new file format is
  disabled by default. Potential unofficial 32 bit builds (#67184) always write
  `BHead4`, but can read all types (in theory anyway, can't test it).

Note that there are other places in Blender that don't fully support arrays this
large. E.g. I noticed that the spreadsheet currently can't scroll all the way
down.

The experimental option can be removed once we are in the 5.0 branch, at which
point only 4.5 will be able to open the files saved with 5.0.

Co-authored-by: Bastien Montagne <bastien@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/129751
2025-04-29 10:55:26 +02:00
Pratik Borhade
8d05ad3195 Fix #138072: UV stitch from menu doesn't allow user to configure what get's stitch
Calling UV stitch from menu executes `exec` function instead of modal() due
to wrong opcontext. Set `operator_context=INVOKE_REGION_WIN` so that
clicking operator from menu invokes `stitch_invoke()` which later calls
modal operation.

Pull Request: https://projects.blender.org/blender/blender/pulls/138075
2025-04-29 06:10:07 +02:00
Jeroen Bakker
a5a36b8e98 Vulkan: Remove from experimental
This changes removes Vulkan from experimental. It should be feature
parity with OpenGL with the exception of USD/Hydra.
Some backports to USD/Hydra developments are being made #133717
and should land soon.

This change only updates UI text that mentions the state of the
backend.

Thanks for the community so far for testing and reporting issues!

Pull Request: https://projects.blender.org/blender/blender/pulls/138086
2025-04-28 14:51:32 +02:00
YimingWu
b05b0f413c Grease Pencil: Add separate render pass
This PR adds a separate "Grease Pencil" render pass. Once
the "Grease Pencil" option is checked in the passes list, the
Grease Pencil engine will render to a new render pass for various
composition uses.

Notes:

- Occluded Grease Pencil geometry is not rendered.
- In most cases, using an "Alpha Over" with the rest will result
  in the same render as the "Combined" output. The exception is
  when there are Grease Pencil layers that use a blending mode
  that changes the chromaticity of the alpha channel.

Pull Request: https://projects.blender.org/blender/blender/pulls/137638
2025-04-28 12:59:54 +02:00
Urko Mauduit
2dc0a243d3 Fix #118806: Grease Pencil: Add "isolate layer" shortcut to Dope Sheet editor
Numpad * is being used for grease pencil object to isolate active layer
while inside edit/paint mode and mouse is over viewport. This PR
includes same keyitem into dopesheet keymap, so that shortcut
can be used in dopesheet editor context.

Pull Request: https://projects.blender.org/blender/blender/pulls/132054
2025-04-28 12:19:34 +02:00
YimingWu
1f4cae0c46 Grease Pencil: Filter option in render
This PR adds Grease Pencil type filter in the view layer, so users can
control whether Grease Pencil objects should be rendered or not. When
the option is turned off, Grease Pencil rendering is skipped.

Pull Request: https://projects.blender.org/blender/blender/pulls/137667
2025-04-28 11:29:13 +02:00
Campbell Barton
682e5e3597 Cleanup: spelling in comments (make check_spelling_*) 2025-04-26 00:48:04 +00:00
Lukas Stockner
bf412ed9dd Cycles: Support for custom OSL cameras
This allows users to implement arbitrary camera models using OSL by writing
shaders that take an image position as input and compute ray origin and
direction.

The obvious applications for this are e.g. panorama modes, lens distortion
models and realistic lens simulation, but the possibilities are endless.

Currently, this is only supported on devices with OSL support, so CPU and
OptiX. However, it is independent from the shading model used, so custom
cameras can be used without getting the performance hit of OSL shading.

A few samples are provided as Text Editor templates.

One notable current limitation (in addition to the limited device support)
is that inverse mapping is not supported, so Window texture coordinates and
the Vector pass will not work with custom cameras.

Pull Request: https://projects.blender.org/blender/blender/pulls/129495
2025-04-25 19:27:30 +02:00
Clément Foucault
81c00bf272 EEVEE: Shadow Terminator Normal Bias
This implement the design detailed in #135935.

A new per object property called `Shadow Terminator Normal Offset` is
introduced to shift the shadowed position along the shading normal.

The amount of shift is defined in object space on the object datablock.

This amount is modulated by the facing ratio to the light. Faces
already facing the light will get no offset. This avoids most light
leaking artifacts.

In case of multiple shading normal, the normal used for the shift
is arbitrary. Note that this is the same behavior for other biases.

The magnitude of the bias is controlled by `Shadow Terminator Normal Offset`.
The amount of faces affected by the bias is controlled using
`Shadow Terminator Geometry Offset` just like cycles.

Tweaking the `Shadow Terminator Geometry Offset` allows to avoid too much
shadow distortion on surfaces with bump mapping.

Cycles properties are copied from the Cycles object datablock to the
blender datablock. This break the python API for Cycles.

The defaults are set to no bias because:
- There is no good default. The best value depends on the geometry.
- The best value might depend on real-time displacement.
- Any bias will introduce light leaking on surfaces that do not need it.
- There is an additional cost of enabling it, which is proportional
  to the amount of pixels on screen using it.

Pull Request: https://projects.blender.org/blender/blender/pulls/136935
2025-04-25 19:12:04 +02:00
Sybren A. Stüvel
a956c34efd Fix #125696: Rigify: spline_tentacle fails to generate sometimes
Ensure the code doesn't delete items from the same collection it is
looping over.

This is done by copying the `self.artifact_reuse_table` dictionary items
and looping over that, making it possible to delete from the original
dictionary.

Co-authored-by: Gianluca Giampuzzo
2025-04-25 16:14:48 +02:00
Campbell Barton
2312cc2d1e Fix: error in BVH export when the operator context becomes invalid
Re-check poll succeeds as it's possible (albeit unlikely) for the
context to become invalid after the file selector starts.
2025-04-25 16:25:25 +10:00
Campbell Barton
5e61fbe1c1 Cleanup: correct subtype for extensions operators
Use DIR_PATH for directories.
2025-04-25 10:25:42 +10:00
Christoph Lendenfeld
9663d287fc Anim: merge keyframe jump operators
This merges the `GRAPH_OT_keyframe_jump` operator into the more generic
`SCREEN_OT_keyframe_jump` operator. (the former introduced with #108549)

The functionality of both operators is retained by running
a `switch/case` based on the editor type.
Doing so, we can filter out the Dope Sheet as well which fixes #93944
The `GRAPH_OT_keyframe_jump` is preserved, but when it is called,
it generates a warning stating it should not be used anymore.
It then calls directly into the `SCREEN_OT_keyframe_jump` to
ensure functionality doesn't drift apart.

Fixes #136176
Fixes #93944

Pull Request: https://projects.blender.org/blender/blender/pulls/137542
2025-04-24 18:01:05 +02:00
Pablo Vazquez
3d5eda688d UI: Theme: Fix inconsistencies in Light theme
Just small tweaks that should have been addressed when the editor
border theme setting was introduced.

* Fix: Match Top Bar and Status Bar headers with editor border.
* Fix: Properties Editor navigation bar and tabs outline tweak for
  readability.
* Use light color for editor outline/active.

Pull Request: https://projects.blender.org/blender/blender/pulls/137955
2025-04-24 13:59:06 +02:00
Pablo Vazquez
1cd2b34685 UI: Theme: Update missing properties in Light theme
Save over the light theme so new/removed properties get updated.

No major visual changes expected.
2025-04-24 13:02:13 +02:00
Philipp Oeser
0a27641b8f Fix #137899: NW: Saving Viewer Node returns to Geometry Node Editor
To resolve, remember the editor `tree_type` and set that when returning
from the `IMAGE_EDITOR` to the `NODE_EDITOR`

Pull Request: https://projects.blender.org/blender/blender/pulls/137904
2025-04-24 09:20:43 +02:00
Campbell Barton
8ccdea1934 Cleanup: typos & references to variable names from recent refactor 2025-04-24 02:43:52 +00:00
Guillermo Venegas
587ddace88 Cleanup: Remove redundant node wrangler operator
615100acda added support to
`NODE_OT_add_image` to open multiple images, This makes the NW
operator redundant, also `NODE_OT_add_image` can open multiple
images at drag-n-drop. The only difference is that this operator adds
the new image nodes as collapsed nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/128443
2025-04-23 11:51:07 +02:00
Campbell Barton
9de0aa1066 Fix: #133486: 'use_region_toggle_pie' AssertionError in MovieClipEditor 2025-04-22 11:25:14 +00:00
Campbell Barton
3c15f1bbe0 Cleanup: quiet Python linter warnings 2025-04-22 21:23:03 +10:00
Alaska
6faef7b149 Fix #137647: Remove warning about macOS not supporting custom wire widths
In a previous commmit (1), custom wire width for armatures was disabled
on macOS and a corrisponding warning was added to the UI due to a
limitation at the time leading to rendering artifacts #124691.

These limiations appear to have been sorted in Blender 4.4 and so
custom wire widths now work on macOS. So this commit removes the
warning message form the UI.

(1) a451971026

Pull Request: https://projects.blender.org/blender/blender/pulls/137651
2025-04-22 09:50:57 +02:00
Mukhesh
541e2b3cdd VSE: Hide-Reveal strips operator in sequencer preview
This pull request adds options to hide and show strips in the Sequencer
Preview, using the same shortcuts. Included "Show/Hide" operators in the Strips
menu of preview mode. It only works on strips that are visible in the preview
at the current frame. The Unmute operator now shows all hidden strips in
the preview at the current  frame, since it's not possible to select hidden strips
in sequencer preview.

See video in PR description.

Pull Request: https://projects.blender.org/blender/blender/pulls/137781
2025-04-22 08:18:21 +02:00
Bastien Montagne
288ab8ed1c I18N: Add British English language to supported translations. 2025-04-21 10:08:30 +02:00
Falk David
ee6d683809 Grease Pencil: Python API: Expose bézier handle selection
This adds two new python properties to  `GreasePencilStrokePoint`
* `select_handle_left`: The selection of the left handle of this point
* `select_handle_right`: The selection of the right handle of this point

These could already be written to using `drawing.attributes[".selection_handle_left"]`
and `drawing.attributes[".selection_handle_right"]`, but this makes it
easier to work on individual points from the higher-level
python API.

Resolves #137639.

Pull Request: https://projects.blender.org/blender/blender/pulls/137730
2025-04-18 18:20:33 +02:00
Nika Kutsniashvili
47f80eb158 UI: Improve labels of asset browser parameters
In new asset browser popover "Import Settings" there are new options
for instancing. Naming of properties wasn't clear enough at a glance, and
it reuses terms "Link" and "Append" which are used way too frequently and
can be mistaken for something else. This commit clarifies what parameters
do in labels.

See Images attached in PR description.

Pull Request: https://projects.blender.org/blender/blender/pulls/137295
2025-04-18 06:04:44 +02:00
Cartesian Caramel
3d1b6f53f3 Geometry Nodes: new Instance Bounds Node
This adds a new Instance Bounds nodes which provides an easy and
efficient way to get the bounding box of each instance.

Nested instances or not taken into account to compute the bounding
box. That would result in a major performance degredation because
one would have to basically realize all instances to do that.

Also see #135933 for some examples.

Pull Request: https://projects.blender.org/blender/blender/pulls/135933
2025-04-17 13:34:26 +02:00
Jeroen Bakker
171f7dcbe7 Vulkan: Show device selection in preferences
Previously the device selection was only shown when Blender was started
with the Vulkan backend. However most users don't know that this feature
exists. By also showing the device selection when the backend is changed
in the preferences, will motivate users to revisit the system tab and
see what can be selected.

Another option is to have the device selection fully working even when
running using OpenGL. Technically possible but it requires to mingle Vulkan
with OpenGL data in gpu globals.

Pull Request: https://projects.blender.org/blender/blender/pulls/137646
2025-04-17 11:55:34 +02:00
Pratik Borhade
ac9a7ca0b8 Fix: Remove header socket along with panel
If panel has boolean header socket, deleting this panel won't remove
its boolean socket. Now Handled this case in `NODE_OT_interface_item_remove`.

Pull Request: https://projects.blender.org/blender/blender/pulls/135430
2025-04-16 12:09:40 +02:00
Aras Pranckevicius
cc741fbf99 IO: New FBX importer (C++, via ufbx)
Adds a C++ based FBX importer, using 3rd party ufbx library (design task:
#131304). The old Python based importer is still there; the new one is marked
as "(experimental)" in the menu item. Drag-and-drop uses the old Python
importer; the new one is only in the menu item.

The new importer is generally 2x-5x faster than the old one, and often uses
less memory too. There's potential to make it several times faster still.

- ASCII FBX files are supported now
- Binary FBX files older than 7.1 (SDK 2012) version are supported now
- Better handling of "geometric transform" (common in 3dsmax), manifesting
  as wrong rotation for some objects when in a hierarchy (e.g. #131172)
- Some FBX files that the old importer was failing to read are supported now
  (e.g. cases 47344, 134983)
- Materials import more shader parameters (IOR, diffuse roughness,
  anisotropy, subsurface, transmission, coat, sheen, thin film) and shader
  models (e.g. OpenPBR or glTF2 materials from 3dsmax imports much better)
- Importer now creates layered/slotted animation actions. Each "take" inside
  FBX file creates one action, and animated object within it gets a slot.
- Materials that use the same texture several times no longer create
  duplicate images; the same image is used
- Material diffuse color animations were imported, but they only animated
  the viewport color. Now they also animate the nodetree base color too.
- "Ignore Leaf Bones" option no longer ignores leaf bones that are actually
  skinned to some parts of the mesh.
- Previous importer was creating orphan invisible Camera data objects for
  some files (mostly from MotionBuilder?), new one properly creates these
  cameras.

Import settings that existed in Python importer, but are NOT DONE in the new
one (mostly because not sure if they are useful, and no one asked for them
from feedback yet):

- Manual Orientation & Forward/Up Axis: not sure if actually useful. FBX
  file itself specifies the axes fairly clearly. USD/glTF/Alembic also do
  not have settings to override them.
- Use Pre/Post Rotation (defaults on): feels like it should just always be
  on. ufbx handles that internally.
- Apply Transform (defaults off, warning icon): not sure if needed at all.
- Decal Offset: Cycles specific. None of other importers have it.
- Automatic Bone Orientation (defaults off): feels like current behavior
  (either on or off) often produces "nonsensical bones" where bone direction
  does not go towards the children with either setting. There are discussions
  within I/O and Animation modules about different ways of bone
  visualizations and/or different bone length axes, that would solve this
  in general.
- Force Connect Children (defaults off): not sure when that would be useful.
  On several animated armatures I tried, it turns armature animation
  into garbage.
- Primary/Secondary Bone Axis: again not sure when would be useful.

Importer UI screenshots, performance benchmark details and TODOs for later
work are in the PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/132406
2025-04-16 09:55:00 +02:00
Aaron Carlisle
3972d52fa8 Fix: Missing Render Layer Passes for workbench
The pass panel was in the code, however, the parent panel was not set to be compatible for workbench.

Fixes #137301
2025-04-15 23:10:06 -04:00
Campbell Barton
9567ac1272 Cleanup: quiet python linter warnings 2025-04-16 11:08:40 +10:00
Hans Goudey
937358d58e Point Cloud: Enable object type without experimental option
In the past couple months, the basic operations needed for a new object
type were implemented, as well as basic edit mode tools. With that, the
object type is in a good enough state that it doesn't need to be hidden
behind an experimental option. That also resolves some inconsistency,
because the object type is already created by geometry nodes and used by
importers; it's weird that you can't add it manually as original data.

This also removes the "bounds" drawing flag for the object created from
the add menu. It's unnecessary now and there was even a TODO comment.

Pull Request: https://projects.blender.org/blender/blender/pulls/137546
2025-04-15 20:08:46 +02:00
Hans Goudey
8ade553987 Cleanup: Formatting 2025-04-15 10:05:27 -04:00
quackarooni
d3639828f8 Fix: Nodes: "Make Panel Toggle" can turn Boolean output sockets into panel toggles
The "Make Panel Toggle" operator does not check if active item is an input socket,
leading to a situation where it can be called on Boolean output sockets.

Doing this creates weird behavior where the panel and associated
operators believe it has a toggle, but is not reflected in the UI drawing.

Other weird behaviors include being able to rearrange output sockets
and apply the operator again to another output socket.

This patch adds a check in the operator's poll function to prevent it
from being called on output sockets.

Pull Request: https://projects.blender.org/blender/blender/pulls/137526
2025-04-15 15:26:44 +02:00
Christoph Lendenfeld
d2f1b6570d Anim: Separate transform snapping flags in the driver editor
With the move to the new snapping system,
the snapping flags were no longer stored on the editor but on the scene.
While that is good for all editors that deal with animation,
it also affected the Driver Editor since that is effectively a Graph Editor.
However since the driver editor doesn't deal with frames,
it is unlikely that settings should be shared with other animation editors.

With this PR the Driver Editor gets it's own snapping flag,
which means snapping can be controlled without affecting
other animation editors.

This also removes snapping options
* Snap to markers doesn't make sense, there are no markers in drivers
* Snap to seconds also makes no sense

Only snap to frames, i.e. whole numbers is kept with the option
to snap directly to whole numbers or offset the current position
by a whole number.

Pull Request: https://projects.blender.org/blender/blender/pulls/136826
2025-04-15 12:35:18 +02:00
YimingWu
4794cbe0bf Fix #137493: UI: Show "Active Spline" panel for surface types
Previously in 5fe1051839 the "Active
Spline" panel was moved to the viewport but not updated correctly for it
to display when active object is of "SURFACE" type. Now it will show for
both curve and surface types.
2025-04-15 08:43:03 +08:00
Bastien Montagne
df215441eb Fix (unreported): Protect Outliner UI py code util against None context.id value.
Detected by review of !135936, the code checked for a non-empty
`context.selected_ids`, but did not propect against a potential
`None` `context.id`.
2025-04-14 14:17:42 +02:00
Bastien Montagne
0eba8caaf9 Core: Add 'relocate' operation on individual linked ID.
So far it was only possible to relocate a whole library, now one can
also relocate a single linked ID (pulling in all of its dependencies).

This is essentially linking the new data, remapping local usages of the
old linked data to the new one, removing no more used IDs, and updating
liboverrides if needed.
2025-04-14 12:54:48 +02:00
John Kiril Swenson
fe1e866fb9 VSE: Slip Operator 2.0
This patch completely reworks the slip operator from the ground up,
reorganizing code to be simpler and adding more clarifying documentation.

Major Changes:
- Add modal keymap to the operator along with an interactive status bar.
- Show offset overlays to the left and right of strips whenever slipping.
- Add option to "clamp" slipped strips.
- Rework input to be accumulative, avoiding "jumps" when transitioning in/out
  of precision mode.

Fixes:
- Properly draw header when initializing operator before any events have been
  sent, and reorganize event flow so that all events have an immediate effect.
- Properly clamp subframe slips.

More information in PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/137072
2025-04-13 22:40:46 +02:00
Jacques Lucke
6b92972dcc Geometry Nodes: initial boilerplate for viewer path for closure evaluation
This will be necessary for supporting viewers inside of closures.
2025-04-11 16:41:46 +02:00
Pratik Borhade
cc4b90ba55 Fix: VSE: SEQUENCER_OT_change_effect_input.swap not found
Found this during #137299
Python error observed when calling batch rename operator on sequencer
strips. `change_effect_input` operator doesn't have any enum property.
Remove operator_enum to fix the error.

Pull Request: https://projects.blender.org/blender/blender/pulls/137331
2025-04-11 12:32:04 +02:00