blender-v3.6-release backports #109694

Merged
Philipp Oeser merged 19 commits from lichtwerk/blender:blender-v3.6-release into blender-v3.6-release 2023-07-04 13:55:25 +02:00

19 Commits

Author SHA1 Message Date
Jesse Yurkovich 2cbf2885dd Fix #109442: Match previous behavior when loading BC5 DDS images
buildbot/vexp-code-patch-coordinator Build done. Details
Prior to using OIIO for image loading, DDS files were hard-coded to
always treat files with BC5/ATI2 compression as normal maps[1].

This basically means that the B channel would be reconstructed from the
R,G channels in a particular way. There is a non-standard header flag
(coming from tools like NVTT and various others) that can also be used
to indicate if such processing should take place, and OIIO understands
that flag and acts appropriately.  However, not all files have that flag
set.

This patch reverts to the hard-coded behavior to match prior versions.
If the user has explicitly set the OIIO environment variable to say
otherwise, we will respect that setting instead.

[1] https://projects.blender.org/blender/blender/src/branch/blender-v3.5-release/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp#L870

Pull Request: #109541
2023-07-04 13:15:20 +02:00
Sergey Sharybin 472e9c37b5 Fix #109550: Cycles: OptiX not able to render without CUDA toolkit
Happens with specific GPUs like  NVIDIA A100-SXM4-40GB. They use the
compute capability 8.0, which is not explicitly compiled as a cubin,
and since 7fca0ee76a the PTX is not suitable for it either.

The safest solution is to revert the change to a known good state,
and re-iterate as needed.

Revert "Cycles: Increase the compute model for the PTX kernel"

This reverts commit 7fca0ee76a.

This change would need to be cherry-picked to the 3.6 LTS.

Pull Request: #109636
2023-07-04 13:14:41 +02:00
Bastien Montagne 7880ae7c78 Fix toggling of liboverrides between editable and non-edtiable with "Make" tool in the Outliner.
regression from 43a31d3c93.

Found while investigating #109513.
2023-07-04 13:13:57 +02:00
Bastien Montagne 9f6a4d0c06 Fix (unreported) missing viewlayer sync call in Outliner liboverride tool. 2023-07-04 13:13:14 +02:00
Bastien Montagne 8073325ddc Fix #109590: Outliner: Assert in outliner_collect_objects_to_delete. 2023-07-04 13:12:31 +02:00
Philipp Oeser 866d43ae9d Fix #109455: NLA editor tracks widgets backdrop is too small
Caused by d9f5ce2546 which moved the NLA solo button to the right, but
didnt make the backdrop behind the right-hand-side widgets bigger. So
the first widget seemed "transparent" over the channel name.

Now make the backdrop bigger if the solo button is drawn.

Pull Request: #109498
2023-07-04 13:11:48 +02:00
Germano Cavalcante c1b2e25c2d Fix #109577: Wireframe edge factor is sometimes random
In some situations the loop value might not be set.
2023-07-04 13:11:06 +02:00
Hans Goudey cbcbba23d5 Fix #109523: Crash applying modifier with shape keys
We can't take the ownership of the data of a CustomDataLayer by simply
swapping the pointers anymore, since the data is owned by the layer's
implicit sharing info. Since shape keys don't support implicit sharing
(yet?), just duplicate the layer data instead of taking ownership of it.
2023-07-04 13:10:10 +02:00
Bastien Montagne 5590993f95 Update `credits_git_gen` tool to also parse co-authors in commit messages,
Co-authors listed following the `Co-authored-by:` format in a commit
message will be automatically added to the list of contributors.

Further more, it is now possible to overwrite authors informations from
git commits with embedded data, in case it is necessary to correct some
commit's author information after the commit has been pushed.

Implements #109438.

Pull Request: #109468
2023-07-04 13:05:59 +02:00
Germano Cavalcante 122d380a7c Fix #109519: Orbit Around Selection resets pivot if nothing is selected
Caused by 968ecf6f8b.

The value of the last pivot of the view should not be changed if there
is no selection.

The variable is static precisely because of this.
2023-07-04 13:05:16 +02:00
Philipp Oeser d990e01342 Fix #109302: baking UDIM displacement normalization wrong
Since UDIM baking support in 6787cc13d4, the normalization of
diplacement heights was always based on the min/max height detected in
the _last_ tile, which could lead to clipping if the last tile had very
subtle (or no) displacement.

