Commit Graph

113108 Commits

Author SHA1 Message Date
Bastien Montagne
1a853a9e90 LibOverrides: fix handling of hierarchy root in complex cases.
This affects essentially the Outliner 'create hierarchy' tool currenlty.
Previously code did not handle properly hierarchy root in case overrides
where created from a non-root ID (e.g. an object inside of a linked
collection), and in case additional partial overrides were added to an
existing partially overrided hierarchy.

Also did some renaming on the go to avoid using 'reference' in override
context for anything else but the reference linked IDs.
2022-02-25 12:18:48 +01:00
Campbell Barton
5db32ab5fc Merge branch 'blender-v3.1-release' 2022-02-25 21:51:37 +11:00
Campbell Barton
0bac962fe5 CMake: exclude add-ons that don't confirm to key requirements
These add-ons don't have documentation on blender.org, see: T95442

These can be re-enabled once documentation has been relocated.
2022-02-25 21:50:00 +11:00
Bastien Montagne
8ddeb71a55 Merge branch 'blender-v3.1-release' 2022-02-25 11:40:19 +01:00
Bastien Montagne
66328db703 Fix T95636: Dragging Material from Asset Browser (Link mode) to Viewport empty space removes this material from all objects
Trust user count to actually delete or not the dragged ID when current
dragging is cancelled, since it may be already used by others.

NOTE: This is more a band-aid fix than anything else, cancelling drag
has a lot of other issues here (like never deleting any indirectly
linked/appended data, etc.). It needs a proper rethink in general.
2022-02-25 11:37:55 +01:00
Antonio Vazquez
4c9846eeae Cleanup: Modify comment 2022-02-25 11:24:45 +01:00
Antonio Vazquez
8f1ee85ff4 Merge branch 'blender-v3.1-release' 2022-02-25 11:22:17 +01:00
Antonio Vazquez
5186a28dec GPencil: Make Fill Dilate expand outside stroke
To keep consistency with the new contract option, the dilate now expand the shape beyond the internal closed area.

Note: This was committed only in master (3.2) by error.
2022-02-25 11:15:56 +01:00
Antonio Vazquez
5fd792c1f6 GPencil: Fill Dilate using negative values contract the fill area
This is requested by artist for some animation styles where is necessary to fill the area, but create a gap between fill and stroke.

Also some code cleanup and fix a bug in dilate for top area.

Reviewed By: pepeland, mendio

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

Note: This was committed only in master (3.2) by error.
2022-02-25 11:15:42 +01:00
Campbell Barton
ad0b3abf53 Cleanup: use flags for wmEvent modifier keys
Using flags makes checking multiple modifiers at once more convenient
and avoids macros/functions such as IS_EVENT_MOD & WM_event_modifier_flag
which have been removed. It also simplifies checking if modifier keys
have changed.
2022-02-25 17:58:22 +11:00
YimingWu
60af7a3496 Fix T95984: Use consistent shifting for persp and ortho cam.
Now always properly shifting camera for ortho and perspective.
2022-02-25 14:07:39 +08:00
YimingWu
e7cae51877 Fix T95984: Use consistent shifting for persp and ortho cam.
Now always properly shifting camera for ortho and perspective.
2022-02-25 13:57:27 +08:00
Clément Foucault
7d7dd66ba7 GPUTexture: Add support for texture view
This is an OpenGL 4.3 feature that enables creating a texture using a range
of the same data as another texture.
2022-02-24 22:51:19 +01:00
Clément Foucault
e59f754c16 GPUTexture: Use immutable storage
This means textures need to have the number of mipmap levels specified
upfront. It does not mean the data is immutable.

There is fallback code for OpenGL < 4.2.

