Hello,
In some shaders, I want to create a RGBA output (it is for an external renderer which doesn't support multiple outputs). So I want a compound attribute named output with 4 elements : cr, cg, cb, and ca.
For now, I just want a compound output attribute named "output", with only one component : "alpha".
Here is what I did :
MFnNumericAttribute nAttr;
MFnCompoundAttribute cAttr;
aOutAlpha = nAttr.create("ca", "ca", MFnNumericData::kFloat);
aOutput = cAttr.create("output", "out");
cAttr.addChild(aOutAlpha);
cAttr.setHidden(false);
cAttr.setReadable(true);
cAttr.setWritable(false);
addAttribute(aOutAlpha);
addAttribute(aOutput);
attributeAffects(aOutAlpha, aOutput);
I didn't report here the input stuff.
The outputs appear as they should in the connection editor, but when I click in the triangle in the swatch's bottom-right corner, there is no output.
