Commit Graph

3374 Commits

Author SHA1 Message Date
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
RedMser
ba04393fde Cleanup: Remove deprecated Python and Rigid Body Joint constraints
Remove long-deprecated constraints that will likely never be
implemented in this form.

- Rigid Body Joint Constraint was removed in 2.80, but some references
  remained in the code. Versioning code was written that tried to
  remove them on load, but since constraint initialization code sets
  the type to CONSTRAINT_TYPE_NULL before versioning gets a chance,
  the versioning code ended up never running. This has all been
  removed.
- Python/Script Constraint never worked since 2.50 and showed an error
  message in the UI panel.

These constraints now load as 'null' constraint, as seems to be
(looking at the code) the way that Blender currently deals with
removed constraint types. These still show up in the outliner and
python API, but have no UI panel. Removing such constraints completely
will be left for another time, as it is beyond the scope of removing
these two specific constraint types.

Pull Request: https://projects.blender.org/blender/blender/pulls/136672
2025-04-11 11:38:29 +02:00
Campbell Barton
e1ac1a71ff RNA: use the file-path subtype & blend relative flag where supported 2025-04-11 12:22:39 +10:00
Campbell Barton
ab20edf469 RNA: support flagging properties as support blend file relative prefix
Some paths in Blender support the `//` prefix for blend-file relative
paths however this is not communicated anywhere.

Support declaring this with a new flag which can be applied to filepath
& dirpath typed properties.

This is used to:

- Show red-alert when "//" are used in paths which don't support a relative prefix.
- Show a warning in the tooltip that the relative suffix is used when unsupported.
- Python warns if this prefix is ever used in an assignment or
  function argument.

Resolves #133456.

Ref !137060
2025-04-10 23:27:21 +00:00
Sean Kim
001b8912ff Cleanup: Consolidate sculpt brush capability checks into BKE_brush.hh
Prior to this commit, whether or not a brush was capable of using
certain options in Sculpt mode and whether or not these properties would
be shown to the user was spread across a number of files and
inconsistently applied.

This commit moves most of these checks to the bke::brush namespace so
that we have a single source of truth for these checks.

In total this commit:
* Changes all BrushCapabilitiesSculpt methods to use the equivalent
  bke::brush function
* Removes brush type macros
* Renames BKE_brush_supports_secondary_color to fit the new pattern
* Refactors inverted logic for the `direction` property

Pull Request: https://projects.blender.org/blender/blender/pulls/137249
2025-04-10 22:05:23 +02:00
Jeroen Bakker
532ec70041 Vulkan: Update unsupported features
Vulkan backend is progressing quickly. Lately we improved the
performance and finalized OpenXR support. Removing these
unsupported/limited features from Preferences->System.

The Vulkan backend is still mentioned to be experimental. Removing it as
experimental option requires some more discussions and user feedback.
2025-04-10 16:18:57 +02:00
quackarooni
5a5ad978bf Nodes: Make spacing for Panel Toggle properties consistent with that of Boolean sockets
Panel toggles have a subpanel for listing out properties associated with their
Boolean checkbox.

The vertical spacing for properties in this panel is slightly different to how
normal Boolean sockets list their properties. This patch makes it more
consistent by putting the properties after `Default` in a `column` sublayout.

Pull Request: https://projects.blender.org/blender/blender/pulls/137211
2025-04-10 09:46:37 +02:00
Campbell Barton
ab5875b2d5 Fix #135979: Extensions refresh does nothing for local repositories
Support refreshing the active repository for "local" repositories.

Co-authored-by: Nika Kutsniashvili <nickberckley@gmail.com>
2025-04-10 15:44:38 +10:00
Campbell Barton
f58e987c95 Cleanup: postpone imports until needed 2025-04-10 13:00:01 +10:00
Campbell Barton
d21b488ac9 UI: hide the "Geometry" panel when viewing the render result
Ref !137242
2025-04-10 01:50:43 +00:00
Jun Mizutani
115d809358 UI: Theme: Increase scrollbars contrast in light theme
Enhance the contrast and make the scrollbar more visible in the light theme.

