Commit Graph

114470 Commits

Author SHA1 Message Date
Richard Antalik
fd98403211 Fix T97733: Crash when adding new scene
Caused by NULL dereference if sequencer data does not exist.
2022-05-03 10:20:41 +02:00
Philipp Oeser
cc0c4c17f0 Fix T95752: crash 'Select Linked' after loopcut in multiobject editmode
This was reported explicitly for originally being in face selectmode,
but could also crash when in vertex selectmode (when doing multiple
cuts).

The reason here is that `MESH_OT_loopcut` switches to edge select mode
(needed for `TRANSFORM_OT_edge_slide`, done in `ringsel_finish`), but was
only doing this on the active object's editmesh, all other participating
meshes would keep their selectmode which would now be out of sync with
both the active object's editmesh and scene settings for these.

This causes problems later in 'Select Linked'. Here, a mixture of
objects are used. First the viewcontext is set up with the active
object, then all participating objects are iterated (changing the
viewcontext to another object), then `unified_findnearest` would use that
changed viewcontext which would now contain the last object iterated. To
repeat: this could now have a different selectmode than the active
object which is later **again** used to get the nearest `BMElem` from in
`EDBM_elem_from_selectmode`. So in the failing case, we could get an
edge (but no face because of edge selectmode) from `unified_findnearest`,
`EDBM_elem_from_selectmode` would return NULL though (edge provided, but
in face selectmode), leading to the crash.

To solve this I assume it is best to change selectmode on all
participating meshes in multi-object editmode loopcut if necessary so
these are always in sync for following operations.
Alternatively, `Select Linked` (and probably lots more operators) would
have to be tweaked to pay closer attention which object is really used
to get selectmode from.

Note the selectmode is actually set back from edge selectmode in certain
cases (see `USE_LOOPSLIDE_HACK`), this patch changes that as well to act
on all participating meshes.

Maniphest Tasks: T95752

Differential Revision: https://developer.blender.org/D14791
2022-05-03 09:46:18 +02:00
Hans Goudey
1a6d0ec71c Fix T93272: Material index mapping missing for mesh boolean node
This commit implements copying of materials and material indices from
all of the boolean node's input meshes. The materials are added to the
final mesh in the order that they appear when looking through the
materials of the input meshes in the same order of the multi-socket
input node.

All material remapping is done with mesh-level materials. Object-level
materials are not considered, since the meshes don't come from objects.

Merging all materials rather than just the materials on the first mesh
requires a change to the boolean-mesh conversion. This subtly changes
the behavior for object linked materials, but in a good way I think;
now the material remap arrays are respected no matter the number
of materials on the first mesh input.

Differential Revision: https://developer.blender.org/D14788
2022-05-03 09:28:35 +02:00
Hans Goudey
c09c3246eb Fix T97718: Crash using "Text on Curve"
8e4c3c6a2414 mistakenly used the `vec` argument
of `BKE_where_on_path` like it was optional. Fix by
making that argument optional too.
2022-05-03 09:25:28 +02:00
Jeroen Bakker
3d96fd6fd6 Fix T97543: Changing multipass images doesn't update the image.
Code was partial migrated from the previous image engine. Missing multilayered
images.
2022-05-03 09:12:00 +02:00
Richard Antalik
38a4d96a90 Fix T97507: Crash when deleting adjustment layer
Issue was not properly fixed in 3cef9ebaf81 due to oversight.
`SEQ_get_channels_by_seq` returned pointer to `seqbase` instead of `channels`.
2022-05-03 08:47:27 +02:00
Jeroen Bakker
e4e5d7781e Fix T97547: Stereo rendering crash.
Viewports weren't drawn as they couldn't get a lock. Resulted in compositing
uninitialized viewports. Fixed by checking that both views were drawn.
2022-05-03 08:21:08 +02:00
Campbell Barton
4ee8dfa8b3 Fix use after free error when exiting a temp screen
Regression in [0] caused by checking the screen after event handling.

[0]: d4bdf2192964f786520c774d1a2ee44617302bc1
2022-05-03 14:50:40 +10:00
Campbell Barton
8810d0cecd Fix T85379: Cube projection size parameter is wrong
The input size was doubled & inverted.
2022-05-03 13:26:46 +10:00
Campbell Barton
79d4740eda Cleanup: use context.temp_override
Remove use of deprecated operator context passing.

Also minor clarification in the context.temp_override docs.
2022-05-03 09:32:28 +10:00
Campbell Barton
309b6319a0 Cleanup: quiet unused variable warning 2022-05-03 09:32:27 +10:00
Henrik Dick
62ef1c08af GPencil: Fix envelope modifier deform mode thickness
The thickness in the deform mode was just correct if the radius when
drawing a stroke was set to 20. Now all factors that influence the
stroke thickness are considered in deform mode.

