mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-24 12:30:17 +00:00
- similar API changes for Maya 2014 in mayaPtexViewer
- more file permission fixes fixes #131
This commit is contained in:
parent
c3fba1708c
commit
acfd8e366b
0
examples/mayaPtexViewer/OpenSubdivPtexShader.cpp
Executable file → Normal file
0
examples/mayaPtexViewer/OpenSubdivPtexShader.cpp
Executable file → Normal file
27
examples/mayaPtexViewer/OpenSubdivPtexShaderOverride.cpp
Executable file → Normal file
27
examples/mayaPtexViewer/OpenSubdivPtexShaderOverride.cpp
Executable file → Normal 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
0
examples/mayaPtexViewer/cudaUtil.cpp
Executable file → Normal file
0
examples/mayaPtexViewer/osdPtexMeshData.cpp
Executable file → Normal file
0
examples/mayaPtexViewer/osdPtexMeshData.cpp
Executable file → Normal 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);
|
||||
|
Loading…
Reference in New Issue
Block a user