Commit Graph

121994 Commits

Author SHA1 Message Date
Jacques Lucke
4c3724180b Refactor: Geometry Nodes: extract value tracing to separate file
This moves code used for tracing bundles and closures to a separate file. This
code is used to e.g. detect which Separate Bundle node a Combine Bundle node is
linked to. This allows providing automatic socket update operators for these
nodes. Similarly for closures.

Pull Request: https://projects.blender.org/blender/blender/pulls/143734
2025-07-31 20:35:09 +02:00
Jacques Lucke
b7194ad693 Geometry Nodes: move sync out of subpanel for bundle/closure nodes
This was mentioned in #140967.
2025-07-31 20:23:50 +02:00
Nika Kutsniashvili
39c066ee53 UI: Add common theme properties panel; make preview range common
First part of design defined in #140360

Images in PR

This PR does two things:
- Creates new panel in theme preferences called "Common" that
doesn't belong to any editor
- Moves "Preview Range" property in common, and removes it
from animation editors.

Now, there is a single theme property for preview range, rather
than 5 for each animation editor.

Co-authored-by: Pablo Vazquez <pablo@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/140686
2025-07-31 20:19:00 +02:00
Miguel Pozo
0730d3f256 Fix: Python API: bpy.app.is_job_running('SHADER_COMPILATION')
Shader compilation no longer uses the `WM_job` API.
Add a `GPU_shader_batch_is_compiling` function to query if there's any
shader compilation happening, and update `bpy_app_is_job_running` to
handle this as a special case.

Pull Request: https://projects.blender.org/blender/blender/pulls/143559
2025-07-31 20:06:27 +02:00
Harley Acheson
972c0b9463 UI: BLF Use Custom NotDef Not Last Resort
This PR removes the "Last Resort" font from the stack. Instead uses a
custom "not def" glyph, defined as an SVG file. This glyph is shown
when requesting a character not found for text inputs, text editor, and
for Sequencer text strips.

Pull Request: https://projects.blender.org/blender/blender/pulls/132032
2025-07-31 19:53:29 +02:00
илья _
b4a355b30d Fix: Ensure world nodes have topology cache for Hydra
Methods like directly_linked_links require a tree topology cache to be there.

Pull Request: https://projects.blender.org/blender/blender/pulls/143670
2025-07-31 19:49:15 +02:00
Jacques Lucke
97b5618911 Refactor: Nodes: pass params as struct to bNodeType::insert_link
This simplifies potentially adding a `bContext` argument which allows for more advanced behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/143732
2025-07-31 19:22:11 +02:00
Aras Pranckevicius
77eec34973 Cleanup: BLF FontFlags enum type safety, move enums to separate header
- BLF font flags were an untyped enum; change to actual enum and
  update usages from int to that.
- Move all BLF API enums to their own header, so that if something
  needs just the enums they don't have to include whole BLF_api.hh

Pull Request: https://projects.blender.org/blender/blender/pulls/143692
2025-07-31 18:47:19 +02:00
Jacques Lucke
c67040771e Refactor: Geometry Nodes: generalize stop condition when tracing bundles/closures
Previously, the code assumed that closures are always created with the closure
zone and end up in the Evaluate Closure node. Similarly with bundles. While true
right now, this won't be true anymore with e.g. #141264 where unlinked input
sockets can also have a closure.

Pull Request: https://projects.blender.org/blender/blender/pulls/143725
2025-07-31 18:35:54 +02:00
Jacques Lucke
6ec5ee713b Cleanup: Geometry Nodes: add comment 2025-07-31 17:18:59 +02:00
Miguel Pozo
b43616513a OpenGL: Remove gl_debug_layer
It's broken and it's not needed anymore, since we require OpenGL 4.3.

Fix #142620

Note: Debug callbacks still won't work for compilation threads,
but that's relatively harmless and should cause no issues for the user.
This will be fixed in 5.0 with #142715.

(4.5 backport candidate)

Pull Request: https://projects.blender.org/blender/blender/pulls/142716
2025-07-31 16:36:08 +02:00
Damien Picard
f6771d8e21 UI: Improve running jobs labels
Use the form "Processing something..." (gerund, sentence case,
ellipsis) for running jobs progress label, according to Blender's
Human Interface Guidelines.

Pull Request: https://projects.blender.org/blender/blender/pulls/141573
2025-07-31 16:32:41 +02:00
Miguel Pozo
4e99678bc5 Fix #143323: Material with "frame_current" attribute is not updated on frame change
Add a time dependency for "frame_current" attributes.

(4.5 backport candidate)