Differential Revision: https://developer.blender.org/D14691
2022-05-02 22:13:38 +02:00
Bastien Montagne
5188c14718 Fix T97688: Deleting a scene with a scene strip causes the referenced scene to have zero users
Relinking code would weirdly enough allow clearing of extra/fake user
status on IDs used by affected ID, which would be utterly wrong.

Fairly unclear why this was working OK in reported case before rBa71a513def20,
could not spot any obvious reason just from reading code...

Also, in `libblock_remap_data_update_tags`, only transfer fake user
status if `new_id` is not NULL (otherwise that would have removed that
falg from `old_id`, without actually transferring it to anything).
2022-05-02 15:58:53 +02:00
Bastien Montagne
263f56ba49 Add RNA accessor for 'extra user' ID tag,
Not expected to be used directly by users, but very handy to have around
for investigations and debugging.
2022-05-02 15:58:53 +02:00
Ethan-Hall
3d5f5c2d9a Color Attributes: Add initial fill color option
This patch adds allows the user to select the initial fill color when
adding a new color attribute layer.

---
{F13035372}

Reviewed By: JulienKaspar, joeedh

Differential Revision: https://developer.blender.org/D14743
2022-05-02 12:18:23 +02:00
Jeroen Bakker
38394e1a32 GPU: Remove OCIO workaround for Apple.
OCIO shader was ported to use GPUShaderCreateInfo a while ago. That
made this workaround not needed anymore.

Best to remove it before the release.
2022-05-02 12:15:21 +02:00
Clément Foucault
1b0da28038 EEVEE: Fix compiler warning 2022-05-02 11:22:57 +02:00
Thomas Dinges
d1cbfc81bb Blender 3.2 splashscreen
Credits: Oksana Dobrovolska
2022-05-02 10:38:59 +02:00
Thomas Dinges
da46ed9116 Blender 3.2 - Beta
* BLENDER_VERSION_CYCLE set to beta
* Update pipeline_config.yaml to point to 3.2 branches and svn tags
* Update and uncomment BLENDER_VERSION in download.cmake
2022-05-02 10:35:39 +02:00
Clément Foucault
12baea1b8e EEVEE: Fix compilation on MSVC 2022-05-02 10:09:46 +02:00
Clément Foucault
8ece0816d9 EEVEE: Rewrite: Implement nodetree support with every geometry types
This commit introduce back support for all geometry types and all nodetree support.
Only the forward shading pipeline is implemented for now.

Vertex Displacement is automatically enabled for now.

Lighting & Shading is placeholder.

Related Task: T93220

# Conflicts:
#	source/blender/draw/engines/eevee_next/eevee_engine.cc
#	source/blender/gpu/CMakeLists.txt
2022-05-02 09:35:45 +02:00
Jacques Lucke
f0f44fd92f Curves: support spherical delete brush
Differential Revision: https://developer.blender.org/D14797
2022-05-02 09:18:57 +02:00
Clément Foucault
a5644f9a28 Cleanup: GPUBuiltinShader: Remove old shader interfaces
This leaves some of the unresolved case where we still need both
implementation.
2022-05-02 01:31:24 +02:00
Clément Foucault
aaab3c8ad4 Cleanup: GPUShader: Make style consistent in builtin_shader_stages 2022-05-02 01:05:35 +02:00
Clément Foucault
f0118e9aca GPUShader: Remove GPU_SHADER_INSTANCE_VARIYING_COLOR_VARIYING_SIZE
This had only one use and it was for debugging. Remove the shader for now.
This also simplifies the debug drawing even if slower.
2022-05-02 00:57:32 +02:00
Clément Foucault
5e5e198bbe GPUShader: Port 3D uniform color clipped shaders to use shaderCreateInfo
This should have no functional changes.
2022-05-02 00:44:58 +02:00
Clément Foucault
0676963809 GPUShader: Port dashed line shaders to use shaderCreateInfo
This should have no functional changes.

This reduce the complexity of the shader by only supporting 2 colors.
We never use more than 2 color in practice and this makes usage not require
a UBO.
2022-05-02 00:35:49 +02:00
Clément Foucault
2a7a01b339 GPUShader: Port polyline shaders to use shaderCreateInfo
This should have no functional changes.
2022-05-01 23:54:41 +02:00
Clément Foucault
aa34706aac Fix T97545 DRW: Crash cause by invalid " char in glsl source
Some old compiler do not like this character even if inside an `#error`
directive.
2022-05-01 22:42:07 +02:00
Clément Foucault
3f0c09f6dd GPUShaderCreateInfo: Add validation for overlapping vertex attribute
Those are usually not supported but some driver silently fix them and most
just silently fail (rendering error).
2022-05-01 22:28:38 +02:00
Clément Foucault
fc872d738e GPUShader: Port 2D widget shaders to use shaderCreateInfo
This should have no functional changes.
2022-05-01 21:12:59 +02:00
Clément Foucault
a330b9b0ea GL: Add attribute-less shader workaround for MacOS to the backend
This workaround and the issue was described in D4490. This makes sure
any shader using `shaderCreateInfo` will benefit from the same workaround.
2022-05-01 20:54:33 +02:00
Clément Foucault
631506d9c3 External Engine: Reuse depth only shader from Basic engine
This removes the usage of `GPU_shader_create_from_info_name()`.
2022-05-01 19:35:37 +02:00
Clément Foucault
eba06fee49 Basic Engine: Port depth shader (object selection) to shaderCreateInfo
This should have no functional changes.
2022-05-01 19:35:37 +02:00
Aras Pranckevicius
c87f6242b9 Fix T97644: new 3.2 obj importer does not set blend mode for eevee
The old python importer had a "if do_transparency, set blend_method to
BLEND" type of logic. This bit was missing in the new importer; it was
only setting the eevee blend method when a transparency texture was
present, but not in other cases of transparency (as driven by MTL
"illum" mode).

