Fix unreported: Flat Surface objects

Before rBf674976edd88, the flag indicating whether a curve was 2D or 3D was
ignored by Surfaces objects.

So it can be said that Surfaces objects were always 3D.

We could remove updates to 2D on Surface objects, so the behavior is
identical to what it was before.

But this would also cause the return of `data.dimensions` to be misleading,
complicate the code a bit and add a micro overhead.

So the solution here is just to init all Surface objects as 3D.

Surface objects can now be constrained to 2D with the command:
```
data.dimensions = '2D'
```
This commit is contained in:
Germano Cavalcante 2021-04-12 11:08:44 -03:00
parent 95e010a22e
commit e96f0d2e2b
1 changed files with 1 additions and 0 deletions

View File

@ -414,6 +414,7 @@ void BKE_curve_init(Curve *cu, const short curve_type)
cu->tb[0].w = cu->tb[0].h = 0.0;
}
else if (cu->type == OB_SURF) {
cu->flag |= CU_3D;
cu->resolv = 4;
}
cu->bevel_profile = NULL;