This commit fixes following issues:
* Undo push of "deselect" does not work correctly with curves. [#6632]
* Hotkey (h) does not work correctly with curves. [#6633]
* If control points are hidden partially (not all are hidden at once),
curve object is not hidden. [#6633]

Issue regarding the way curve objects are shown in the object mode
when they are hidden remains to be solved. [#6633]

First commit!
This commit is contained in:
2007-05-01 14:37:59 +00:00
parent ab77b4aade
commit aa7d7103b1
2 changed files with 9 additions and 5 deletions

View File

@@ -1036,8 +1036,6 @@ void deselectall_nurb()
if(!G.vd || !(G.obedit->lay & G.vd->lay))
return;
BIF_undo_push("Deselect all");
a= 0;
for(nu= editNurb.first; nu; nu= nu->next) {
if((nu->type & 7)==CU_BEZIER) {
@@ -1111,6 +1109,7 @@ void deselectall_nurb()
}
countall();
allqueue(REDRAWVIEW3D, 0);
BIF_undo_push("Deselect all");
}
void hideNurb(int swap)
@@ -1131,12 +1130,12 @@ void hideNurb(int swap)
sel= 0;
while(a--) {
if(BEZSELECTED(bezt)) {
sel++;
bezt->f1 &= ~1;
bezt->f2 &= ~1;
bezt->f3 &= ~1;
bezt->hide= 1;
}
if(bezt->hide) sel++;
bezt++;
}
if(sel==nu->pntsu) nu->hide= 1;
@@ -1149,13 +1148,12 @@ void hideNurb(int swap)
if(swap==0 && (bp->f1 & 1)) {
bp->f1 &= ~1;
bp->hide= 1;
sel++;
}
else if(swap && (bp->f1 & 1)==0) {
bp->f1 &= ~1;
bp->hide= 1;
sel++;
}
if(bp->hide) sel++;
bp++;
}
if(sel==nu->pntsu*nu->pntsv) nu->hide= 1;

View File

@@ -1882,6 +1882,12 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
else if(G.obedit->type==OB_CURVE) {
if(G.qual==LR_CTRLKEY)
add_hook();
else if(G.qual==LR_ALTKEY)
revealNurb();
else if((G.qual==LR_SHIFTKEY))
hideNurb(1);
else if((G.qual==0))
hideNurb(0);
else {
if(G.qual==LR_CTRLKEY)
autocalchandlesNurb_all(1); /* flag=1, selected */