Age | Commit message (Collapse) | Author |
|
This is part two of the fix for T84459.
Issue appears to be caused by AMD graphics driver later than 20.11.1 and
affects older GPUs (Polaris/FIJI cards). Drawing normals in edit mode
uses the same OpenGL data type for storing normals that is known to be
faulty.
This change fixes the face dot normals by using GPU_COMP_I16.
|
|
THe high quality normals work around is enabled for Polaris cards using
the official drivers. Since driver version 2.11.2 they fail to render
using low quality normals.
The detection of polaris cards is done by matching the opengl renderer.
The renderer strings have been extracted from various reports linked to
{T82856} but isn't complete as some reports are missing the exact
renderer as users don't always report via the help menu.
|
|
This change makes it possible for platforms to only support high quality
normal rendering. This is part of {T82856} where current AMD drivers
running on the polaris architecture does not support the low quality
setting due to a driver bug.
In a next commit the work around will be enabled.
|
|
This adds high quality normals for non meshes. These include
* Volumetric Object Wireframe
* Metaballs
* Extracted Curves
* Curves in edit mode
This is in preparation to fix a regression in recent AMD
drivers where the `GL_INT_2_10_10_10_REV` data type isn't
working in Polaris cards.
|
|
Some GPU platforms don't support having more than one underscore in
sequence in an attribute name. This change will remove the underscore
as a possible character when encoding to save names.
|
|
Off by one error in array access.
|
|
Root of the issue was missing management of ID pointers in the cloth
modifier data stored in ParticleSystem for hair physics, in the
'foreach_id' particle system code.
Using modifier's 'foreach_id' code in psys one unfortunately requires
some ugly conversion gymnastics, but this is still better than having
dedicated code for that case.
Note that this is actually a fairly critical issue, fix should be
backported to 2.91.1 should we do it, and to 2.83 LTS as well I think.
|
|
|
|
Version bump
|
|
In `calc_curve_deform` a factor is calculated without checking if
the divisior is zero or close to zero. This patch adds the missing
checks and sets the factor to zero if the division shouldn't be
computed.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D9645
|
|
dynamic paint modifiers
Looks like prior to the introduction of mantaflow, the former
SmokeModifierData always had a domain initialized (even if its type was
set to None). Since mataflow, the FluidModifierData type needs to be set
to MOD_FLUID_TYPE_DOMAIN (otherwise domain is invalid)
Maniphest Tasks: T82729
Differential Revision: https://developer.blender.org/D9644
|
|
This was reported in the form of the eyedropper of the 'Parent' property
creating a custom property 'parent' if self was picked.
Problem arises when certain checks for setting rna pointer properties
failed (for example: the PROP_ID_SELF_CHECK check) and then a different
code path was entered (which was only meant for IDProperties).
Problem was introduced in rBa7b3047cefcb.
To solve, now first enter the branch for rna-based pointer properties,
then perform the sanity-checks (and if these fail: dont enter the other
unrelated codepath but instead do nothing)
Maniphest Tasks: T83055
Differential Revision: https://developer.blender.org/D9652
|
|
|
|
Besides being incorrect as only the first two bytes should be tested,
searching binary data using `strstr` can easily read past buffer bounds.
|
|
Also clear `gpd_eval` as this wasn't being copied either.
|
|
Zeroed mouse coordinates were being used making projection fail.
|
|
Regression in 0b2d1badecc48.
|
|
|
|
|
|
Endian switching when loading 64bit blend files on a 64bit system was
crashing as the endian switching is only applicable when loading
on 32 bit systems.
This crash goes back to 2.7x, it looks like this never worked
all the way back to the first commit.
|
|
Regular rendering uses a custom blend mode, but render passes renders to
2 separate textures. This wasn't configured correctly inside the
fragment shaders. This patch adds a switch to configure the fragment
shader with the correct attachments.
Backport to Blender 2.83.
Reviewed By: Clément Foucault
Differential Revision: https://developer.blender.org/D9038
|
|
Calling PyEval_ReleaseLock() was crashing with Python 3.9
because it accessed the NULL pointer set by PyThreadState_Swap().
This happened when calling ViewLayer.update() for example.
While the existing logic could be fixed by swapping the thread-state
back before calling PyEval_ReleaseLock(), this depends on functions
which are tagged to be removed by v4.0.
Replace use of deprecated functions by calling PyEval_SaveThread(),
instead of inlining the logic, using _PyThreadState_UncheckedGet()
to prevent Python aborting.
The call to PyEval_ThreadsInitialized has been removed
as threads are now initialized with Python.
This could be replaced with Py_IsInitialized() however it doesn't look
like this is necessary.
This is compatible with Python 3.7 & 3.9.
|
|
Changing options after using select-linked didn't work
when the object being selected wasn't the active object.
|
|
The logic of `BKE_sculpt_update_object_for_edit` was not correct. such
low-level functions should typically never preform depsgraph evaluation
themselves, they should be able to rely on getting a fully evaluated
depsgraph and just get needed data from there.
Supporting that required fixing other broken code higher in the
callstack, namely:
* `ED_object_sculptmode_enter_ex` was freeing evaluated data, for no
valid reason it would seem.
* `sculpt_undosys_step_decode` was ensuring an evaluated depsgraph
**before** calling `ED_object_mode_generic_exit`, which would
invalidate a lot of evaluated data.
Note that it is fairly difficult to track down all code paths leading to
`BKE_sculpt_update_object_for_edit`, so there may be still cases where
this gets called with improperly evaluated depsgraph.
Reviewed By: sergey
Maniphest Tasks: T81854
Differential Revision: https://developer.blender.org/D9270
|
|
with 1023 symbols crashes Blender.
Usual lack of protection against buffer overflows when manipulating
strings.
Also add some basic tests for `BLI_path_rel`.
|
|
This was happening because the raytrace was not even being performed
due to the tracing line being too small after frustum clipping.
|
|
Missing NULL check in bmesh_kernel_vert_separate.
|
|
This specific pose channel pointer was not handled at all during
rebuilding of poses, meaning that it could end up pointing at some freed
pchan.
|
|
This lets add-on authors avoid false positive leaks when exiting.
In particular GPUShaders's although it applies to any PyObject that
stores memory allocated by guarded-alloc.
While this does add overhead on exit, on my system it's
under 1/100th of a second with all addons enabled.
See: T71362
|
|
This was caused by a wrong flag equality check when in xray mode because
the xray mode was masking the effect option flags that are not supported
in this mode. This means the never passed and the TAA was reset before
every redraw, leading to infinite rendering.
|
|
|
|
|
|
The external engine in the draw manager wasn't registered correctly.
This did not free the resources after the external engine was used.
|
|
The example file in T81218 has a driver that maps a bone's X-location to
the number of BBone segments. This caused a dependency cycle, which
resulted in bad thread serialisation, which caused the crash.
This patch breaks the dependency cycle `BONE_LOCAL` →
`DRIVER(bones["Bone"].bbone_segments)` → `BONE_LOCAL`. The 'Driver Data'
relation now points to `BONE_SEGMENTS` when the driven property starts
with `bbone_`.
Differential Revision: https://developer.blender.org/D9122
|
|
Unmatched ED_image_undo_push_{begin/end},
add doc-strings noting why this is needed.
Thanks to @Baardaap for the initial fix.
|
|
Found by address sanitizer.
|
|
Use correct owner_id types for depsgraph view_layer properties
instead of inheriting from the Depsgraph which is set to NULL.
|
|
The output layout was wrong and it's a mistery why it works on most
implementations since it's clearly a wrong usage.
Thanks @sebbas for helping narrowing down the issue.
|
|
Indices referencing other orientations were not being updated,
|
|
Use a remap function instead a swap.
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D8739
|
|
|
|
Warp & weight vertex-group editing modifiers miscalculated vertex weight
inversion, the weights were multiplied before being subtracted from 1.
Ref D8241
|
|
Object in the 2.7x file is on no layer at all, while this is not really
expected nor considered valid, better to cope with the case gracefully
than crash.
To be backported to 2.90 and 2.83.
|
|
|
|
|
|
The localized node-tree was freeing the materials ID properties twice.
This matches how animation data behaves, setting to NULL after freeing.
|
|
On systems with 512kb stack this happened at around 13k points.
This happened at times with grease-pencil, although callers that
frequently use complex polygons should be using BLI_polyfill_calc_arena.
|
|
results in Crash.
RNA diffing code was not dealing properly valid NULL PointerRNA (like
the empty texture slots of a ParticleSettings e.g., which were cause of
crash in that report).
To be backported to 2.90 and 2.83.
|
|
During undo/redo read code is expected to clear the `OB_MODE_EDIT`
bitflag of `Object.mode`, for some reasons.
This was not done anymore for re-used Objects, we need to add a special
handling case for that too.
Should be backported to 2.90 and 2.83 (will probably not be straight
forward for the latter).
|
|
Entering edit-mode after creating shape keys on a blank mesh would crash.
Regression in 9b9f84b317fef which prevented initializing empty
shape keys when there is no shape key offset data available.
|