Jump to content

Can I have both 123.cmd and 123.py?


magneto

Recommended Posts

I normally use 123.py but now I also need to use exread, which didn't work in 123.py (unknown command), is there a way to have both?

When I call exread in textport, it successfully reads in my expression functions, but inside the 123.cmd, nothing happens. I put it in the same scripts folder as 123.py.

Thanks :)

Link to comment
Share on other sites

It depends on what Houdini finds first in the Houdini path. If it finds both 123.py and 123.cmd in the same directory, it will run the Python version and not the hscript version. If it finds a hscript version first, that gets run. Once it finds and executes one it will not execute others.

If you want both versions to be run, you can do it by manually calling the file. For example, sticking in hou.hscript("source 123.cmd") in your 123.py file will cause the script to try and run your 123.cmd script, if it exists and can be found in the path.

You should also be able to use exread from within a hou.hscript() call as well.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...