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 <montagne29@wanadoo.fr>2016-12-02 12:45:03 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-12-02 12:47:18 +0300
commit0c958b9f8e933605497a59faf8838a544b9da740 (patch)
tree35f410a87ddf2df76a3fd43edc888f4186c47034 /source/blender/blenloader/intern/versioning_270.c
parent0ac2be7030ee114e43407743c85ca72aade62e7e (diff)
Fix T50062: Mask - Clicking in ActivePoint Parent makes Blender crash.
Mask primitive adding code was not initializing correctly id_type of points' parents.
Diffstat (limited to 'source/blender/blenloader/intern/versioning_270.c')
-rw-r--r--source/blender/blenloader/intern/versioning_270.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 25d78b73d59..88c583b827e 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -46,6 +46,7 @@
#include "DNA_screen_types.h"
#include "DNA_object_force.h"
#include "DNA_object_types.h"
+#include "DNA_mask_types.h"
#include "DNA_mesh_types.h"
#include "DNA_modifier_types.h"
#include "DNA_particle_types.h"
@@ -60,6 +61,7 @@
#include "BKE_colortools.h"
#include "BKE_library.h"
#include "BKE_main.h"
+#include "BKE_mask.h"
#include "BKE_modifier.h"
#include "BKE_node.h"
#include "BKE_scene.h"
@@ -1473,4 +1475,21 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
br->fill_threshold /= sqrt_3;
}
}
+
+ /* To be added to next subversion bump! */
+ {
+ /* Mask primitive adding code was not initializing correctly id_type of its points' parent. */
+ for (Mask *mask = main->mask.first; mask; mask = mask->id.next) {
+ for (MaskLayer *mlayer = mask->masklayers.first; mlayer; mlayer = mlayer->next) {
+ for (MaskSpline *mspline = mlayer->splines.first; mspline; mspline = mspline->next) {
+ int i = 0;
+ for (MaskSplinePoint *mspoint = mspline->points; i < mspline->tot_point; mspoint++, i++) {
+ if (mspoint->parent.id_type == 0) {
+ BKE_mask_parent_init(&mspoint->parent);
+ }
+ }
+ }
+ }
+ }
+ }
}