Immutable storage will enables texture views in the future.
2022-02-24 22:51:19 +01:00
Hans Goudey
c23ee6d7b4 Cleanup: Simplify operating on multiple geometry components 2022-02-24 14:02:32 -05:00
Antonio Vazquez
5ccbbaed08 Cleanup: Sort include lines 2022-02-24 19:44:07 +01:00
Antonio Vazquez
3b3e519edd Nodes: Add include to avoid Windows compiler error
This line was added as request of @HooglyBoogly
2022-02-24 19:43:14 +01:00
Brecht Van Lommel
9de720f31a Merge branch 'blender-v3.1-release' 2022-02-24 19:40:42 +01:00
Antonio Vazquez
8fb7c50aab Fix compiler error in Windows
In some compilers this file fails because the function `BKE_mesh_poly_normals_ensure`is not defined.
2022-02-24 19:38:16 +01:00
Brecht Van Lommel
0781c22cee Fix T95969, T91856: bake AO to vertex color artifacts after ray offset removal
Without ray offsets intersections at neigbhoring triangles are found, as
the ray start is exactly at the vertex. There was a small offset towards
the center of the triangle, but not enough.

Now this offset computation is moved into Cycles and modified for better
results. It's still not perfect though like any offset approach, especially
with long thin triangles.

