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:
authorTon Roosendaal <ton@blender.org>2009-01-31 16:30:56 +0300
committerTon Roosendaal <ton@blender.org>2009-01-31 16:30:56 +0300
commit86a2a0f6947feab469a108eb7eb875fa5637d036 (patch)
treeff033132556d35991a488e6dc98807fa5b06b625 /source/blender/editors/space_view3d/drawmesh.c
parent607a56cb7a0e5a7fef2214d60a723dd67e8209ab (diff)
2.5
Edit Mesh: - Added back "Edge Shortest Path select" It now also does regular selection, more fun! It's mapped to CTRL+click now, and makes or clears selections between current and previously activated edge. Seam/Sharp/etc marking is a toolsetting mode still. These options cannot become properties easily, because the tool uses the properties of selected edge to clear... - Removed a whole bunch of G.f flags, related to mesh drawing. It's all now local in me->drawflags. Here's the list of removed old globals: G_DRAWEDGES G_DRAWFACES G_DRAWNORMALS G_DRAW_VNORMALS G_ALLEDGES G_HIDDENEDGES G_DRAWCREASES G_DRAWSEAMS G_DRAWSHARP G_DRAWBWEIGHTS G_DRAW_EDGELEN G_DRAW_FACEAREA G_DRAW_EDGEANG
Diffstat (limited to 'source/blender/editors/space_view3d/drawmesh.c')
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index f34f520e269..92c8b8f0b69 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -135,13 +135,14 @@ static EdgeHash *get_tface_mesh_marked_edge_info(Mesh *me)
static int draw_tfaces3D__setHiddenOpts(void *userData, int index)
{
struct { Mesh *me; EdgeHash *eh; } *data = userData;
- MEdge *med = &data->me->medge[index];
+ Mesh *me= data->me;
+ MEdge *med = &me->medge[index];
uintptr_t flags = (intptr_t) BLI_edgehash_lookup(data->eh, med->v1, med->v2);
- if((G.f & G_DRAWSEAMS) && (med->flag&ME_SEAM)) {
+ if((me->drawflag & ME_DRAWSEAMS) && (med->flag&ME_SEAM)) {
return 0;
- } else if(G.f & G_DRAWEDGES){
- if (G.f&G_HIDDENEDGES) {
+ } else if(me->drawflag & ME_DRAWEDGES){
+ if (me->drawflag & ME_HIDDENEDGES) {
return 1;
} else {
return (flags & eEdge_Visible);
@@ -154,11 +155,12 @@ static int draw_tfaces3D__setHiddenOpts(void *userData, int index)
static int draw_tfaces3D__setSeamOpts(void *userData, int index)
{
struct { Mesh *me; EdgeHash *eh; } *data = userData;
+ Mesh *me= data->me;
MEdge *med = &data->me->medge[index];
uintptr_t flags = (intptr_t) BLI_edgehash_lookup(data->eh, med->v1, med->v2);
- if (med->flag&ME_SEAM) {
- if (G.f&G_HIDDENEDGES) {
+ if (med->flag & ME_SEAM) {
+ if (me->drawflag & ME_HIDDENEDGES) {
return 1;
} else {
return (flags & eEdge_Visible);
@@ -217,7 +219,7 @@ static void draw_tfaces3D(RegionView3D *rv3d, Object *ob, Mesh *me, DerivedMesh
dm->drawMappedEdges(dm, draw_tfaces3D__setHiddenOpts, &data);
/* Draw Seams */
- if(G.f & G_DRAWSEAMS) {
+ if(me->drawflag & ME_DRAWSEAMS) {
UI_ThemeColor(TH_EDGE_SEAM);
glLineWidth(2);
@@ -227,7 +229,7 @@ static void draw_tfaces3D(RegionView3D *rv3d, Object *ob, Mesh *me, DerivedMesh
}
/* Draw Selected Faces */
- if(G.f & G_DRAWFACES) {
+ if(me->drawflag & ME_DRAWFACES) {
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
UI_ThemeColor4(TH_FACE_SELECT);