Commit Graph

123048 Commits

Author SHA1 Message Date
Sean Kim
c6a48aecc8 Fix #146233: Dyntopo sample detail size crashes with cursor not on mesh
Introduced by 45d9bfa734

Pull Request: https://projects.blender.org/blender/blender/pulls/146249
2025-09-14 11:08:25 +02:00
Sean Kim
5892069296 Fix: Spacing doesn't work with non-default size curve
Introduced with 5f8311f596

When using the Spacing stroke type, the exact spacing between brush
daubs becomes modified by the brush size. In the case of users using
a non default brush size curve with size pressure, we need to use the
evaluated pressure factor for the size, not the raw pressure value.

Additionally, this commit renames the parameters in a helper method
to more clearly differentiate between the two float parameters.

Pull Request: https://projects.blender.org/blender/blender/pulls/146054
2025-09-14 10:11:03 +02:00
Sean Kim
1104c69a0e Fix #146153: Sculpt tools do not work after duplicating scene
Introduced with 7f3aa617ce

The `PaintMode` is needed when activating the default tool. There were
two things that caused this field on the `PaintRuntime` to be in an
invalid state on duplication:

* The original values for `PaintRuntime` were not copied to the new
  instance.
* When copying `ToolSettings`, the incorrect old value of `Paint` was
  passed to `BKE_paint_copy`, leading to the inability to copy the right
  data.

Pull Request: https://projects.blender.org/blender/blender/pulls/146199
2025-09-14 09:37:48 +02:00
Eitan Traurig
a9a54c88b9 UV: add pack to custom region option to "Pack Islands" operator
This commit implements the design task #78398

- Box region
  - Set Custom UV Region (Ctrl-B).
  - Disabled with Custom Region checkbox in the menu or (Ctrl-Alt-B).
- Box Select (Pinned) changed to (Alt-B).
- When the Custom Region enum is chosen the islands are packed
  into the bounding box of the drawn region.

Ref !140020
2025-09-14 05:23:47 +00:00
Campbell Barton
e6c0a204f6 Cleanup: use of doxygen params in doc-strings 2025-09-14 15:15:33 +10:00
Christoph Lendenfeld
ab43c57a2a Anim: fps dependent frame display in animation editors
Currently, the frame scrub area shows different frame numbers based on
the zoom level. But they would not show frame 24 until you zoom in. Since 24
is the most used frame rate for animation that's inconvenient because you never
see the spot with the full second.

With this PR the numbers and lines depend on the frame rate, and will favor
full seconds, then divide by either 2, 3 or 5 to break down the number.

This works for most FPS values, however custom FPS may hit a prime number, in which case
this logic is aborted and the next step down when zooming in will be 1. This can
result in quite large gaps where no frame numbers are displayed. But I think the impact
will be small since large prime number frame rates are rare.

This patch also reduces UI jumping because the major lines will always be turned into minor lines before disappearing.
When zooming in, any minor line will become a major line eventually.

To reduce the bunching up of minor lines when dividing by a large prime number,
they are only drawn if the distance between them is large enough.

Note that the line drawing in the VSE is not quite following the zoom level. Since this doesn't use the code path i modified in this PR I left it as is. Info from the Sequencer module is appreciated.

Pull Request: https://projects.blender.org/blender/blender/pulls/143562
2025-09-13 20:09:31 +02:00
Brecht Van Lommel
924d72e05b Fix #146192: Wrong HDR mastering display max luminance in videos
Pull Request: https://projects.blender.org/blender/blender/pulls/146217
2025-09-13 15:06:37 +02:00
Jesse Yurkovich
fde6625d8d Cleanup: Reduce size of DupliObject data
Shrink from 216 bytes to 208 by reordering the `random_id` field. Saves
32kb for every 4096 block of duplis in the DupliList container.

Pull Request: https://projects.blender.org/blender/blender/pulls/145149
2025-09-12 21:56:38 +02:00
Brecht Van Lommel
f43566f8bc Color Management: Improve handling of missing working spaces
* Fix: OpenColorIO config defined working space disappears from menu. It
  was incorrectly using the current scene linear instead of default space.
