I'm trying to create a string that will be used as a parm. The quote syntax is slowly killing me.
for i = 1 to 10
set colour_R = ‘pic(“/img/img2/Line_Color”,0.5,’ + $i + ‘,R)’
opparm $node3 color ( $colour_R 0.5 0.3 1 )
end
This is the jist of it. The priority and limitations of ' and ` and " are confusing.
Does the back slash work for more than protecting the hash character.
??
Cheers
( acknowledged, having a UV value going from 1 to 10 is daft )
Hscript syntax
10489 13 1-
- Henster
- Member
- 196 posts
- Joined: July 2005
- Offline
-
- wolfwood
- Member
- 4336 posts
- Joined: July 2005
- Online
for i = 1 to 10
set colour_R = ‘pic(“/img/img2/Line_Color”,0.5,’ + $i + ‘,R)’
opparm $node3 color ( $colour_R 0.5 0.3 1 )
end
What are you trying to do? The syntax can be completely different based on the result you want.
Do you want the pic() expression to be evaluated? Do you want the pic expression to be in the channel?
Details details details.
if(coffees<2,round(float),float)
-
- Henster
- Member
- 196 posts
- Joined: July 2005
- Offline
-
- jason_iversen
- Member
- 12995 posts
- Joined: July 2005
- Offline
Henster
Sorry, not concentrating.
What happened to the RFE on a `remove problem` button? I'm sure it was suggested…
Right now this is implemented in the web browser as “New Topic” in which you may write the problem in simple english and a panel of enthusiasts are all ready to help.
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
also, http://www.odforce.net [www.odforce.net]
-
- Henster
- Member
- 196 posts
- Joined: July 2005
- Offline
-
- edward
- Member
- 8080 posts
- Joined: July 2005
- Offline
-
- Henster
- Member
- 196 posts
- Joined: July 2005
- Offline
-
- edward
- Member
- 8080 posts
- Joined: July 2005
- Offline
-
- Henster
- Member
- 196 posts
- Joined: July 2005
- Offline
I'll try re-phrasing this. Must be going wrong somewhere.
I would like $i to evalute in the loop, but the rest to remain.
I'm creating multiple nodes and inserting this expression. So in the channel box for red reads:
Node 1:
pic(“/img/img2/Line_Color”,0.5,1,R)
Node 2:
pic(“/img/img2/Line_Color”,0.5,2,R)
Node 3:
pic(“/img/img2/Line_Color”,0.5,3,R)
.
.
.
Hope this makes it a little clearer
H
I would like $i to evalute in the loop, but the rest to remain.
I'm creating multiple nodes and inserting this expression. So in the channel box for red reads:
Node 1:
pic(“/img/img2/Line_Color”,0.5,1,R)
Node 2:
pic(“/img/img2/Line_Color”,0.5,2,R)
Node 3:
pic(“/img/img2/Line_Color”,0.5,3,R)
.
.
.
Hope this makes it a little clearer
H
Henster
-
- edward
- Member
- 8080 posts
- Joined: July 2005
- Offline
-
- Henster
- Member
- 196 posts
- Joined: July 2005
- Offline
chadd -t 0 0 strip_colour colorr
chkey -t 0 -v 1 -m 0 -a 1 -F ‘pic(“/img/img2/Line_Color”,0.5,1,R)’ strip_colour/colorr
is the opscript ouput from the first node when I make the nodes manually.
I don't see how this opscript output helps me with sticking the string together in hscript.
The value of $i in reality is evaluated elsewhere in the script and is usually different upon each execution, as is the number of nodes. So just writing out each expression by hand would not work.
I understand now that chadd and chkey are required as opposed to opparm.
chkey -t 0 -v 1 -m 0 -a 1 -F ‘pic(“/img/img2/Line_Color”,0.5,1,R)’ strip_colour/colorr
is the opscript ouput from the first node when I make the nodes manually.
Type your expression into a parameter and then run opscript on that node. That should give you the correct code.
I don't see how this opscript output helps me with sticking the string together in hscript.
The value of $i in reality is evaluated elsewhere in the script and is usually different upon each execution, as is the number of nodes. So just writing out each expression by hand would not work.
I understand now that chadd and chkey are required as opposed to opparm.
Henster
-
- Mario Marengo
- Member
- 941 posts
- Joined: July 2005
- Offline
-
- Henster
- Member
- 196 posts
- Joined: July 2005
- Offline
-
- Mario Marengo
- Member
- 941 posts
- Joined: July 2005
- Offline
Henster
It was those back slashes.
I easily get confused with the butt-ugliness of those cat functions. The big + signs work better for me….![]()

Hehe… yup; forgot all about them fancy + signs (still stuck in the stone age over here) … and they were all over the thread too, lol! (note to self: next time read the whole thread before posting)
But look at it on the bright side: using the functions reminds you that what you're building is an expression. The + operators also become functions (internally, something like string.operator+()), but it's harder to see this. Which means that both forms need the single back-quotes surrounding the whole thing…. which you were also missing in your attempts…. not just the back slashes.
There; I justified my archaic, butt-ugly ways. Ha!
-
- Quick Links


