Commit graph

117320 commits

Author SHA1 Message Date
Campbell Barton
10ade9ceee Build: back-port fix for Python & SSL
Python failed to find SSL, back-port changes from main.
2023-10-17 20:05:42 +11:00
Campbell Barton
71a519eca1 Build: back-port make_deps_wrapper.sh
Back port [0] with minor updates in main. The wrapper script builds
one library at a time, using all available cores for each.

Without this, building libraries is slower and it's more
difficult to troubleshoot build errors.

[0]: 09498264f6
2023-10-17 09:52:57 +11:00
Philipp Oeser
3a1a5f47da Release: Bump version cycle to 3.3.12 2023-10-16 16:43:16 +02:00
Ray Molenkamp
4e5a182ee1 Deps_builder: minor build fixes, windows fixes and hash updates
small clean-up pass on #112530 that resolves the following problems

- Missing python_windows.diff
- CONFIGURE_ENV_MSVC is new in 4.0 and didn't exist in 3.3 breaking
the python build
- Hash updates for USD and OIIO both had repo renames leading to a
change there
- OIIO was building with -DREQUIRED_DEPS=python and -DUSE_PYTHON=OFF
- Updates in creators cmake for the ffmpeg 6.0 dll names.
2023-10-16 08:16:22 -06:00
Bastien Montagne
356fe62667 Fix (unreported) crash in 'startup.blend' GP default update code.
This commit fixes two different issues in
`BLO_update_defaults_startup_blend`:
* No check were done whether a given 'paint mode' tool settings actually
  exist or not before trying to 'update' it, leading to hard crash when
  some did not.
* Only the first Scene in loaded 'startup' Main would be processed -
  nothing prevents a `startup.blend` file to have more than one scene!

Pull Request: https://projects.blender.org/blender/blender/pulls/113597
2023-10-12 14:12:03 +02:00
Jeroen Bakker
610f9134d8 Fix #113002: Fix Crash When Loading Previous Settings
The default theme of blender has no `icon_border_intensity` and
therefore only loads the regular icons. When newly loaded theme has the
`icon_border_intensity` set it needs to reload the icon textures so both
icon maps would be loaded.

Without reloading the icons a GPU texture is missing and would crash
blender at first use. Starting Blender the second time it would load the
correct icons and would work as expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/113016
2023-10-12 13:42:11 +02:00
Christoph Lendenfeld
68d05d0112 Fix #97628: Clear and Keep Transformation not working when keyed
When clearing the parent of an object that has keys,
the object position jumped back to world space immediately.
This didn't allow for keying the current position
and was inconsistent with setting a parent.

This PR fixes it by not instantly re-evaluating the animation.

Pull Request: https://projects.blender.org/blender/blender/pulls/112670
2023-10-12 13:38:46 +02:00
Pratik Borhade
fa4913061c Fix #101550: Transfer Mode operator doesn't update outliner selection
Notifiers was sent to outliner for redraw but outliner was out of sync
due to missing flag which is required for syncing.
This will correctly set the select/active outliner element flags with
the help of Base in `outliner_select_sync_from_object`. So correct active
tree element will be highlighted in `outliner_draw_highlights`

Pull Request: https://projects.blender.org/blender/blender/pulls/112370
2023-10-12 13:34:25 +02:00
Brecht Van Lommel
96c5cc5d45 Build: update 3.3 libraries to address CVEs
And ignore a few CVEs that do not affect Blender.

ffmpeg 6.0.0
libxml2 2.10.4
openssl 3.1.2
python 3.10.13 (with changes to use our own ssl)
sndfile 1.2.2
tiff 4.5.1
webp 1.3.2

Ref #98555

Co-authored-by: Ray Molenkamp <github@lazydodo.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/112530
2023-10-09 15:49:08 +02:00
Philipp Oeser
9d513515ce Bump version cycle to 3.3.12 RC 2023-09-22 11:02:51 +02:00
Philipp Oeser
0b29dc895e updated addon references 2023-09-21 11:19:02 +02:00
Thomas Dinges
6a3240da1d Release: Bump version cycle to 3.3.11 2023-09-21 08:07:33 +02:00
Sergey Sharybin
6368ffe636 Fix regression tests failure on the latest Xcode
When using Xcode version 14.3 on Apple Silicon hardware a number of
regression tests fails. This change fixes this problem.

