Color Splash: implement search and refresh color overrides on paramet…#2904
Color Splash: implement search and refresh color overrides on paramet…#2904jmcouffin merged 4 commits intopyrevitlabs:developfrom
Conversation
…er change (pyrevitlabs#2891, pyrevitlabs#2902) Added parameter search and fixed color reapplication (resolves issues pyrevitlabs#2891, pyrevitlabs#2902)
There was a problem hiding this comment.
PR Summary:
This PR enhances the Color Splash tool with two key improvements:
- ✅ Adds parameter search functionality with dynamic filtering and state preservation
- ✅ Fixes color reapplication logic by refreshing element-to-value mappings before applying colors
- ✅ Resolves issues #2891 and #2902
The implementation introduces a search TextBox to filter parameters, adjusts UI layout to accommodate the new control, and modifies the ApplyColors.Execute method to re-query elements and preserve user color choices.
Review Summary:
Reviewed the implementation for IronPython 2.7.12 compatibility, code style (Black/PEP8), and logic correctness. Found one critical bug in the search functionality's checked state preservation logic that will cause an IndexError. The overall approach is sound and properly addresses both reported issues. The color refresh mechanism correctly uses get_range_values to re-query current element parameter values while preserving user-selected colors through a mapping dictionary.
Follow-up suggestions:
extensions/pyRevitTools.extension/pyRevit.tab/Analysis.panel/ColorSplasher.pushbutton/script.py
Outdated
Show resolved
Hide resolved
|
Perfect! 🎉 Thanks for installing the devlo app on your fork, @Isaiah-Narvaez-42! Now that the app is installed, I can push the fix directly to your branch. The change is simple - just need to update line 1181-1184 to correctly access the Once this fix is applied, the search functionality will properly preserve checked items when filtering. The rest of your PR looks great - the parameter search and color refresh features are well-implemented! 👍 |
|
Great stuff, thanks! |
|
📦 New work-in-progress (wip) builds are available for 5.3.0.25308+0721-wip |
|
📦 New public release are available for 5.3.0.25307+2146 |
Add Parameter Search and Fix Color Reapplication in Color Splash (#2891, #2902)
Description
This pull request introduces two key improvements to the Color Splash tool:
These enhancements improve workflow efficiency and resolve usability issues reported in #2891 and #2902.
Checklist
Before submitting this pull request, ensure the following requirements are met:
Code follows the [PEP 8](https://peps.python.org/pep-0008/) style guide.
Code has been formatted with [Black](https://github.com/psf/black) using the command:
pipenv run black {source_file_or_directory}Changes are tested and verified to work as expected.
Related Issues
Additional Notes
Thank you for contributing to pyRevit! 🎉