Well the trivial solution is:
global proc test (string $smallCurve, int $cvId){
connectAttr ("mouthCurveShape.cv[" + $cvId + "].xValue") ($smallCurve+".tx");
connectAttr ("mouthCurveShape.cv[" + $cvId + "].yValue") ($smallCurve+".ty");
connectAttr ("mouthCurveShape.cv[" + $cvId + "].zValue") ($smallCurve+".tz");
}
Or simpler
global proc test (string $smallCurve, int $cvId){
connectAttr ("mouthCurveShape.cv[" + $cvId + "]") ($smallCurve+".translate");
}
well for now I dont care about referencing and possible problems,
Its a habitual problem, you may not now care how it works. But may at some point, now if you try to constantly find the easiest way around you get very good at all the hacks. Want happens is you spend lots of time learning bad habtis, that time you could have used to learn good habits with equal ease.
So what you have is a bad cycle you use energy to doing something, and learning in the process. But you consciously choose the bad learning experience. So what you do is you choose learning that you discard, or worse build into your toolkit just to discard your entire toolkit whwn it really counts*. So your trading what you can do in a minute, for what you can do in 2 minutes but where you save 1 minute in the future for every and each case. Had you taken the hogh route youd eventually get interest on the investment no you really arent.
Second issue, you might not be the person who faces the problem. Thing is you were in position to easily do the job right. But the other might not be in a similar position, there might be too much data there to search for the problem, etc etc. So something you could have easily avoided becomes a very heavy burden of somebody else.
See solutions never die, you will live with all your bad decisions often much longer then you THINK ininitially. Ive seen peices of solutions that were going to be 2 hour temporary measures become the core of a comppanys daily inner workings and due to neglect in early days the idea behind it is lost, and built on 15 years later, rebuilding thsi one 1 day extra work is costing the company 20 million to fix.
Since you can NOT completely avoid bad decisions what you do is you at laest document that theres no significant thought behind the solution at hand. So that others that come behind may find the key issue at hand after threes troves of bad and goo decisions lying around. If your really pro you put in framework that lets users test they do the same thing even if they choose some other solution.
- most people choose to burn out or outright fail at this point because the task of doing a complete rehaul of everything you knew true of 3 years of experience may be too much.
PS: the expression is not as bad as it admittedly could be but still nonetheless 3 nodes you have absolutely no need ofr in the firstplace. Its still abusing expressions for no gain.