Commits

Chad Dombrova committed 413473d

Basic fixes for Maya > 2013

  • Participants
  • Parent commits 5c9a296

Comments (0)

Files changed (3)

maya/abcMayaShader/abcMayaShaderNode.cpp

 #include <maya/MFloatVector.h>
 #include <maya/MString.h>
 #include <maya/MColor.h>
+#include <maya/MArrayDataBuilder.h>
 //Alembic
 #include <Alembic/Abc/All.h>
 #include <Alembic/AbcCoreFactory/IFactory.h>

maya/alembicHolder/alembicHolderOverride.cpp

 MUserData* AlembicHolderOverride::prepareForDraw(
     const MDagPath& objPath,
     const MDagPath& cameraPath,
+    const MHWRender::MFrameContext& frameContext,
     MUserData* oldData)
 {
     using namespace MHWRender;
         }
 
         for (unsigned int i=0; i<nbLights; ++i) {
-            MFloatPoint position;
             MFloatVector direction;
             float intensity;
             MColor color;
             bool hasDirection;
             bool hasPosition;
+            MFloatPointArray positions;
             status = context.getLightInformation(
-                i, position, direction, intensity, color,
+                i, positions, direction, intensity, color,
                 hasDirection, hasPosition);
+
             if (status != MStatus::kSuccess) return false;
 
             // if (hasPosition)
             if (hasDirection) {
                 if (hasPosition) {
                     // Assumes a Maya Spot Light!
+                    MFloatPoint position = positions[0];
                     const MGLfloat ambient[4] = { 0.0f, 0.0f, 0.0f, 1.0f };
                     const MGLfloat diffuse[4] = { intensity * color[0],
                                                   intensity * color[1],
             }
             else if (hasPosition) {
                 // Assumes a Maya Point Light!
+                MFloatPoint position = positions[0];
                 const MGLfloat ambient[4] = { 0.0f, 0.0f, 0.0f, 1.0f };
                 const MGLfloat diffuse[4] = { intensity * color[0],
                                               intensity * color[1],

maya/alembicHolder/alembicHolderOverride.h

     virtual MUserData* prepareForDraw(
         const MDagPath& objPath,
         const MDagPath& cameraPath,
+        const MHWRender::MFrameContext& frameContext,
         MUserData* oldData);
 
     static void draw(const MHWRender::MDrawContext& context, const MUserData* userData);