# Parent attribute was not found

**URL:** https://forum.highend3d.com/t/parent-attribute-was-not-found/5613
**Category:** Maya
**Tags:** mel
**Created:** [January 7, 2003, 7:20pm UTC](https://forum.highend3d.com/t/parent-attribute-was-not-found/5613 "2003-01-07T19:20:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![radiation](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/r/439d5e/32.png) [@radiation](https://forum.highend3d.com/u/radiation)
#### Post date: [January 7, 2003, 7:20pm UTC](https://forum.highend3d.com/t/parent-attribute-was-not-found/5613/1 "2003-01-07T19:20:14Z")

</div>

...hacking my way thru...

trying to set up a process that creates a new material attribute but I'm getting a "Parent attribute was not found" error. Here is what I have.. hope it is enough.

proc setTripUserAttr( string $node, string $attr, float $val, string $mat )  
{  
 select $node;  
 if ( !`attributeQuery -n $node -exists $attr` )  
 {  
 addAttr -ln $attr -at "float" ;  
 }

```
if ( `attributeQuery -n $node -exists $attr` )
{
	addAttr -ln ("TM" + $attr + "Conn") -at "double3" $mat;
	addAttr -ln ("TM" + $attr + "Conn") -at double -p $mat;
	addAttr -ln ("TM" + $attr + "Conn") -at double -p $mat;
	addAttr -ln ("TM" + $attr + "Conn") -at double -p $mat;	
	setAttr -type double3 ($mat + "." + $attr) 0 0 0;
}
else
{
	warning( "could not create attr " + $attr + " on node " + $node + "n" );
}
```

}

thanks,  
--TOM