The root cause comes to the floating point contraction. It was already
disabled for GCC on Linux, but not for Clang on neither of Linux or
macOS.

Also corrected the comment about Clang default, as it as set to on
somewhere in 2021.

Cherry-pick of a pull-request #107136

Pull Request: https://projects.blender.org/blender/blender/pulls/112578
2023-09-19 15:29:44 +02:00
Philipp Oeser
f7e6ddb993 Fix #112144: Graph Editor handle highlighting not working correctly
Mistake in 7c48196056.

Second handle was always drawn with positions of the first handle (when
it was highlighted).

Should be good for 3.6/3.3 LTS.

Pull Request: https://projects.blender.org/blender/blender/pulls/112219

Pull Request: https://projects.blender.org/blender/blender/pulls/112325
2023-09-13 14:29:49 +02:00
Philipp Oeser
662fd4213c Fix #112208: Vertex parenting index wrong with multiple splines
Caused by 346023b457.

Above commit made variables too local (starting index with zero in each
nurb of the curve/surface object, but we need the "overall" index).

Should be good for LTS.

Pull Request: https://projects.blender.org/blender/blender/pulls/112222
2023-09-13 14:01:25 +02:00
Philipp Oeser
b4a34d54f7 Fix #111642: VSE glow code can overflow with small proxies
With such small proxy sizes (combined with a small blur radius), the
kernels `halfWidth` can get zero, which leads to a memory allocation of
same zero size and writing to that memory leads to overflow/crashes/can
only go downhill from there.

Now early out in such cases [which leads to
slightly different output -- well if the "buggy" output survives and
does not crash that is].

(alternatively we could just prevent the overflow and still let do
`RVBlurBitmap2_float` do stuff that it really shouldnt imo, see first version of the PR)

Pull Request: https://projects.blender.org/blender/blender/pulls/111660
2023-09-13 13:56:00 +02:00
Philipp Oeser
895702f803 Fix #109427: Shortcut missing in animation editors channel context menu
Specifying the correct operator context (`INVOKE_REGION_CHANNELS` in
this case) is mandatory, otherwise looking up the shortcut in
`wm_keymap_item_find_props` will fetch the wrong region
(`RGN_TYPE_WINDOW` not `RGN_TYPE_CHANNELS`) and thus wont find the keymap
item in that region keymap.

This was already done for the other menus, not for the context menu
though.

Pull Request: https://projects.blender.org/blender/blender/pulls/111376
2023-09-13 13:52:23 +02:00
Philipp Oeser
a423ebad48 Fix #94129: Unable to remove added keying set from context menu
Mistake in (7-year-old) f6c09eadf0.

The operator was just cancelled if the right button was found, instead
it should only cancel if the button is _not_ found.

Pull Request: https://projects.blender.org/blender/blender/pulls/111373
2023-09-13 13:48:44 +02:00
Philipp Oeser
5eafbc7c6e Fix #111238: Arrow keys in some menus work in the opposite direction
Since menus are created flipped (from event handling point of view), the
root layout block needs to be flagged `UI_BLOCK_IS_FLIP`.
This was missing for a couple of `uiMenuCreateFunc`, namely:
- creating worspaces menu
- modifiers extra ops
- constraints extra ops
- GP modifiers extra ops
- GP Shader FX extra ops

Same fix as f51de2246c.

Not crtitcal, but could go into LTS I guess.

Pull Request: https://projects.blender.org/blender/blender/pulls/111341
2023-09-13 13:45:34 +02:00
Alaska
ee2e231adc Fix #111277: NaN in Vector Displacement leading to render errors
Fixes NaN in Vector Displacement node caused by the normalization of
0, 0, 0 vectors.

This fixes both visual rendering issues and an "illegal address" error
on the GPU. The "illegal address" error came from the Light Tree
Sampling code not handling the NaN normals well, leading to weird code
paths being taken, eventually leading to a kernel_assert and a
user facing illegal address error.

In Blender 3.5+, this fixes two errors (visual artifacts and errors on
the GPU when using the light tree). In Blender 3.3 it only fixes one
(visual artifacts) because 3.3 doesn't have the light tree. The commit
message should be adjusted to represent that

