diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-08-15 10:50:21 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-08-15 10:50:21 +0400 |
commit | ddb843a1acc3b6f255906d4b69fb5f3194c586b0 (patch) | |
tree | 301602cb5a0117e27e23b15aa7e56ef34158dcb0 /source/blender/editors | |
parent | 2b796ed03d8d256a1325e62d19c51702937df027 (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/editors')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 9 |
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; |