Age | Commit message (Collapse) | Author |
|
Add check for `NULL` `from` pointer to `BLO_main_validate_shapekeys`,
and delete these shapekeys, as they are fully invalid and impossible to
recover.
Found in a studio production file (`animation
test/snow_parkour/shots/0040/0040.lighting.blend`, svn rev `1111`).
Would be nice to know how this was generated too...
|
|
This does not happen with **any** image, but with images that have ID
properties.
ID properties are used to store view projection matrices (e.g. for
reprojection with `Image from View` or `Quick Edit` -- these are the
ones we are interested in), but of course they can be used for anything
else, too. The images in the file from the report have ID properties from
an Addon for example.
So the crash can reliably be reproduced with **any** image doing the
following:
```
bpy.data.images['myImage']['myIDprop'] = "foo"
```
This would lead code in `texture_paint_camera_project_exec` to think the
needed `view_data` is on the image (but in reality it was just some
other IDprop).
Solution is simple: just check `view_data` is really valid after getting
it from the IDprops.
Maniphest Tasks: T95787
Differential Revision: https://developer.blender.org/D14116
|
|
lib_query/foreach_id code
Fix T95601: Missing handling of keyingsets ID pointers in lib_query/foreach_id code.
This will have to be backported to 2.93 and possibly 2.83 if possible.
|
|
The NURB case did not properly handle a curve with only 1 point.
Ref D13904
|
|
In normal conditions, `gpf` always has a value, but better move inside the NULL checking.
|
|
|
|
|
|
2-point-curves are treated separately from 3plus-point-curves (assume a
lot of the twisting reduction can be skipped, so there is a dedicated
function for single segment curves).
And while using the 3plus-point-curves function [`make_bevel_list_3D`]
would actually work in this case, the dedicated function
`make_bevel_list_segment_3D` would only consider the tilt of the second
point and would just copy over the quat to the first point as well. Dont
see a reason for this, now consider the first point's tilt as well.
Maniphest Tasks: T94837
Differential Revision: https://developer.blender.org/D13813
|
|
When paste new frames, the datablock need to be tagged to update the drawings.
|
|
When a new frame is created, ensure the keytype of source key is used.
|
|
After disconnecting hair on an object, if you then hide the particle system, and try connecting the hair again, the operator is cancelled due to `remap_hair_emitter` returning `false` because `target_psmd->mesh_final` is NULL, but `connect_hair` will still strip the `PSYS_GLOBAL_HAIR` flag, which will cause the hair in the hidden particle system to be positioned incorrectly. The correct behavior is to strip the flag only if `remap_hair_emitter` succeeds.
Differential Revision: https://developer.blender.org/D13703
|
|
Harden bounds check in the stream reader avoiding integer overflow.
|
|
Add a data boundary check in the flipping code.
This code now also communicates the number of mipmap levels
it processed with an intent to avoid GPU texture from using
more levels than there are in the DDS data.
Differential Revision: https://developer.blender.org/D13755
|
|
Fix IMB_flip[xy] to handle cases where integer overflow might occur when
given sufficiently large image dimensions.
All of these fixes were of a similar class where the intermediate
sub-expression would overflow silently. Widen the types as necessary.
Differential Revision: https://developer.blender.org/D13744
|
|
Fixes a bug introduced in rB5dedb39d447b. `mesh_original` is not set if the
mesh has no generative modifiers, in which case we can use `mesh_final`, which
would seem to be consistent with the rest of the particle code. An alternative
approach would be to make sure that `mesh_original` is always set in
`deformVerts`.
Differential Revision: https://developer.blender.org/D13754
|
|
Take the Use Modifier Stack setting into account when connecting hair, and
fix wrong results results when using deforming modifiers also.
Differential Revision: https://developer.blender.org/D13704
|
|
If a mirror object is used in a mirror modifier, sculptmode did not take
this into account (and instead always clipped on the sculpt objects
local axis).
Now take this into account by storing a matrix in the preparation
function `sculpt_init_mirror_clipping` and use that later in
`SCULPT_clip`.
Maniphest Tasks: T94564
Differential Revision: https://developer.blender.org/D13711
|
|
Since 2.8, background images are tied to cameras (in 2.79 these were
tied to a View3D I think).
Code in `BKE_library_id_can_use_idtype` wasnt taking this relation
between `Camera` and `Image` into account, thus leading to ID deletion/
unlinking not working properly -- in particular `libblock_remap_data`
not doing its thing (and leaving the camera as a user of the image),
then things went downhill from there...
Now make the "Camera-can-use-an-Image" relation clear in
`BKE_library_id_can_use_idtype`.
Maniphest Tasks: T94544
Differential Revision: https://developer.blender.org/D13722
|
|
This was visible outside of camera view and was not respecting the
"Depth of Field" checkbox on the Camera properties.
Now return early if DoF should not be visible.
Maniphest Tasks: T94262
Differential Revision: https://developer.blender.org/D13631
|
|
The array modifier does not necessarily tag normals dirty.
If it doesnt, normals are recalculated "internally" using the offset ob
transform. This was happening for the array items, but not for the caps.
Now do the same thing for caps.
Maniphest Tasks: T94422
Differential Revision: https://developer.blender.org/D13681
|
|
This leads to division by zero in Freestyle's NoiseShader which also
crashes blender.
Not sure if we really need a do_version patch for old files, as an
alternative we could also force a positive number in the NoiseShader.
This patch does not do either, just force a positive range in RNA from
now on.
Maniphest Tasks: T89081
Differential Revision: https://developer.blender.org/D13332
|
|
This happens if the Wavelength is set to 0.0f.
Not sure if we really need a do_version patch for old files, as an
alternative we could also force a slight offset in the
SinusDisplacementShader. This patch does not do either, just force a
positive range from now on.
Maniphest Tasks: T93322
Differential Revision: https://developer.blender.org/D13329
|
|
This was just a typo in {rBb408d8af31c9}
Must be 'MINIMUM' (instead of 'MININUM').
Maniphest Tasks: T93320
Differential Revision: https://developer.blender.org/D13328
|
|
|
|
There was a clamp with a value greater than 0.
|
|
This broke with {rB20fac2eca723} (which landed in 2.63), so long
standing bug.
Convention for paint modes is:
- when no paint mask is active, `Frame Selected` will focus the last
stroke
- when paint mask is active, `Frame Selected` will focus the selected
mask faces
To check the right vert coords we have to offset with `mp->loopstart`.
Maniphest Tasks: T93130
Differential Revision: https://developer.blender.org/D13247
|
|
Caused by {rBaf162658e127}, so long standing bug.
When changing clone slots (report involved a quite complicated sequence
of selecting textures and undo -- but I think this could happen in more
situations) code checks for UV of new clone slot.
However, since above commit the slot and the clone slot were mixed up,
so in this case the responsible NULL check (for when no UV is assigned)
wasnt working.
Now correct this (NULL check the clone slot uv -- instead of the paint
slot UV).
note: not sure why low level CustomData functions actually dont do the
name NULL checks themselves (seems like callers are always responsible).
Maniphest Tasks: T93117
Differential Revision: https://developer.blender.org/D13378
|
|
The first loop was left out when finding the split edge boundary.
Error from f2138686d9d8c105ebf8884774fd7e4d8ff239a1.
|
|
When adding `INSERT` operations over RNACollection items, rna diffing
code did not properly report the properties as not being equals.
This in turn triggered the 'purge unused exiting override properties'
mechanism, thus deleting the exitsting (valid) insert override property
operation.
NOTE: This should also be backported to 2.93, and probably 2.83.
Reviewed By: sybren, jbakker
Maniphest Tasks: T93353
Differential Revision: https://developer.blender.org/D13426
|
|
Looks like OSX changed the default format of its locale, which is not
valid anymore for gettext/boost::locale.
Solution based on investigations and patch by Kieun Mun (@kieuns), with
some further tweaks by Ankit Meel (@ankitm), many thanks.
Also add an exception catcher on `std::runtime_error` in
`bl_locale_set()`, since in OSX catching the ancestor `std::exception`
does not work with `boost::locale::conv::conversion_error` and the like
for some reasons.
Reviewed By: #platform_macos, brecht
Maniphest Tasks: T88877
Differential Revision: https://developer.blender.org/D13019
|
|
Same fix as rB0a3b4d4c64f1, but this time for greasepencil.
To repeat: dopesheet in greasepencil mode was ignoring the temporariy
visibility flag of collections. As a result, even though the dopesheet
was supposed to show animation data of visible greasepencils only was
still showing such data of greasepencils that were hidden by hiding
their collection.
|
|
Just disable these tests on macOS for now as fixing seems hard, and we want to
be able to cross-compile and test x86_64 on Arm machines on the buildbot.
|
|
Don't create const avx vectors before validating if CPU supports AVX.
|
|
There is an apparent compiler bug here, tweak the code to avoid it. This did
not affect official builds as we were still using Xcode 12.
|
|
Affects insertion of constraints in liboverrides. In some cases, when
opening newer post-3.0 .blend files, the source won't be found anymore,
override apply code then needs to fail properly instead of crashing.
Related to refactor from rB33c5e7bcd5e5.
|
|
This is a follow up to 8fecc2a8525467ee2fbbaae16ddbbc10b3050d46.
This makes sure future .blend files that have more channels than the
limit won't break Blender.
For LTS this happens silently, without warning the users.
This is part of https://developer.blender.org/D12645
Differential Revision: https://developer.blender.org/D12648
|
|
This is required for Cycles to report a meaningful error message when it fails to load a PTX module
created with a newer CUDA toolkit version than the driver supports.
Ref T91879
|
|
|
|
|
|
|
|
Choosing a UV layer would actually affect the overlay in the viewport
and also painting with the mask brush was in that UV space, but the
resulting stencil mask was always applied with the active UV (not the
explicitly selected stencil UV -- the one one is looking at in the
viewport!) to painting.
This has been like that as far as I have checked back (at least 2.79b),
I am surprised this has not come up before, but it does not seem to make
sense at all...
Now use the UV specified for the stencil layer when applying the mask for
painting, so it corresponds to the stencil mask one is looking at in the
viewport.
Maniphest Tasks: T91557
Differential Revision: https://developer.blender.org/D12583
|
|
The resolution for surfaces was 12 for U, 4 for V,
where both should have been set to 4.
Regression in 9a076dd95a01135ea50f9ccc675668db9f2155f4
|
|
|
|
Follow up to fix for T89868.
|
|
Mistake in a30a8179331d689c9e599fb9a530c0b6b155f689.
|
|
This was working differently in 2.79, tried tracking this down and it
seems this was wrong since the 2.8 beginning in {rB7907dfc40018}.
This would not only crash without an active scene camera, but would also
result in different tracks from different camera's constraints could not
be selected.
So select id depends on corresponding camera, remove the dependency on
scene camera completely.
Maniphest Tasks: T90651
Differential Revision: https://developer.blender.org/D12230
|
|
Reading paths over 512 bytes would cause a buffer overrun.
|
|
|
|
|
|
It wasn't obvious this didn't free the memory of the mesh it's self
leading to memory leaks.
|