Commit Graph

150077 Commits

Author SHA1 Message Date
Ray Molenkamp
98addc0191 Windows: Minor clang-cl changes
- WITH_WINDOWS_EXTERNAL_MANIFEST is now required even for ninja
builds, this previously was not the case. so just apply it
across all build flavours on windows.

- fmsc-version=1922 is no longer needed, was required back when
support for clang on windows landed, is fine without it now.

- /MP gives better build performance when building from the IDE
makes no difference for a ninja build which wasn't struggling in
that department anyhow.
2025-01-22 13:18:57 -07:00
Sean Kim
b24d8822ef Build: Add config print for WITH_AUDASPACE and WITH_OPENSUBDIV
This commit adds two entries into the "Build Options:" CMake print to
assist in verifying configuration both locally and on the buildbot.

Pull Request: https://projects.blender.org/blender/blender/pulls/133409
2025-01-22 21:05:26 +01:00
Harley Acheson
62a0350f6d Fix #91223: Draw Non-Object Active Items in Text Hi
In the Outliner, draw the text of active collections, scenes, and view
layers in "text highlight" color, by default a brighter white than the
regular items. This helps differentiate the active ones a bit better
and also allows them to be themed separately.

Pull Request: https://projects.blender.org/blender/blender/pulls/133390
2025-01-22 20:24:54 +01:00
Hans Goudey
e07cd2b982 Cleanup: Remove unused and transitive includes in draw module
Especially through DRW_render.hh, there were a lot of unnecessary
includes almost everywhere in the module. This typically makes
dependencies less explicit and slows down compile times, so switch
to including what files actual use.

Pull Request: https://projects.blender.org/blender/blender/pulls/133450
2025-01-22 19:37:38 +01:00
Julian Eisel
efadb938f0 Fix #132422: Crash when opening UV editor from shader editor
Fixes: #132422, #133288.

`ED_area_init()` is called when the editor in an area changes, this also changes
the available regions. That means, region polling needs to be executed. The
crash was happening because that wasn't the case, and the asset shelf region was
initialized before the polling was executed, which allocates region data in the
`on_poll_success()` callback.

Also had to pass context to `ED_area_init()`, which is an annoyance, but should
be fine. Similar functions like `ED_area_exit()` take it too.

Pull Request: https://projects.blender.org/blender/blender/pulls/133388
2025-01-22 19:24:38 +01:00
Harley Acheson
0b38b3b2b1 UI: Status Bar Display for GPENCIL_OT_annotate
Simplify the status bar display for "Annotation Draw"

Pull Request: https://projects.blender.org/blender/blender/pulls/133402
2025-01-22 19:19:42 +01:00
Ray Molenkamp
7c657e250e make.bat: remove 2019pre support and update help
2019 no longer has a preview track, so support for it can
safely be removed. The help also incorrectly advertised
asan as a clang only feature, which is no longer true as
msvc supports it these days.
2025-01-22 11:12:11 -07:00
Hans Goudey
d54a7bcb11 Cleanup: Use reinterpret_cast instead of two static casts 2025-01-22 12:50:01 -05:00
Bastien Montagne
8435c03061 Fix missing header in materialX code.
Fairly weird, debug builds were fine, but release ones with clang 19
and mold failed at linking step, complaining about misisng
`bNode::output_sockets()` symbol.

Guess debug config somehow pulls this symbol from somewhere else?
2025-01-22 18:43:27 +01:00
Iliya Katueshenock
ef8808d990 Cleanup: Compositor: Ghost data of a node storage
Since 4cf7fc3b3a (where a storage handling being added) a render layer node never has persist storage data.
And even more, some code of node update do use storage field as temporal variables for a callback so no any data can live forever in this place.
No one copy/initialize/free callback of the node also does not deal with node storage.
And compositor code also don't know about node storage since use different data from a node (id and custom1 fields).