Reviewd By: Howard Trickey
Differential Revision: https://developer.blender.org/D14783
2022-05-01 20:10:21 +03:00
Aras Pranckevicius
33518f9da1 Fix T97417: OBJ: support tab and other whitespace characters after obj/mtl keywords
Even if available OBJ/MTL format documentations don't explicitly specify
which characters can possibly separate keywords & arguments, turns out
some files out there in the wild use TAB character after the line
keywords. Which is something the new 3.2 importer was not quite
expecting (T97417).

Fix this by factoring out a utility function that checks if line starts
with a keyword followed by any whitespace, and using that across the
importer. Also fix some other "possible whitespace around name-like
parts" of obj/mtl parser as pointed out by the repro files in T97417.

Reviewed By: Howard Trickey
Differential Revision: https://developer.blender.org/D14782
2022-05-01 20:07:03 +03:00
Clément Foucault
30d1d4579e Cleanup: Overlay: Remove unused extern datatoc and shader library
These are not needed anymore.
2022-05-01 18:47:51 +02:00
Clément Foucault
6cad9c7964 Overlay: Port particle display shader to use shaderCreateInfo
This should have no functional changes.
2022-05-01 18:40:48 +02:00
Clément Foucault
d02d1129f7 Overlay: Port particle edit shader to use shaderCreateInfo
This should have no functional changes.
2022-05-01 18:17:37 +02:00
Clément Foucault
6861ef62a6 Overlay: Port sculpt mask shader to use shaderCreateInfo
This should have no functional changes.
2022-05-01 18:07:16 +02:00
Clément Foucault
cc268238ea Overlay: Port wireframe shader to use shaderCreateInfo
This should have no functional changes.
2022-05-01 17:39:32 +02:00
Clément Foucault
ba22aa8797 Overlay: Port facing shader to use shaderCreateInfo
This should have no functional changes.
2022-05-01 17:14:30 +02:00
Clément Foucault
e59cc3a814 Overlay: Port gpencil canvas shader to use shaderCreateInfo
This should have no functional changes.
2022-05-01 17:07:20 +02:00
Clément Foucault
d33801e2bf Overlay: Port image empty shader to use shaderCreateInfo
This should have no functional changes.
2022-05-01 16:30:51 +02:00
Clément Foucault
1c992cc647 Overlay: Fix non functional outline on wireframe
This was caused by rB6e5877c189df5d6c2dfcaa44ba4c3c9a8b387998.
2022-05-01 15:37:37 +02:00
Clément Foucault
0dfb6eddc0 Overlay: Port motion path shaders to use shaderCreateInfo
This should have no functional changes.
2022-05-01 15:37:37 +02:00
Clément Foucault
0c44b03b09 Overlay: Port 2D image overlay shaders to use shaderCreateInfo
This should have no functional changes.
2022-05-01 15:37:37 +02:00
Lukas Tönne
df0616bcd0 Nodes: Fix T90233
- Fix default_value initialization of custom node tree interface:

  This was crashing when adding a custom interface socket to a tree.
  The node_socket_set_typeinfo function was called too early, creating a
  default float socket, which then doesn't match the socket type after
  changing to the custom type.

  The node_socket_set_typeinfo only allocates and initializes
  default_value when it isn't already set. That is because the function is
  used either when creating new sockets or to initialize typeinfo after
  loading files. So default_value has to be either null or has to be
  matching the current type already.

- Fix RNA flag for string return value of the valid_socket_type callback:

  String return values of registerable RNA functions need a
  PROP_THICK_WRAP flag since they don't have a fixed buffer to write into.
2022-05-01 09:27:22 +01:00
Clément Foucault
171851a6c8 Material: Hide material output socket Thickness as it is not used for now
This is a EEVEE-Next feature that is not yet implemented. Ideally the
socket should only be displayed when EEVEE is in the selected target
engine.
2022-05-01 10:09:23 +02:00
Nate Rupsis
5ff931149b Updating Graph editor channels pin tool tip
Reviewed By: Blendify

Maniphest Tasks: T97631

Differential Revision: https://developer.blender.org/D14766
2022-04-30 23:12:44 -04:00