Pull Request: https://projects.blender.org/blender/blender/pulls/143572
2025-07-31 16:27:03 +02:00
Jonas Holzman
51b2c31c01 Fix: Grease Pencil: Missing versioning for default Anti-Aliasing settings
The new anti-aliasing feature added in 299a581b1b didn't contain
versioning for startup.blend defaults, this caused the versioning
implemented in versioning_450.cc to be used instead, which was meant
to ensure older files stay the same. This thus caused the feature to be
effectively disabled in default/factory startup files.

Pull Request: https://projects.blender.org/blender/blender/pulls/143711
2025-07-31 15:43:12 +02:00
Jonas Holzman
30af9ebc72 Fix #143304: Convert Vulkan backend preference to Metal on macOS
This is in addition to the already existing OpenGL to Metal GPU backend
preference conversion.

Pull Request: https://projects.blender.org/blender/blender/pulls/143677
2025-07-31 14:48:16 +02:00
Bastien Montagne
474abdd7eb Fix #143360: Vertex Weight Proximity sets Normalize Weights checkbox to default state after options switch.
Proper fix, using `RNA_def_property_enum_bitflag_sdna` to mask the
affected bitflags when setting the value, and not overwrite unrelated
other bitflags.

Also similar fix/cleanup in DataTransfer modifier, who was also using
custom setters to handle this masking, instead of defining the
properties with `RNA_def_property_enum_bitflag_sdna`.

And added some documentation to `RNA_def_property_enum_sdna` and
`RNA_def_property_enum_bitflag_sdna`, to try to make it more explicit
what they are doing and what are their expected usecases.
2025-07-31 12:52:48 +02:00
Bastien Montagne
83306cdbf4 Revert "Fix #143360: Separate geometry flags RNA access from weight proximity modifier"
This fix works, but is not the correct way to solve the propblem. Proper
fix for this issue comming in next commit.

This reverts commit 46bd73f967.
2025-07-31 12:52:48 +02:00
Habib Gahbiche
c499adf3b8 Compositor: Remove scene.use_nodes from Python API
Use Nodes were removed in d88d4cc8 from the UI, but marked deprecated
in Python API. Since we decided to remove `world.use_nodes` and
`material.use_nodes` for the shader editor (instead of deprecating
them), we also remove `scene.use_nodes`.

This PR only replaces the deprecated `scene.node_tree` with
`scene.compositing_node_group` where necessary. #143619 will fully
remove `node_tree`

Pull Request: https://projects.blender.org/blender/blender/pulls/143578
2025-07-31 12:28:00 +02:00
Benjamin Beilharz
481c524734 Compositor: Add extension modes to displacement node
The node uses anisotropic sampling (which is currently not supported for the
extension mode), so extension modes are only rendered in the node if any
other interpolation method, but anisotropic is selected.

Pull Request: https://projects.blender.org/blender/blender/pulls/143367
2025-07-31 10:51:59 +02:00
Bastien Montagne
d77c98d1d4 Fix compilation in BSDF glass shader code (missing includes). 2025-07-31 10:43:44 +02:00
Benjamin Beilharz
ea94c0be22 Compositor: Implements extension modes for rotate node
This commit introduces the `ExtensionMode` for the rotation node and
changes the node to use a node storage instead of node properties.

Pull Request: https://projects.blender.org/blender/blender/pulls/143357
2025-07-31 10:29:14 +02:00
Christoph Lendenfeld
79b7b3bc21 Fix #143154: Crash when scrubbing in action editor with no action
The issue was that getting the `bAnimContext` fails in the
Action Editor if there is no action. This lead to the keylist being a
nullptr and Blender crashing.

The fix is to always create the keylist, and just keep it empty in case
the anim context cannot be created.

Also fixes: #143306

Pull Request: https://projects.blender.org/blender/blender/pulls/143524
2025-07-31 10:21:02 +02:00
Weizhen Huang
1b80bd2da9 Fix: Glass node missing buttons after adding thin film panel
_No response_

Pull Request: https://projects.blender.org/blender/blender/pulls/143616
2025-07-31 09:41:31 +02:00
Campbell Barton
941582324c Cleanup: pass const arguments to sort, use C++ radian conversion 2025-07-31 16:18:13 +10:00
Campbell Barton
f3e4b45115 Cleanup: typos in code comments 2025-07-31 06:17:48 +00:00
Campbell Barton
cd5dd61527 Cleanup: replace back-ticks with docygen symbol references
This marks them as symbols we should be able to resolve.
2025-07-31 16:17:44 +10:00
Jacques Lucke
2abb0657e0 Fix: missing pragma once 2025-07-31 07:20:24 +02:00
Campbell Barton
32f9b65cc5 BLI_convexhull_2d: ensure stable order, correct doc-strings
Since [0], removing degenerate points at the beginning of the hull
would re-order points so the last were moved to the beginning.

