Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <mont29>2022-07-07 17:20:27 +0300
committerBastien Montagne <bastien@blender.org>2022-07-07 17:25:34 +0300
commitfcf1a9ff71e20e4af56815c4db1816d786298c3f (patch)
tree51bad6dbb1b27d29e0226e38172d828040a54667 /source/blender/makesrna/intern/rna_access.c
parentc76e1ecac6d6611269f15b5fd229ca726bde0337 (diff)
Fix T99256: Regression: Meta balls segfaulting copy-to-selected.
Revealed by rB43167a2c251b, but actuall issue is the `rna_MetaBall_update_data` function expecting a never-NULL `scene` pointer, which is not guaranteed. This lead to refactoring the duo `rna_MetaBall_update_data`/`BKE_mball_properties_copy`, since it was doing a very sub-optimal O(n^2) process, new code is O(2n) now (n being the number of Objects). Not sure why the objects were processed through the existing bases of the existing scene in the first place, this could miss a lot of affected objects (e.g. in case said objects are in an excluded collection, etc.). Also noticed that both old and new implementation can fail to fully propagate changes to all affected meta-balls in some specific corner cases, added a comment about it in the code. Reviewed By: sergey Maniphest Tasks: T99256 Differential Revision: https://developer.blender.org/D15338
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index a0b25cf60b2..cf4182243b9 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -2141,6 +2141,7 @@ void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_update_main(Main *bmain, Scene *scene, PointerRNA *ptr, PropertyRNA *prop)
{
+ BLI_assert(bmain != NULL);
rna_property_update(NULL, bmain, scene, ptr, prop);
}