connect in MFnCompoundAttribute?

6 views
Skip to first unread message

miarmy

unread,
Nov 1, 2018, 3:05:02 PM11/1/18
to Python Programming for Autodesk Maya
hi!.my node has this attribute:

        MFnCompoundAttribute compoundAttr;
        MFnNumericAttribute numericAttr;

compoundsGRPAttr = compoundAttr.create("compounds", "comps");
compoundAttr.setArray(true);
indexAttr = numericAttr.create("index", "index", MFnNumericData::kInt, 0.0);

compoundAttr.addChild(indexAttr);

stat = addAttribute(compoundsGRPAttr);
if (!stat) { stat.perror("addAttribute"); return stat; }

now, i want run one function when, one plug, connected to indexAttr... how can i do it? (c++ api)
and how i can connect the one node plug(the specified plug) to one of indexAttrs?

Excuse me,I don't speak English as well as you....
Reply all
Reply to author
Forward
0 new messages