Jump to content
Cetras

Houdini Expression Editor plugin

Recommended Posts

Hey Guys
 
I wanted to share with you a small script I've done to have a better support or external editors to edit your expressions and code. It works with a system or file watcher, that means it doesn't freeze Houdini and you don't need to close your editor to see you updates :) It's available by a simple right-click on a parameter => expression => External Expression Editor ( you can set a hotkey ).
It works with VEX and Python expressions but also regular HScript expressions ( but with no completion ). It works very well with Visual Studio Code as it has a nice VEX and Python plugins, but it could work with sublime text, notepad ++ etc.
( I haven't tested all the IDE out there so if you find a bug with one of them, feel free to send an email to contact@cgtoolbox.com ).
 
A small video about it:
 
You can download it for free here:
 
PySide, PySide2 and PyQt are supported, it is compatible with Houdini 15 to 16.5.
  • Like 7

Share this post


Link to post
Share on other sites

Looks simple and bug-free. With some small additions, this system could work in both directions: file changed? Update parameter. Parameter changed? Update file. File changed when user still typed his parameter? Prompt user about merging. Maybe even cook nodes and output node errors to some companion files?

That should be implemented natively in Houdini and replace existing system, because it is so clearly better than blocking process. Houdini already use temporary files for external editing. Modern editors track files themselves very well.

Share this post


Link to post
Share on other sites

Hey,

Very good idea I think I'm gonna add the both directions feature, and I'll look into other stuff like node cook output. But yeah I agree this should be natively in Houdini :)

Share this post


Link to post
Share on other sites

This is really nice! Thanks. I wish i could tie this directly to "Edit Expression" though, instead of having to rely on the "External Expression Editor" command. Having a keyboard shortcut on the "External Expression Editor" is kind of limited (not your fault) as you have to either select or hoover over the "VEXpression" parameter label for the shortcut to work. Whereas the "Edit Expression" shortcut fires if you have the cursor in the snippet field. Would be even better if you could just select the node in the editor and fire of "External Expression Editor" from there. Again, not your fault :)

-b

Share this post


Link to post
Share on other sites

Great thanks a lot.

On 16/11/2017 at 8:54 AM, bonsak said:

This is really nice! Thanks. I wish i could tie this directly to "Edit Expression" though, instead of having to rely on the "External Expression Editor" command. Having a keyboard shortcut on the "External Expression Editor" is kind of limited (not your fault) as you have to either select or hoover over the "VEXpression" parameter label for the shortcut to work. Whereas the "Edit Expression" shortcut fires if you have the cursor in the snippet field. Would be even better if you could just select the node in the editor and fire of "External Expression Editor" from there. Again, not your fault :)

-b

This should be doable no ? I'll look into the code

  • Like 2

Share this post


Link to post
Share on other sites

I placed the files for this plugin inside a folder and from there I set the path within my houdini.env file for HOUDINI_PATH but when restarting Houdini I was unable to see Set External Expressions Editor from Edit > Preferences within Houdini ?

Share this post


Link to post
Share on other sites

Hello,

You have all the infos needed to install the plugin on the awesome varomix video :) ( minute 13:00 ):

 

 

Share this post


Link to post
Share on other sites

I watched that section :) 

At 17:17 varomix as a, what appears like an absolute path within his HOUDINI_PATH variable, even though I know he's using Linux. In my case I have an absolute path to the plugin for HOUDINI_PATH and I didn't forget at the end the semi-colon and ampersand characters. Although when restarting Houdini, I see no Set External Expressions Editor from Edit > Preferences within Houdini ?

Share this post


Link to post
Share on other sites

 

Hello my friend. Your plugin works perfectly with vex and python. Good job!

As default, in a pointWrangle Node,  ALT + E calls out an advanced editing window straightly when cursor is in the code area. 

 I have set a hotkey(such as ALE + R) for calling out my VS Code panel. It works but it's slightly different from the ALT + E combo. I need to right click my mouse in the code area => move mouse to the "Expression" => ALE + R. 

Could you please optimize the workflow?

Plus: My English is not good but I hope you could understand what I mean. : )

Share this post


Link to post
Share on other sites
On 4/9/2018 at 9:55 AM, CinnamonMetal said:

I watched that section :) 

At 17:17 varomix as a, what appears like an absolute path within his HOUDINI_PATH variable, even though I know he's using Linux. In my case I have an absolute path to the plugin for HOUDINI_PATH and I didn't forget at the end the semi-colon and ampersand characters. Although when restarting Houdini, I see no Set External Expressions Editor from Edit > Preferences within Houdini ?

I'm having the same issue. I have to actually install the plugin's files in my Houdini's home path. I'd like to keep that path clean and instead add a custom path to HOUDINI_PATH. I've done this, but it doesn't pick up the script.

Share this post


Link to post
Share on other sites

That's weird, here I have this on my houdini.env:

HOUDINI_PYTHON_TOOLS=/home/guillaume/Documents/__dev__/HoudiniPythonTools

HOUDINI_PATH=$HOUDINI_PYTHON_TOOLS/HelpCardMaker:
HOUDINI_PATH=$HOUDINI_PATH$HOUDINI_PYTHON_TOOLS/HoudiniEasyCompileBlock:
HOUDINI_PATH=$HOUDINI_PATH$HOUDINI_PYTHON_TOOLS/HoudiniExprEditor:
HOUDINI_PATH=$HOUDINI_PATH$HOUDINI_PYTHON_TOOLS/HouGitHub:
HOUDINI_PATH=$HOUDINI_PATH$HOUDINI_PYTHON_TOOLS/Houpy_PyTakes2:
HOUDINI_PATH=$HOUDINI_PATH:&:

And it works fine ... For the shortcut issue I haven't found a solution so far :(

( on ubuntu, but same thing on windows but with ';' instead of ';' )

Share this post


Link to post
Share on other sites

Could you tell me how to assign the menu line 'External Expression Editor' to a button defined by me in python (callback script) .

THX

Share this post


Link to post
Share on other sites

You can call it using:

from HoudiniExprEditor import ParmWatcher;ParmWatcher.add_watcher(your_parm_object_here)

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×