Using copySOP stamp in an OTL

   3314   4   1
User Avatar
Member
289 posts
Joined: July 2005
Offline
Hi all

I've created a for loop with the copy sop in an otl. Basically to rerun the function on all the primitives that come into the otl.

the problem I have is that I cannot place 2 of those otl's behind each other. this is due to the fact that the copy Sops in those otl's share the same stamp variable name.

Is there a way with an expression or so that houdini can give a unique varaible name for each of those otl's that are added in the scene? And also give a corresponding name with the param expressions used?

Cheers
A computer is almost human - except that it does not blame its mistakes on another computer.
User Avatar
Member
4140 posts
Joined: July 2005
Offline
I'm not near Houdini at the moment, and nothing springs to mind immediately…good point. Perhaps someone will hack at it a bit and come up with something. If you could hack in the OTL instance's name as the var, that should do it…just getting a brain lock at the moment.

My reason for posting, though, is to mention that for v8 the param() function is being deprecated and replaced by the stamp() function, which is unfortunately a little more verbose but I think may be designed for precisely this sort of thing. An extra param in there also states *which* copy SOP it's intended to be referenced to, making each stamp() call specific to a particular copy SOP. As much as my fuzz saturday morning brain will allow , this may deal with your problem.

Which unfortunately doesn't help you right *now*.

Cheers,

J.C.
John Coldrick
User Avatar
Member
289 posts
Joined: July 2005
Offline
Thanks J.C.

for the moment I can do without, but it would have been handy to have this.
A computer is almost human - except that it does not blame its mistakes on another computer.
User Avatar
Member
7734 posts
Joined: July 2005
Offline
As easy work around is to base your param name around the full path of your copy sop. So instead of param(“myvar”,0), use param(opfullpath(“../copy1”)+“/myvar”,0) where ../copy1 is the relative path to your copy sop. Then in your copy sop, instead of stamping myvar, stamp `opfullpath(“.”)+“/myvar”`
User Avatar
Member
289 posts
Joined: July 2005
Offline
edward
As easy work around is to base your param name around the full path of your copy sop. So instead of param(“myvar”,0), use param(opfullpath(“../copy1”)+“/myvar”,0) where ../copy1 is the relative path to your copy sop. Then in your copy sop, instead of stamping myvar, stamp `opfullpath(“.”)+“/myvar”`

YES!! thanks!
A computer is almost human - except that it does not blame its mistakes on another computer.
  • Quick Links