Commit Graph

141917 Commits

Author SHA1 Message Date
Bastien Montagne
b9dacfe77b Merge branch 'blender-v4.3-release' 2024-10-07 11:54:08 +02:00
Bastien Montagne
af4d53ac2d I18N: Update UI translations from git/weblate repository (84027d1374f1ae). 2024-10-07 11:38:46 +02:00
Sergey Sharybin
ba98ec4a43 Merge branch 'blender-v4.3-release' 2024-10-07 11:23:34 +02:00
Alaska
02973568d6 Cycles Build: Add OptiX 7.4 to FindOpitX.cmake
This helps users building Blender on their own machine get OptiX 7.4
setup for Cycles.

Pull Request: https://projects.blender.org/blender/blender/pulls/128682
2024-10-07 11:22:57 +02:00
Sybren A. Stüvel
a97fe64c4f Anim: fix Action slot idtype endianness switching
`ActionSlot::idtype` needs some extra care when reading from a blend
file. Blender's generic endian switching needs to be un-done, as the
ID type values are not numerically the same between little and big
endian machines. Due to the way they are defined, they are always in
the same byte order, regardless of hardware/platform endianness.

This is the same for Action Slots as #128129 does for Actions, except
that Action Slots use a `int16_t` instead of `short` and thus don't
need a cast.

Pull Request: https://projects.blender.org/blender/blender/pulls/128438
2024-10-07 10:45:11 +02:00
YimingWu
eec84d16ed Overlay-Next: Check active_base for GPv3 sync
`state.active_base` could be null when checking `active_base->object`,
thus guarding this from happening.
2024-10-07 14:22:20 +08:00
Campbell Barton
98002ce4ad Cleanup: minor simplification to file-selector directory expansion
Instead of setting the directory empty so it's initialized to the root,
use a variable which can be set when there are problems expanding the
path. This is then checked once at the end.

Also avoid inlining platform specific root directory access.
2024-10-07 13:11:51 +11:00
Campbell Barton
c1f18be1ba Merge branch 'blender-v4.3-release' 2024-10-07 13:05:28 +11:00
Campbell Barton
9cda82f3f9 Merge branch 'blender-v4.3-release' 2024-10-07 13:05:24 +11:00
Campbell Barton
f36b303a75 Merge branch 'blender-v4.3-release' 2024-10-07 13:04:26 +11:00
Campbell Barton
a5f121149d Merge branch 'blender-v4.3-release' 2024-10-07 13:02:31 +11:00
Campbell Barton
6039cb17e6 Unix: use getpwuid() to access home when the variable/tilde expand fails
This was already done in GHOST, but not BKE_appdir_folder_home.

Also null check the return value from getpwuid() as it's not
guaranteed to be non-null.
2024-10-07 13:00:56 +11:00
Campbell Barton
1e9206238e Fix crash if expanding the fonts directory fails
Add missing null check for BLI_expand_tilde.
2024-10-07 13:00:53 +11:00
Campbell Barton
ff9d9711d7 Fix crash using "~" in the file selector when the "home" is null 2024-10-07 13:00:52 +11:00
Campbell Barton
e0f036f8f3 Fix inconsistency between *BKE_appdir_folder_{home/default} on macOS
Change from [0] introduced BLI_expand_tilde but missed the change
for BKE_appdir_folder_default.

[0]: 9df13fba69
2024-10-07 12:58:39 +11:00
Jason C. Wenger
262d32b694 Cleanup: improve comments & add error checking asserts
Ref !128610
2024-10-07 12:52:34 +11:00
Campbell Barton
61ea50e9c8 UI: don't resolve // in the file selector for unsaved blend files
Using `//` for unsaved files isn't meaningful, instead of replacing
with a "default" directory, clear the input to avoid confusing
users as to the meaning of the prefix.
2024-10-07 12:21:01 +11:00
Campbell Barton
6df7656fca Cleanup: remove redundant call to BLI_path_abs, reduce variable scope 2024-10-07 12:21:01 +11:00
Campbell Barton
16b839dd5f Docs: expand comments for file selector logic
Some of the assumptions made here weren't so clear,
update comments for clarity.
2024-10-07 12:21:01 +11:00
Campbell Barton
13fdf34e57 Cleanup: early return from file-selector handlers
Also pass arguments Main & FileSelectParams to file_expand_directory
instead of the context as this is a lower level function thats
only ever called when these values are known & doesn't run
the appropriate refresh functions needed to be called on it's own.
2024-10-07 12:21:01 +11:00
Lukas Stockner
b8d0bef3b4 Cleanup: Cycles: Consolidate coordinate system conversions
- Deduplicate Fisheye projection code
- Replace spherical/cartesian conversions with shared helpers
- Replace transforms from/to local coordinate systems with shared helpers

