Hello,
I have a question about TCL and Renderman.
I have a TCL helper application that sends information to Renderman. In order to send the “end of stream” message to Renderman, the TCL has to do a
puts “\377”
The probloem is that this works on Windows but when I get into Linux, I get the following error:
P79011 Undefined binary token 0xc3. (at line 51 in /usr/bin/tclsh /helper.tcl): Context “split gprim”: Object “<unnamed>”
P79011 Undefined binary token 0xbf. (at line 51 in /usr/bin/tclsh /helper.tcl): Context “split gprim”: Object “<unnamed>”
I tried passing the number in two chunks and I got a similar error. I also tried passing it as {“\377”} which did not work either. I have searched through sites and cannot seem to figure out what to do. Any help would be greatly appreciated - it might be something small I'm not thinking about or something large about which I have no clue.
Thank you for the help
Found 12 posts.
Search results Show results as topic list.
Technical Discussion » TCL Cross-Platform Issues
- idojomo
- 12 posts
- Offline
Technical Discussion » HScript <-> TCL
- idojomo
- 12 posts
- Offline
source is a valid comman but it takes no arguments.
http://www.tcl.tk/man/tcl8.0/TclCmd/source.htm [tcl.tk]
In the Tk console, if i type in:
myfile.tcl $arg1 $arg2 $arg3, I still get the error.
but if go into tclsh and type the above it works, as long as I'm not calling hscript or outside programs.
At least I'm getting parameters passed on through hscript so that works for me.
Thanks
http://www.tcl.tk/man/tcl8.0/TclCmd/source.htm [tcl.tk]
In the Tk console, if i type in:
myfile.tcl $arg1 $arg2 $arg3, I still get the error.
but if go into tclsh and type the above it works, as long as I'm not calling hscript or outside programs.
At least I'm getting parameters passed on through hscript so that works for me.
Thanks
Technical Discussion » Dialog Scripts
- idojomo
- 12 posts
- Offline
I have a script written in HScript and TCL. Calling it in the Textport or just hscript is no problem. But I wanted to add a GUI interface so it would be easier for others to use the script. I have the ds created so that it calls the script with the appropriate arguments. I know this from testing it through dsparse. The question for me now is how to open up that dialog script in the Houdini interface
When I say a multi-select list. If there's no such thing, then I would like to create something like in the light-linking window. When light linking is being done in Houdini a window shows up that lets you choose * (all) or simultaneously highlight all the lights to be used.
Thank you
When I say a multi-select list. If there's no such thing, then I would like to create something like in the light-linking window. When light linking is being done in Houdini a window shows up that lets you choose * (all) or simultaneously highlight all the lights to be used.
Thank you
Technical Discussion » HScript <-> TCL
- idojomo
- 12 posts
- Offline
You're right. I just tried it again and it worked. I think it might have been my test files.
But when I try the other way in the tk console:
>>source myfile.tcl $arg1 $arg2 $arg3, I still get the error.
But when I try the other way in the tk console:
>>source myfile.tcl $arg1 $arg2 $arg3, I still get the error.
Technical Discussion » Dialog Scripts
- idojomo
- 12 posts
- Offline
Hi,
If I've written a dialog script and saved it as a .ds file, how do I use it in Houdini. I've tested it with dsparse and it does what I want, but as far as loading it up in the Houdini Master interface, I'm not sure what to so.
Do I have to create an OTL, and how will I do that. Or do I have to create special node?
The .ds file is basically supposed to call a .cmd file with some parameters.
Also, how do I create a multi-electable list. So if I have a list of all the lights, and I want to select 3 simultaneously, how can I do that in the dialog script?
Thank you.
If I've written a dialog script and saved it as a .ds file, how do I use it in Houdini. I've tested it with dsparse and it does what I want, but as far as loading it up in the Houdini Master interface, I'm not sure what to so.
Do I have to create an OTL, and how will I do that. Or do I have to create special node?
The .ds file is basically supposed to call a .cmd file with some parameters.
Also, how do I create a multi-electable list. So if I have a list of all the lights, and I want to select 3 simultaneously, how can I do that in the dialog script?
Thank you.
Technical Discussion » TCL within and without Houdini
- idojomo
- 12 posts
- Offline
I worked around it by using
string last string1 string2 instead. Then I run that on tha substring up until the returned index. So I parse from right to left instead of left to right.
string last string1 string2 instead. Then I run that on tha substring up until the returned index. So I parse from right to left instead of left to right.
Technical Discussion » HScript <-> TCL
- idojomo
- 12 posts
- Offline
Oh, sorry about that.
If in the textport I do
>> source myfile.cmd $arg1 $arg2 $arg
and within myfile.cmd there is a line saying
>>tcl myfile.tcl $arg1 $arg2 $arg3
The arguments do not go through to the tcl. I get an error saying the syntax should be tcl myfile.tcl.
Now if I do
>>tclsh myfile.tcl $arg1 $arg2 $arg3.
The arguments go through BUT because in my tcl file, there are lines saying “hscript opadd …” or something, then I get a different error saying there is no such thing as hscript. This is because I'm now in TCL shell.
Thanks
If in the textport I do
>> source myfile.cmd $arg1 $arg2 $arg
and within myfile.cmd there is a line saying
>>tcl myfile.tcl $arg1 $arg2 $arg3
The arguments do not go through to the tcl. I get an error saying the syntax should be tcl myfile.tcl.
Now if I do
>>tclsh myfile.tcl $arg1 $arg2 $arg3.
The arguments go through BUT because in my tcl file, there are lines saying “hscript opadd …” or something, then I get a different error saying there is no such thing as hscript. This is because I'm now in TCL shell.
Thanks
Technical Discussion » HScript <-> TCL
- idojomo
- 12 posts
- Offline
Hello again,
I have an HScript script that takes in arguments, then is supposed to pass them into a TCL script. This doesn't work. Theonly way my TCL script takes args is if I open a TK window in Houdini then type “tclsh fileName.tcl args”.
The problem with this is that the lines of code that say “hscript ….” no longer work. So is there a way for me to pass my args that I type in textport throught to the .cmd file then the .tcl file?
Thank you
I have an HScript script that takes in arguments, then is supposed to pass them into a TCL script. This doesn't work. Theonly way my TCL script takes args is if I open a TK window in Houdini then type “tclsh fileName.tcl args”.
The problem with this is that the lines of code that say “hscript ….” no longer work. So is there a way for me to pass my args that I type in textport throught to the .cmd file then the .tcl file?
Thank you
Technical Discussion » TCL within and without Houdini
- idojomo
- 12 posts
- Offline
Oh Ok. Thank you Edward, that helps a lot.
Does anyone know if the version of TCL used by Houdini can be changed?
Does anyone know if the version of TCL used by Houdini can be changed?
Technical Discussion » TCL within and without Houdini
- idojomo
- 12 posts
- Offline
edward, I am not trying to run a procedure. I had a string that I was trying to parse based on a token. So, if I create myString, then try to do something like , I get the error.
Basically, Houdini is telling me the syntax is wrong - it doesn't like the $index part - but that is the correct syntax according to tcl.tk and every other place I have checked.
Basically, Houdini is telling me the syntax is wrong - it doesn't like the $index part - but that is the correct syntax according to tcl.tk and every other place I have checked.
Technical Discussion » TCL within and without Houdini
- idojomo
- 12 posts
- Offline
Okay I solved problem number 2 by simply rewriting the statement as:
hscript opparm $lightName -v “ $temp ”
instead of hscript opparm $lightName -v $temp
I also tried hscript opparm $lightName -v “$temp” but that does not work either.
I still need help with problem #1 if anyone knows how to solve it.
Thanks
hscript opparm $lightName -v “ $temp ”
instead of hscript opparm $lightName -v $temp
I also tried hscript opparm $lightName -v “$temp” but that does not work either.
I still need help with problem #1 if anyone knows how to solve it.
Thanks
Technical Discussion » TCL within and without Houdini
- idojomo
- 12 posts
- Offline
Hello everyone, this is my first post.
I am teaching myself HScript and I am writing a script using TCL and HScript. I have two questions:
1) When using TCL outside of Houdini, I am able to run the follwing line of code with no problems:
string first $token $stringToParse $index
When I do this within Houdini, I get the following error:
>>wrong # args: should be “string first string1 string2”
Does anyone know why this is or how I can get around it?
2) The second question that when I pass a string from TCL to HScript, I get curly brackets around the string. How can I avoid this?
When I run:
set lightName “keyLight”
set temp “c (0 1 0)”
hscript opparm $lightName -v $temp
I get the error:
>>Skipping unrecognized parameter “{c”
>>Skipping unrecognized parameter “(”
>>Skipping unrecognized parameter “0”
>>Skipping unrecognized parameter “1”
>>Skipping unrecognized parameter “1”
>>Skipping unrecognized parameter “)”
I've figure out that it's because in hscript, $temp becomes { c (0 1 0)}. I tried doing some string manipulations to remove the brackets. It works in hscript, but if I do those same string manipulations from TCl, it does not work.
Any help would be appreciated. Thank you.
I am teaching myself HScript and I am writing a script using TCL and HScript. I have two questions:
1) When using TCL outside of Houdini, I am able to run the follwing line of code with no problems:
string first $token $stringToParse $index
When I do this within Houdini, I get the following error:
>>wrong # args: should be “string first string1 string2”
Does anyone know why this is or how I can get around it?
2) The second question that when I pass a string from TCL to HScript, I get curly brackets around the string. How can I avoid this?
When I run:
set lightName “keyLight”
set temp “c (0 1 0)”
hscript opparm $lightName -v $temp
I get the error:
>>Skipping unrecognized parameter “{c”
>>Skipping unrecognized parameter “(”
>>Skipping unrecognized parameter “0”
>>Skipping unrecognized parameter “1”
>>Skipping unrecognized parameter “1”
>>Skipping unrecognized parameter “)”
I've figure out that it's because in hscript, $temp becomes { c (0 1 0)}. I tried doing some string manipulations to remove the brackets. It works in hscript, but if I do those same string manipulations from TCl, it does not work.
Any help would be appreciated. Thank you.
-
- Quick Links