Commit Graph

152234 Commits

Author SHA1 Message Date
Germano Cavalcante
66ef7f5621 Fix #142314: Crash popup blocks automation in background mode
Crash popups were being displayed even when Blender was running in
background mode, causing the process to hang and blocking automated
workflows (e.g., render farms).

Therefore, disable the crash popup when running in background mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/142518
2025-07-22 09:04:14 +02:00
Campbell Barton
c7ac5240d8 Core: use UTF8 string formatting for BKE_image (missed last commit) 2025-07-22 16:50:59 +10:00
Campbell Barton
4d4f518d80 Core: use UTF8 string formatting for BKE_image
Also use UTF8 string functions elsewhere for RenderSlot::name &
RenderView::name.
2025-07-22 16:41:13 +10:00
Campbell Barton
0501555dcc BLI_string: add UTF8 aware BLI_snprintf functions & macros
BLI_snprintf and related functions could truncate partial UTF8
code-points, which would then cause problems elsewhere -
Python raises an exception when accessing for example.

Existing uses of BLI_snprintf should use the UTF8 versions in most
cases, except for file paths which are not required to be UTF8.
2025-07-22 16:25:51 +10:00
Campbell Barton
58e76ff26f Cleanup: format CMake files
Wrap long lines, correct typos, simpler line wrapping for messages.
2025-07-22 16:17:10 +10:00
Campbell Barton
53136a0b53 Cleanup: format 2025-07-22 16:00:11 +10:00
Campbell Barton
5f6a07240f Cleanup: avoid redundant string formatting 2025-07-22 15:53:14 +10:00
Campbell Barton
dd49c50ccf Cleanup: remove redundant calls to strlen, don't cast "const" away 2025-07-22 15:18:45 +10:00
Campbell Barton
13dc1ba1d3 Fix: incorrect string size writing to RenderStats::scene_name
Bytes for the ID-code were subtracted twice when initalizing
render status scene_name for baking.
2025-07-22 14:45:12 +10:00
Campbell Barton
7b83c7d761 Cleanup: declare variables when assigned 2025-07-22 12:08:00 +10:00
Campbell Barton
c045ce324b Cleanup: remove redundant checks in BLI_snprintf functions
Checking for -1 only makes sense for signed types.
2025-07-22 11:59:43 +10:00
Campbell Barton
996210999b Cleanup: use C style comments for descriptive text, doxygen doc-strings
Also replace add-hoc groups in BKE_collision.h with doxy groups.
2025-07-22 11:59:43 +10:00
Campbell Barton
f470a0bbd0 Cleanup: quiet mypy warning 2025-07-22 11:59:43 +10:00
Campbell Barton
81e4558ab6 Cleanup: reduce right-shift in Python scripts 2025-07-22 11:59:43 +10:00
Campbell Barton
2b0764222f Cleanup: clarify the purpose of full-screen areas
It wasn't obvious why a full-screen area should also disable gizmos.
Also move screen check last to avoid context member access.
2025-07-22 11:59:43 +10:00
Charles S
36e52ba853 Fix #142006: Color Jitter produces black points in Material mode
This fixes a bug caused by 96e549c092. Before the change, the
`randomize_color` function passed through the `color.a` value in the
returned rgba color. The alpha is `1` when the color mode is Color
Attribute and `0` when it's Material. After the patch, it was hard
coded to `1`. This fixes it by passing the `color.a` back through
again.

Pull Request: https://projects.blender.org/blender/blender/pulls/142642
2025-07-22 02:42:42 +02:00
Campbell Barton
f6cacb14da Build: unbreak building WITH_FFMPEG=OFF 2025-07-22 09:56:54 +10:00
Harley Acheson
2ae08d3cbe Fix #141550: Pad Editor Outline to Avoid Blurriness
At low scale and on regular DPI displays the editor outline, being just
a single pixel can sometimes look blurry. Padding by half a pixel (that
is not increased with scale, DPI, or line size) avoids this blurriness.

Pull Request: https://projects.blender.org/blender/blender/pulls/142777
2025-07-22 01:31:41 +02:00
Sean Kim
b0bf71cadf Fix #142557: UV Editor 'Show Faces' toggle doesn't work
Caused by 490ab44e47