* Warn users about missing working space.
* Don't detect lin_ap0_scene working space, we don't offer it in the menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/146149
2025-09-12 19:35:29 +02:00
Hans Goudey
6a8c2ca16e Fix #146139: Corrective smooth rest source property crash
Stupid mistake in a08cd68f1e.
I double checked that commit for this mistake but still missed this.
2025-09-12 12:31:53 -04:00
Damien Picard
56d52a7070 I18n: Disambiguate "Value" in colors
In some languages, a color value (as in Hue, Saturation, Value), is
not the same as a numeric or other variable value.

Pull Request: https://projects.blender.org/blender/blender/pulls/145839
2025-09-12 18:31:03 +02:00
Damien Picard
71dfbb955b I18n: Disambiguate "Bundle" in movie clip editor
Prior to 5.0, "Bundle" used to mean only the reconstructed data from
tracking.

Since then, bundles are a new data type in Geometry Nodes. It has many
occurrences, so it's easier to give it the default translation
context, and to use the "MovieClip" context for the tracking sense.
2025-09-12 18:30:56 +02:00
Damien Picard
14ef75de1d I18n: Extract new line from messages
New lines that are used as UI layout should not be included in a
translation.
2025-09-12 18:30:56 +02:00
Damien Picard
2963fc12f9 I18n: Disambiguate "Marker" in tracking editor
Most "Marker"s are time markers in the timeline, but these ones are
the tracking points in the Video Clip editor.
2025-09-12 18:30:56 +02:00
Damien Picard
42c25d683f I18n: Extract UI_MENU_ARROW_SEP from translated string
Some places used `IFACE_("For Each Element " UI_MENU_ARROW_SEP "
Main")`, which doesn't work because the arrow separator character is
not extracted by the translation regex. This results instead in:

"For Each Element  Main" (two spaces).

This commit uses string formatting to add the special character after
translation. It's clunky because translators won't see the actual
string, but not as risky right now as trying to include those special
characters in message extraction.
2025-09-12 18:30:56 +02:00
Damien Picard
580c396ad9 I18n: Disambiguate "Array" as data type
"Array" usually refers to the modifier, but it can also refer to a
data type.

Reported by Gabriel Gazzán.
2025-09-12 18:30:56 +02:00
Damien Picard
e50d1c6ff3 I18n: Translate color icons using the Color context
Color icons for Red, Green, Blue, were introduced in c13d3e2f7a. They
are translatable but currently using the default transation context
and the `TIP_()` translation macro.

R, G, B as colors should use the BLT_I18NCONTEXT_COLOR context,
and `IFACE_()` since they are not specific to tooltips.
2025-09-12 18:30:56 +02:00
Christoph Neuhauser
092affc573 Color Management: Use preprocessor for gamma 2.2 vs piecewise sRGB
The referenced commit introduced the use of gamma 2.2 or piecewise sRGB
for the backbuffer blit depending on the operating system. This commit
switches from a push constant for this to a preprocessor define.

Ref 5d72498154

Pull Request: https://projects.blender.org/blender/blender/pulls/146170
2025-09-12 18:30:25 +02:00
Pablo Vazquez
2898ef0a5c UI: Preferences: Move sections to a regular sidebar region
While perhaps it is more accurate to draw the sidebar navigation in a
"Navigation Bar" region, the navigation "tabs" are not real tabs, so
the darker background usually used for tabs doesn't look good here.

Draw the sections radio buttons in a regular sidebar region instead.

See PR for details and screenshots.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/146169
2025-09-12 18:20:11 +02:00
Guillermo Venegas
c69dad9b0f Fix #146138: UI: Preferences tabs lost grouping
Error in 4c0114b94e,  the line was warded against
`USE_UIBUT_SPATIAL_ALIGN`, so the check should
be removed too.

Pull Request: https://projects.blender.org/blender/blender/pulls/146144
2025-09-12 18:00:19 +02:00
Nika Kutsniashvili
250384dd57 UI: Theme: Scrubbing/Markers shared region
Continues and depends on #145609, part of #140360 project.

Previously, all 5 animation/video editors had different properties
for Scrubbing/Markers region. This PR adds new Region panel for it,
so that all editors can share one color.

Text color in this region was coming from regular editor text color.
To differentiate between editors (as is the pattern already with other editors),
and allow more modular themeability of regions, new Text color is added
for that region as well.

Video in PR

Pull Request: https://projects.blender.org/blender/blender/pulls/146113
2025-09-12 16:25:56 +02:00
Clément Foucault
f729e639f4 GPU: Simplify Codegen dependency injection
Dependencies were previously merged manually
inside the generated_sources by EEVEE.
This caused issues with double includes.

