Isn't this c++ code? On May 4, 12:50 pm, goofoo <[email protected]> wrote: > Hello. Maya node fluidShape have attribute ouyGrid. What is it and how > can it be used? > I have a problem. I take the data from maya fluid container and try to > render in maya viewport using GPU. Everything works, but the transfer > of data from maya fluid container in my container is very slow. The > calculation in maya fluid container is faster than data transfer. > Why? > Here is my code: > ////////////////// > Status volumeNode::compute( const MPlug& plug, MDataBlock& data ) > { > > data.setClean(plug); > if (plug == aNeedsCompute) > { > MDataHandle hInFluidMesh = data.inputValue(aInFluidMesh); > MPlug plugInFluidMesh(thisMObject(), aInFluidMesh); > MPlugArray plugArr; > plugInFluidMesh.connectedTo(plugArr, true, false); > MObject oFluidNode = plugArr[0].node(); > MFnFluid fnFluid(oFluidNode); > > float *fDensity = fnFluid.density(); > > glTexSubImage3D(GL_TEXTURE_3D, 0, 0, 0, 0, 64, 64, 64, GL_RED, > GL_FLOAT, fDensity); > > return MS::kSuccess; > } > > return MS::kUnknownParameter; > > } > > ////////////////////////////
-- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