While this isn't an error, having the resulting hull *sometimes*
re-ordering it's result based on internal error correction isn't ideal.

Document that the first point in the hull has the lowest Y value and
update tests to ensure this.

Also correct the doc-string regarding the hulls cross-product
and tests this is working as documented.

[0]: 87f9fd8fb3
2025-07-31 02:06:43 +00:00
Sean Kim
193b91e04c Cleanup: Use switch instead of if / else for set_pivot cases
Also ensures the case ordering is the same as the enum declaration

Pull Request: https://projects.blender.org/blender/blender/pulls/143678
2025-07-31 03:27:58 +02:00
Sean Kim
bc17734177 Cleanup: Use C++ math types and functions for sculpt.set_pivot 2025-07-30 17:33:59 -07:00
Sean Kim
6a6d636843 Cleanup: Remove redundant comments 2025-07-30 17:33:59 -07:00
Sean Kim
1aa6b73b9a Fix #143630: Pivot to Active Vertex moves 3D cursor to infinity
There are a number of issues with the "Active Vertex" mode for the Set
Pivot operator in Sculpt Mode:

1. The menu option did not require the cursor, so moving off of the mesh
   and using this option would previously pick the last value in the
   `SculptSession`
2. The active vertex information was not updated when this was called,
   so even if the user invoked this operator with their mouse on the
   mesh via the Operator Search popup, it would not use the right
   position. This also means behavior would differ depending on if a
   brush tool was being used or the transform tools.

To fix these issues, the relevant flags are set for the operator as a
whole, and the internal active vert information is updated prior to
being requested for this operator.

Note that this does add an extra mouse click required for calling the
operator via the Operator Search menu, but given that it only worked in
specific situations before, this is an acceptable tradeoff. Assigning a
shortcut to this operator removes this requirement, as expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/143675
2025-07-31 02:27:00 +02:00
Sean Kim
978fa597c0 Fix: SculptSession#last_active_vert uses incorrect value
Error in ab5ce3061a

Pull Request: https://projects.blender.org/blender/blender/pulls/143672
2025-07-31 00:51:19 +02:00
Harley Acheson
39187001c4 Fix #141442: Ensure Panel Text Colors Are Opaque
This PR alters the new panel colors introduced in 140726 so that
panel_text and panel_title have full opacity rather than none.

Pull Request: https://projects.blender.org/blender/blender/pulls/142992
2025-07-31 00:41:56 +02:00
Harley Acheson
276eee8f53 BLF: Correct the Showing of VFont Not Found Character
When VFont objects use a custom (non-default) font and reference a
character that is not contained in that font, our intention is to show
placeholder curves that represents "not found". Instead we are
currently showing the ".notdef" glyph if there is one defined inside
the font or blank space if not. This PR fixes that by altering
BLF_character_to_curves so that it returns a boolean success instead of
character advance. This way we can properly distinguish "not found"
from the return of other empty, non-advancing characters.

Pull Request: https://projects.blender.org/blender/blender/pulls/143484
2025-07-30 21:25:18 +02:00
Jacques Lucke
4afe62ee29 Nodes: always initialize new links in closure zone when syncing 2025-07-30 20:56:24 +02:00
Aras Pranckevicius
f942767b14 Fix: VSE gaussian blur size was incorrect in proxies / render scale
Gaussian blur effect size is expressed in pixels (not ideal, but that is
what it is). It was not taking render output scale or preview proxy
size into account, resulting in much larger blur at lower render scales.

Pull Request: https://projects.blender.org/blender/blender/pulls/143627
2025-07-30 20:53:43 +02:00
Aras Pranckevicius
23242002c4 Cleanup: add get_render_scale_factor helper to use across VSE, proxy size type safety
- Some functions that took integer arguments for proxy size enums; make
  them take said enums directly.
- Add get_render_scale_factor() that calculates effective render scale,
  use that in places that did manual "use either scene render scale setting
  or proxy size" calculation in 5 places.
- Replace previous double with float in proxy size scale factors; all
  the factors are exactly representable as floats, and all the calling
  places used them as floats too.
2025-07-30 20:53:42 +02:00
Jacques Lucke
1260e90b4c Refactor: Geometry Nodes: simplify detection of syncable nodes
This moves most of the code to deal with syncable nodes (such as
Combine/Separate Bundle) to the nodes module. Over time it might be possible to
decentralize it more.