Pull Request: https://projects.blender.org/blender/blender/pulls/111294
2023-09-13 13:41:02 +02:00
Philipp Oeser
da6c1e1ccf Fix #110723: cant drop object name on object field/socket in node editor
Reason was a difference in poll functions (dropbox poll function vs.
operator poll function).

So the dropbox was actually recognized as being active (see
`dropbox_active`) but then when actually dropping, the corresponding
operator wasnt called (but instead another operator was).

In detail, the way `wm_handlers_do_intern` works, it checks all
dropboxes poll function if one succeeds it calls the dropbox operator.
But if that operators poll function fails, `wm_handlers_do_intern`
happily continues and "ends" the drop operations in a way we dont
actually get to the "real" dropbox & operator that was also recognized
as being active.

In the case of the report:
- dropbox for `UI_OT_drop_name` is active
- dropbox poll for `NODE_OT_add_object` (`node_object_drop_poll`)
succeeds though
- operator poll for `NODE_OT_add_object` (`node_add_object_poll`) fails
(it checks `UI_but_active_drop_name` already)

So in order to make this work, add the check for `UI_but_active_drop_name` to two dropbox poll
functions (and remove from the operator polls).

Probably good for LTS as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/110929
2023-09-13 13:37:11 +02:00
Harley Acheson
1cdd83bf9d Fix #110085: Ignore Scroller Zone when on a Screen Edge
When the mouse cursor is between editors ignore scroller zones, which
overflow their areas, so that screen edges are always detected.

Pull Request: https://projects.blender.org/blender/blender/pulls/110402
2023-09-13 13:31:28 +02:00
Bastien Montagne
9d9db7852d Fix (partially) wrong RNA path for 'ViewShading' data.
This commit fixes the RNA path reported from the struct owned by the
Scene.display data. Paths generated for the View3D space remain
completely broken (but whole 'space' paths are broken anyway).
2023-09-13 13:20:41 +02:00
Brecht Van Lommel
a66d09f2b5 Fix T103960: build issue with GCC 13 in Cycles thread code 2023-09-13 12:49:28 +02:00
Bastien Montagne
2d482f482a Fix building Blender with some versions of gcc.
Seems like quadriflow was missing a header, which somehow made the build
fails on Suse Tumbleweed (gcc 13).
2023-09-13 12:48:56 +02:00
Bastien Montagne
ae9665bc44 Fix (unreported) invalid memory access in new 'newer blendfile version' code.
When choosing the new 'overwrite' option when trying to save a blendfile
from a newer version of Blender, it would cause invalid (use-after-free)
memory access.

Issue caused by the main commit (a1d7ec7139) of the new blendfile
compatibility handling. No idea how it was not detected earlier.

Many thanks to @weizhen for spotting the issue and doing some initial
investigation on it.
2023-08-22 17:42:59 +02:00
Bastien Montagne
b7c4972ebc Fix #111235: invalid .blend file can crash on load.
Somehow the backport for 3.3 diverged from commits to main (4.0), and
the case were the DNA block would go missing would not anymore prevent
handling of further `is_minversion_older_than_blender` test in
`blo_decode_and_check`.
2023-08-21 16:25:33 +02:00
Philipp Oeser
7311c9d51e Release: Bump to 3.3.11 - release candidate. 2023-08-17 12:11:20 +02:00
Philipp Oeser
0c1a241b8b updated addon references 2023-08-17 09:54:24 +02:00
Thomas Dinges
11839bc851 Release: Bump version cycle to 3.3.10 2023-08-14 16:05:58 +02:00
Bastien Montagne
90381c879c Fix (unreported) missing handling of ViewLayer IDProperties in foreach_id code.
Yet another 'obviously' missing bit in foreach_id processing found and fixed.
2023-08-09 23:33:55 +02:00
Bastien Montagne
2ddfb23cb6 Fix (unreported) minor bug in RNA/Liboverride apply code.
The wrong RNA pointers were passed (passing the root ones instead of the
ones actually owning the rna-path-resolved property).

This was likely a harmless mistake, since it only affected RNA
collections of IDs, afaik we currently don't have many (if any) of these
in non-ID RNA structures. The children collections and objects in a
Collection data-block RNA structure e.g. were not affected.