Pull Request: https://projects.blender.org/blender/blender/pulls/132717
2025-01-22 18:19:39 +01:00
Miguel Pozo
20bd132703 Fix: Overlay-Next: Jagged wireframes when Overlay AA is disabled
Fixes the issue described in
https://projects.blender.org/blender/blender/issues/132895#issuecomment-1390739.

Pull Request: https://projects.blender.org/blender/blender/pulls/133446
2025-01-22 17:18:37 +01:00
Hans Goudey
a704d47a04 Fix #133429: Bevel modifier crash with empty mesh
Attribute domain interpolation would fail in this case. Instead of
checking for that, just add an empty check at the modifier entry point.
2025-01-22 10:32:09 -05:00
Brecht Van Lommel
14facb987e Fix #132367: Cycles tiled render cancel still does slow denoise
Read the tiles back from disk, but don't run denoiser.

Pull Request: https://projects.blender.org/blender/blender/pulls/133443
2025-01-22 15:54:41 +01:00
Brecht Van Lommel
e31077ca4c Fix #132148: Assert using rendered animation playback
Don't close file handle twice.
2025-01-22 15:52:09 +01:00
YimingWu
053d817a75 Fix (unreported): Assert when right clicking on image editor tools
When right clicking on any of the image editor tool buttons,
`WM_keymap_guess_from_context` would be called but lack of `space_type`
will cause `WM_keymap_find_all` to return `nullptr`. Assigning it to
`SPACE_IMAGE` fixes the issue.
2025-01-22 22:28:26 +08:00
Philipp Oeser
c0e881cebf Sculpt: avoid adding ".sculpt_mask" attributes in certain cases
Mask layers were added (unnecessarily) in these cases:
- calling `Mask Slice` without having a mask even (now return
`OPERATOR_CANCELLED` early)
- calling `Mask Extract` without having a mask even (now return
`OPERATOR_CANCELLED` early)
- `Extract Face Set` was also adding a mask layer (only because both
extracts used `geometry_extract_apply`), moved mask specific stuff into
`paint_mask_extract_exec` (see above also)

Came up in !123888

Pull Request: https://projects.blender.org/blender/blender/pulls/133435
2025-01-22 15:25:25 +01:00
Omar Emara
549c724f78 Revert "Cleanup: Remove check for SSE4.1 in denoise node"
This reverts commit 19e9092cb6. The
minimum requirement is for builds that Blender officially provides. We
still need to maintain code for none SSE builds.
2025-01-22 16:15:21 +02:00
Omar Emara
19e9092cb6 Cleanup: Remove check for SSE4.1 in denoise node
Blender now has a minimum requirement of 4.2, so no need to check for
SSE4.2 support in the denoise node.
2025-01-22 15:11:22 +02:00
Hans Goudey
7177dca600 Fix: Incorrect interface/tooltip translation check
These panel header labels should be translated when the interface
is translated but they checked for tooltip translation instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/133412
2025-01-22 14:05:59 +01:00
YimingWu
8620f0286a Fix #133414: Sequencer: Ensure valid UTF-8 sequence when pasting text
`TextVars::text` is only 512 bytes and does not include string ending
byte, and `sequencer_text_edit_paste_exec` uses a very simple truncation
that didn't guarantee valid UTF-8 sequence at the end. This is now fixed
by using `BLI_str_utf8_invalid_strip` after truncating the string.

Pull Request: https://projects.blender.org/blender/blender/pulls/133416
2025-01-22 13:00:01 +01:00
Nika Kutsniashvili
9d5a4756ca UI: Use gizmo theme colors for knife tool overlay
Knife Tool overlays were using NURBS theme colors,
make it use gizmo colors instead.

More details and screenshots in the PR.

Fixes #126867

Pull Request: https://projects.blender.org/blender/blender/pulls/133395
2025-01-22 12:57:46 +01:00
Philipp Oeser
517aa5bfe2 Fix #113760: Knife Tool: wrong red point after undo
After confirming a cut, the tool goes into `MODE_IDLE`.
In `knifetool_undo`, the `KnifePosData` `prev` (drawn as the "red point"
in question in `knifetool_draw`) was only set to the `KnifeUndoFrame`
pos when we are in `MODE_DRAGGING` though -- this is now changed to also
be done for `MODE_IDLE`.

