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; +%}