Hi, I'm writing a plugin which is registered as "texture/2d".
It draws something onto the texture, using the "compute" method.
The problem is, "compute" is called only once when "myShader" is created via Hypershade (which executes "shadingNode -asTexture myShader;" internally).
Is there any way to FORCE Maya to refresh the shading node so it can re-compute the texture?
I tried "refresh -f;" in the script editor, nothing happened.
I need this because the content of the texture is animating (changes in time) and needs to be refreshed.
Besides, how can I make the "Output Window" show up?
I called "cout" many times for debugging, but never can see anything!
[codebox]class myShader : public MPxHwShaderNode
{
...
virtual MStatus compute(const MPlug&, MDataBlock&);
...
}
MStatus myShader::compute(const MPlug& plug, MDataBlock& block )
{
// Draw something!
}[/codebox]