Roadmap 0.13, Python scripting
PY.3 Python scripts as toolbar buttons, with a form for their inputs
a Discord member Suggested. A saved Python script becomes a button in the app (name, icon, where it sits); inputs the script declares become a small form before it runs. Builds on PY.1.
2026-12-03 (python-13, PY.3), built in the lab (add-on python 0.2.0, all eight apps). Scripts > Save this script keeps a script in this browser (100 at most, 100 KB each); a script whose first comment lines say `# button: Name` (with `# icon: bi-...`, `# tip:`) is a button in a Python group at the end of the toolbar. Each `# input name: type(range) = default | Label` line is one field of a small form that opens before the script runs (number, integer, text, bool, choice(a, b)); the range is checked before the script starts, Escape or Cancel runs nothing, the answers reach the script as `cadcraft.inputs`, and Run on the editor asks the same form. A broken input line refuses to run and says which. One button run is one undo step in CadCraft, BimCraft and PartCraft as before. Help topic 'Python scripting' (section Scripts as buttons, with a form). Tests: tools/python-test/scripts.mjs 43/0, offline.mjs 22/0 (real CPython), test_package.py 42/0, lab browser run tools/python-test/browser-py-13.mjs 94/0 (CadCraft, PartCraft, BimCraft, ModelCraft, MarkupCraft, TakeoffCraft, CivilCraft, DetailCraft). Log docs/0.13-sessions/python-13.md. Not done: the scripts are kept in this browser, not in the file (needs the document-level data call of PY.1 left 1); other languages for the new strings (lang-13).
Community comments
No comments yet
Add detail as we go: how you would use it, files or steps that show the problem, what other programs do. The team reads every comment.
Sign in or create a free account to add a comment.