The main type of repeated transform that's not covered here is `to/from_coords`, but with separate values for xy and z (e.g. BSDFs that already computed `dot(wi, N)` earlier, so they only need `dot(wi, X)` and `dot(wi, Y)` later). Could also be replaced, but it would feel weirdly specific for a helper function.

Pull Request: https://projects.blender.org/blender/blender/pulls/125999
2024-10-07 02:18:49 +02:00
Germano Cavalcante
6d5d3ce975 Transform: Simplify and specialize the handling of events
The `transformEvent` function is becoming increasingly complex due to
the inclusion of operation-specific code.

To improve this, remove the `handled` boolean and allow each
`TransModeInfo::handle_event_fn` to determine how to handle already
processed events.

Additionally, move some operation-specific logic to the operators file.

Note:
The `handled` boolean was added in aef307cf31 to fix a bug with the
custom events of the Edge and Vertex Slide operators;
2024-10-05 22:11:07 +02:00
Germano Cavalcante
ed1c708619 Merge branch 'blender-v4.3-release' 2024-10-05 14:21:01 -03:00
Germano Cavalcante
e82ce39e17 Fix: Snap Toggle not updating snap status after a transform operation
Unlike Snap Invert, Snap Toggle (Shift + Tab) saves the snap status in
ToolSettings.

This is a regression from v3.6
2024-10-05 14:20:29 -03:00
Germano Cavalcante
5eae28e685 Fix: Snap Toggle not updating snap status after a transform operation
Unlike Snap Invert, Snap Toggle (Shift + Tab) saves the snap status in
ToolSettings.

This is a regression from v3.6
2024-10-05 14:18:50 -03:00
Campbell Barton
884b724e08 UI: prevent relative path use in the file selector
It was possible to navigate to a CWD relative path if it was entered
in the directory and it happened to exist
(or entering relative paths: `./`, `../` etc).

After this, navigation in the file selector didn't work well, any paths
loaded would depend on the directory Blender was started in.

While CWD relative paths aren't prevented & can even be useful when
using paths passed in by scripts - there is no need for the file
selector to expose them to the user - potentially forwarding CWD
relative paths to operators where they can cause further problems.
2024-10-05 23:46:07 +10:00
Campbell Barton
47f0042942 UI: prevent CWD relative directories being created in the file selector
Entering a single word (for example) in the file selectors directory
would ask to create the director, which then created the directory
relative to the processes CWD, then set a CWD relative path.

From the users perspective this is strange as it's unclear where
the directory was created the path would not show the CWD prefix.

Resolve by checking the path is absolute and at least one of the parent
paths exists before prompting the user to create the path.

Resolve part of the strange behavior from #128567.
2024-10-05 23:16:29 +10:00
Jacques Lucke
3103daab20 Cleanup: avoid unnecessary use of unique_ptr 2024-10-05 12:04:00 +02:00
Campbell Barton
ae261c424c Merge branch 'blender-v4.3-release' 2024-10-05 18:01:33 +10:00
Campbell Barton
9517f69762 Fix BLI_path_is_abs_from_cwd with root/drive-letter paths
The paths `C:` (on WIN32) and `/` on other systems was detecting as
relative. This meant `BLI_path_abs_from_cwd` would make both paths
CWD relative. Also remove duplicate call to BLI_path_is_unc.
2024-10-05 17:58:41 +10:00
Campbell Barton
5776a0b67c Merge branch 'blender-v4.3-release' 2024-10-05 17:54:01 +10:00
Campbell Barton
237f35c350 Cleanup: quiet implicit-fallthrough warning 2024-10-05 17:53:36 +10:00
Campbell Barton
ea2d27cf84 Fix #128567: file selector automatically creates paths & warns
Regression in [0] which didn't account for entering paths in the
file selector which would create paths without confirming,
warning that the "confirm" property was missing.

Entering `*.*` would create `_._` for e.g in the users CWD for example.

Ref !128568

[0]: 6dd0f6627e.
2024-10-05 16:58:21 +10:00
Aaron Carlisle
1dc8468f74 Merge branch 'blender-v4.3-release' 2024-10-05 00:51:59 -04:00
Aaron Carlisle
522a21c58b Docs: Update RNA to user manual URL mapping 2024-10-05 00:51:36 -04:00
Miguel Pozo
3272b56190 Merge branch 'blender-v4.3-release' 2024-10-05 01:23:36 +02:00
Miguel Pozo
40d20f023a Fix: gpu_shader_create_info_get_unfinalized_copy 2024-10-05 01:22:51 +02:00
Clément Foucault
8165d52f90 Fix: Overlay: Broken shader compilation 2024-10-04 23:32:24 +02:00
Harley Acheson
61ae777fbd Merge branch 'blender-v4.3-release' 2024-10-04 11:13:51 -07:00
Pratik Borhade
826ba8e27a Fix #128231: Wrong padding for gizmo and menu tooltips
This is due to wrong `is_pad` is passed as argument. It should be false
for gizmo tooltips. For menus when fields size is zero i.e. no
element is appended yet, the python message will be at the top of
tooltip region.