Pull Request: https://projects.blender.org/blender/blender/pulls/137195
2025-04-09 17:02:09 +02:00
YimingWu
5fe1051839 UI: Move "Active Spline" panel to viewport.
The "Active Spline" panel used to be inside curve properties tab,
however the property is dependent on spline selection, so it makes more
sense to put this panel in the viewport, just below the "Transform"
panel, in edit mode this panel also edits active element so visually
they belong together.

Resolves #134208

Co-authored-by: Pratik Borhade <pratikpb2123@noreply.localhost>
Pull Request: https://projects.blender.org/blender/blender/pulls/134217
2025-04-09 14:41:01 +02:00
quackarooni
a345f86e33 Fix #137169: "Panel Toggle" poll errors if a panel's first child item is a panel
The poll function for `NODE_PT_node_tree_interface_panel_toggle` looks at the
first child item and checks if it has the `is_panel_toggle` property set to
`True`. This fails if the first child is a panel, which doesn't have that
property.

The fix is to simply fall back to returning False if the first child item does
not have the aforementioned property.

Pull Request: https://projects.blender.org/blender/blender/pulls/137171
2025-04-09 10:17:41 +02:00
Richard Antalik
bf18e8f814 UI: Filter visible tabs in Properties Editor
This commit allows to specialize or optimize properties editor for
particular workflows by hiding individual tabs. The filtering is done on
editor level, currently in editor options popover panel.

Primary motivation was to allow strip properties to be moved to
properties editor. The filtering is beneficial, as usually it does not
make sense to show strip propeties in modelling workspace and in video
editing workspace other properties would introduce quite a bit of noise.

Ref. #115626

Pull Request: https://projects.blender.org/blender/blender/pulls/115624
2025-04-08 18:43:18 +02:00
quackarooni
17b5ab6965 Geometry Nodes: Field Statistic Nodes
Adds field versions of the operations from Attribute Statistic, can
support grouping via Group IDs. These operations are added as separate
nodes: `Field Average`, `Field Min & Max`, & `Field Variance` which
group the different statistic operations according to their use.

Supported Data Types:
- Field Average - (Float, Vector)
- Field Min & Max - (Float, Integer, Vector)
- Field Variance - (Float, Vector)

Pull Request: https://projects.blender.org/blender/blender/pulls/134640
2025-04-08 17:12:08 +02:00
Hans Goudey
d835c02607 Cleanup: Avoid capitals in Geometry Nodes Grease Pencil add menu
The capitals were only used for API compatibility when the add menu
was first added, they're not needed for new menus. Better to avoid
since they're non-standard for menu names.
2025-04-08 10:45:46 -04:00
Falk David
20ce477ea0 Geometry Nodes: Add node to set the Grease Pencil depth order
Adds a new node to set the Grease Pencil depth ordering.

Here are the options:
* 2D Layers: Uses the Layer order + Stroke order to calculate the depth ordering.
* 3D Location: Uses the 3D position of the points as the depth.

This reflects the same setting that is available in the Grease Pencil
object-data properties.

The node is added to the `Grease Pencil` > `Write` menu.

Resolves #129458.

Pull Request: https://projects.blender.org/blender/blender/pulls/135914
2025-04-08 15:24:51 +02:00
Sybren A. Stüvel
9605cbde6f Fix #137041: Bugs with Slotted Actions and the Available Keying Set
Make the 'Available' keying set look at the F-Curves for the assigned
slot, instead of the backward-compatible API (which only sees the F-Curves
for the first slot).

Pull Request: https://projects.blender.org/blender/blender/pulls/137131
2025-04-08 11:10:46 +02:00
Campbell Barton
ef22f22c25 UI: resolve glitch where resetting the theme left the old name
Co-authored-by: quackarooni <alfonsomartzii@gmail.com>
2025-04-08 17:33:42 +10:00