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:
authorJiri Hnidek <jiri.hnidek@tul.cz>2006-08-20 19:22:56 +0400
committerJiri Hnidek <jiri.hnidek@tul.cz>2006-08-20 19:22:56 +0400
commit2ee42ac01e6f4b154ac68976024af0615f7acb26 (patch)
tree9a2400a99bf7880a2f146c7a89bd2d8c0108374c /source/blender/src/editmesh_tools.c
parentffe630b452f4abb28c105fca2b8eb9fdb6e72370 (diff)
Huge commit: VERSE
- All code is in #ifdef ... #endif - Only make build system is supported and you have to add: export WITH_VERSE=true to user-def.mk file - Blender can share only mesh objects and bitmaps now - More informations can be found at wiki: http://mediawiki.blender.org/index.php/BlenderDev/VerseIntegrationToBlender http://mediawiki.blender.org/index.php/BlenderDev/VerseIntegrationToBlenderUserDoc I hope, that I didn't forget at anything
Diffstat (limited to 'source/blender/src/editmesh_tools.c')
-rw-r--r--source/blender/src/editmesh_tools.c83
1 files changed, 79 insertions, 4 deletions
diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c
index de8cc5b7a9b..f1e5b555009 100644
--- a/source/blender/src/editmesh_tools.c
+++ b/source/blender/src/editmesh_tools.c
@@ -72,6 +72,10 @@ editmesh_tool.c: UI called tools for editmesh, geometry changes here, otherwise
#include "BKE_object.h"
#include "BKE_utildefines.h"
+#ifdef WITH_VERSE
+#include "BKE_verse.h"
+#endif
+
#include "BIF_cursors.h"
#include "BIF_editmesh.h"
#include "BIF_gl.h"
@@ -85,6 +89,10 @@ editmesh_tool.c: UI called tools for editmesh, geometry changes here, otherwise
#include "BIF_toolbox.h"
#include "BIF_transform.h"
+#ifdef WITH_VERSE
+#include "BIF_verse.h"
+#endif
+
#include "BDR_drawobject.h"
#include "BDR_editobject.h"
@@ -200,6 +208,11 @@ void convert_to_triface(int direction)
}
EM_fgon_flags(); // redo flags and indices for fgons
+
+#ifdef WITH_VERSE
+ if(G.editMesh->vnode)
+ sync_all_versefaces_with_editfaces((VNode*)G.editMesh->vnode);
+#endif
BIF_undo_push("Convert Quads to Triangles");
}
@@ -509,6 +522,13 @@ int removedoublesflag(short flag, float limit) /* return amount */
eve= nextve;
}
+#ifdef WITH_VERSE
+ if((a>0) && (G.editMesh->vnode)) {
+ sync_all_verseverts_with_editverts((VNode*)G.editMesh->vnode);
+ sync_all_versefaces_with_editfaces((VNode*)G.editMesh->vnode);
+ }
+#endif
+
return a; /* amount */
}
@@ -549,6 +569,12 @@ void xsortvert_flag(int flag)
addlisttolist(&em->verts, &tbase);
MEM_freeN(sortblock);
+
+#ifdef WITH_VERSE
+ if(G.editMesh->vnode)
+ sync_all_versefaces_with_editfaces((VNode*)G.editMesh->vnode);
+#endif
+
BIF_undo_push("Xsort");
}
@@ -609,6 +635,10 @@ void hashvert_flag(int flag)
addlisttolist(&em->verts, &tbase);
MEM_freeN(sortblock);
+#ifdef WITH_VERSE
+ if(G.editMesh->vnode)
+ sync_all_versefaces_with_editfaces((VNode*)G.editMesh->vnode);
+#endif
BIF_undo_push("Hash");
}
@@ -710,6 +740,12 @@ void split_mesh(void)
countall();
allqueue(REDRAWVIEW3D, 0);
DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
+
+#ifdef WITH_VERSE
+ if(G.editMesh->vnode)
+ sync_all_versefaces_with_editfaces((VNode*)G.editMesh->vnode);
+#endif
+
BIF_undo_push("Split");
}
@@ -747,7 +783,7 @@ void extrude_repeat_mesh(int steps, float offs)
allqueue(REDRAWVIEW3D, 0);
DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
-
+
BIF_undo_push("Extrude Repeat");
}
@@ -833,6 +869,7 @@ void spin_mesh(int steps, int degr, float *dvec, int mode)
countall();
allqueue(REDRAWVIEW3D, 0);
DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
+
if(dvec==NULL) BIF_undo_push("Spin");
}
@@ -1180,6 +1217,12 @@ void fill_mesh(void)
countall();
allqueue(REDRAWVIEW3D, 0);
DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
+
+#ifdef WITH_VERSE
+ if(G.editMesh->vnode)
+ sync_all_versefaces_with_editfaces((VNode*)G.editMesh->vnode);
+#endif
+
BIF_undo_push("Fill");
}
/*GB*/
@@ -3310,6 +3353,10 @@ void beauty_fill(void)
allqueue(REDRAWVIEW3D, 0);
DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
+#ifdef WITH_VERSE
+ if(G.editMesh->vnode)
+ sync_all_versefaces_with_editfaces((VNode*)G.editMesh->vnode);
+#endif
BIF_undo_push("Beauty Fill");
}
@@ -3404,6 +3451,10 @@ void join_triangles(void)
allqueue(REDRAWVIEW3D, 0);
DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
+#ifdef WITH_VERSE
+ if(G.editMesh->vnode)
+ sync_all_versefaces_with_editfaces((VNode*)G.editMesh->vnode);
+#endif
BIF_undo_push("Convert Triangles to Quads");
}
@@ -3515,6 +3566,10 @@ void edge_flip(void)
allqueue(REDRAWVIEW3D, 0);
DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
+#ifdef WITH_VERSE
+ if(G.editMesh->vnode)
+ sync_all_versefaces_with_editfaces((VNode*)G.editMesh->vnode);
+#endif
BIF_undo_push("Flip Triangle Edges");
}
@@ -3974,7 +4029,12 @@ void edge_rotate_selected(int dir)
allqueue(REDRAWVIEW3D, 0);
DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
-
+
+#ifdef WITH_VERSE
+ if(G.editMesh->vnode)
+ sync_all_versefaces_with_editfaces((VNode*)G.editMesh->vnode);
+#endif
+
BIF_undo_push("Rotate Edge");
}
@@ -5377,10 +5437,18 @@ int EdgeSlide(short immediate, float imperc)
BLI_ghash_free(vertgh, NULL, (GHashValFreeFP)MEM_freeN);
BLI_linklist_free(vertlist,NULL);
BLI_linklist_free(edgelist,NULL);
-
+
if(cancel == 1) {
return -1;
}
+ else {
+#ifdef WITH_VERSE
+ if(G.editMesh->vnode) {
+ sync_all_verseverts_with_editverts((VNode*)G.editMesh->vnode);
+ sync_all_versefaces_with_editfaces((VNode*)G.editMesh->vnode);
+ }
+#endif
+ }
return 1;
}
@@ -5638,7 +5706,14 @@ void mesh_rip(void)
}
countall(); // apparently always needed when adding stuff, derived mesh
-
+
+#ifdef WITH_VERSE
+ if(G.editMesh->vnode) {
+ sync_all_verseverts_with_editverts((VNode*)G.editMesh->vnode);
+ sync_all_versefaces_with_editfaces((VNode*)G.editMesh->vnode);
+ }
+#endif
+
BIF_TransformSetUndo("Rip");
initTransform(TFM_TRANSLATION, 0);
Transform();