From e96f0d2e2b5cba05a2455278898bbd6026852aaf Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Mon, 12 Apr 2021 11:08:44 -0300 Subject: 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' ``` --- source/blender/blenkernel/intern/curve.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/blenkernel/intern/curve.c') 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; -- cgit v1.2.3