Commit Graph

110087 Commits

Author SHA1 Message Date
Sergey Sharybin
3dcd042bfc Merge branch 'blender-v3.0-release' 2021-11-02 18:38:59 +01:00
Sergey Sharybin
978f2cb900 Fix T89487: Crash adding Rigid Body to object with shared mesh data
Not sure why this bug was only discovered by such an elaborate steps
and why it took so long to be discovered. The root of the issue is
that in the 956c539e59 the typical flow of tag+flush+evaluate was
violated and tagging for visibility change happened after flush.
2021-11-02 18:36:24 +01:00
Jacques Lucke
53fdde3f64 Merge branch 'blender-v3.0-release' 2021-11-02 18:14:59 +01:00
Jacques Lucke
3a454beae7 Fix T91094: missing update after collection changed
Since rBb67fe05d4bea2d3c9efbd127e9d9dc3a897e89e6 collections
have a geometry component that depends on all the geometries
inside the collection. Contrary to what I originally thought
`ID_RECALC_COPY_ON_WRITE` does not trigger a collection geometry
update. This makes sense because a collection may change in ways
that do not require a geometry update.
Instead, we have to trigger the geometry update manually now by
passing `ID_RECALC_GEOMETRY` when appropriate.
2021-11-02 18:13:01 +01:00
Bastien Montagne
0a254109b8 Merge branch 'blender-v3.0-release' 2021-11-02 17:52:03 +01:00
Bastien Montagne
29dff8f844 Fix lots of missing messages i18n handling in uiItemL calls.
Also fix several wrong usages of `IFACE_` (as a reminder, error/info
messages should use `TIP_`, not `IFACE_`).
2021-11-02 17:50:18 +01:00
Bastien Montagne
242ad4bd0f Merge branch 'blender-v3.0-release' 2021-11-02 17:49:52 +01:00
Bastien Montagne
20b163b533 UIMessages/i18n: Fix incorrect part of rBdabfac37e35274b.
My bad, forgot lower-level UI code does not handle translations itself.

Thanks to Hans Goudey (@HooglyBoogly) for the heads up.
2021-11-02 17:49:32 +01:00
Omar Emara
27621490c2 Merge branch 'blender-v3.0-release' 2021-11-02 18:33:25 +02:00
Omar Emara
980bc5a707 UI: Use socket type info color to draw links
Currently, colored links overlay only supports standard sockets defined
by Blender. Some add-ons like Animation Nodes defines custom sockets for
everything and hence doesn't get colored sockets.

This patch uses the draw color from the socket type info to draw links
in order to support custom sockets.

Differential Revision: https://developer.blender.org/D13044

Reviewed By: Hans Goudey
2021-11-02 18:29:35 +02:00
Bastien Montagne
12bf4adbe3 Merge branch 'blender-v3.0-release' 2021-11-02 17:05:03 +01:00
Charlie Jolly
2c23256288 Merge branch 'blender-v3.0-release' 2021-11-02 16:03:17 +00:00
Bastien Montagne
dabfac37e3 Fix more UI message/i18n issues. 2021-11-02 17:02:33 +01:00
Bastien Montagne
cde982d672 I18n: Fix all new cpp files not being parsed by UI message extractor.
The 'new' `.cc`/`.hh` extensions were never added to UI message
extractor.

Related to T43295.
2021-11-02 17:02:33 +01:00
Charlie Jolly
6981bee2c7 Fix T92736: Hole in mesh after Set Position
The geometry node port of voronoi_smooth_f1 function has a
division by zero when smoothness is set to zero.
Using a safe_divide within the function causes issues
and was noted in the original patch D12725.
Solution in this case is to clamp zero smoothness to FLT_EPSILON.

Reviewed By: JacquesLucke

Maniphest Tasks: T92736

Differential Revision: https://developer.blender.org/D13069
2021-11-02 15:58:17 +00:00
Sergey Sharybin
c01b3c534b Merge branch 'blender-v3.0-release' 2021-11-02 15:42:09 +01:00
Sergey Sharybin
89c9fa8b73 Fix T92462: Cycles crash calculating hair transparency
Need to make sure images needed for hair shaders are loaded
before running the shader.

