i'm trying to write a plugin and i'd like one of my attributes to be
an array of compound attributes, so in my initialize function i did
something like:

def nodeInitializer():
    nAttr = OM.MFnNumericAttribute()
    cAttr = OM.MFnCompoundAttribute()

    stupidPlugin.inputElement1 = nAttr.createPoint("element1", "el1")
    stupidPlugin.inputElement2 = nAttr.createPoint("element2", "el2")

    stupidPlugin.inputCompound = cAttr.create("inCompound", "inCmp")
    cAttr.addChild(stupidPlugin.inputElement1)
    cAttr.addChild(stupidPlugin.inputElement2)
    cAttr.setArray(True)
    cAttr.setDisconnectBehavior(OM.MFnAttribute.kDelete)

    stupidPlugin.output = nAttr.createPoint("output", "out")

    stupidPlugin.addAttribute(stupidPlugin.inputCompound)
    stupidPlugin.addAttribute(stupidPlugin.output)

    stupidPlugin.attributeAffects(stupidPlugin.inputCompound,
stupidPlugin.output)


The plugin load fine inside maya, but when i click on "Add new item"
in the attribute editor i get this error:

* Error: Found no attribute match for "stupidPlugin1.element1" *

I think that it could be an AETemplate problem, but i have no clue on
how to fix it.

Any hint would be really welcome.

Ciao,

Luca

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---

Reply via email to