opscript , cmdread

   3360   2   1
User Avatar
Member
145 posts
Joined: 7月 2015
Offline
hello

I'm writing a node to testScene.cmd file using opscript.
the command is :

opscript -r /obj/grid > /tmp/testScene.cmd

each time It says: Unable to redirect output to….
but prints the nodes.
is something wrong with the code?!

- I want to use cmdread. but I don't know how to set filename.
would you please give me a hint?
is it equivalent to “Run script” in file menu bar?

thank you in advance.
User Avatar
Member
702 posts
Joined:
Offline
i think you need to use >> when creating a new file

> appends to an existing file


opscript -r /obj/grid >> /tmp/testScene.cmd

should create the file then write to it

then in the houdini textport :

cmdread /tmp/testScene.cmd

will run the script
User Avatar
Member
145 posts
Joined: 7月 2015
Offline
I tried it but still get the same error.

but I saved the contents as (testScene.cmd) and manually removed the header and It worked perfectly.

thank you
  • Quick Links