The naming is a bit misleading, but this is an internal API
and we can change it easily. Submitting minimal patch needed
to fix logic in the code to make it safer to review for 3.0.

Differential Revision: https://developer.blender.org/D13067
2021-11-02 15:41:54 +01:00
Bastien Montagne
1b2342b4d3 Tests: Add basic unittest for library reload and relocate operators. 2021-11-02 15:33:30 +01:00
Jacques Lucke
698b05fc58 BLI: avoid passing nullptr to strncmp
This resulted in an ASAN warning.
2021-11-02 15:07:50 +01:00
Ray Molenkamp
a7e92843f7 Fix: Build error on windows.
External symbols in C files need
to be marked as such otherwise
the linker will not find them.
2021-11-02 07:43:44 -06:00
Hans Goudey
e64d4d0200 Merge branch 'blender-v3.0-release' 2021-11-02 07:59:35 -05:00
Hans Goudey
efcf36f2e9 Fix T92532: Missing null checks in IDPropertyManager.update_from
Calling it with a None argument, or no arguments, or with a property
that is missing UI data for some reason would fail. There is no
particular reason why ensuring those things don't happen is helpful,
so just add null checks for safety.

Differential Revision: https://developer.blender.org/D13024
2021-11-02 07:59:10 -05:00
Campbell Barton
0daf429591 Merge branch 'blender-v3.0-release' 2021-11-02 23:38:01 +11:00
Campbell Barton
2f0f08bc98 Fix T92733: Error moving a completely locked bone 2021-11-02 23:36:22 +11:00
Jacques Lucke
b7dc667eb2 Merge branch 'blender-v3.0-release' 2021-11-02 12:31:05 +01:00
Jacques Lucke
b1bf884889 Images: fix error in previous refactor
Some compositor tests (e.g. `compositor_color_test`) broke
because of rB0c3b215e7d5456878b155d13440864f49ad1f230.
The issue was a heap-use-after-free bug caused by a missing
call to `MEM_CacheLimiter_unmanage`.
2021-11-02 12:30:27 +01:00
Campbell Barton
7a4ee2fd4f Merge branch 'blender-v3.0-release' 2021-11-02 22:06:35 +11:00
Campbell Barton
9bd97e62ad Fix T92464: Operators fail after opening blend files via an operator
Operators such as setting the object mode failed after calling
WM_OT_open_mainfile from Python.

Keep the window after loading a file outside the main event loop.
2021-11-02 22:01:38 +11:00
Jeroen Bakker
52f4a908f7 Removed compilation warning nullptr check in image engine. 2021-11-02 12:00:07 +01:00
Jacques Lucke
ffd3dd6376 Merge branch 'blender-v3.0-release' 2021-11-02 11:17:53 +01:00
Jacques Lucke
0c3b215e7d Images: refactor how failed image load attempts are remembered
Previously, `ImageTile->ok` and `ImageUser->ok` were used to indicate
whether an image failed to load. There were three possible values
which (probably) had the following meanings:
* `0`: There was an error while loading the image. Don't try to load again.
* `1`: Default value. Try to load the image.
* `2`: The image was loaded successfully.

This image-wide flag did not make sense unfortunately, because loading
may work for some frames of an image sequence but not for others.
Remember than an image data block can also contain a movie.

The purpose of the `->ok` flag was to serve as an optimization to avoid
trying to load a file over and over again when there is an error (e.g. the
file does not exist or is invalid). To get the optimization back, the patch
is changing `MovieCache` so that it can also cache failed load attempts.
As a consequence, `ibuf` is allowed to be `NULL` in a few more places.
I added the appropriate null checks.

This also solves issues when image sequences are used with the
Image Texture node in Geometry nodes (also see D12827).

