Hi,
I admit, I haven't used COPs much in the past, just simple things, but now I've got to do a bit more complicated sequence and I'm stumped …
What I need to do is take values out of CHOPs and export them to COPs, primarily to a Font COP, I need to:
a) change the text field to be the value of my exported CHOP value
b) change the position of the text based on the CHOP values …
But I can't seem to export to a COP, when I look at the help for the COPs I'm using, I don't see any channels listed.
Am I missing something? Looking in the wrong place?
Hints? Work arounds?
As usual, thanks!
–Mark
CHOPs & COPs
10616 16 2- xiondebra
- Member
- 543 posts
- Joined: July 2005
- Offline
- JColdrick
- Member
- 4140 posts
- Joined: July 2005
- Offline
Translate is easy - just add an export CHOP after whatever you want exported, add a translate COP after the font COP, then point the export at the transform COP, then enter “tx”(no quotes) in the “Path” field in the export CHOP. it breaks it up into two lines - the OP and the channel. Scrub the timebar and you should see the font moving(it needs a kick to show up). I've not been able to export directly to the Font COP - not sure why, but it's probably related to the fact that the channel is called “translate” and consists of two fields, instead of being two separate enitities called tx and ty. Probably need to construct the channel to match that I suppose.
I'm thick on the outputting text thing. How does a channel contain a text value?
Cheers,
J.C.
I'm thick on the outputting text thing. How does a channel contain a text value?
Cheers,
J.C.
John Coldrick
- malexander
- Staff
- 5156 posts
- Joined: July 2005
- Offline
You can print the CHOP's channel value by entering the following expression in the Font's text field:
`chopf(“/ch/ch1/wave1/chan1”, $F)`
(note the backticks around the expression). Replace the path with the path to your CHOP. The last part of the path is the channel name (my node is wave1, it has a channel chan1).
Unfortunately, the transform parms in the Font COP are terribly named - translate1, translate2, scale1, scale2, etc.. I must have hit my head hard before writing it. ops: As long as you get the path right, the export should kick in.
`chopf(“/ch/ch1/wave1/chan1”, $F)`
(note the backticks around the expression). Replace the path with the path to your CHOP. The last part of the path is the channel name (my node is wave1, it has a channel chan1).
Unfortunately, the transform parms in the Font COP are terribly named - translate1, translate2, scale1, scale2, etc.. I must have hit my head hard before writing it. ops: As long as you get the path right, the export should kick in.
- xiondebra
- Member
- 543 posts
- Joined: July 2005
- Offline
Hey, hey, hey!
Ah yes, I now have the Transform COP working, but I would have expected the same from the Font, Layer, and other COPs that have Translate fields … all the COPs help pages that I checked don't have any channels listed (even though as you point out, at the very least, the Transform COP does have channels available).
What the deal is with the text from CHOPs is this: I have a set of min/max values stored in a bunch of files, they are selected by a Switch CHOP based on elapsed time. What I need to do is “convert” those CHOP values to text in COPs. Still stumped …
–Mark
JColdrick
I've not been able to export directly to the Font COP - not sure why, but it's probably related to the fact that the channel is called “translate” and consists of two fields, instead of being two separate enitities called tx and ty. Probably need to construct the channel to match that I suppose.
I'm thick on the outputting text thing. How does a channel contain a text value?
Ah yes, I now have the Transform COP working, but I would have expected the same from the Font, Layer, and other COPs that have Translate fields … all the COPs help pages that I checked don't have any channels listed (even though as you point out, at the very least, the Transform COP does have channels available).
What the deal is with the text from CHOPs is this: I have a set of min/max values stored in a bunch of files, they are selected by a Switch CHOP based on elapsed time. What I need to do is “convert” those CHOP values to text in COPs. Still stumped …
–Mark
========================================================
You are no age between space
You are no age between space
- JColdrick
- Member
- 4140 posts
- Joined: July 2005
- Offline
Heh - looks like Mark A. posted one minute before Mark S. Hopefully that answered your question Mark #1…
Btw - I was stuck on the Font COP channel naming too - but whenever that happens, I just open the textport and type(for example):
opscript /img/img1/font1
and that lists the channels for the op. For the record, the help popup in v6.5+ does actually give the param name - it just *seems* wrong. It actually says “translate” under params…which is correct.
Cheers,
J.C.
Btw - I was stuck on the Font COP channel naming too - but whenever that happens, I just open the textport and type(for example):
opscript /img/img1/font1
and that lists the channels for the op. For the record, the help popup in v6.5+ does actually give the param name - it just *seems* wrong. It actually says “translate” under params…which is correct.
Cheers,
J.C.
John Coldrick
- malexander
- Staff
- 5156 posts
- Joined: July 2005
- Offline
Heh - looks like Mark A. posted one minute before Mark S. Hopefully that answered your question Mark #1…
Yeah, I posted, looked back and… hey, that's not what I wrote…
Btw - I was stuck on the Font COP channel naming too - but whenever that happens, I just open the textport and type(for example):
opscript /img/img1/font1
The only problem with opscript is that it only prints out the ‘base name’ of the parm, ‘translate’ ( translate { 0 0} ). The channels themselves have extensions placed on them (1,2,3 for floats, x,y,z for points, r,g,b, etc).
If you can't find the channel names in the helpcards (which shouldn't be an issue with the new helpcards) and popups are off, you can Alt+LMB the parm label to create a channel, and Shift+LMB it to scope the channels in the channel editor - the names will be displayed there (and then Undo). However, you shouldn't need to do this, 6.5 and up.
- JColdrick
- Member
- 4140 posts
- Joined: July 2005
- Offline
- xiondebra
- Member
- 543 posts
- Joined: July 2005
- Offline
- Simon
- Member
- 2199 posts
- Joined: July 2005
- Online
- Ondrej
- Staff
- 1072 posts
- Joined: July 2005
- Offline
- Simon
- Member
- 2199 posts
- Joined: July 2005
- Online
- stevenong
- Member
- 1631 posts
- Joined: July 2005
- Offline
- xiondebra
- Member
- 543 posts
- Joined: July 2005
- Offline
stevenong
And you can create your own aliases (RMB on the parameter label) for channels too. So if you don't like “what_cha_ma_call_it”, you can alias it as “foo_x” & reference that instead. opparm works too!
Oh, I did not know that, thanks!
–Mark
========================================================
You are no age between space
You are no age between space
- deecue
- Member
- 412 posts
- Joined: July 2005
- Offline
- stevenong
- Member
- 1631 posts
- Joined: July 2005
- Offline
- Simon
- Member
- 2199 posts
- Joined: July 2005
- Online
- deecue
- Member
- 412 posts
- Joined: July 2005
- Offline
-
- Quick Links