NOTE: it might be questionable to even draw this bigger red dot once a
cut is confirmed (will attach another small diff to the PR that does
this)

Pull Request: https://projects.blender.org/blender/blender/pulls/133430
2025-01-22 12:14:51 +01:00
Brecht Van Lommel
7a0a173d39 Fix: Missed case of OCIO luminance coefficients in EEVEE
Following up on #133368. Thanks Omar for spotting this.

Pull Request: https://projects.blender.org/blender/blender/pulls/133400
2025-01-22 11:19:02 +01:00
Brecht Van Lommel
e98b45beb1 Fix: Cycles CPU render wrong with latest OSL 1.14 2025-01-22 10:59:07 +01:00
Pratik Borhade
446b2a983d Fix: Variable referenced in UI code without being assigned
Mistake in d4d046a673
Right now python error is triggered with empty material slot.

Pull Request: https://projects.blender.org/blender/blender/pulls/133287
2025-01-22 10:43:09 +01:00
Brecht Van Lommel
c749f6c376 Cleanup: Remove unnecessary usage of Boost in the build system
* Some libraries like Alembic and OpenColorIO for a long time removed
  header dependencies on Boost.
* No need to have BOOST_LIBRARIES anymore, only BOOST_PYTHON_LIBRARIES
  is a direct dependency through USD headers.
* OpenVDB is no longer a static library, no need to link its dependencies.

Pull Request: https://projects.blender.org/blender/blender/pulls/133424
2025-01-22 10:02:22 +01:00
Campbell Barton
e8ebbce9c5 Cleanup: update naming for dualcon: rename loop corner_verts
These weren't the equivalent of MLoop's even with the old naming
this was misleading, especially `DualConInput::mloop`.
2025-01-22 19:59:03 +11:00
Campbell Barton
6c05859b12 UI: mitigate problem where remesh could accidentally hang/crash
Having a small voxel size meant typing in zero would clamp the
voxel size to a small number which was often small enough to hang
calculating large voxels which would eventually fail to allocate
memory & crash.

Instead, allow a zero value but bypass calculation.

See #130526.
2025-01-22 19:46:16 +11:00
Campbell Barton
acf270b216 Unbreak build WITH_INTERNATIONAL=OFF 2025-01-22 19:40:21 +11:00
Campbell Barton
46724ca841 Fix #105164: Blender exits when QuadriFlow solver fails
Replace calls to exit(..) with an error return value.
2025-01-22 19:27:00 +11:00
Julien Duroure
16f728cfe5 glTF exporter: Missed background check in previous commit 2025-01-22 09:19:32 +01:00
Philipp Oeser
2a52ca42bd Fix #131836: Texture paint: "Texture Mask" stencil is not drawing
Reason for this is that all the brushes in essentials assets have a zero
default `mask_stencil_pos` / `mask_stencil_dimension`.
At that time, they have been created resetting a brush to defaults and
using that as a starting point.
At that time though, these settings didnt have a default (which
b2dd308dca fixed, so that method should not result in those settings
being zero).

The brushes in essentials assets still do though, now correct these in
versioning code.

Pull Request: https://projects.blender.org/blender/blender/pulls/133374
2025-01-22 09:16:25 +01:00
Philipp Oeser
00968fe6db Fix: Grease pencil inconsistent inverting of influence vertex groups
Behavior was not consistent across modifiers

- Opacity
-- strokes were using inverted weights only when
MOD_GREASE_PENCIL_OPACITY_USE_WEIGHT_AS_FACTOR was OFF, fills however
when MOD_GREASE_PENCIL_OPACITY_USE_WEIGHT_AS_FACTOR was ON
- Tint
-- strokes and fills were using inverted weights only when
MOD_GREASE_PENCIL_TINT_USE_WEIGHT_AS_FACTOR was ON
- others (Envelope, Lattice, Noise, Offset ) were ignoring inverting the
influence vertex group alltogether (but that is reported in #133055 and
will be handled separately, see below)
- others (Hook, ... ) were always inverting it, which is correct

