import soptoolutils soptoolutils.customStateTool(kwargs, 'polyextrude::1.0') print(1)
The
print(1)
part will run immediately when the shelf tool is called. How could I make it run after the user exits PolyExtrude's viewer state? (Like putting it in some kind of asynchronous callback?)