The `show_face_overlay_` private property needs to be set correctly when
an object is in Edit Mode and the Space is the UV editor.

Pull Request: https://projects.blender.org/blender/blender/pulls/142739
2025-07-22 00:31:37 +02:00
Sean Kim
063917b929 Cleanup: Replace index calculation with helper function
Pull Request: https://projects.blender.org/blender/blender/pulls/142424
2025-07-21 23:38:47 +02:00
Jacques Lucke
c20b67a6c0 Cleanup: quiet unused variable warning 2025-07-21 22:37:55 +02:00
Harley Acheson
551cb3b939 Fix #142669: Show AZONE_FULLSCREEN for Sequencer RGN_TYPE_PREVIEW
Switching to full screen mode with panel hiding normally shows a button
at the top-right to switch back. But only for RGN_TYPE_WINDOW regions.
This PR just adds RGN_TYPE_PREVIEW to the regions that show this.

Pull Request: https://projects.blender.org/blender/blender/pulls/142754
2025-07-21 21:34:48 +02:00
Hans Goudey
d84f10f2a0 Fix #142583: Uninitialized data in edit UV lines index buffer
Caused by a slightly weird API, that has no good way to recieve
the final size of a partially used index buffer. Until this is refactored
more, just assign this data manually.

Pull Request: https://projects.blender.org/blender/blender/pulls/142748
2025-07-21 21:06:49 +02:00
Thomas Dinges
ce0ae95ed3 Cycles: Bump minimum supported CUDA architecture to sm_50
Pull Request: https://projects.blender.org/blender/blender/pulls/142212
2025-07-21 19:49:21 +02:00
Aras Pranckevicius
d89c9c5155 Video: HDR video input/output support
HDR video files are properly read into Blender, and can be rendered out
of Blender.

HDR video reading / decoding:

- Two flavors of HDR are recognized, based on color related video
  metadata: "PQ" (Rec.2100 Perceptual Quantizer, aka SMPTE 2084) and
  "HLG" (Rec.2100 Hybrid-Log-Gamma, aka ARIB STD B67). Both are read
  effectively into floating point images, and their color space
  transformations are done through OpenColorIO.
- The OCIO config shipped in Blender has been extended to contain
  Rec.2100-PQ and Rec.2100-HLG color spaces.
- Note that if you already had a HDR video in sequencer or movie clip,
  it would have looked "incorrect" previously, and it will continue to
  look incorrect, since it already has "wrong" color space assigned to
  it. Either re-add it (which should assign the correct color space),
  or manually change the color space to PQ or HLG one as needed.

HDR video writing / encoding"

- For H.265 and AV1 the video encoding options now display the HDR mode.
  Similar to reading, there are PQ and HLG HDR mode options.
- Reference white is assumed to be 100 nits.
- YUV uses "full" ("PC/jpeg") color range.
- No mastering display metadata is written into the video file, since
  generally that information is not known inside Blender.

More details and screenshots in the PR.

Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/120033
2025-07-21 19:26:07 +02:00
Bastien Montagne
7c7c68fd7a Refactor: Cleanup Library FileData handling.
Add an explicit 'is owning' tag for libraries' FileData pointer, and
factorize code cleaning it up into a small util function.

Also allows to get rid of the weird ugly exception case in `link_end`
code for the 'root' library filedata, which is usually owned by caller
code and should not be freed here.

Pull Request: https://projects.blender.org/blender/blender/pulls/142723
2025-07-21 17:59:17 +02:00
Lukas Tönne
828bd83734 Fix #142163: Instance attributes can be invalid on curves
The "curve_type" attribute in curves geometry is built-in and only valid with
a `int8` type on the `Curves` attribute domain. Adding it with a different type
on instance geometry is fine though, but causes invalid attribute writer access
when realizing the instances.

Pull Request: https://projects.blender.org/blender/blender/pulls/142218
2025-07-21 16:15:45 +02:00
Hans Goudey
1d4acb809a Mesh: Slightly simplify BKE_mesh_uv_vert_map_create code
The UV values for a face are contiguous anyway, there's no need
to put them into a temporary vector. Also compute them the UV
map windings in parallel, and avoid unnecessarily adding up the
size of every face.

