Surface bugfix (reported by jms on the french newsgroup)

Adding Donut or Sphere surfaces with the Align to View option turned on added broken surfaces.

Those two surface type were always aligned in the past and their creation method were not made to deal with this. Fixed now (that is, they are aligned to view and created correctly if the option is on).

There might be other cases of this bug elsewhere.
This commit is contained in:
Martin Poirier
2008-05-01 18:16:21 +00:00
parent 0d1aa8d7bf
commit 8c1b594ed3

View File

@@ -4316,8 +4316,10 @@ Nurb *addNurbprim(int type, int stype, int newname)
makeknots(nu, 1, nu->flagu>>1); makeknots(nu, 1, nu->flagu>>1);
BLI_addtail(&editNurb, nu); /* temporal for spin */ BLI_addtail(&editNurb, nu); /* temporal for spin */
if(newname) spin_nurb(0, 2); if(newname && (U.flag & USER_ADD_VIEWALIGNED) == 0)
else spin_nurb(0, 0); spin_nurb(0, 2);
else
spin_nurb(0, 0);
makeknots(nu, 2, nu->flagv>>1); makeknots(nu, 2, nu->flagv>>1);
@@ -4344,8 +4346,10 @@ Nurb *addNurbprim(int type, int stype, int newname)
nu->resolv= 32; nu->resolv= 32;
nu->flag= CU_SMOOTH; nu->flag= CU_SMOOTH;
BLI_addtail(&editNurb, nu); /* temporal for extrude and translate */ BLI_addtail(&editNurb, nu); /* temporal for extrude and translate */
if(newname) spin_nurb(0, 2); if(newname && (U.flag & USER_ADD_VIEWALIGNED) == 0)
else spin_nurb(0, 0); spin_nurb(0, 2);
else
spin_nurb(0, 0);
BLI_remlink(&editNurb, nu); BLI_remlink(&editNurb, nu);