Jump to content
Sign in to follow this  
lisux

Creating GUI's for houdini scripts and operators

Recommended Posts

I've posted this topic in the HDK list, but i posted it here too bedcause i think it can be useful in this forum too:

Hi all, i'm making some tests with the HDK and scripting, i now how to make scripts and i'm studying how to make new operators, in particular a new Alfred ROP, now my main problem is how to make a GUI for this new operator (and for my scripts), what tools i have to do this, i've seen that hscript doesn't support GUI creation like Maya's MEL.

The custom panel editor only allows to save the panel for the actual scene ($HIP), how can a save my panel for future uses in otrher scenes?

Thanks

Anothe thing: how can i make shortcuts for my scripts and commands in houdini, like Maya's shelf.

Thanks again

Share this post


Link to post
Share on other sites

GUI for operators:

- From HDK: you already have PRM_Template lists for this

- From Houdini: Type Properties on custom opereator types

GUI for scripts:

- Tcl/Tk

- Java

- Operator Scripts (see control rmb menu in network editor)

- Custom Panels (turn off "Save to Hip" when editing panel)

Share this post


Link to post
Share on other sites

on a related note.. what's the proper way of saving out and importing custom panels? I've tried `cuexport` and `cusaveopt` but had no luck.

edward: cool... never noticed the 'operator scripts'!

Share this post


Link to post
Share on other sites

Operator scripts are rather old. I'm sure few people still use it if any at all.

As soon as you turn off "Save to Hip" and hit ok, I think it saves out automatically to $HOME/houdini7.0/custom. As for saving out and importing, I think cuimport and cuexport should be all you need. If you're on Windows, you might need to use something like c:/temp instead of /tmp.

Share this post


Link to post
Share on other sites

Thanks edward.

I'll study the PRM_Template.

For the custom operator you advise to type properties and make a new otl with his UI and the new operator.

For scripts i think that tcl/tk is the more flexible option.

Have you tested java programs in houdini ???

For the operator scripts, how can i modigy the gui??? i can open the operator script dialog, but what about to change it?

Some help about custom panel creation, it looks great for make GUI's but there isn't any doc :(

Share this post


Link to post
Share on other sites

Personally, I've never done my own java gui's in Houdini but I've seen at least a couple.

The operator script GUI language I think is the same as the DialogScript section as otl's.

I remember some docs on custom panel's in the old H4 docs. I'm sure they're still around.

Share this post


Link to post
Share on other sites

lisux: for opertator scripts there are two places to look at..

- the DS (dialog script) file is in '$HOME/houdini/config/scripts'. It's just a text file that you can edit and add your own stuff. Operator scripts at OBJ level are in 'OBJmacro.ds'.

- the CMD files ie. scripts that are used with those dialogs.. that's in '$HOME/houdini/scripts/macro'. Again they are regular text files. When you create your DS file you just point to the script that will be executed.

Have a look at the various DS/cmd files.. they are pretty much selfexplanatory. Also check out the docs under Dialog Scripts for more info on their creation.

Share this post


Link to post
Share on other sites

Thanks for the help

Finally i'll try to make a hscript script to make an alfred's script.

The dialogue scripts are documented :)

Another doubt. I need to write an alfred's script so i need to output text to a file, in MEL i can use open, fprint, etc ... to open a new file, fprint to print text in the new file, i haven't seen anything for this pourpose in hscript.

Are there any commmands in hscript to open, read, write and close files?

An option is to use yhe unix command and there do all the file job usin the echo unix shell command, but i prefer to do this job from hscript.

Share this post


Link to post
Share on other sites

I usually keep 'strcat'ing into a variable all the stuff I need and then just dump it to a file

echo $foo > c:/data/output.dat

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×