« Is there a maximum resolution for images rendered with mental ray for Maya ? | Main | The Maya 2012 network license and sub-feature components: mental ray and fluid simulation »

22/03/2011

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

How would I call this script to execute per frame?
I have a bunch of objects scattered in my scene and I want to sample the 3d texture for each every frame and pass that value on to a mel script.

I am also new to python and it seems you can not execute a python command in the expression editor or can you? Because this is where I need to run this script so that I can set the color of these objects on each frame.

That's embarrassing. I'll update the script. Thanks for pointing that out :)
Owen

Nice stuff. FYI, you have a typo in the sampleshadingnetwork01.py script (the blog post is ok). Line 58 should be:

omr.MRenderUtil.sampleShadingNetwork(shadingNode, numSamples, useShadowMap, reuseMaps, cameraMatrix, pointArray, uCoords, vCoords, normals, refPoints, tangentUs, tangentVs, filterSizes, resultColors, resultTransparencies )

instead of:
om.MRenderUtil.sampleShadingNetwork(shadingNodeName, numSamples, useShadowMap, reuseMaps, cameraMatrix, pointArray, uCoords, vCoords, normals, refPoints, tangentUs, tangentVs, filterSizes, resultColors, resultTransparencies )


om to omr, shadingNodeName to shadingNode

Thanks for sharing! I really need to learn this Python stuff some day :)

The comments to this entry are closed.

RSS Feed

  • Subscribe

Share

  • Bookmark and Share