I am basically making a ramp shader and trying to find the proper way to get values from a ramp attribute in the compute()
function for a node.
I know it can be done with
MObject oThis = thisMObject();
MRampAttribute rampAttribute(oThis, aRamp); // aRamp is our ramp MObject.
but is it safe to do this in compute
?
The Maya documentation mentions in a few places that, in compute
, we should only use attributes in the MDataBlock
to get input data, but I can't find a way to get a ramp attribute from the MDataBlock
. I couldn't find any official code samples using MRampAttribute
in compute()
either.