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:
authorJoseph Eagar <joeedh@gmail.com>2010-01-28 03:45:30 +0300
committerJoseph Eagar <joeedh@gmail.com>2010-01-28 03:45:30 +0300
commit20fac2eca72370f1003e46d774225c22ff0f78cf (patch)
tree0c61b84e6d8ed28034e64c7dac25c5a32f20f3e2 /source/blender/editors/object/object_transform.c
parent3af4392087b9174dce0fa5a1c906898b3f7d83e1 (diff)
The Death Of Editmesh - Part 1
I've removed editmesh altogether (other then scanfill, which is seperate code that happens to reuse the editmesh structures). The compatibility layer I had written for old editmesh tools was more trouble then it was worth, though it did help in the early stages of this project. There's a fair amount of breakage, and there's bunches of tools (mostly minor ones) I need to port over still. Biggest ones are join triangles and loop to region, and spin/screw. This probably isn't really testable, I'll hopefully have more work done on this soon, but might not be before next week.
Diffstat (limited to 'source/blender/editors/object/object_transform.c')
-rw-r--r--source/blender/editors/object/object_transform.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 43382562a8a..fcedf75b854 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -53,6 +53,7 @@
#include "BKE_object.h"
#include "BKE_report.h"
#include "BKE_utildefines.h"
+#include "BKE_tessmesh.h"
#include "RNA_define.h"
#include "RNA_access.h"
@@ -712,11 +713,9 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
/* BezTriple *bezt;
BPoint *bp; */
Nurb *nu, *nu1;
- EditVert *eve;
float cent[3], centn[3], min[3], max[3], omat[3][3];
int a, total= 0;
- int centermode = RNA_enum_get(op->ptr, "type");
-
+ int centermode = RNA_enum_get(op->ptr, "type");
/* keep track of what is changed */
int tot_change=0, tot_lib_error=0, tot_multiuser_arm_error=0;
MVert *mvert;
@@ -732,14 +731,15 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
cent[0]= cent[1]= cent[2]= 0.0;
if(obedit) {
-
INIT_MINMAX(min, max);
if(obedit->type==OB_MESH) {
Mesh *me= obedit->data;
- EditMesh *em = BKE_mesh_get_editmesh(me);
+ BMEditMesh *em = me->edit_btmesh;
+ BMVert *eve;
+ BMIter iter;
- for(eve= em->verts.first; eve; eve= eve->next) {
+ BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
if(v3d->around==V3D_CENTROID) {
total++;
VECADD(cent, cent, eve->co);
@@ -758,14 +758,13 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
cent[2]= (min[2]+max[2])/2.0f;
}
- for(eve= em->verts.first; eve; eve= eve->next) {
+ BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
sub_v3_v3v3(eve->co, eve->co, cent);
}
- recalc_editnormals(em);
+ EDBM_RecalcNormals(em);
tot_change++;
DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
- BKE_mesh_end_editmesh(me, em);
}
}