switch __shiftclick__ to EXEC_PARAMS.config_mode#3125
switch __shiftclick__ to EXEC_PARAMS.config_mode#3125jmcouffin merged 1 commit intopyrevitlabs:developfrom
Conversation
...yRevit.tab/Drawing Set.panel/Sheets.pulldown/List TitleBlocks on Sheets.pushbutton/script.py
Show resolved
Hide resolved
|
This may be a breaking change for some external extensions. You may want to change the definition of the dunder shift click and throw an explicit exception for the depreciation |
There was a problem hiding this comment.
Pull request overview
This PR standardizes “config/shift-click” behavior handling across tools in pyRevit.tab by replacing usage of the legacy __shiftclick__ built-in with the supported EXEC_PARAMS.config_mode API.
Changes:
- Replace
__shiftclick__checks withEXEC_PARAMS.config_modein several pyRevit tab tools. - Add
EXEC_PARAMSimports where needed to support the new checks.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| extensions/pyRevitTools.extension/pyRevit.tab/Selection.panel/memo.stack/lib/copypastestate/actions.py | Switches paste-time “align axis” prompt gating from __shiftclick__ to EXEC_PARAMS.config_mode. |
| extensions/pyRevitTools.extension/pyRevit.tab/Selection.panel/memo.stack/Memory.pulldown/Prev.pushbutton/script.py | Uses EXEC_PARAMS.config_mode to determine step size (+1 vs +10). |
| extensions/pyRevitTools.extension/pyRevit.tab/Selection.panel/memo.stack/Memory.pulldown/Next.pushbutton/script.py | Uses EXEC_PARAMS.config_mode to determine step size (+1 vs +10). |
| extensions/pyRevitTools.extension/pyRevit.tab/Analysis.panel/Tools.stack/Inspect.pulldown/LinesPerViewCounter.pushbutton/LinesPerViewCounter_script.py | Uses EXEC_PARAMS.config_mode to include linked-doc processing in config mode. |
| extensions/pyRevitCore.extension/pyRevit.tab/pyRevit.panel/Settings.smartbutton/script.py | Switches explorer-opening behavior gating from __shiftclick__ to EXEC_PARAMS.config_mode. |
You mean if i'd ditch the support entirely within the core? True, but i only changed it in the tools themselves to "set a good example". I think that's one of those legacy things that will get carried around forever 😆 |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26055+2115-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26055+2121-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26055+2123-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26057+1645-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26057+2022-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26058+1619-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1027-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1126-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1139-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1233-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1244-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1357-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1403-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26069+2130-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26071+0706-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26073+1714-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26073+2220-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26074+1648-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26076+0001-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26077+2319-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26079+2333-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26080+1314-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26083+2031-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26083+2042-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26083+2045-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26083+2048-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26083+2106-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26083+2130-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26086+2004-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26088+1318-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26089+1231-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26090+0549-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26090+1533-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26090+1536-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26090+1540-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26090+1540-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26090+1556-wip |
|
📦 New public release are available for 6.2.0.26090+1754 |
Description
As per https://pyrevitlabs.notion.site/Python-Runtime-Variables-1ae28b25faca48ff8c291d68e8010541
__shiftclick__should be avoided.This PR moves all tools in pyRevit.tab to the exec_params approach to set a good example and make code consistent.
Checklist
Before submitting your pull request, ensure the following requirements are met:
pipenv run black {source_file_or_directory}Additional Notes
I did not test all tools, only random samples.