MStatus ArsenalPoseManager2::initialize()
{
MStatus status;
MFnNumericAttribute nAttr;
MFnMatrixAttribute mAttr;
MFnMessageAttribute meAttr;
MFnTypedAttribute tAttr;
MFnCompoundAttribute cmpAttr;
dataFile = tAttr.create("PoseFile", "psf", MFnData::kString);
tAttr.setInternal(true);
tAttr.setUsedAsFilename(true);
tAttr.setStorable(true);
tAttr.setKeyable(false);
addAttribute(dataFile);
poseDriver = meAttr.create("poseDriver", "pd");
meAttr.setArray(false);
meAttr.setStorable(true);
meAttr.setKeyable(false);
addAttribute(poseDriver);
poseDriverValue = nAttr.create("poseAttribute", "pa",
MFnNumericData::kFloat);
nAttr.setArray(false);
nAttr.setStorable(true);
nAttr.setKeyable(true);
addAttribute(poseDriverValue);
poseName = tAttr.create("poseName", "pn", MFnData::kString);
tAttr.setArray(false);
tAttr.setStorable(true);
tAttr.setKeyable(false);
addAttribute(poseName);
poseNode = meAttr.create("poseNode", "pnd");
meAttr.setArray(false);
meAttr.setStorable(true);
meAttr.setKeyable(false);
addAttribute(poseNode);
poseMatrix = mAttr.create("poseMatrix", "pm", MFnMatrixAttribute::kDouble);
mAttr.setArray(false);
mAttr.setStorable(true);
mAttr.setKeyable(true);
addAttribute(poseMatrix);
poseSets = cmpAttr.create("poseSet", "ps");
cmpAttr.setArray(true);
cmpAttr.addChild(poseNode);
cmpAttr.addChild(poseMatrix);
cmpAttr.setReadable(true);
cmpAttr.setUsesArrayDataBuilder(false);
addAttribute(poseSets);
poseData = cmpAttr.create("poseData", "pd");
cmpAttr.setArray(true);
cmpAttr.addChild(poseDriver);
cmpAttr.addChild(poseDriver);
cmpAttr.addChild(poseName);
cmpAttr.addChild(poseSets);
cmpAttr.setReadable(true);
cmpAttr.setUsesArrayDataBuilder(false);
addAttribute(poseData);
return MS::kSuccess;
}
that was working on the build I did the other day, but all of a sudden its
not adding the compound attribute, no error or anything just not there.
Any thoughts as to why?
--
Todd Widup
Creature TD / Technical Artist
[email protected]
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CABBPk36ThRdY1qiR_6JU4JY3%3DH--LVqqtc9ZYHAfu6X15iH%2BCA%40mail.gmail.com.