From 6db0216dd459187c71a61d2bbd11940070539d54 Mon Sep 17 00:00:00 2001 From: qu1ck Date: Sun, 17 Oct 2021 03:21:47 -0700 Subject: [PATCH] Bring back python compatibility constants for SHAPE_T They were removed in a41944020ddb2039f04ed8b2a640badc78b1c762 and that broke a lot of stuff. --- pcbnew/python/swig/pcb_shape.i | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pcbnew/python/swig/pcb_shape.i b/pcbnew/python/swig/pcb_shape.i index 2cd8d98443..feac188223 100644 --- a/pcbnew/python/swig/pcb_shape.i +++ b/pcbnew/python/swig/pcb_shape.i @@ -14,3 +14,20 @@ #include %} +/* Only for compatibility with old python scripts: */ +const int S_SEGMENT = (const int)SHAPE_T::SEGMENT; +const int S_RECT = (const int)SHAPE_T::RECT; +const int S_ARC = (const int)SHAPE_T::ARC; +const int S_CIRCLE = (const int)SHAPE_T::CIRCLE; +const int S_POLYGON = (const int)SHAPE_T::POLY; +const int S_CURVE = (const int)SHAPE_T::BEZIER; + +%{ +/* for compatibility with old python scripts: */ +const int S_SEGMENT = (const int)SHAPE_T::SEGMENT; +const int S_RECT = (const int)SHAPE_T::RECT; +const int S_ARC = (const int)SHAPE_T::ARC; +const int S_CIRCLE = (const int)SHAPE_T::CIRCLE; +const int S_POLYGON = (const int)SHAPE_T::POLY; +const int S_CURVE = (const int)SHAPE_T::BEZIER; +%}