From 8ee73126f1162834ec21fe057ffcb3f8581ed8c0 Mon Sep 17 00:00:00 2001 From: Aleksandra Apolinarska Date: Wed, 17 Apr 2024 16:56:36 +0200 Subject: [PATCH] #2 add reset component --- .../components/aixd_Reset/code.py | 9 +++++++ .../components/aixd_Reset/icon.png | Bin 0 -> 1548 bytes .../components/aixd_Reset/metadata.json | 23 ++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 src/aixd_grasshopper/components/aixd_Reset/code.py create mode 100644 src/aixd_grasshopper/components/aixd_Reset/icon.png create mode 100644 src/aixd_grasshopper/components/aixd_Reset/metadata.json diff --git a/src/aixd_grasshopper/components/aixd_Reset/code.py b/src/aixd_grasshopper/components/aixd_Reset/code.py new file mode 100644 index 0000000..fb3a5ee --- /dev/null +++ b/src/aixd_grasshopper/components/aixd_Reset/code.py @@ -0,0 +1,9 @@ +# flake8: noqa + +from scriptcontext import sticky as st +from aixd_grasshopper.gh_ui import reset_session +from aixd_grasshopper.gh_ui_helper import session_id, clear_sticky + +if reset: + reset_session(session_id()) + clear_sticky(ghenv, st) diff --git a/src/aixd_grasshopper/components/aixd_Reset/icon.png b/src/aixd_grasshopper/components/aixd_Reset/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..db4402b75a08a822154d75def68675beca069d1d GIT binary patch literal 1548 zcmV+n2J`ueP)?zy?5@tGoxeTJkmt-!dA4wRzj(* zR7$l-0~IYo6~!vrQs0mdZ77JQP|TMig@OdrrdCSvLj{XUps&;ln%aam579&?rZ}(8 zo%=ZF?7h~KeeRv{GT41sZ0?8q|E;yodK_%N{r=+s5CMPz0EGVWpirP{j|4i_xmKES zXLKp+TykNh*mQPDrr&Sbi|0CNtzC>*$8{qx0-#k;NU*O*LC+3^X&}A|pfyt^QZ&XZ z880SsY~n)5I*y1XM$rTn5`fZT1h7N@U;8n9G&~5}Cn*35pbj&vnQ|0R%sRDJrOC0qX@LCuqGGRJ9mHH8`rnnOHltE`m}V`r-@< z9Bvd9Vo~xcs}N#E5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