Pull Request: https://projects.blender.org/blender/blender/pulls/142415
2025-07-21 16:11:37 +02:00
Hans Goudey
dfeb425e51 Cleanup: Improve BKE_mesh_uv_vert_map_create arguments
Use Span and modern naming for mesh data.
2025-07-21 16:11:37 +02:00
Hans Goudey
a9865f5119 Cleanup: Remove unused arguments to BKE_mesh_uv_vert_map_create 2025-07-21 16:11:37 +02:00
Bastien Montagne
17de1678ba Fix 'raw' version of blendfile.py reader.
Broken after changes to blendfile header reading code, the
`BlendFileBlockRaw` class was not updated.
2025-07-21 15:51:24 +02:00
Bastien Montagne
ddd0eb1891 CMake Ninja Jobs: Better auto-compute of jobs values.
This refactor the previous system, main changes being:
* The `NINJA_MAX_NUM_PARALLEL_..._JOBS` variables are now only to allow
  users to override automatic values with their own settings.
* If undefined or left at the new '0' default, CMake will compute
  'optimal' values for all three pools, based on the amount of available
  RAM, cores, and the type of build.
* Linking jobs can now max up at 2 instead of 1.

Pull Request: https://projects.blender.org/blender/blender/pulls/142112
2025-07-21 15:48:27 +02:00
Miguel Pozo
ee39f43bf0 Fix #142255: Unbound resource for point clouds
Same fix as #142265, but for point clouds.

Pull Request: https://projects.blender.org/blender/blender/pulls/142396
2025-07-21 15:14:58 +02:00
Miguel Pozo
a8975bf651 Fix #142097: Vulkan: Crash with unbound textures
On the Vulkan side, ensure that unbound textures don't result in
accessing uninitialized or out of bounds memory.
On the Draw side, ensure all Hair and Curves attributes have, at least,
a dummy attribute bound.

Pull Request: https://projects.blender.org/blender/blender/pulls/142265
2025-07-21 15:14:10 +02:00
Guillermo Venegas
230813f2ab Cleanup: UI: Remove redundant namespace prefixes
A follow-up from recent UI refactors.

Pull Request: https://projects.blender.org/blender/blender/pulls/141920
2025-07-21 15:08:12 +02:00
Weizhen Huang
9404db8c7c Fix #141388: Cycles: CPU/GPU difference in pow function with 0 base
If the base is 0 and the exponent is non-zero, return 0 for both CPU and GPU.

Pull Request: https://projects.blender.org/blender/blender/pulls/142678
2025-07-21 14:45:30 +02:00
Richard Antalik
40b2cd92ee Fix #142195: Crash when adding stereo 3D image
Caused by assigning pointer to address which is eventually freed.

Use `MEM_mallocN()` with copy assignment instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/142361
2025-07-21 14:05:31 +02:00
Bastien Montagne
2933433abc Cleanup/Refactor: Readfile: Add a fd_bmain new pointer to FileData.
Existing code was confusing, as existing `FileData::bmain` was not
really documented, and it could be in some cases the 'library bmain' of
a library filedata, instead of the 'main' Main (i.e. the local data of
the currently editied blendfile, the one containing all local IDs).

Now, `FileData::bmain` is always the 'main' root Main.

The new `FileData::fd_bmain` is assigned with the Main matching that
filedata and its blendfile: either the same 'main' Main (when used to
read the main edited blendfile), or the 'library' Main (when used to
read a library blendfile).

This is mostly no-op change in current code (with one exception, see
below), as this pointer is currently mostly used either:
* In a context whgere it is also always the 'main' Main, or...
* In a context where it is only used to access the (shared among all
  Mains) list of `Main::split_mains`.

But having a clear and sane definition of this data gets much more
important with packed linked data (see !133801), as there we have data
that 'belong' to a library, but must e.g. be read from another FileData,
with the added complexity of different versions etc.

NOTE: The only effective change in this commit is
`read_library_file_data`, which used to assign the _library_ Main to the
new (library) `FileData::bmain`. This should not have any effect in
practice in current code, as this Main is only used to access its list
of split_mains.

Pull Request: https://projects.blender.org/blender/blender/pulls/142384
2025-07-21 13:32:31 +02:00
Richard Antalik
10b2670616 Fix #141709: VSE doesn't show scene strip subframes
Caused by source cache using integer for frame index, which is used as
cache key. Use float for scene strips instead.

