diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2004-04-05 23:50:58 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2004-04-05 23:50:58 +0400 |
commit | e4ce73c99eca48d7d494f5e2d0ca0e034f7d4a62 (patch) | |
tree | 349f361db0419d279ef6d91533a921297e20ceca /source | |
parent | 0c22680f1b2e9b067d5172a57b82ba60201910c1 (diff) |
Fixed bug #1006:
In Faceselect Mode, in the Face menu, Copy Vertexcolors, Copy UVs & Textures
and Copy Drawmode did not work.
Also fixed some menu entries redrawing the logic buttons window instead of the
edit buttons window.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/header_view3d.c | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c index 13ec84a24a1..9299aa9e8b0 100644 --- a/source/blender/src/header_view3d.c +++ b/source/blender/src/header_view3d.c @@ -2784,7 +2784,7 @@ static void do_view3d_facesel_propertiesmenu(void *arg, int event) break; } allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWBUTSLOGIC, 0); + allqueue(REDRAWBUTSEDIT, 0); } static uiBlock *view3d_facesel_propertiesmenu(void *arg_unused) @@ -2892,37 +2892,40 @@ static void do_view3d_faceselmenu(void *arg, int event) Mesh *me=NULL; Object *ob=NULL; extern TFace *lasttface; /* caches info on tface bookkeeping ?*/ + TFace *tface; + int a; switch(event) { case 0: /* copy draw mode */ case 1: /* copy UVs */ case 2: /* copy vertex colors */ + ob= OBACT; + if(ob==0) return; me= get_mesh(ob); - if(me && me->tface) { + if(!(me && me->tface)) return; - TFace *tface= me->tface; - int a= me->totface; - - set_lasttface(); - if(lasttface) { - - while(a--) { - if(tface!=lasttface && (tface->flag & TF_SELECT)) { - if(event==0) { - tface->mode= lasttface->mode; - tface->transp= lasttface->transp; - } else if(event==1) { - memcpy(tface->uv, lasttface->uv, sizeof(tface->uv)); - tface->tpage= lasttface->tpage; - tface->tile= lasttface->tile; - - if(lasttface->mode & TF_TILES) tface->mode |= TF_TILES; - else tface->mode &= ~TF_TILES; - - } else if(event==2) memcpy(tface->col, lasttface->col, sizeof(tface->col)); - } - tface++; + tface= me->tface; + a= me->totface; + set_lasttface(); + if(lasttface) { + + while(a--) { + if(tface!=lasttface && (tface->flag & TF_SELECT)) { + if(event==0) { + tface->mode= lasttface->mode; + tface->transp= lasttface->transp; + } else if(event==1) { + memcpy(tface->uv, lasttface->uv, sizeof(tface->uv)); + tface->tpage= lasttface->tpage; + tface->tile= lasttface->tile; + + if(lasttface->mode & TF_TILES) tface->mode |= TF_TILES; + else tface->mode &= ~TF_TILES; + + } else if(event==2) + memcpy(tface->col, lasttface->col, sizeof(tface->col)); } + tface++; } do_shared_vertexcol(me); } @@ -2939,7 +2942,6 @@ static void do_view3d_faceselmenu(void *arg, int event) } allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWBUTSLOGIC, 0); allqueue(REDRAWIMAGE, 0); } |