I am proud to present the latest tool I made for Houdini. This time an editor for VEX code! It is a good alternative to builtin editor in Houdini. During development user feedback and requests have been a decisive factor. And yes you can now change font size! This is only one small feature. Following text will present a full list of features and abilities it will give you. I am open for new ideas and suggestions for expanding it further. Feedback, suggestions ideas and feature requests can be sent to my email: [email protected].
- edit VEX code and parameters of any node
- edit code sections of VEX operator
- edit *.h or *.vfl files
- connect editor with source, quick saving of code by Ctrl+Enter
- auto creation of parameters, used in code when saving
- removal of unused and renamed parameters
- auto change type parameter when saving
- VEX syntax highlighting
- quick change of font size (Ctrl + Mouse Scroll)
- color themes mimicking Houdini themes as well as custom, editor specific themes
- quick access to help cards by pressing Shift+F1
- autocompletion for VEX functions, data types, keywords. List of functions generated automatically for current build of Houdini
- auto complete functions and variables of the current code, as well as of the connected through #include files
- auto complete context
- nodes existing parameters for the function ch, chv, chi, etc.
- standard attributes, switched on after the @
- the existing attributes of the current geometry SOP Content (node Wrangle)
- *Global variables are switched on after the symbol $
- input and output parameters of inline node, switched on after the $ symbol in the node inline
- directives and their parameters are switched on after the # symbol
- included files from path HOUDINI_VEX_PATH, switched on after entering the "#include" and the opening quotation marks, " ' or <
- templates as well as templates for quick insertion of the Tab key after the keyword
- regular backup in case of the crash of Houdini
- preservation of open tabs in a hip file and automatic recovery when reopening
- display an error message in the editor’s interface
- auto indentation and indentation control with Tab and Shift + Tab
NOT recommended that you use global variables in the VEX code.
It's possible to read and write global variables directly (for example, P and Cd in the SOP context). However, we strongly recommend you do not use global variables directly. Houdini does not guarantee the order in which VOPs generate their code, so assigning values to globals can give unpredictable results. Instead, you should explicitly wire from the globals node into this node. Unlike the Point SOP, this does not use local variables. Further, all backtick expressions and $ F variables will be evaluated at frame 1, not the current time. Use Frame, Time, or TimeInc instead.
You can show or hide tool bar
Drag and drop node parameter on VEX Editor UI to create new tab connected to this parameter
Added "Save as..." action in Tabs menu
Added "Open settings folder" action in Editor menu
Renamed settings folder
Skipping creation of parameters if path is external
Number bar now have static width
Some fixes for linux systems
Added help window to show quick help for function in cursor focus (Menu -> Editor -> Help Window)
Now context help (Shift + F1) worked if cursor not only above function name but also inside arguments
Added "Find and Replace" window. Use Ctrl+F to open
Fixed disappearing autocomplite widget in Houdini 15
"Select node" button now open parent network in active network tab
Now help browser open help in same window in Houdini 15
Support Houdini 16
Creates tab for the selected node
Creates from File tab
Creates an empty tab
Saving code from current tab to the connected parameter or file
Reload the source code from the bound parameter or a file in the current editor
Loading saved tabs in the current hip file. For example, if you open another file without restarting VEX Editor
Removal of saved tabs in the current hip file
AutoSave
Selecting a color theme of editor UI
The settings dialog
Editor templates
Next comes a list of available templates
Open this page
VEX documentation page on the official website
Context-sensitive help function on which the cursor is located. Just invoked by pressing Shift + F1
Checking for new version of VEX Editor
About dialog
The font size for new tabs
Selecting a font family
Automatically create the parameters used in your code when saving (only Wrangle)
Creating parameters at the top of the interface node (for Wrangle)
Save open tabs in hip file
Create autosave. By default, all of the tabs are saved every 3 minutes. Configured in settings.json
Display non-printing characters in the editor
Use online documentation for quick reference instead of a local
Use external browser for quick reference instead of the standard browser Houdini
Creates a new template
Deletes the selected template
The keyword for the selected template. The template will be inserted at the current cursor position after the keyword by pressing the Tab key
Button to insert a marker indicating the position of the cursor after inserting the template. By default, the cursor moves to end.
Saves all the changes and create files for new templates
Exits without saving
Opens the folder with the template
- Ctrl + Enter - save the current code
- Shift + F1 - open help about the function, which is currently under the cursor
- Tab - to add a space from the current position or to highlight the code
- Tab - after the keyword template is added to the current cursor position
- Shift + Tab - to remove the indentation of the current line or selected lines
- Alt + Q - comment out or uncomment the current line or selected lines
- Ctrl + D - duplication of the line or a selected code
- Ctrl + Z - Cancel
- Ctrl + Y - Redo
- Ctrl + C - Copy
- Ctrl + X - Cut
- Ctrl + V - Paste
- Ctrl + Mouse Scroll - change the font size of the current tab
- Alt + Mouse Scroll - Editor to scroll left \ right
- Arrow Up / Arrow Down - move the focus on completer, select a row
- Enter - to use the current line completer. By default, the first
- Esc - close completer if it is not in focus
- Any other key - to go back to the editor and continue typing
First, download and unzip the package pw_VEX_Editor his path PATH, PYTHONPATH or standard directory Houdini for Python scripts. For example $ HFS / Houdini / scripts / python. Next, you need only to load the script as PythonPanel. Also, you definitely need a module hqt. Download last version!
If you are using version 13, you have no way to open the editor as a PythonPanel. Then you can try to use module hqt. I myself am at this version of Houdini did not tested. Read the documentation of hqt, try to run.
Since this is a common VEX Editor PythonPanel you can adjust its opening alone. Either use a ready file python_panels / vexeditor.pypanel. In addition, the 14th version of Houdini you can use the module hqt to quickly create and open PythonPanel. About how to do this, see the documentation for the module hqt.
In Houdini version 15 implemented an excellent opportunity to add specific PythonPanel as a new Houdini panel. Therefore, you can simply add the supplied script python_panels / vexeditor.pypanel to python_panels folder in your HOUDINI_PATH and include VEX Editor to the list of panels. Hqt module is still required.
Installation is no different. Tests were conducted on Ubuntu, Kubuntu, and Debian.
To start writing code in the VEX Editor is enough to make three simple steps:
- VEX Editor Open in new tab (see the installation instructions)
- Select node wrangle, inline, snippet or VEX operator
- Press btn1 to quickly create tabs. The required parameter will be found automatically.
Everything is ready to edit code! Save the result at any time using a hotkey Ctrl + Enter or the button on the panel.
The main problems associated with the implementation of Qt on a particular system. In view of such problems on MacOS, some interface elements do not display correctly. Their defeat is not yet possible. Therefore, for the performance of the script on the Mac I can not vouch. In the future, I will try to fix it.
Houdini 15 at this time was released recently and has a number of problems both with conventional tools and with the implementation of Qt. This is in particular caused the error in the module and replacement hqt widget auto complete list of the standard. All this will be corrected as the stabilization of Houdini.
Another problem is the custom VEX operators. To create a parameter on the custom operator you need to specify the arguments of main function. For example like this:
sop myoperator (int value) {
...
}
Once you add the new arguments and click Apply in the Type Properties, Houdini recreates parameters of your operator. Unfortunately, the same does not occur if you replace the operator code programmatically, and in the current implementation of HOM or HScript I have not found a way to do this programmatically. I am hoping to solve this issue soon. Temporary solution to the problem - open the Type Properties window and click Accept.
I really hope that this tool is useful to you in your work. Ideas for new chips and error messages as usual to send [email protected].