Additionaly, this uses the shadow terminate offset for AO rays now, which
helps remove some pre-existing artifacts.
2022-02-24 19:35:36 +01:00
Brecht Van Lommel
6e396e21e6 Cleanup: remove unused ray offset function 2022-02-24 19:35:36 +01:00
Hans Goudey
4c66bd5da2 Curves: Use simpler "set" behavior for postion attribute
This is similar to f8fe0e831ec14cc521e03df, which made the change to the
handle position attributes. This commit removes the way that setting the
`position` attribute also changes the handle position attributes. Now,
the "Set Position" node still has this behavior, but changing the
attribute directly (with the modifier's output attributes) does not.

The previous behavior was a relic of the geometry nodes design
from before fields and the set position node existed.

This makes the transition to the new curves data structure simpler.
There is more room for optimizing the Bezier case of the set position
node in the future.
2022-02-24 12:22:26 -05:00
Hans Goudey
f4d80ecdfd Cleanup: Typo in comment 2022-02-24 12:01:22 -05:00
Hans Goudey
cc966c548d Merge branch 'blender-v3.1-release' 2022-02-24 11:57:53 -05:00
Hans Goudey
7b37d980b9 Fix: Crash switching between sculpt and edit mode
Also fix a couple other places where normals layers weren't properly
tagged dirty or reallocated when the mesh changes.

Caused by cfa53e0fbeed7178. When the size of a mesh changes,
the normal layers need to be reallocated. There were a couple of places
that cleared other runtime data with `BKE_mesh_runtime_clear_geometry`
but didn't deal with normals properly. Clearing the runtime "geometry"
is different from clearing the normals, because sometimes the size of
the normal layers doesn't have to change, in which case simply tagging
them dirty is fine.
2022-02-24 11:56:32 -05:00
Clément Foucault
7c1b0dec00 Merge branch 'blender-v3.1-release' 2022-02-24 17:43:24 +01:00
Clément Foucault
f8507ca372 EEVEE: Fix crash when shadow caster count is reduced to 0.
The crash was catched by ASAN. It was caused by the buffer shrinking logic
being faulty.
2022-02-24 17:43:04 +01:00
Julian Eisel
17301a3163 Fix incorrect Outliner tree-display type returned
Reverts 6d97fdc37eef. A function like this should not return a different
tree-display object than of the requested type. This may hide errors,
and leaves the Outliner in an undefined state (where the stored display
mode doesn't match the tree-display object). I rather don't hide the
fact that all display-modes should be handled here, and emit a clear
error if one isn't.
2022-02-24 17:10:19 +01:00
Aaron Carlisle
fc8aab755a Fix T96015: Calling wrong operator resulting in python error
Own mistake in rB86fc63c4ca9d36eae7512c5c3e640285d84415d1.
Forgot to change the call from `wm.url_open` to `wm.url_open_preset`.
2022-02-24 11:10:00 -05:00
Clément Foucault
8d83fc552a GPU: Fix compilation in debug mode
Fixes issue introduced in rB1685b1dba44e02ce1faace4a5de6d6cd0d98ef90
2022-02-24 15:55:22 +01:00
Clément Foucault
1685b1dba4 OCIO: Fix mip length in texture creation
Also add an assert to avoid reproducing the error in the future.
2022-02-24 15:48:54 +01:00
Jacques Lucke
9be720d85e BLI: support accessing nth last element in Array/Span/Vector
This often helps to make the intend of code more clear compared
to computing the index manually in the caller.
2022-02-24 14:50:13 +01:00
Kévin Dietrich
7cab7eb3d6 Merge remote-tracking branch 'origin/blender-v3.1-release' 2022-02-24 14:34:15 +01:00
Kévin Dietrich
b7a954218b Fix T95976: on cage GPU subdivision breaks X-ray selection
When X-ray mode is active the selection is done using the mesh data to
select what is closest to the cursor. When GPU subdivision is active with
the "show on cage" modifier option, this fails as the mesh used for selection
is the unsubdivided one.

This creates a subdivision wrapper before running the selection routines to
ensure that subdivision is available on the CPU side as well.

Differential Revision: https://developer.blender.org/D14188
2022-02-24 14:33:48 +01:00
Jacques Lucke
189c5bd9af Merge branch 'blender-v3.1-release' 2022-02-24 12:45:27 +01:00
Jacques Lucke
17e0634902 Fix T95985: crash when assigning a name for an output attribute
This was a double free error which happened because `BM_mesh_bm_from_me`
was taking ownership of arrays that were still owned by the Mesh. Note that
this only happens when the mesh is empty but some custom data layers still
have a non-null data pointer. While usually the data pointer should be null in
this case for performance reasons, other functions should still be able to
handle this situation.

Differential Revision: https://developer.blender.org/D14181
2022-02-24 12:44:02 +01:00
Julian Eisel
d48e595c78 Fix wrong asset library displayed/loaded in asset view templates
Sometimes when switching asset libraries in the asset view templates
(like the pose library sidebar UI), the wrong library would end up being
shown.
2022-02-24 12:40:40 +01:00
Campbell Barton
b0eed6fb9a Merge branch 'blender-v3.1-release' 2022-02-24 18:01:53 +11:00
Campbell Barton
41d607976c Keymap: use 90 degree roll for NDOF roll shortcuts
3Dconnexion documentation states these buttons should roll 90 degrees.
2022-02-24 18:00:18 +11:00
Campbell Barton
13efaa8a09 3D View: keep the orthographic view when rolling 90 degrees
Support for maintaining orthographic view for view3d.view_roll for an
angle of 90/-90 degrees.
2022-02-24 18:00:17 +11:00
Campbell Barton
87c2b1988d Keymap: correct NDOF button roll assignment
NDOF ROLL CCW was used for both left & right roll.
2022-02-24 18:00:17 +11:00
Campbell Barton
e767a2d98b Keymap: correct NDOF button roll assignment
NDOF ROLL CCW was used for both left & right roll.
2022-02-24 17:51:19 +11:00
Campbell Barton
81df323df4 Tests: disable file output for bl_keymap_validate.py
Left on by accident but should only be used when debugging output.
2022-02-24 17:43:36 +11:00
Campbell Barton
fe4b53311a Merge branch 'blender-v3.1-release' 2022-02-24 15:25:38 +11:00
Campbell Barton
f80f7afbf0 Fix 2D view NDOF panning requiring both axes to be non-zero
Possible fix for T86592.
2022-02-24 15:24:09 +11:00
Campbell Barton
1a6b35157c Cleanup: code comments in vfont_to_curve 2022-02-24 13:20:33 +11:00
Campbell Barton
b45a3e8747 Cleanup: remove dead code in vfont_to_curve
Also replaces numbers with character literals for tab/space.
2022-02-24 13:14:33 +11:00
Kévin Dietrich
24450fa142 Merge remote-tracking branch 'origin/blender-v3.1-release' 2022-02-24 03:01:44 +01:00
Campbell Barton
d59f45fb15 Cleanup: remove dead code from text wrapping logic
Error from original commit in 2005,
97df61a7e5391e302d1a5f9069cf0b388f85e0c8.
2022-02-24 12:53:11 +11:00
Campbell Barton
e83e7d49b6 Cleanup: use continue instead of goto for 3D text wrapping logic 2022-02-24 12:53:09 +11:00