File system object in hscript

   3636   4   1
User Avatar
Member
158 posts
Joined: July 2005
Offline
How can I create a file system object in hscript and write lines in it? I lookd into the dokuments but couldn't find something.
User Avatar
Member
4262 posts
Joined: July 2005
Offline
There isn't any file open hscript command. You can save stuff from hscript by using >> and > to direct stuff to a file on disk.

If you want to just read in some simple data you can always use

set myData = `system(“cat /tmp/myFile.data”)`

That will run cat on the file and stash the results in a variable myData. Its not super robust, but its useful if you need to read something simple in.
if(coffees<2,round(float),float)
User Avatar
Member
4262 posts
Joined: July 2005
Offline
If you need to tons of file parsing and what-not, its best to use perl, python, java or ruby to do it, to interact with Houdini there is an openport command which opens up a way to communicate with Houdini from a remote application/script.

help openport in the textport to get more info.
if(coffees<2,round(float),float)
User Avatar
Member
158 posts
Joined: July 2005
Offline
I want to export a rig hierarchy with animation from Houdini to XSI. I will try the openport with python. Thanks so far.
Edited by - Oct. 24, 2005 09:53:23
User Avatar
Member
7734 posts
Joined: July 2005
Offline
I think a rig hierarchy can be done with just hscript (and some parsing in hscript). Just use echo statements piped to your file. For animation, remember about http://www.odforce.net/wiki/index.php/KeysToHoudini [odforce.net]
  • Quick Links