Stremik Posted December 3, 2002 Share Posted December 3, 2002 Does anyone know where I can find more info on Tcl/Tk scripting for Houdini besides that little chapter in Tutorial Guide? Quote Link to comment Share on other sites More sharing options...
danteA Posted December 3, 2002 Share Posted December 3, 2002 There's really not much to know. You can start a tcl/tk script from within Houdini using the tk textport command. From within tcl/tk itself, you can using the "hscript" command to run hscript commands. For how to write tcl/tlk, see http://www.tcl.tk/ dante Quote Link to comment Share on other sites More sharing options...
danteA Posted December 3, 2002 Share Posted December 3, 2002 Another good link is: http://resource.tcl.tk/resource/software/t...ols/guibuilder/ I've dabbled with Visual Tcl in the past but not with Houdini. Reading the specs, for Visual Tcl and tkBuilder, Houdini should work with them fine. That is probably the easiest way to create custom GUI's in Houdini. Ok, so if you're lazy, make sure you go to this page where it gives you all the tutorials: http://www.tcl.tk/scripting/ In particular, a good one page intro on tcl is here: http://www.tcl.tk/scripting/primer.html I'm really busy for the next two weeks. But if you want to bug me about it afterwards, I'd be happy to figure out and write a short tutorial on how to build custom graphical tk interfaces in Houdini using Visual Tcl or tkBuilder. dante Quote Link to comment Share on other sites More sharing options...
Stremik Posted December 3, 2002 Author Share Posted December 3, 2002 Thanks Dante! I just started learning Tcl/Tk and so far I'm doing fine (it appers to be preaty straightforward) but what more interests me is how to make Tcl scripts to interact with Houdini. I know this is done trough hscript but I want to find out the details. You know.Stuff like how to retreve data from Houdini and pass it back on etc. For example, how to set Variables inside Houdini from Tcl/Tk script or a frame range or visibility of objects and so on. Guess for this I need to know hscript as well, right? It'll be really great if you put togethr that little tutorial you mentioned. Anyway. If you don't, it's ok. I don't want you to feel obligated. Thanks again for your help. Quote Link to comment Share on other sites More sharing options...
danteA Posted December 3, 2002 Share Posted December 3, 2002 There's very little you need to know about Tcl/tk. The main thing is to know how to use hscript. Quote Link to comment Share on other sites More sharing options...
sirogi Posted December 3, 2002 Share Posted December 3, 2002 to learn hscript: -one afternoon (okay maybe two ) -a textport -type in "help" -get list of commands, and read the interesting-looking one's help! (the :ch: functions and the :op: functions....) now you know enough hscript to do a lot of damage. -grab a hot cup o' joe and pat yourself on the back! have fun! Quote Link to comment Share on other sites More sharing options...
Stremik Posted December 4, 2002 Author Share Posted December 4, 2002 The hardest part would be to pat myself on the back Quote Link to comment Share on other sites More sharing options...
TheUsualAlex Posted December 4, 2002 Share Posted December 4, 2002 Well.... if you are Courage, I am sure you can do it. Quote Link to comment Share on other sites More sharing options...
LEO-oo- Posted December 4, 2002 Share Posted December 4, 2002 A hint for tcl/tk stuff - have a look at Komodo by Active State. This editor/IDE is really great. In the new version is a GUI-builder for tcl/tk. Additional version control (CVS), debugging (for Perl, Python, PHP, TCL and XSLT) and a few more cool features. LEO Quote Link to comment Share on other sites More sharing options...
danteA Posted December 4, 2002 Share Posted December 4, 2002 I don't think it's really necessary to pay for something as advanced as Komodo for our purpose though. As for important hscript off the top of my head: - for - if - exhelp - opparm - set - $argc - $arg1, $arg2, ... $arg9 - shift dante Quote Link to comment Share on other sites More sharing options...
LEO-oo- Posted December 4, 2002 Share Posted December 4, 2002 @dante: You mean: Shell and Emacs rulez I know what you mean... LEO Quote Link to comment Share on other sites More sharing options...
sirogi Posted December 4, 2002 Share Posted December 4, 2002 As for important hscript off the top of my head:- for - if - exhelp - opparm - set - $argc ...oh oh oh and "foreach"! Quote Link to comment Share on other sites More sharing options...
Stremik Posted December 6, 2002 Author Share Posted December 6, 2002 Oooo! Oooo! Oooo! Look what I found! Command And Expression (Tcl/Tk case study) This is an online version that came with Houdini 4.0 I've reinstalled Apprentice but this time I installed HDK too (not that I need it) and voila! There it is! "Houdini Development Toolkit - Version 5.5" documantation. Quote Link to comment Share on other sites More sharing options...
danteA Posted December 15, 2002 Share Posted December 15, 2002 Ok, so here's a first draft of the Tcl/Tk tutorial that I promised. It turned out to be a lot more work to write than I thought. It's 3:45am now and I'm going to sleep. I've only managed to do 2 screen shots. Anyone wants to take a crack at it, correct the mistakes, and add some more meat or screen shots for it? I'll be busy tomorrow so maybe I'll work some more on it next week. Cheers, dante tcltk_tut1.zip Quote Link to comment Share on other sites More sharing options...
michael Posted December 16, 2002 Share Posted December 16, 2002 cool...thanks Dante, I've been wondering if Houdini has anything like Maya's 'echo all commands' in the script editor...with this feature on you can see exactly the code used to do each of your actions - it makes learning mel and writing scripts so much easier.... Quote Link to comment Share on other sites More sharing options...
miguel m Posted December 16, 2002 Share Posted December 16, 2002 Thank you Dante, went through it. Nice learning . Arctor, I'm not sure such feature makes sense in houdini. Since it's purely non linear, all you care is a "state" of your network, there's no particular order in which actions must take place. You can always echo to screen or file any piece or the whole scene. Also in houdini one massages data with exernal programming languages that afterwards call appropiate "hscript blah $blahblah". So some kind of "output code as you go" isn't much useful really? this is dangerous land for me... i better go back to my hole Quote Link to comment Share on other sites More sharing options...
danteA Posted December 16, 2002 Share Posted December 16, 2002 No prob, guys. Thanks, for the encouragement. Ok, here's some minor corrections and a bit more screenshots. tcltk_tut1.1.zip 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.