Set external script editor not working

   12458   15   6
User Avatar
Member
211 posts
Joined: Dec. 2009
Offline
H 17.5.391 (but doesn't work for me in earlier builds as well)


Hi,

this seems to be a function related to the game dev toolset? Not sure.

Can anybody help me with this (plz see description below)?

Cheers,
Marc



Description:

When I use ‘Preferences/Set External Editor’ to point to a editor like notepad++ or sublime, I get the message that the editor is successfully set.

1. But, when I hit the ‘External Editor’-button in a opened expression window, Houdini will still open notepad.exe.

2. And when I want to open the external editor directly from the parameter field via right-click -> ‘Expression/Edit in External Editor’, the following message appears:

'float' object has no attribute ‘encode’
Traceback (most recent call last):
File “<stdin>”, line 5, in <module>
File “C:/Users/defsh/AppData/Roaming/SideFX/GameDevToolset/17.5/1.196/scripts/python\houdini_external_editor.py”, line 253, in add_watcher
data = str(parm.eval().encode(“utf-8”))
AttributeError: ‘float’ object has no attribute ‘encode’
Edited by bollili - Nov. 18, 2019 08:42:54
User Avatar
Member
211 posts
Joined: Dec. 2009
Offline
I did just update the game dev tools to build 220. Same problem persists.
User Avatar
Member
211 posts
Joined: Dec. 2009
Offline
Forgot to mention… I'm on Windows 10.
User Avatar
Member
104 posts
Joined: July 2019
Offline
As always it's required to edit houdini.env to connect something external to Houdini and make it work. See the video:
User Avatar
Member
211 posts
Joined: Dec. 2009
Offline
Hey Faitel,

thanks to you, I got it working.

So this function (see screenshot) seems to be just broken.

Attachments:
setExternal.JPG (87.6 KB)

User Avatar
Member
6 posts
Joined: Aug. 2019
Offline
Bumping this old thread. How did you resolve this in the end bollili? I have been able to set the VISUAL environment variable but it seems that there is still something broken relating to this in SideFX labs.

Edited by jlrvfx - May 24, 2020 13:09:51

Attachments:
hindie_Rl9TkPBTpx.png (19.0 KB)

User Avatar
Member
6 posts
Joined: Aug. 2019
Offline
I found I was able to resolve this by removing SideFX Labs, quitting Houdini, updating the .env, then a fresh install of SideFX Labs R416, then resetting the preference again through Edit > Preferences > Set External Text Editor.
User Avatar
Member
2 posts
Joined: Oct. 2018
Offline
Hey there,
almost two years later, I encounter a problem with the external script editor.

I managed to pass in the external script editor exe like molder mentioned and alt+e opens the external editor like expected. but the pipe from the temp file to the expression field seems broken, since saving the file will not update the code in the node. right-clicking edit in external editor works fine though.

any idea, why this might be?
User Avatar
Member
151 posts
Joined: Feb. 2009
Offline
The solution is to add -w as a launch argument to the end of the environment variable value. This waits for the process to close which houdini requires according to support, and keeps the item loaded in a single thread.

EDITOR = "C:/Users/XXXX/AppData/Local/Programs/Microsoft VS Code/Code.exe -w"
Edited by Andrew Graham - May 27, 2022 20:45:08
https://openfirehawk.com/ [openfirehawk.com]
Support Open Firehawk - An open source cloud rendering project for Houdini on Patreon.
This project's goal is to provide an open source framework for cloud computing for heavy FX based workflows and allows end users to pay the lowest possible price for cloud resources.
User Avatar
Member
55 posts
Joined: March 2016
Offline
if you install the sidefx labs it would be solved
Gerardo Castellanos
www.gerardocastellanos.com
User Avatar
Member
112 posts
Joined: July 2005
Offline
molder
EDITOR = “C:/Users/XXXX/AppData/Local/Programs/Microsoft VS Code/Code.exe”
Thank you!
Set external editor crashes Houdini after file browser pops up briefly. Just setting it in the houdini.env file worked, thank you.
User Avatar
Member
899 posts
Joined: Feb. 2016
Offline
I managed to use VSCode as external editor for python scripting but I'm experiencing few issues:

  1. The hotkey ALT+E does not work because it launches the internal Houdini editor. To properly launch VSCode, I must right-click (RMB) on the Python Code parameter, select 'Expression', and then click on "Edit in External Editor."
  2. When editing a Python SOP, I must include "import hou" in the code to enable autocompletion in VSCode, which is redundant for a Python Sop.
  3. Additionally, autocompletion is not instantly available; there is a significant delay of at least 15 seconds before it becomes accessible in VSCode.



Regarding 2, I tried to add the following line in the settings.json of VSCode, but it didn't work:
    "python.autoComplete.extraPaths": [
        "C:\\Program Files\\Side Effects Software\\Houdini 19.5.569\\houdini\\python3.9libs"
    ]
User Avatar
Member
209 posts
Joined: Jan. 2016
Offline
I managed to make the hotkey launch an external editor. I have to:
- hover the mouse over the title of the parameter (as in the attached picture)
- also, the text cursor can't be active in that parameter

Did anyone manage to launch an external editor, while the cursor is active in the parameter?

Attachments:
Screenshot 2024-04-08 090844.png (27.1 KB)

User Avatar
Member
102 posts
Joined: April 2017
Offline
I am having the same issue even in H20.5, everytime you open the external editor you need to close the file in VSCode to prevent Houdini from crash!
User Avatar
Member
151 posts
Joined: Feb. 2009
Offline
jomaro
I am having the same issue even in H20.5, everytime you open the external editor you need to close the file in VSCode to prevent Houdini from crash!

did you use -w like I suggested?
https://openfirehawk.com/ [openfirehawk.com]
Support Open Firehawk - An open source cloud rendering project for Houdini on Patreon.
This project's goal is to provide an open source framework for cloud computing for heavy FX based workflows and allows end users to pay the lowest possible price for cloud resources.
User Avatar
Member
102 posts
Joined: April 2017
Offline
Andrew Graham
jomaro
I am having the same issue even in H20.5, everytime you open the external editor you need to close the file in VSCode to prevent Houdini from crash!

did you use -w like I suggested?

Yes I did, it looks like it's the normal behavior, you need to close the file in VSCode so Houdini can pick it up!
  • Quick Links