But the potential consequence of that bug would have been missing
automatic detection of some needed liboverride resyncs.
2023-08-09 23:21:15 +02:00
Bastien Montagne
4d3dda2222 File Browser: Add proper warning when trying to list content of invalid library.
In case a blend file opening fails (in the context of library content
listing, e.g. for linking or appending), the File Browser would just
show an emtpy window.

With the new comnpatibility policy, this will now become a fairly common
situation, which requires giving proper explanations to the user.

This commit re-uses and extends the system used to display errors
messages from the Asset browser.

Part of #109151 (PR !110109).

Pull Request: https://projects.blender.org/blender/blender/pulls/110574
2023-08-09 22:59:16 +02:00
Bastien Montagne
51eb9f1205 BKE_file: Add util to check if a given blend file is readable.
`BKE_blendfile_is_readable` attempts to open the given file path, and
return `true` on success, `false` on failure.

Part of #109151 (PR !110109).
2023-08-09 22:59:14 +02:00
Bastien Montagne
1637896367 Core: Implement new blendfile compatibility handling.
This implements the main aspects of changes to blendfile compatibility
as designed in #109151:
* Blender files which file minversion is newer than current Blender
  executable won't be loaded at all.
* Blender files which file version is newer than current Blender will
  triger systematic warning to user:
  * In the status info bar (lower right corner in default UI).
  * When attempting to save (overwrite) them.

This means that the file minversion becomes a hard limit, and not a
soft, warning-only as it used to be. Further more, forward compatibility
warning is now systematic (instead of depending on file minversion),
and more visible for users.

See also https://wiki.blender.org/wiki/Process/Compatibility_Handling
for details over the new policy.

Technically:
* Opening any file with a minversion newer than current Blender file one
  now triggers an early abort, with an error message reported to the user.
  This is handled by a new utils called from `blo_decode_and_check`.
* Any file newer than current Blender version sets a new
  `has_forward_compatibility_issues` flag in Main struct at read time.
* Status bar info area is turned into a template, which uses this flag
  to display special warning UI and tooltip when set.
* A new confirmation popup appears when user tries to save (overwrite)
  such a 'newer' blendfile, stating potential loos of data, and
  proposing by default to 'save as' instead.
* The 'quit unsaved' popup has also been updated to 'save as' instead of
  'save' when the edited file is has potential forward compitibility
  issues.

NOTE: For 3.3LTS, an additional hot-fix is applied on read file
minversion, to ensure that all files from 3.6LTS releases (and
versions in-between 3.3 and 3.6) remain readable in Blender 3.3LTS
after this commit.

Part of #109151 (PR !110109).
2023-08-09 22:59:14 +02:00
Bastien Montagne
d4ebd222a5 No update of file minversion for Blender 3.3.
The existing one (3.0 (sub 43)) is already low enough, and no older
version of Blender will get the new compatibility handling back-ported
anyway.

This commit only updates the comment regarding file minversion.

Part of #109151 (PR !110109).
2023-08-09 22:59:14 +02:00
Bastien Montagne
815111c47b BKE version: Add utils to get string out of numbers for blendfile version.
Since in rare cases there may be needs to expose file subversion here,
the following format was defined:

  <major>.<minor> (sub <subversion>)

Part of #109151 (PR !110109).
2023-08-09 22:59:14 +02:00
Brecht Van Lommel
14766b13ed Fix #110426: render hanging when drawing metadata in the image editor
Release must be called regardless if the returned image buffer pointer
is null.

Pull Request: https://projects.blender.org/blender/blender/pulls/110985
2023-08-09 22:56:55 +02:00
Philipp Oeser
af100b768b Fix #110341: Appended text looses user after reload
Even if a text datablock was "used" by in the Text Editor, it would be
lost after save/reload if no fake user is set.

This is not in line with other datablocks if they are used by an editor
(e.g. images, clips, masks etc.).

Now handle this with `IDWALK_CB_USER_ONE` (instead of `IDWALK_CB_NOP`)
in `id_refcount_recompute_callback` >
`BKE_screen_foreach_id_screen_area` which re-ensures a user is set.

(Bit on shaky ground here, but this seems like this is how this is
handled for other editors "consuming" a datablock).

