lisux Posted July 23, 2004 Share Posted July 23, 2004 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 Quote Link to comment Share on other sites More sharing options...
edward Posted July 24, 2004 Share Posted July 24, 2004 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) Quote Link to comment Share on other sites More sharing options...
AdamJ Posted July 24, 2004 Share Posted July 24, 2004 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'! Quote Link to comment Share on other sites More sharing options...
edward Posted July 25, 2004 Share Posted July 25, 2004 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. Quote Link to comment Share on other sites More sharing options...
lisux Posted July 27, 2004 Author Share Posted July 27, 2004 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 Quote Link to comment Share on other sites More sharing options...
edward Posted July 28, 2004 Share Posted July 28, 2004 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. Quote Link to comment Share on other sites More sharing options...
AdamJ Posted July 28, 2004 Share Posted July 28, 2004 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. Quote Link to comment Share on other sites More sharing options...
lisux Posted July 29, 2004 Author Share Posted July 29, 2004 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. Quote Link to comment Share on other sites More sharing options...
AdamJ Posted July 29, 2004 Share Posted July 29, 2004 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.