Differential Revision: https://developer.blender.org/D12957
2021-11-02 11:17:12 +01:00
Thomas Dinges
a2f5a10129 Merge branch 'blender-v3.0-release' 2021-11-02 11:09:09 +01:00
Thomas Dinges
2b3becf2be Fix typo in Cycles PMJ enum define.
Reported by Raimund58 in the chat, thanks!
2021-11-02 11:07:06 +01:00
Philipp Oeser
223f2b27d1 Merge branch 'blender-v3.0-release' 2021-11-02 09:57:16 +01:00
Campbell Barton
21e168069d Merge branch 'blender-v3.0-release' 2021-11-02 19:52:01 +11:00
Campbell Barton
8ca6e51ade Cleanup: clang-tidy 2021-11-02 19:50:53 +11:00
Philipp Oeser
a5b996df88 Fix T92608: Image Editor does not display stereo images
Caused by own {rB5aa3167e48b2}.
Related commit: {rBebaa3fcedd23}.

For stereo renders, `BKE_image_is_multilayer` is true, however we seem
to get to down to `space_image_gpu_texture_get` [where this is called]
from `IMAGE_cache_init` with a NULL Image->RenderResult.

So what then happens is that `BKE_image_multilayer_index` is called and
even though it has an appropriate codepath for stereo, it earlies out
and does not set multi_index correctly.

Still a bit puzzled why RenderResult is NULL for a render, but since
other places also check for a valid RenderResult before going down the
_multilayer_ route (and doing _multiview_ instead), now do the same
thing, BKE_image_multiview_index is now called in these cases (and seems
to behave correctly, checked with layers and passes and all seems to
display correctly, either in stereo or choosing individual eyes).

thx @jbakker & @brecht for double-checking.

Maniphest Tasks: T92608

Differential Revision: https://developer.blender.org/D13063
2021-11-02 09:42:32 +01:00
Campbell Barton
69a7734b75 UI: always show the cursor while transforming the cursor 2021-11-02 19:35:17 +11:00
Jeroen Bakker
47d12268e3 Cleanup: Change image engine to CPP.
Added namespace blender::draw::image_engine. Code is still C-a-like.
Only changed the obvious code style to CPP (structs, nullptr, casts).
2021-11-02 09:16:33 +01:00
Campbell Barton
9cc05fe9c4 Merge branch 'blender-v3.0-release' 2021-11-02 16:08:13 +11:00
Campbell Barton
af9e0409f1 Merge branch 'blender-v3.0-release' 2021-11-02 16:08:10 +11:00
Campbell Barton
7b436ead6b Merge branch 'blender-v3.0-release' 2021-11-02 16:08:07 +11:00
Campbell Barton
2fb43f08e7 Fix "Alt Tool Access" key-map preference with sequencer preview 2021-11-02 16:04:07 +11:00
Campbell Barton
4511964594 Fix T92721: "Alt Cursor Access" option fails to drag the cursor 2021-11-02 16:04:06 +11:00
Campbell Barton
a0edddaa0c Cleanup: clang-tidy 2021-11-02 16:04:06 +11:00
Germano Cavalcante
5363437555 Merge branch 'blender-v3.0-release' 2021-11-02 00:46:32 -03:00
Germano Cavalcante
24310441dd Fix snap cursor still active even when gizmo is not available
The snap cursor continued to appear even when the workspace is changed for example.

So add the region to check in the cursor pool.
2021-11-02 00:43:48 -03:00
Hans Goudey
75f5edcaf3 Merge branch 'blender-v3.0-release' 2021-11-01 14:48:20 -05:00
Hans Goudey
348d7c35a9 Geometry Nodes: Support volumes in the set material node
Even though volumes can only have one material, it is still necessary to
allow assigning a material to a prodecurally created volume. This commit
adds volume support and a warning for when a non-constant selection is
used with a volume.

Fixes T92485

Differential Revision: https://developer.blender.org/D13037
2021-11-01 14:46:48 -05:00
Hans Goudey
6ddbcaa096 Merge branch 'blender-v3.0-release' 2021-11-01 14:42:49 -05:00