From f674976edd884d7a9a409042708f2b1169fd4e98 Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Thu, 1 Apr 2021 10:41:12 -0300 Subject: Curve: Remove 'CU_2D' flag used for nurbs This fixes T86440 As the CU_2D flag is set for nurbs, a Curve can have 2D nurbs mixed with 3D. But the UI does not allow this mixing. It updates all nurbs to 2D or 3D when set. So remove this specific flag for nurbs. This may break old files, since 2D curves with mixed 3D are now set as 3D. Differential Revision: https://developer.blender.org/D10738 --- source/blender/makesrna/intern/rna_curve.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 3e90b4bd9d4..e670b17b79a 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -357,9 +357,8 @@ static void rna_Curve_dimension_set(PointerRNA *ptr, int value) } else { cu->flag &= ~CU_3D; + BKE_curve_dimension_update(cu); } - - BKE_curve_curve_dimension_update(cu); } static const EnumPropertyItem *rna_Curve_fill_mode_itemf(bContext *UNUSED(C), @@ -721,10 +720,6 @@ static Nurb *rna_Curve_spline_new(Curve *cu, int type) nu->resolv = cu->resolv; nu->flag = CU_SMOOTH; - if ((cu->flag & CU_3D) == 0) { - nu->flag |= CU_2D; - } - BLI_addtail(BKE_curve_nurbs_get(cu), nu); return nu; -- cgit v1.2.3