Ok, I see where you're going, and
you're correct, there's no double4 output.
You could make an array of doubles, but my question is why you'd
want a Quaternion as an output--to my knowledge, Maya does process
rotations internally as a Quaternion, but it converts those to
Euler's before it outputs, and I don't know of any plugs that take
a Quaternion.
When I've used Quaternions, I normally build my Quaternion
internally, use it, and then output as a float3 after converting
to a Euler with the appropriate rotation order.
You can do this pretty easily with MEulerRotation--it has
asQuaternion(), and MQuaternion has asEulerRotation.
Once you've converted to a MEulerRotation, it's pretty
straightforward to put it into a rotation data set.
You basically will need to set up three attributes (rotationX,
rotationY, rotationZ) as MFnUnitAttributes with a type of
MFnUnitAttribute::kAngle, and then a MFnNumericAttribute
(rotation) with the three rotation attributes. At least that's
how I do it--the setup looks something like this in c++ (but
Python's very similar), in the initialize() function:
MFnNumericAttribute nAttr;
MFnUnitAttribute uAttr;
aRotX = uAttr.create("rotateX", "rx",
MFnUnitAttribute::kAngle);
uAttr.setWritable(false);
uAttr.setStorable(false);
aRotY = uAttr.create("rotateY", "ry",
MFnUnitAttribute::kAngle);
uAttr.setWritable(false);
uAttr.setStorable(false);
aRotZ = uAttr.create("rotateZ", "rz",
MFnUnitAttribute::kAngle);
uAttr.setWritable(false);
uAttr.setStorable(false);
aOutRotation = nAttr.create("outRotation", "or", aRotX, aRotY,
aRotZ);
nAttr.setWritable(false);
nAttr.setStorable(false);
nAttr.setArray(true);
Then you just use set3Double to set them.