From 2cff9b4cb605047927fbb1c774fdafcfd2ab534e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Tue, 25 Sep 2018 18:50:57 +0200 Subject: Curves: Move draw options to overlays This commit add one regression: it is impossible to currently hide handles in the viewport. But this should be fixed in another commit. --- source/blender/makesdna/DNA_curve_types.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/makesdna/DNA_curve_types.h') diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 7c7eaae4949..b8b1066e1a9 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -278,11 +278,13 @@ enum { CU_AUTOSPACE = 1, }; +#if 0 /* Moved to overlay options in 2.8 */ /* Curve.drawflag */ enum { CU_HIDE_HANDLES = 1 << 0, CU_HIDE_NORMALS = 1 << 1, }; +#endif /* Curve.flag */ enum { @@ -443,8 +445,8 @@ typedef enum eBezTriple_KeyframeType { /* checks if the given BezTriple is selected */ #define BEZT_ISSEL_ANY(bezt) \ (((bezt)->f2 & SELECT) || ((bezt)->f1 & SELECT) || ((bezt)->f3 & SELECT)) -#define BEZT_ISSEL_ANY_HIDDENHANDLES(cu, bezt) \ - (((cu)->drawflag & CU_HIDE_HANDLES) ? (bezt)->f2 & SELECT : BEZT_ISSEL_ANY(bezt)) +#define BEZT_ISSEL_ANY_HIDDENHANDLES(v3d, bezt) \ + ((((v3d) != NULL) && ((v3d)->overlay.edit_flag & V3D_OVERLAY_EDIT_CU_HANDLES) == 0) ? (bezt)->f2 & SELECT : BEZT_ISSEL_ANY(bezt)) #define BEZT_SEL_ALL(bezt) { (bezt)->f1 |= SELECT; (bezt)->f2 |= SELECT; (bezt)->f3 |= SELECT; } ((void)0) #define BEZT_DESEL_ALL(bezt) { (bezt)->f1 &= ~SELECT; (bezt)->f2 &= ~SELECT; (bezt)->f3 &= ~SELECT; } ((void)0) -- cgit v1.2.3