How to edit Python scripts in an external editor?

   272   3   0
User Avatar
Member
154 posts
Joined: Aug. 2019
Offline
I'm talking about the Python scripts in an HDA:



When I press "Edit text in an external editor", it opens my editor of choice (VScode in my case):



But it's a *temp* file. When I make changes there and save it, the script in Houdini doesn't change at all!



It's definitely not how I expected "edit in an external editor" works. I googled and found this: http://cgtoolbox.com/houdini-expression-editor [cgtoolbox.com]

However, it only works for parameter expressions, not for scripts in HDAs.

Attachments:
Screenshot 2022-01-15 112221.png (83.9 KB)
Screenshot 2022-01-15 112255.png (71.4 KB)

User Avatar
Member
5014 posts
Joined: Sept. 2011
Offline
If its an HDA, just save it as an expanded HDA, and edit the files directly. To see the changes in Houdini, use the Refresh Asset Libraries command in the Asset menu. Works better than reloading external python modules.

Using an external editor from within Houdini might as well not be an option at all. I could never get it to work reliably except with something simple like gedit on linux.
User Avatar
Member
154 posts
Joined: Aug. 2019
Offline
I found this:



It actually works for HDA's Python module script. But it's a weird "special case" and only works for that.

Attachments:
Screenshot 2022-01-16 112322.png (39.6 KB)

User Avatar
Member
5014 posts
Joined: Sept. 2011
Offline
raincole
It actually works for HDA's Python module script. But it's a weird "special case" and only works for that.

That's some LABs baloney, not part of the Houdini base software.

raincole
When I press "Edit text in an external editor", it opens my editor of choice (VScode in my case):

This actually does work for me; it opens notepad and blocks Houdini until it's closed. If a software doesn't block when opened, then Houdini won't know when the file is finished being edited.
  • Quick Links