diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-04-12 17:08:44 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-04-12 17:08:54 +0300 |
commit | e96f0d2e2b5cba05a2455278898bbd6026852aaf (patch) | |
tree | f1851398dd1fe62e904287f4aa295b3a32ec66db /source/blender/blenkernel/intern/curve.c | |
parent | 95e010a22eb422a1efa2f7e2bbb6b3ee168ce9e5 (diff) |
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'
```
Diffstat (limited to 'source/blender/blenkernel/intern/curve.c')
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 95c242c31b2..f7eca689241 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -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; |