Jump to content

hscript python


csp

Recommended Posts

 

While using python hscript command how can use have in this single argument script an if statement? I tried unsuccessfully:

more code; do_that if statement; more code

Although you can use Python's version of ternary operation such as

x,y,z = 10,10,0; z = x**y if z == 0 else x*y; print z

If you have more complicated python code, consider putting it in file, or just don't use hscript at all :)

Link to comment
Share on other sites

just don't use hscript at all :)

 

I wish that I could avoid hscript but when you want to hack Houdini's interface, like adding items to node's right click menu using OPmenu, you have to Hscript. :)

 

If you have more complicated python code, consider putting it in file

 

 

At least I can do that but I was trying to avoid have OPmenu script calling an hsc script which is calling a python script :mellow:  

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...