This also changes the caching mechanism from storing a flag on the node to
storing a map on the node editor runtime data. This simplifies the code quite
significantly and also removes the need to store any of this data in DNA.

The node tree update code now always clears this cache because before it was
missing many cases, e.g. when creating links that would connect a Combine to a
Separate Bundle node.

Pull Request: https://projects.blender.org/blender/blender/pulls/143661
2025-07-30 20:42:20 +02:00
Harley Acheson
f0634f6dfc Fix #140406: Inset Scroll Bars for Left-Aligned Panels
As shown in the complaint, when a panel region with category tabs is
aligned to the left we are not insetting the position of the scroll
bars like we do if aligned to the right. There are two separate
fixes needed. In ED_region_panels_draw we are just not doing this for
regions on the left.  And in UI_view2d_mask_from_win when sizing a
left-algined scrollbar we just use scrollbar width as xmax, when it
should be xmin + width. This means that the scroll bar will not be seen
if the mask xmin is greater than the scrollbar width.

Pull Request: https://projects.blender.org/blender/blender/pulls/141470
2025-07-30 19:03:46 +02:00
Jacques Lucke
21ca4584b6 Geometry Nodes: show sync button on bundle and closure nodes if syncing is possible
This shows a sync button when Geometry Nodes has detected that
syncing is possible and might be necessary.

Pull Request: https://projects.blender.org/blender/blender/pulls/140967
2025-07-30 18:51:14 +02:00
Habib Gahbiche
0a0dd4ca37 Compositor: add asset shelf
Add an asset shelf to the compositor node editor.

This is part of simplifying the compositing workflow:
https://projects.blender.org/blender/blender/issues/134214.

The reasoning is:
- Assets will help users get started more easily with compositing
- Assets will help keeping users within Blender and use the compositor
instead of doing post processing in a different software.
- The asset shelf is better than the asset browser because it has a
better user interface; it's easily hidable and doesn't take much space

The asset shelf is hidden by default in this PR, since we have no
assets yet.

Previously, a similar implementation was proposed for all node editors,
see https://projects.blender.org/blender/blender/pulls/110589.
We didn't move forward with this PR for the following reasons:
- For geometry nodes, no concrete use case was known/proposed
- The PR didn't intend to actually show the asset shelf, only
implement the possibility that it can be shown in node editors

Known Issues:
- Can't hide the asset shelf if region overlap is off: #129737

Pull Request: https://projects.blender.org/blender/blender/pulls/138983
2025-07-30 18:41:00 +02:00
Jacques Lucke
7186ab7e86 Geometry Nodes: add conversion warnings for closures and bundles
This adds warnings to inform the user when potentially unexpected implicit
conversions happen in the Separate Bundle and Evaluate closure node.

Pull Request: https://projects.blender.org/blender/blender/pulls/143645
2025-07-30 18:03:52 +02:00
Jacques Lucke
78c161585b Fix: Nodes: single value types sometimes shown as dynamic 2025-07-30 17:05:00 +02:00
Jacques Lucke
f646948ace Geometry Nodes: change closure socket/zone and repeat zone color
This implements #143624.

Pull Request: https://projects.blender.org/blender/blender/pulls/143631
2025-07-30 16:53:03 +02:00
Yahia
a37157f12b UI: Changed the UI text from "Click Drag" to "Drag"
Address change proposed in #131899.

Ref !131985
2025-07-31 00:12:52 +10:00
Jacques Lucke
6cd1c5c031 Fix: missing main invariants update after append
This could result in a crash before when appending a data-block that was already linked before.

Pull Request: https://projects.blender.org/blender/blender/pulls/143606
2025-07-30 15:41:40 +02:00
Jacques Lucke
76a861ab41 Geometry Nodes: move more menu inputs to sockets
This is a continuation of #140705. It changes more menu node options to be input
sockets. It also changes the order of the input sockets in a few cases to make
the node look a bit better.

Forward and backward compatibility is preserved.

Pull Request: https://projects.blender.org/blender/blender/pulls/142220
2025-07-30 15:32:10 +02:00
Miguel Pozo
4a87a7e290 Fix #142800: Broken selection with Clipping Regions
Add missing DRW_CLIPPING_UBO_SLOT UBO.

(4.5 backport candidate)

Pull Request: https://projects.blender.org/blender/blender/pulls/143493
2025-07-30 15:23:38 +02:00
Campbell Barton
4d6af81b58 Fix #143629: Tool gizmo disappears when resizing areas & regions
After resizing screen data an additional redraw is needed so gizmos
are refreshed without `G_TRANSFORM_WM` being set which causes some
gizmos not to display.
2025-07-30 23:21:51 +10:00