Now getting the min/max is spread across all images.
This also takes the first thread into account for getting the min/max (which for some reason was skipped).

Pull Request: #109409
2023-07-04 13:04:15 +02:00
Philipp Oeser 18ae7eb689 Fix #109198: Enum properties don't display text in Dope Sheet sliders
`uiDefAutoButR` (or actually `uiDefButR_prop` > `ui_def_but_rna` later
down the line) has this behavior when "" string is passed in, it will
not display text on or next to the button.
This is of course desired in most scenarios -- it might even be desired
for non-icon enums in certain cases (though this is already a bit harder
to find cases for), so changing behavior in said functions is probably
not what we want.

The behavior - from the dopsheet sliders - would seem like a bug though.

Passing NULL (instead of "") to `uiDefAutoButR` results in properly
displaying the chosen item on the dropdown for enums, but for other
property types it would then show the property ui name alongside the
button (which is not what we want in the dopsheet, UI names are already
drawn there separately).

So now, pass "" or NULL conditionally (depending on property type
`PROP_ENUM`).

Pull Request: #109205
2023-07-04 13:03:38 +02:00
Campbell Barton f825a346fc Fix dropping files onto the window under Wayland in some cases
Dropping files from gnome-web onto Blender failed because the
URL data didn't end with a newline.
2023-07-04 13:02:46 +02:00
Campbell Barton 45bf61f131 Fix property tags dummy enum value holding a reference to stack memory
Also update the doc-string to include a warning about this.
2023-07-04 13:00:06 +02:00
Bastien Montagne 6adfd2ae39 Fix (studio-reported) crash when using 'Clear' on a liboverride hierarchy in the Outliner.
Usual issue of modifying the data hierarchy while iterating on it in its
outliner representation. And usual fix for this problem (only store data
to be processed during the iteration over Outliner data, and perform the
actual operation in a single call afterwards).

This commit also tries to improve a bit the 'Clear' process when applied
to a bunch of IDs, by iterating several times over the list of IDs to
clear, and only processing 'liboverrides leaves' first. That way, if
clearing a liboverride leaves turn other liboverrides into leaves, then
can also be processed that way, instead of just being reset.

Note that this is a naive and quite imperfect solution though
(dependency islands cannot be handled that way e.g.), this feature needs
a complete re-write at some point to be more complete and consistent.
Don't think this is high priority though, as it is not really that
useful in practice afaik.

Note: This should be backported to 3.6 LTS (and maybe 3.3 LTS if
applicable).
2023-07-04 12:59:09 +02:00
Philipp Oeser 7fe112c56d Pyhon API: Add animation playback pre/post handlers
Since d8388ef36a, the "frame_change_post" handler could not be used
anymore to detect when animation playback stopped.

This functionality is needed by certain addons though and is generally
usefull to have, so this is now added.

Related reports : #109168, #109218

Pull Request: #109232
2023-07-04 12:57:55 +02:00
Bastien Montagne 596d4ff55f Fix #109004: Append: in Localize All case, LibOverrides does not behave properly.
The root of the issue was that when localizing all linked data, it makes
no sense (and there is no way) to keep liboverrides, since some linked
data would then remain linked.

The solution is then to clear any override data from localized IDs.
While simple in theory, this adds a noticeable amount of complexity to
the 'append' process, as now some IDs should remain linked, and some
should be forcefull copied (instead of directly made local), such that
the liboverride reference data remains valid.

NOTE: Appending without `Localize All` remains unchanged here, and will
keep the liboverrides untouched, since in that case having some linked
data as result of the append operation is expected.

This fix should be backported to the 3.6 LTS.
2023-07-04 12:54:16 +02:00
Bastien Montagne ce7cde954e IDManagement: Add option to 'make local' code to clear liboverride data.
In some cases, when making a linked liboverride data local, the
liboverride data should be preserved (and therefore produce a local
liboverride data).

However, it implies that the data is not really, fully made local, since
it has (critical) dependencies to linked data.

This new option allows 'make local' code to also clear any liboverride
data in the processed ID, making it effectively fully local.

Preliminary step to solve #109004.
2023-07-04 12:53:52 +02:00
Philipp Oeser eeec5e6822 Fix #108171: bpy.ops.uv.pack_islands crash
Originally caused by edc12436c6, the fix c4f39eab88 also had a mistake
unfortunately (double free of `UVPackIslandsData` since it already
called `pack_islands_freejob`).

Pull Request: #109377
2023-07-04 12:52:44 +02:00