Jump to content

Creating GUI's for houdini scripts and operators


lisux

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

Link to comment
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)

Link to comment
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.

Link to comment
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 :(

Link to comment
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.

Link to comment
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.

Link to comment
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.

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