Co-authored-by: Aras Pranckevicius <aras@nesnausk.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/142380
2025-07-21 12:45:12 +02:00
Sebastian Parborg
0f4a46093e Fix: Properly package unicode folders/files with make_source_archive.py
The issue was that `git ls-files` will per default escape unicode
characters. This make it so that our python script couldn't find any
files or folder as it expected unescaped characters.
2025-07-21 12:37:11 +02:00
Lukas Tönne
79e61be409 Fix #142649: Grease Pencil remove fill guides operator breaks triangle cache
This needs a topology cache update to ensure triangles are update after removing
curves.

Pull Request: https://projects.blender.org/blender/blender/pulls/142671
2025-07-21 12:16:50 +02:00
Weizhen Huang
5a27edcf79 Fix #141136: Cycles Hair black artifacts with direct coloring
fixed by clamping negative input colors

Pull Request: https://projects.blender.org/blender/blender/pulls/142667
2025-07-21 12:15:04 +02:00
Pratik Borhade
744793ff72 Fix #141565: Mode icons in outliner too far to the left
Affected due to c046b8bb21
To fix this, move icon to the right by same factor as in the above commit

Pull Request: https://projects.blender.org/blender/blender/pulls/141596
2025-07-21 11:56:13 +02:00
Bastien Montagne
f67ce27f69 I18N: Updated UI translations from git/weblate repository (def3c8131dbed9f). 2025-07-21 11:33:49 +02:00
YimingWu
f74ad86748 Fix #142647: Don't create preset that has the same name as built-in ones
When creating presets in some panels, names like "Default" can be used
which are the same preset names as bundled presets. New entries created
like this can't be deleted because blender will treat it as a bundled
preset which then leaves stale entries in the list. This fix prevents
those kind of preset names to be used during creation.

Pull Request: https://projects.blender.org/blender/blender/pulls/142652
2025-07-21 11:23:40 +02:00
Aras Pranckevicius
e57b73bdf7 Fix #142333: new FBX importer produces broken rotation fcurves in some cases
Need to ensure that interpolation between neighboring quaternions
takes the shortest path. The Python FBX importer was doing this;
due to oversight was missed in the new importer.

Pull Request: https://projects.blender.org/blender/blender/pulls/142659
2025-07-21 10:50:48 +02:00
Habib Gahbiche
a775d58b2e Fix: Assert after importing a USD scene with DomeLight
**How to reproduce the bug:**
Load the attached Blend File OR

1. Create a new World in python: bpy.data.worlds.new("Test")
2. Switch to this new world in the UI (but do nothing else to it)
3. Import in a USD file with a DomeLight (see attached file in PR)
4. Close Blender
5. Observe assert `BLI_assert(ELEM(owner_id, nullptr, id));`

The issue was caused by a assigning a regular node tree
`World->nodetree` whereas an embedded one is expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/142367
2025-07-21 10:21:51 +02:00
Habib Gahbiche
806c317306 Cleanup: Node gizmos: move ibuf check to centralized function
Follow up to https://projects.blender.org/blender/blender/pulls/140356

Pull Request: https://projects.blender.org/blender/blender/pulls/141947
2025-07-21 10:20:56 +02:00
Alaska
281a594c22 Tools: Small changes for fixes per release script
This commit makes a few small changes to the bug fixes per release
script:

- The main loop is factored out into it's own function, making it
easier for external scripts to reuse.
- The cached commits file has been renamed to include the range
that is cached. This allows multiple caches to be kept for situations
where you're collecting a list for both the current release and main.
- The Blender 5.0 example has been updated with the 4.5 backport task.

Pull Request: https://projects.blender.org/blender/blender/pulls/141867
2025-07-21 08:06:29 +02:00
Harley Acheson
690000da9f UI: Hide More Content for Full Screen Area
The "Full Screen Area" makes the area take up the screen and also hides
most regions. This is meant to be as clean as possible, as part of the
stereo 3D pipeline. There are some items that remain though. This PR
removes navigation gizmos, text overlay, and statistics overlay.

Pull Request: https://projects.blender.org/blender/blender/pulls/142418
2025-07-20 21:44:19 +02:00