Pull Request: https://projects.blender.org/blender/blender/pulls/110344
2023-08-09 22:22:30 +02:00
YimingWu
70b382100a Fix #106139: Curvemapping clipping range variable error
Clipping should use `clipr`instead of `curr`.

`clipr` is for value clipping while `curr` is for curve view clipping,
misuse of these two can lead to output value being clipped by
viewing range. Now fixed.

Pull Request: https://projects.blender.org/blender/blender/pulls/106164
2023-08-09 22:21:32 +02:00
Christoph Lendenfeld
6bc0bc8c4a Fix #109781: Linked datablocks are keyable
Add a simple check when inserting keyframes to ensure the data is not linked

Pull Request: https://projects.blender.org/blender/blender/pulls/109813
2023-08-09 22:20:36 +02:00
Philipp Oeser
d69b033860 Release Cycle: bump to Blender 3.3.10 release candidate 2023-08-09 22:07:46 +02:00
Philipp Oeser
a23b30d4f7 Release Cycle: bump to Blender 3.3.9 release 2023-07-17 14:27:29 +02:00
Philipp Oeser
1efddc9dca Fix #109802: Outliner "Blender File" view cant delete scene
`outliner_do_scene_operation` wasnt recursive, so it only acted on the
top-level `TreeElement` (which was fine for Scenes view, but failed in
`Blender File` view).

Now use an iterator that handles open subhierarchies as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/109810

Pull Request: https://projects.blender.org/blender/blender/pulls/110061
2023-07-13 16:16:26 +02:00
Philipp Oeser
359e96167c Fix #109822: Average Brush in Vertex Paint Mode is broken
Caused by 7a943428de

Looking at history, e.g. 575ade22d4 or prior, it seems the
"fallthrough" [related compiler warning was removed in 7a943428de] was
actually intended in the case of `VPAINT_TOOL_AVERAGE`.

So first, the average color is calculated and after that regular drawing
should happen with that color.

Now make this more clear by calling both `calculate_average_color` as
well as `vpaint_do_draw` before breaking.

Pull Request: https://projects.blender.org/blender/blender/pulls/109971
2023-07-13 15:37:32 +02:00
Philipp Oeser
d0ec3d7b56 Fix #109928: issues adding rigid bodies via just the world collection
Selecting a rigid body world collection is supposed to set up rigid
bodies for all of its mesh members (if they are not rigid bodies
already), expected result would be just the same as if `Object` > `Rigid
Body` > `Add ...` was used.

Doing it via just the world collection had the following issues though:
- calculating mass would crash on such a freshly created rigid body
objects (be1b32e4e4 falsely assumed `ob->rigidbody_object` is always
present on evaluated objects -- without tagging for depsgraph updates
this is not the case though)
- rigid body simulation would not work even on these freshly created
rigid body objects

Now tag bmain relations and object transforms for update to make both of
these work (following code in `BKE_rigidbody_add_object` that is used
when adding these through `Object` > `Rigid Body` > `Add ...`)

Pull Request: https://projects.blender.org/blender/blender/pulls/109961
2023-07-13 15:33:27 +02:00
Bastien Montagne
b3520818ac Fix (unreported) potential crash in 'make override' Outliner tool. 2023-07-13 15:17:08 +02:00
Pratik Borhade
e328a237df Fix #109898: Incorrect behavior when moving objects to linked collection
Do not move objects to a collection which is linked from another file.

Pull Request: https://projects.blender.org/blender/blender/pulls/109957
2023-07-13 15:16:35 +02:00
rBrenick
0250791fdb UI: Grey out ShapeKey list entry on mute
At a glance, it can be hard to see if a Shape Key has been muted or not.
This change greys out all the UI elements, instead of just the current value number.
All the functionality still works the same, purely a visual change.

Pull Request: https://projects.blender.org/blender/blender/pulls/109857
2023-07-13 15:15:26 +02:00
Brecht Van Lommel
b510f68a67 Fix #109562: Cycles HIP device not found on Debian
Try loading ROCm 5.x libraries specifically, as the .so without version
is only part of the development package.

Thanks to Lee Ringham investigating and proposing this solution.
2023-07-13 15:14:03 +02:00