This pull requeset only corrects this for Opacity and Tint (in the way
that now weights are always inverted, no matter if "Use Weight As
Factor" is used).
This also paves the way to a more general fix for #133055 (which intends
to move the weight inversion to the very general
greasepencil::get_influence_vertex_weights)

Pull Request: https://projects.blender.org/blender/blender/pulls/133310
2025-01-22 09:15:53 +01:00
Julien Duroure
71d3e32974 glTF exporter: Tweak for action filter in Collection Export
Waiting a proper solution for props declaration:

- Filter now happen even if the list is not displayed
- Avoid spaming console with error, display a label saying what to do
2025-01-22 09:09:40 +01:00
Brecht Van Lommel
bec8581916 Refactor: Remove Boost from Quadriflow
Extract Boykov-Kolmogorov max flow algorithm from boost::graph. As part
of work towards removing Boost as a Blender dependency.

Together with #133347 this removes the last direct Blender dependency
on Boost.

Pull Request: https://projects.blender.org/blender/blender/pulls/132142
2025-01-22 09:05:38 +01:00
Brecht Van Lommel
139f0d8c32 Refactor: Move translation handling fully into blentranslation
No need to have the extra abstraction, simpler to have it together
in the same module.

Pull Request: https://projects.blender.org/blender/blender/pulls/133347
2025-01-22 09:05:32 +01:00
Brecht Van Lommel
860bfd786e Refactor: Don't modify std::locale::global for translation
Without boost::locale, there seems no particular reason to modify the
global locale, we can just translate strings ourselves.

Other locale facets like numeric and time are also left unchanged
from the default, which is the "C" locale. This appears to match
previous Blender behavior with boost::locale. That protects against
bugs where formatting floats for I/O unexpectedly depends on the
system language.

Pull Request: https://projects.blender.org/blender/blender/pulls/133347
2025-01-22 09:05:29 +01:00
Brecht Van Lommel
820f261371 Refactor: Replace Boost Locale for translation
Use code adapted from boost::locale to implement locale name parsing
and .mo file reading ourselves.

Together with #132142 this removes the last direct Blender dependency
on Boost.

Pull Request: https://projects.blender.org/blender/blender/pulls/133347
2025-01-22 09:00:32 +01:00
T0MIS0N
9cdbb72c1a Fix #132643: Deleting Color Ramp's penultimate stop doesn't update the Color Ramp
This bug occurs when the user deletes the rightmost stop on a
color ramp with 2 stops. After doing this, the color ramp appears
to stop updating its results.

This bug is due to a shader optimization for color ramps. For ramps
with 2 stops or less, the first and second stops are hardcoded as
inputs to get the results of the color ramp. When deleting the
rightmost stop, the stop's data isn't actually changed. The ramp
just updates its total stop number. Because of this, the result of
the color ramp won't change.

This is fixed by only allowing this optimization when a ramp has
exactly 2 stops. This solution works well since it keeps color ramp
code neat and concise. It also makes more logical sense to only allow
this optimization to work with 2 stops since it uses 2 hardcoded values
from the color ramp. It's also unlikely this will lead to adverse
performance problems since it doesn't make sense to use a color ramp
with 1 color stop. In that case, the user should just use an RGB node.

Another possible solution for this problem would be to update the data
for the second stop in the color ramp to exactly match the first when
deleting the second stop. However, this is undesirable since the code
wouldn't make much sense to those who don't know about the color ramp
optimizations.

Pull Request: https://projects.blender.org/blender/blender/pulls/132951
2025-01-22 08:29:48 +01:00
Campbell Barton
dfb01181cd extern: update quadriflow patch to account for local changes 2025-01-22 16:27:34 +11:00
Alaska
58b7543ede Fix #132322: Artifacts in Cycles volume rendering with Light tree on some devices
In a previous commit (1), adjustments to light tree traversal were made
to try and skip distant lights when deciding which light to sample
while within a world volume.

