- similar API changes for Maya 2014 in mayaPtexViewer

- more file permission fixes

fixes #131
This commit is contained in:
manuelk 2013-02-22 12:58:09 -08:00
parent c3fba1708c
commit acfd8e366b
5 changed files with 37 additions and 7 deletions

0
examples/mayaPtexViewer/OpenSubdivPtexShader.cpp Executable file → Normal file
View File

View File

@ -335,13 +335,23 @@ public:
OsdBufferGenerator(bool normal) : _normal(normal) {}
virtual ~OsdBufferGenerator() {}
#if MAYA_API_VERSION >= 201400
virtual bool getSourceIndexing(
const MObject &object,
MHWRender::MComponentDataIndexing &sourceIndexing) const
{
MStatus status;
MFnMesh mesh(object, &status);
#else
virtual bool getSourceIndexing(
const MDagPath &dagPath,
MHWRender::MComponentDataIndexing &sourceIndexing) const
{
MStatus status;
MFnMesh mesh(dagPath.node());
MFnMesh mesh(dagPath.node(), &status);
#endif
if (!status) return false;
MIntArray vertexCount, vertexList;
@ -356,15 +366,24 @@ public:
return true;
}
virtual bool getSourceStreams(const MDagPath &dagPath,
#if MAYA_API_VERSION >= 201400
virtual bool getSourceStreams(const MObject &object,
MStringArray &) const
#else virtual bool getSourceStreams(const MDagPath &dagPath,
MStringArray &) const
#endif
{
return false;
}
#if MAYA_API_VERSION >= 201350
virtual void createVertexStream(
#if MAYA_API_VERSION >= 201400
const MObject &object,
#else
const MDagPath &dagPath,
#endif
MVertexBuffer &vertexBuffer,
const MComponentDataIndexing &targetIndexing,
const MComponentDataIndexing &,
@ -377,7 +396,11 @@ public:
{
#endif
#if MAYA_API_VERSION >= 201400
MFnMesh meshFn(object);
#else
MFnMesh meshFn(dagPath);
#endif
int nVertices = meshFn.numVertices();
#if MAYA_API_VERSION >= 201350

0
examples/mayaPtexViewer/cudaUtil.cpp Executable file → Normal file
View File

0
examples/mayaPtexViewer/osdPtexMeshData.cpp Executable file → Normal file
View File

View File

@ -408,23 +408,30 @@ public:
return false;
}
#if MAYA_API_VERSION >= 201400
#if MAYA_API_VERSION >= 201350
virtual void createVertexStream(
const MObject &object,
#if MAYA_API_VERSION >= 201400
const MObject &object,
#else
const MDagPath &dagPath,
#endif
MVertexBuffer &vertexBuffer,
const MComponentDataIndexing &targetIndexing,
const MComponentDataIndexing &,
const MVertexBufferArray &) const
{
MFnMesh meshFn(object);
#elif MAYA_API_VERSION >= 201350
#else
virtual void createVertexStream(
const MDagPath &dagPath, MVertexBuffer &vertexBuffer,
const MComponentDataIndexing &targetIndexing) const
{
MFnMesh meshFn(dagPath);
#endif
#if MAYA_API_VERSION >= 201400
MFnMesh meshFn(object);
#else
MFnMesh meshFn(dagPath);
#endif
int nVertices = meshFn.numVertices();
MFloatPointArray points;
meshFn.getPoints(points);