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:
authorCampbell Barton <ideasman42@gmail.com>2011-04-19 09:34:05 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-04-19 09:34:05 +0400
commit1d536da57e34a7e611747b12d6a43e5392c29580 (patch)
tree4e9f947581eb2729dd4a8bd5234a846192b2f90e /source/blender/editors/mesh
parentba229e38597cec9a784742be44d4cc827def3850 (diff)
fix [#27016] Add new vertex at wrong position ( bpy.ops.mesh.dupli_extrude_cursor() )
also found curve click-extrude was always aligning the new points depth to (0,0,0), now work the same as mesh edit - align to the selected point or the cursor if none are seleted.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_add.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c
index ec84d7f830f..2609a745398 100644
--- a/source/blender/editors/mesh/editmesh_add.c
+++ b/source/blender/editors/mesh/editmesh_add.c
@@ -139,7 +139,7 @@ static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event)
/* call extrude? */
if(done) {
- short rot_src= RNA_boolean_get(op->ptr, "rotate_source");
+ const short rot_src= RNA_boolean_get(op->ptr, "rotate_source");
EditEdge *eed;
float vec[3], cent[3], mat[3][3];
float nor[3]= {0.0, 0.0, 0.0};
@@ -246,20 +246,16 @@ static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event)
}
else if(vc.em->selectmode & SCE_SELECT_VERTEX) {
- float mat[3][3],imat[3][3];
- float *curs= give_cursor(vc.scene, vc.v3d);
+ float imat[4][4];
+ const float *curs= give_cursor(vc.scene, vc.v3d);
copy_v3_v3(min, curs);
view3d_get_view_aligned_coordinate(&vc, min, event->mval);
eve= addvertlist(vc.em, 0, NULL);
- copy_m3_m4(mat, vc.obedit->obmat);
- invert_m3_m3(imat, mat);
-
- copy_v3_v3(eve->co, min);
- mul_m3_v3(imat, eve->co);
- sub_v3_v3v3(eve->co, eve->co, vc.obedit->obmat[3]);
+ invert_m4_m4(imat, vc.obedit->obmat);
+ mul_v3_m4v3(eve->co, imat, min);
eve->f= SELECT;
}