The skip wasn't implemented properly, and as a result distant lights
were still included in the light tree traversal in that sitaution.
And due to the way the skip was implemented, there were some
unintialized variables used in the processing of the distant lights
importance which caused artifacts on some platforms.

This commit fixes this issue by reverting the skip of distant lights
in that situation.

(1) blender/blender@6fbc958e89

Pull Request: https://projects.blender.org/blender/blender/pulls/132344
2025-01-22 05:50:32 +01:00
YimingWu
e7efb704fa Fix #133367: Use BKE_unit_value_as_string_scaled for ruler gizmo
`BKE_unit_value_as_string` was modified in e949ff7334
to include a `BKE_unit_value_as_string_scaled` version, some places on
the interface needs to use the scaled version to show the string, this
includes ruler gizmo length text.

Pull Request: https://projects.blender.org/blender/blender/pulls/133373
2025-01-22 03:51:45 +01:00
John Kiril Swenson
e3c0224d16 Fix #133193: VSE: Wrong mouse cursor over scroll bars
Add a check to see if the mouse is in the scroller region in
`sequencer_main_cursor()`.

Pull Request: https://projects.blender.org/blender/blender/pulls/133353
2025-01-22 03:43:01 +01:00
Harley Acheson
efe75841d3 UI: Status Bar Display for POSELIB_OT_blend_pose_asset
Simplify and improve the status bar display by adding icons and
state highlighting while running "Blend Pose Asset".

Pull Request: https://projects.blender.org/blender/blender/pulls/133397
2025-01-22 03:30:40 +01:00
Campbell Barton
ecdeeca5b3 Cleanup: re-order baking highpoly break-on-error
Avoid breaking with a partially initialized `highpoly` as this
could cause complications when freeing members in the future.
Also use variables for brevity.
2025-01-22 12:45:03 +11:00
Campbell Barton
0f0bc1a940 Fix #107426: error when texture bake cannot access evaluated mesh data
Changes in [0] broke baking to objects with animated render visibility,
causing render visibility override not to work.

Resolve by disabling visibility optimizations.

Ref !133358

[0]: 0dcee6a386
2025-01-22 12:43:23 +11:00
Campbell Barton
9b5a65d1ec Cleanup: suppress unused function warning 2025-01-22 12:43:08 +11:00
Hans Goudey
8c381a3b37 Cleanup: Slightly improve comments in OffsetIndices header
Avoid some repetition and clarify/simplify some language.
2025-01-21 19:09:01 -05:00
Sean Kim
6b0fa709fa Fix #133128: Multires cavity automasking creates artifacts
Prior to the brush refactor in 4.3, the cavity automasking feature
had an implicit dependency on stable position values. In many cases,
such as during brush evaulation, this was upheld by the usage of the
proxy system, which meant that even if a vertex's neighbor was changed
during a stroke in paralell, these changes would not be accessed until
after a stroke finished.

With the new method of brush evaulation removing the proxy system, this
introduced subtle artifacts on BVH node boundaries, as vertices were
guaranteed to change and cause differences as there was no temporary
storage to use the "old" position data. This effect was most noticable
in 4.3 and beyond in multires sculpting, though similar artifacts can be
seen when using the mesh filter in all prior versions.

To fix these issues, instead of calculating the internal cavity factor
during a stroke or during deformations, we calculate it ahead of time
based on the affected nodes of a stroke. This has the benefit of now
behaving consistently for a given mesh and given brush or filter
application.

From a performance perspective, this change should have no noticeable
impact, as each BVH node, and by extension each vertex, only has its
corresponding cavity factor calculated once, when the stroke would
affect the node.

Related: #102745

Pull Request: https://projects.blender.org/blender/blender/pulls/133224
2025-01-21 23:19:51 +01:00
Iliya Katushenock
1eed464d48 Cleanup: Remove unused includes in geometry nodes
Pull Request: https://projects.blender.org/blender/blender/pulls/118095
2025-01-21 22:46:40 +01:00