User guide tcl example

   6070   3   1
User Avatar
Member
48 posts
Joined: July 2005
Offline
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?
Todd Dufour
——————————–
Life is as long as it is short.
——————————–
User Avatar
Member
1631 posts
Joined: July 2005
Offline
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
User Avatar
Member
7714 posts
Joined: July 2005
Offline
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).
User Avatar
Member
48 posts
Joined: July 2005
Offline
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…
Todd Dufour
——————————–
Life is as long as it is short.
——————————–
  • Quick Links