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:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-08-15 10:50:21 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-08-15 10:50:21 +0400
commitddb843a1acc3b6f255906d4b69fb5f3194c586b0 (patch)
tree301602cb5a0117e27e23b15aa7e56ef34158dcb0 /source/blender
parent2b796ed03d8d256a1325e62d19c51702937df027 (diff)
Fix T41443: Separate bug with Curves & Hooks
This solves the crash, but indices might be wrong after the separation. There are loads of other ways to confuse hook indices in both meshes and curves, for now considering this a TODO.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/curve/editcurve.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index b0371b8dd6c..f3a6dfb2d35 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -1238,9 +1238,18 @@ static void remap_hooks_and_vertex_parents(Object *obedit)
{
Object *object;
Curve *curve = (Curve *) obedit->data;
+ EditNurb *editnurb = curve->editnurb;
int *old_to_new_map = NULL;
int old_totvert;
+ if (editnurb->keyindex == NULL) {
+ /* TODO(sergey): Happens when separating curves, this would lead to
+ * the wrong indices in the hook modifier, address this together with
+ * other indices issues.
+ */
+ return;
+ }
+
for (object = G.main->object.first; object; object = object->id.next) {
ModifierData *md;
int index;