Hi,
I try to create a simple triangle to render in maya using the following code:
All the lines are executed, but the render crashes Maya. Anything I did wrongly ?
Thanks !
I try to create a simple triangle to render in maya using the following code:
Code:
void setFace(VR::DefIntListParam &p, int faceIndex, int a, int b, int c) { p[faceIndex*3+0]=a; p[faceIndex*3+1]=b; p[faceIndex*3+2]=c; } void VRayPlane::createVRayPlugin(VR::VRayGeomInfo *geomInfo) { if (!geomInfo) return; PluginManager *plugman=geomInfo->getPluginManager(); if (!plugman) return; bool existing=false; geomPlugin=geomInfo->newPlugin("GeomStaticMesh",existing); VR:: DefVectorListParam param_vertices("vertices",0); param_vertices.setCount(3); param_vertices[0]=VR::Vector(0,0,0); param_vertices[1]=VR::Vector(0,0,10); param_vertices[2]=VR::Vector(10,0,0); VR:: DefIntListParam param_faces("faces",0); param_faces.setCount(3); setFace(param_faces, 0, 0, 1, 2); VR:: DefVectorListParam param_normals("normals",0); param_normals.setCount(1); param_normals[0]=VR::Vector(0,1,0); VR:: DefIntListParam param_faceNormals("faceNormals",0); param_faceNormals.setCount(3); setFace(param_faceNormals,0,0,0,0); geomPlugin->setParameter(¶m_vertices); geomPlugin->setParameter(¶m_faces); geomPlugin->setParameter(¶m_normals); geomPlugin->setParameter(¶m_faceNormals); }
Thanks !
Comment