Search - User list
Full Version: User guide tcl example
Root » Technical Discussion » User guide tcl example
todd dufour
I have been working my way through the scripting section of the user guide. I am learning alot andhave become completely fascinated by the possiblities..

I transcribed the tcl example code into a text document and when I source it in the tcl console the canvas draws but nothing else does.

I created a cop network in houdini and selected it before I ran the tcl command for the hscript prompt. I tried double clicking on the cop network after the tcl console appeared no luck..

How does the cop network information get passed to the tcl script?
stevenong
Hi Todd,

The following links should help:

http://www.sidefx.com/forum/viewtopic.php?t=227 [sidefx.com]

http://odforce.net/forum/index.php?act=ST&f=15&t=456&s=70bb5e5646c097dc26f8069a11dea9d1 [odforce.net]

Good luck & have fun!

Cheers!
steven
edward
Perhaps the problem is that the example in the User Guide hasn't been updated to use the new COPs v2. It looks like it is using old cops. To fix the script to use the new COPs v2, you first need to replace /comp with /img. After that, change the get_start_range and get_end_range procedures to this:
proc get_start_range { copname } {
hscript set tmp=$copname
set start
return $start
}
proc get_end_range { copname } {
hscript set tmp=$copname
set end
return $end
}


The cop information is derived from the hscript command (as in the above calls to the hscript command).
todd dufour
I think that might be it… At some point yesterday I figured out that I needed to change the /comp to /img but I was still having trouble with the variable being read in the get_start_range procedures… I am at work now and do not have any access to houdini, but when I get home tonight I will try your changes…. I am rather sure that will work… Thanks. I was getting quite frustrated…
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB