Just to add to the discussing. I'm have some odd issues with nesting
attributes as in they don't seem to get created reliable.
c1 = polyCube()[0]
c1.addAttr('Anim', nc=1, at='compound')
print c1.hasAttr('Anim')
#result False
c1.addAttr('Attr_A', nc=1 ,at='compound',parent='Anim')
print c1.hasAttr('Anim')
#result False
c1.addAttr('Attr_B', nc=1, at='compound', parent = 'Attr_A')
print c1.hasAttr('Anim')
#result False
c1.addAttr('Attr_C', at='message', parent='Attr_B')
print c1.hasAttr('Anim')
#result True
So the the entire structure doesn't exist until 'Attr_C' is added. Is
there something wrong in my logic?
Cheers,
Shawn
On May 25, 12:02 pm, shawnpatapoff <[email protected]> wrote:
> Hey David,
>
> Looks like compound is the way to go, a bit of a pain to manage but it
> does what I was looking for. And you can use '.message'
>
> Cheers,
> Shawn
>
> On May 25, 11:00 am, David Moulder <[email protected]> wrote:
>
> > I think your after a compound attribute. I'm not sure if a message
> > link can be a compound attribute tho.
>
> > FYI
>
> >http://www.rtrowbridge.com/blog/2009/03/python-api-compound-attribute/
>
> > -Dave
>
> > On Tue, May 25, 2010 at 5:37 PM, shawnpatapoff <[email protected]>
> > wrote:
> > > Anyone know how to make sub attributes at all, or is it possible?
>
> > > What I'm trying to do is.
>
> > > object.myAttr.subAttr
>
> > > I'm using .message for my connections, not sure if it's even possible.
>
> > > Cheers,
> > > Shawn
>
> > > --
> > >http://groups.google.com/group/python_inside_maya
>
> > --
> > David Moulderhttp://www.google.com/profiles/squish3d
>
> > --http://groups.google.com/group/python_inside_maya
>
>
--
http://groups.google.com/group/python_inside_maya