Instead, we now only gather the name of the
nodetree dependencies and add them to the
dependencies of the `GeneratedSource`.

This also make the compositor use the `GeneratedSource`
mechanism.

Pull Request: https://projects.blender.org/blender/blender/pulls/146106
2025-09-12 16:07:55 +02:00
Jacques Lucke
ad27211b77 Refactor: Geometry Nodes: use faster IDProperty group lookup instead of custom VectorSet
Geometry Nodes used a `PropertiesVectorSet` in some places to allow
constant-time `IDProperty` access by name in a group. This used to be a
bottleneck in node groups with hundreds of inputs. Now this separate hash table
is not necessary anymore, because it's `IDProperty` groups now support this
directly since 6cb2226f13.

This also adds a `IDP_GetPropertyFromGroup_null` utility function to be able to
do this refactor more safely. Null pointers were allowed before.

Pull Request: https://projects.blender.org/blender/blender/pulls/146152
2025-09-12 15:43:14 +02:00
Pablo Vazquez
4e629a6cb1 Cleanup: Remove incorrect comment
Tab background is no longer per editor, it's a global theme setting.
2025-09-12 14:54:11 +02:00
Nika Kutsniashvili
7f62d5d85e UI: Theme: Common colors for animation channels
Continuation of #140360

New common properties for Channel and Channel Selected,
used in animation editors.
Previously Dope Sheet, Graph Editor, NLA, and Movie Clip Editor
had separate properties for them.

Video and images inside the PR.

---

> [!important]

- Channels looked different in Dope Sheet and Graph Editor. In the former,
they were same color as the background, so only labels and icons were visible,
in the latter they had a darker color, so their outline was visible. We need to pick
which design we go for now that they're combined. I chose color from Graph
Editor for now, with alpha from Dope Sheet, since only that editor uses alpha.

---

There is a confusion with names of channel colors. In 4.5 there is:
- - "Channel" (singular, blue color) which refers to objects, actions,
and action slots that hold/combine channels.
- - "Channels" (plural, black color) which refers to individual channels.

This goes against how we name things. In theme, especially, we refer to object
colors as "Object", singular, not Objects, plular. Same goes for all elements except
this one, where individual elements are referred in plural.

To lessen the confusion, and also avoid unnecessary breaking changes in the
future (in case we want to rename blue things, which seems likely), in this PR
I swap those names. Main reason is that black color marks individual channels,
so it should be singular, and blue colors are combination of many channels,
so they should be plural. Otherwise even talking about them is awkward.

Note that renaming isn't a breaking change, because we already "broke" them
by moving them to common path from individual editors.

