PDA

View Full Version : addAttr problem


Luddy
04-29-2003, 11:49 AM
I'm trying to add an attribute to a null object. I'm getting an error over |$cnfName;


global proc cnfNull(string $name, string $leftRight)
{
string $cnfName = "null" + $name + $leftRight + "_1";
string $adAtr = $name + "cgTalk";

group -em -n $cnfName;
addAttr -ln $adAtr -at double -min 0 -max 1 -dv 0 |$cnfName;

string $cnfCg = $cnfName + "." + $name + "cgTalk";
setAttr -e -keyable true |$cnfNmCg;
}
cnfNull "Obj" "LR";

alexx
04-29-2003, 02:12 PM
1: you are getting an error on |$cnfNmCg which is not declared at all.. (guess it should be $cnfName though)

2: what are you doing with the | in front of it?
i dont know that one..
if you are trying to get your objects (nulls) name with a | in front of it, try it that way:
("|"+$cnfName);

cheers

alexx

Luddy
04-29-2003, 05:57 PM
Thanks alexx,

My naming and addition was wrong. I guess I shouldn't drink and code at 3 in the morning. :D

alexx
04-29-2003, 08:40 PM
hehe.. in general both is not really good to keep up concentration indeed :rolleyes:

cheers

alexx

CGTalk Moderation
01-15-2006, 01:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.