Pull Request: https://projects.blender.org/blender/blender/pulls/128243
2024-10-04 20:12:38 +02:00
Falk David
3364cb34ee Merge branch 'blender-v4.3-release' 2024-10-04 19:28:16 +02:00
Falk David
5f5b1b83d0 GPv3: Rename mode enum names and python identifiers
This renames the mode identifiers to be consistent with e.g. the context mode identifiers and other names used for the new Grease Pencil.

For `object.mode`:
* `PAINT_GPENCIL` -> `PAINT_GREASE_PENCIL`
* `SCULPT_GPENCIL` -> `SCULPT_GREASE_PENCIL`
* `VERTEX_GPENCIL` -> `VERTEX_GREASE_PENCIL`
* `WEIGHT_GPENCIL` -> `WEIGHT_GREASE_PENCIL`

For the internal `ob->mode` flag:
* `OB_MODE_PAINT_GPENCIL_LEGACY` -> `OB_MODE_PAINT_GREASE_PENCIL`
* `OB_MODE_SCULPT_GPENCIL_LEGACY` -> `OB_MODE_SCULPT_GREASE_PENCIL`
* `OB_MODE_VERTEX_GPENCIL_LEGACY` -> `OB_MODE_VERTEX_GREASE_PENCIL`
* `OB_MODE_WEIGHT_GPENCIL_LEGACY` -> `OB_MODE_WEIGHT_GREASE_PENCIL`

Resolves #127374.

Pull Request: https://projects.blender.org/blender/blender/pulls/128604
2024-10-04 19:20:00 +02:00
Miguel Pozo
1e72605be6 Merge branch 'blender-v4.3-release' 2024-10-04 19:17:12 +02:00
Miguel Pozo
6e6e3da454 Workaround: Allow patching CreateInfos at runtime
Temporary workaround for Overlay Next.

Pull Request: https://projects.blender.org/blender/blender/pulls/128452
2024-10-04 19:16:30 +02:00
Miguel Pozo
3a39121a07 Fix: Finalize CreateInfos at startup
Prevents race conditions on ShaderCreateInfo::finalize.
Previoulsy fixed by #128281, but it doesn't work for the render thread.
2024-10-04 19:16:02 +02:00
Miguel Pozo
ba2faf4285 Workaround: Allow patching CreateInfos at runtime
Temporary workaround for Overlay Next.

Pull Request: https://projects.blender.org/blender/blender/pulls/128452
2024-10-04 19:06:37 +02:00
Miguel Pozo
aed1871bd3 Fix: Finalize CreateInfos at startup
Prevents race conditions on ShaderCreateInfo::finalize.
Previoulsy fixed by #128281, but it doesn't work for the render thread.
2024-10-04 19:06:32 +02:00
Clément Foucault
e4c802e53e GPU: Use macros for create infos
Mass rename create info function to use the new macros.
This allows to define resources in C++ inside IDEs'
precompilation system for linting purpose.

This applies the following script and format afterwards:
https://projects.blender.org/blender/blender/pulls/128602#issuecomment-1310597

Rel #127983

Pull Request: https://projects.blender.org/blender/blender/pulls/128602
2024-10-04 19:04:40 +02:00
Xavier Hallade
b614953971 Cycles: oneAPI: fix Linux compilation with fno-honor-nans
Previously, when compiling on Rocky Linux 8 with fno-honor-nans, compile
time was more than 5x longer than expected, and there was an unresolved
symbol to __sqrtf_finite in GPU binaries.
Once defining sqrtf in compat.h, both issues are effectively gone, this
was certainly due to problematic interactions with build system's math
library headers.
So we can remove current workaround of defining fhonor-nans, and now
have the same set of flags on both Windows and Linux.
2024-10-04 17:50:24 +02:00
Clément Foucault
7a36906ecd GPU: CreateInfo: Add macros for C++ stubs
These macros allow to define resources in
C++ inside IDEs' precompilation system for
linting purpose.

The following script can be used to port
existing create info files to the new macros:
https://projects.blender.org/blender/blender/pulls/128602#issuecomment-1310597

Rel #127983

Pull Request: https://projects.blender.org/blender/blender/pulls/128599
2024-10-04 17:45:00 +02:00