Pull Request: https://projects.blender.org/blender/blender/pulls/146091
2025-09-12 14:49:27 +02:00
Clément Foucault
e19e9e57ee EEVEE: Split eevee_shader_shared.hh into multiple files
The goal of this patch is to reduce final shader code footprint to
hopefully reduce shader compile time (see #145347).

This also contains a pass over most shader file to remove unused
include or use more granular ones to reduce final shader code
length.

Testing with the same setup as #145347:
|          | main (ms) |  PR (ms) |   Delta (ms) |
| -------- | ----------- | ------------ |------------ |
| Nvidia   |         257 |  207 (1.24x) |         50 |
| Mesa AMD |         323 |  295 (1.09x)    |        28 |

In barbershop test scene however the saving are not so noticeable:
|          | main (s) |  PR (s) |   Delta (s) |
| -------- | ----------- | ------------ |------------ |
| Nvidia (OpenGL)  |         40 |  39 (1.02x) |         1 |
| Nvidia (Vulkan)   |         29 |  29 (1.0x) |         0 |

Pull Request: https://projects.blender.org/blender/blender/pulls/145803
2025-09-12 14:09:35 +02:00
Namit Bhutani
2110391058 PyAPI: rename undo memory usage method, improve doc-string
Ref !146095
2025-09-12 22:05:53 +10:00
Campbell Barton
1e2ed785f7 Cleanup: use assume attribute to quiet array bounds warning for GCC 15
Ref !146150
2025-09-12 22:03:35 +10:00
Campbell Barton
1f80345242 Cleanup: quiet some array-bounds warnings with GCC 15
Warnings remain but suppression is not as simple, see: !146150.
2025-09-12 21:48:43 +10:00
Nika Kutsniashvili
534b5f1f4f UI: Theme: Shared regions
Continuing recent attempts to combine theme settings
and reduce complexity. part of #140360
This PR adds new root panel in theme called "Regions" which for now
includes two subpanels:

# Asset Shelf
This is just moving asset shelf from root to regions, where
it's more appropriate and less noisy.
No functional changes. (alternative to #144267)

# Channels
Previously known as "Theme Space List", or "Source List",
but in user interface we refer this region as "Channels".
This region is shared by all animation/video editors, and each had
a separate panel for theme properties. Now they're combined, and all
editors follow settings defined in Regions -> Channels.

Additionally, "Source List Title" property, which was never used is removed.
Properties are also renamed to be more intuitive and shorter.

# Toolbar / Sidebar
Previously was registered separately on every single editor. This allowed
for some extra customization, but in 5.0 need for this is reduced very much,
because elements drawn in those regions (tabs & tools) are also generalized,
so it makes sense to want same background color for them as well.

> This replaces 46 properties with 5, reducing the total by 41.
> Videos in PR

Pull Request: https://projects.blender.org/blender/blender/pulls/145609
2025-09-12 13:22:50 +02:00
Bastien Montagne
619a9ff580 Silence DNA deprecated warning in versioning_260.cc.
DNA-related defines (like `DNA_DEPRECATED_ALLOW`) should be defined
before any Blender include, as some non-DNA Blender header may
indirectly include some DNA ones.
2025-09-12 12:08:42 +02:00
Bastien Montagne
8d985f38de Fix broken build.
Broken by 6cb2226f13, due to very recent refactor in 84511b8509...
2025-09-12 12:05:21 +02:00
Jacques Lucke
6cb2226f13 Refactor: IDProperty: accelerate looking up properties by name
Currently, `IDP_GetPropertyFromGroup` is a common bottleneck because it has to
iterate over all properties to find the one with the right name.

This patch adds a hash table to id property groups that finding properties by
name in O(1) instead of O(n). The main tricky aspect is to find all the places
where this needs to be created/updated/freed. I tried to find all places but if
I missed some place, it should be easy to fix.

Pull Request: https://projects.blender.org/blender/blender/pulls/140907
2025-09-12 11:34:38 +02:00
Pratik Borhade
e246838639 Fix #145957: Outliner Indirect Only option is greyed out on sub collections
Unlike other properties, "indirect only" restriction toggle doesn't
depend on parent. Meaning, when parent has the value disabled, it is
still possible to control the sub-collection value. That said, we don't
want to grey out the property when parent has the value `OFF`. To fix
this, remove the if condition which checks the parent value before
obtaining the value of current tree element. This  `layer_collection_indirect_only`
is later used inside drawing code to set/unset the `UI_BUT_INACTIVE`
flag

See images in PR description

Pull Request: https://projects.blender.org/blender/blender/pulls/146010
2025-09-12 11:04:17 +02:00
Jeroen Bakker
429854363e Vulkan: Disable Stencil Export when Forcing Workarounds
When forcing workarounds stencil export was not disabled. This PR
disables this GPU feature when running blender with `--debug-gpu-force-workarounds` .

Pull Request: https://projects.blender.org/blender/blender/pulls/146130
2025-09-12 09:28:17 +02:00
Guillermo Venegas
4c0114b94e Cleanup: UI: Remove unused interface_align code
The spatial align method has by now 10 years, this removes the old
alignment code since it has not been actively maintained.

-----
This was agreed to be removed in #145051

Pull Request: https://projects.blender.org/blender/blender/pulls/145362
2025-09-12 09:11:13 +02:00
Omar Emara
b10d767c4e Fix #134920: File Output writes frame for single render
The File Output node always appends the frame number even if the render
is not an animation. This patch makes it such that the frame number is
only written if the render is an animation. The user can use a frame
variable to manually append the frame number if needed.

The command line rendering interface already uses animation rendering in
all cases, so it should not be affected. However, rendering using the
render.render() operator with animation=False will see the behavior
change, however, setting animation=False and start_frame and end_frame
to the same frame number should be sufficient to restore the old
behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/141209
2025-09-12 09:01:31 +02:00
Campbell Barton
320092d0e2 Cleanup: quiet array-bounds compiler warning for GCC 2025-09-12 16:43:41 +10:00
luz paz
353e9178a2 Cleanup: Fix the misspelling of "anisotropy" in some variable names
Mistake in d4915b35988dcde9da540800f72a45e7a08d8fa9

Pull Request: https://projects.blender.org/blender/blender/pulls/146085
2025-09-12 08:39:53 +02:00
Campbell Barton
84511b8509 Core: add type checks to ID property accessors
Since moving the C++ ID property access macros cast "const" away,
replace with get/set accessors and add asserts that correct types
are used.
2025-09-12 06:29:42 +00:00
luz paz
f29382bd7b Cleanup: Fix typos in source/blender/animrig
Fixes user-facing and non-user-facing typos.

Pull Request: https://projects.blender.org/blender/blender/pulls/146098
2025-09-12 07:19:27 +02:00
Guillermo Venegas
ad50ee6bf6 Refactor: UI: Make layout estimate functions as virtual methods
Following the uiLayout refactor, this converts each layout estimate
function as virtuals methods, so w_ and y_ properties can become
protected. This includes missing structs for each layout type in
`uiItemType`, but without the `ui` prefix (they eventually will be
moved to the to the `blender::ui` namespace instead)

Pull Request: https://projects.blender.org/blender/blender/pulls/146049
2025-09-12 03:40:17 +02:00
Campbell Barton
134110b87f Cleanup: sort file lists 2025-09-12 10:20:40 +10:00
Campbell Barton
975f42b7b2 Cleanup: use doxygen comments to end groups 2025-09-12 10:19:56 +10:00
Casey Bianco-Davis
1dd536e24f Grease Pencil: Support Bézier and Catmull Rom for interpolation tool
This adds support for `Bézier` and `Catmull Rom` curve types to the
interpolation tool.

When interpolating between to curves of different types, a priority
system is used.
The priorities from highest for lowest are in the order
`NURB`, `Bézier`, `Catmull Rom` and `Polyline`.

The reasoning for this order is that:
- `NURBs` can be degree order 5 or greater, were as `Bézier` is only
order 4.
- `Bézier` can match the form of both `Catmull Rom` and `Polyline`, so
should be higher priority.
-  `Catmull Rom` is continuous.
- `Polyline` is the simplest and is not smooth, so it should be last.

Note: This does add some simple `NURBs` interpolation, but proper
handling is more complicated and will be save for a future PR.

Resolves: #141178, #143377, #133948 and #136087
Pull Request: https://projects.blender.org/blender/blender/pulls/145683
2025-09-12 01:59:03 +02:00
Sean Kim
a426e70bf6 Fix: Use new USER_DEVELOPER_TOOL_TEST macro where appropriate
Missed in fb91e576ca

Changes all of the non-sanitized, always available options to use the
new macro to match previous behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/146118
2025-09-12 01:42:52 +02:00
Sean Kim
fb91e576ca Preferences: Update macros for experimental feature checks
* Removes `USER_DEVELOPER_UI` conditional check for
  `USER_EXPERIMENTAL_TEST` since the options are always exposed in alpha
  builds.
* Adds `USER_DEVELOPER_TOOL_TEST` as a helper macro for developer
  options.`

Pull Request: https://projects.blender.org/blender/blender/pulls/146116
2025-09-12 00:48:28 +02:00
Sean Kim
4c2ea47aec UI: Add 'Developer Tools' section to user preferences
This PR introduces a 'Developer Tools' section of the user preferences,
enabled when the `Developer Extras` option is enabled. This menu will
not be hidden when the release cycle is no longer in alpha, allowing
developers to use this for common debug options instead of having to use
`G.debug_value` and arbitrary values.

This has the benefit of allowing for an ease of debugging in non-alpha
builds as well as being able to use multiple options that would have
been considered exclusive debug options at once.

None of the existing values bound to a specific `G.debug_value` have
been migrated yet.

Pull Request: https://projects.blender.org/blender/blender/pulls/145215
2025-09-11 23:53:43 +02:00
quackarooni
dacae33cbe Nodes: Add missing tooltip descriptions for various nodes
Add a description for function nodes and a few geometry nodes
and a few shader nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/145772
2025-09-11 20:03:35 +02:00
Hans Goudey
a08cd68f1e Modifiers: Use implicit sharing for some bind data
Addresses #145680.

In one (relatively extreme) test file with the surface deform modifier,
memory usage goes from 14 GB to 4 GB, and an annoying freeze
from preparing an undo step after every operation is gone.

Pull Request: https://projects.blender.org/blender/blender/pulls/145705
2025-09-11 20:00:01 +02:00