How to change Textport's current node?

   1080   9   0
User Avatar
Member
215 posts
Joined: 6月 2023
Offline
When I open Textport, the prompt says "Director":



However when I open Textport from other people's hip files, the prompt says the current node:



Why is it and how could I change the current node of Textport? Is there a command similar to Unix's cd?

Attachments:
Screenshot 2024-01-22 161916.png (35.3 KB)
Screenshot 2024-01-22 161928.png (69.0 KB)

User Avatar
Member
696 posts
Joined: 3月 2009
Offline
Texport is like a command prompt and you can navigate through a Houdini scene as if you were in an OS's file system. opcd (or opcf) to change directory (node); opls to list the contents of the current directory, so on so forth.

https://www.sidefx.com/docs/houdini/commands/index.html [www.sidefx.com]

Cheers
Toronto - ON
My Houdini playground [renderfarm.tumblr.com]
“As technology advances, the rendering time remains constant.”
User Avatar
Member
209 posts
Joined: 1月 2013
Offline
You don't need special commands to do this. Many transition commands already have aliasing.

Attachments:
Screenshot_2024-01-22_16-49-01.jpg (36.6 KB)

User Avatar
Member
215 posts
Joined: 6月 2023
Offline
I don't think the alias is default.



But yeah it might be wise to add these.
Edited by kodra - 2024年1月22日 12:10:20

Attachments:
Screenshot 2024-01-23 010854.png (3.9 KB)

User Avatar
Member
8647 posts
Joined: 7月 2007
Offline
those aliases are the default ones, but you can check whether you see them set in your session

however I've never seen Textport open saying Director ->
this is the Textport in my vanilla install
Edited by tamte - 2024年1月22日 13:50:02

Attachments:
textport_cd.gif (3.9 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
7863 posts
Joined: 9月 2011
Offline
kodra
I don't think the alias is default.

Image Not Found


But yeah it might be wise to add these.

Houdini might be launched incorrectly. There might be conflicts in the path, or the houdini environment isn't being initialized.
User Avatar
Member
215 posts
Joined: 6月 2023
Offline
tamte
those aliases are the default ones, but you can check whether you see them set in your session

however I've never seen Textport open saying Director ->
this is the Textport in my vanilla install
Image Not Found

The weird thing is that when I open other people's hip it works as you showed. But my own hip, even an empty one, always causes the textport to say "Director ->".

Attachments:
empty.hiplc (38.7 KB)

User Avatar
Member
215 posts
Joined: 6月 2023
Offline
Ok, I found the reason. It's extremely weird tho.

I have this empty 123.py in my scriptsfolder:

import hou

Remove it fixes this issue. I'm not kidding, this empty 123.py even breaks the built-in aliases.
Edited by kodra - 2024年1月22日 21:52:27
User Avatar
Member
7863 posts
Joined: 9月 2011
Offline
kodra
Ok, I found the reason. It's extremely weird tho.

I have this empty 123.py in my scriptsfolder:

import hou

Remove it fixes this issue. I'm not kidding, this empty 123.py even breaks the built-in aliases.

That's the init script for Houdini, so that checks out. If you have 123.py in your path it will take precedence over the built in one--so you can customize startup. Normally your script looks for the built in one and executes it first though. An empty script won't though.
User Avatar
Member
215 posts
Joined: 6月 2023
Offline
jsmack
That's the init script for Houdini, so that checks out. If you have 123.py in your path it will take precedence over the built in one--so you can customize startup. Normally your script looks for the built in one and executes it first though. An empty script won't though.

Ah, you're correct.

For the reference, the correct way to do this seems to be:


with open(hou.text.expandString("$HFS/houdini/scripts/123.cmd")) as f:
    hou.hscript(f.read())

In 123.py. This will run the built-in 123.cmd, which sets up the aliases and the textport's prompt.
  • Quick Links