Hi, I'm having some issues with reading the depthMap for a view in Maya 2010. The problem is the method wants an unsigned char pointer and I'm having difficulty creating one that doesn't crash maya.
Here's what I have so far, ( this crashes maya 2010!): import maya.OpenMaya as om import maya.OpenMayaUI as omui view = omui.M3dView.active3dView() width = view.portWidth()/10 height= view.portHeight()/10 depthPixels = om.MScriptUtil() view.readDepthMap( 0,0, width, height, depthPixels.asUcharPtr(), omui.M3dView.kDepth_Float) In the c++ example in the docs (http://download.autodesk.com/us/maya/ 2010help/API/view_callback_test_8cpp-example.html#a29) they create a float array and then cast it as a uchar pointer. I've tried creating Float arrays with MScriptUtil and the same result, no errors, just crashing. Or am I going about this the wrong way entirely? All the best, Sveinbjorn -- http://groups.google.com/group/python_inside_maya
