Update Multi Script Editor to work with Python 3, Pyside6 and newer Maya, Nuke and Houdini versions#11
Open
charliewales wants to merge 395 commits into
Open
Update Multi Script Editor to work with Python 3, Pyside6 and newer Maya, Nuke and Houdini versions#11charliewales wants to merge 395 commits into
charliewales wants to merge 395 commits into
Conversation
paulwinex
approved these changes
May 26, 2026
…ettings - Fixed a bug in `always_ontop` toggling where XOR (`^`) was used instead of AND NOT (`& ~`), causing the window to be forced to "always on top" incorrectly when trying to disable it. - Changed default settings in `loadSettings`: `fuzzy_autocomplete` and `show_docstrings` are now enabled by default (`True`). - Ensured `always_ontop` properly clears the Qt window flag when disabled during application boot.
- Fixed a bug in `core/base_text_widget.py` where `render_whitespace` overwrote the entire `QTextOption`, unintentionally overriding the default `wrapMode` and causing text to break into single words. - Removed rapid-toggling hack (`wordWrap(not wrap)` -> `wordWrap(wrap)`) from `scriptEditor.py` which was confusing the Qt layout engine before window rendering. - Ensured falsey settings (like `wrap = False`) are now correctly applied during `loadSettings` by explicitly checking for `None`.
- Added a missing call to `updateRecentFilesMenu()` at the end of `loadSettings` in `scriptEditor.py`. - Ensures the "Recent Files" submenu is correctly populated with the saved history when the application launches, rather than waiting for a new file to be opened.
- Created `multi_script_editor/docs/` directory. - Moved `documentation.html` from the project root into the new `docs` directory. - Updated `openDocumentation` method in `scriptEditor.py` to point to the new location.
…ides - Deleted `qss13()` and all manual CSS theme-parsing logic (`colorReader`, `.hcs` variables) used for older Houdini versions. - Renamed the legacy `get_h14_style` function to `get_hou_style` across the codebase (`hqt.py`, `_houdini.py` y `.pypanel`). - `get_hou_style` now exclusively relies on `hou.ui.qtStyleSheet()`, ensuring robust, 100% native theme inheritance from Houdini 15/18+.
- Renamed the legacy `get_h14_style` function to `get_hou_style` across `hqt.py` and the `managers` files to better reflect its modernized, version-agnostic role of returning native Houdini stylesheets.
- Modified `EditorTabContainer` in `tabWidget.py` to optionally store a `file_path`. - Updated `addNewTab` to accept and pass through `file_path`. - Refactored `loadScript` and `openRecentFile` in `scriptEditor.py` to associate the opened file's path with the newly created tab. - Enhanced `saveScript` to perform an instant direct-to-disk save if the current tab has an associated `file_path`, bypassing the file dialog. It also automatically updates the tab's path and title when performing a "Save As" on a fresh tab.
- Added explicit `autocomplete_timer.stop()` inside `commentSelected` to cancel the scheduled autocompletion triggered by the programmatic `textChanged` signal. - Wrapped the comment text insertion in an Undo/Redo edit block (`beginEditBlock`/`endEditBlock`) to ensure clean history states as per project rules.
- Added a safety check (`hasattr(self.p, '_presenter')`) in `inputWidget.py` before delegating autocomplete and linting requests. - This prevents `AttributeError: 'themeEditorClass' object has no attribute '_presenter'` when typing inside the theme editor preview window, as it lacks a presenter.
- Removed hardcoded logic that always forced focus on the first tab (`widget(0)`). - Implemented a delayed focus via `QTimer.singleShot` targeting the dynamically resolved `currentIndex()`. - This ensures that PySide2/PySide6 correctly registers the focus event after the UI is fully mapped to the screen, restoring the blinking cursor in the active editor tab.
BREAKING CHANGE: Python 2 is no longer supported. All code has been updated to be Python 3 exclusively.
fix(ui): resolve exec_ deprecation warning in theme editor launch
- Add predefined themes (Dracula, Nord, Monokai Pro, Ayu Mirage, Sonokai, GitHub Dark) - Fix PySide6 theme CSS parsing issue with textsize - Ensure theme applies globally on editor load - Alphabetize predefined themes and visually separate custom themes - Rename default theme to 'Multi Script Editor' with auto-migration
- Fix QListView subcontrol syntax for Qt6 in completer.qss - Format RGB color variables to hexadecimal in design.py - Fix outputWidget not applying initial theme on startup - Add optional argument to QAction lambda to support both PySide2 and PySide6 signals
- Fixed regex replacement logic in design.py to not prepend 'rgb' to non-color variables like [textsize] when custom themes declare them.
- Prevent AttributeError by attaching the highlighter to the document only after all internal formats and regex attributes are initialized.
- Pass document to QSyntaxHighlighter.__init__ at the end of the constructor to satisfy PySide2 and PySide6 argument requirements without triggering AttributeError.
- Extracted textsize spinbox update logic from the color dict loop in themeEditor.py to ensure it updates even when a theme lacks the key.
- Wrap textsize spinbox setValue in blockSignals(True/False) to prevent premature triggering of updateExample before colors list widget is populated.
- Added Monokai theme - Added Solirized Dark theme - Added Kimbie Dark theme - Added Multi Script Editor Light theme with cream-toned backgrounds
- Add cross-compatibility fallbacks for font aliases (Nerd Font, NF, NFM, NFP) - Extend CSS font injection to support Maya (PySide6) as well as Houdini - Fix PySide2 TypeError with unbound QFontDatabase.families() - Resolve Qt6 exec_() deprecation warnings via dynamic hasattr execution
- Fixed context detection issue by setting context before importing submodules in managers/__init__.py. - Updated SettingsModel to access managers.context dynamically instead of copying it statically. - Removed unused main_parent variable and its commented references across the codebase.
When the user manually chooses a new theme font or resets it to the default, the font size controls (completer, menu, outline, output, status bar, tab labels, and symbols) were not updating to reflect the default proportions relative to the new font size. This change introduces a helper method to recalculate and reset these values whenever the font is updated.
Replaced specific open*SizeMenu and reset*SizeToDefault methods with generic ones in themeEditor.py. Updated signal connections to use lambda functions to pass sender references and dynamically calculate size ratios.
Added max(1, value) constraints to font size calculations in getCurrentColors, _getBaseFontPointSize, and updateExample to prevent QFont::setPointSizeF from receiving zero or negative values.
…o avoid black text flicker
…I colors - Removed self.parent().applyTheme(name) to stop the imported theme from applying to the main window automatically. - Added self.updateColors() after self.fillUI(name) so the Code Theme Editor UI properly updates to reflect the imported theme's colors. - Retained self.parent().fillThemeMenu() to ensure the new theme is added to the main menu.
…figs - Document manual/auto trim trailing whitespace actions - Document output layout at the bottom option - Document line number bar and status bar text colors and line numbers size in theme editor - Reorganize Edit Menu items list to match the reorganized menu structure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a lot of new functionalities