diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-09-05 12:20:11 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-09-05 12:20:11 +0400 |
commit | 919bd181b764b0cf76b7e0fee76a07cc8126fc9a (patch) | |
tree | f9d886d0e45a85f27b13ec73ba2c07712a624152 /source/blender/editors/object/object_relations.c | |
parent | 3b09c331faae4406d619bfb1fab28a01c77097b4 (diff) |
Partial revert commit 39878 "Fix #28280: Insert Hook wrong index"
Such load/make edit structures introduced regression into iterators
via object's geometry (vertices, edges, control points and so) when
adding hooks in the body of this iterator.
Fix for wrong index should be non-destructable for geometry.
This will fix #28506: Unusual behavior in curves.
Diffstat (limited to 'source/blender/editors/object/object_relations.c')
-rw-r--r-- | source/blender/editors/object/object_relations.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index b9208e778c7..e9418ca9f9f 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -91,8 +91,6 @@ #include "ED_armature.h" #include "ED_curve.h" -#include "ED_lattice.h" -#include "ED_mesh.h" #include "ED_keyframing.h" #include "ED_object.h" #include "ED_screen.h" @@ -124,12 +122,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op) if(obedit->type==OB_MESH) { Mesh *me= obedit->data; - EditMesh *em; - - load_editMesh(scene, obedit); - make_editMesh(scene, obedit); - - em = BKE_mesh_get_editmesh(me); + EditMesh *em = BKE_mesh_get_editmesh(me); eve= em->verts.first; while(eve) { @@ -147,12 +140,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op) BKE_mesh_end_editmesh(me, em); } else if(ELEM(obedit->type, OB_SURF, OB_CURVE)) { - ListBase *editnurb; - - load_editNurb(obedit); - make_editNurb(obedit); - - editnurb= curve_get_editcurve(obedit); + ListBase *editnurb= curve_get_editcurve(obedit); cu= obedit->data; @@ -192,13 +180,8 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op) } } else if(obedit->type==OB_LATTICE) { - Lattice *lt; - - load_editLatt(obedit); - make_editLatt(obedit); - - lt= obedit->data; - + Lattice *lt= obedit->data; + a= lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw; bp= lt->editlatt->latt->def; while(a--) { |