diff options
Diffstat (limited to 'mayaPlug/shaveVrayRenderer.h')
| -rw-r--r-- | mayaPlug/shaveVrayRenderer.h | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/mayaPlug/shaveVrayRenderer.h b/mayaPlug/shaveVrayRenderer.h new file mode 100644 index 0000000..146603d --- /dev/null +++ b/mayaPlug/shaveVrayRenderer.h @@ -0,0 +1,85 @@ +#ifndef shaveVrayRenderer_h +#define shaveVrayRenderer_h + +// Shave and a Haircut +// (c) 2019 Epic Games +// US Patent 6720962 + +#include <maya/MSelectionList.h> +#include <maya/MString.h> +#include <maya/MStringArray.h> +#include <maya/MTypes.h> + +#include "shaveConstant.h" +#include "shaveVrayNode.h" +#include "shaveRenderer.h" + +class shaveHairShape; + +#ifdef USE_VRAY + +class shaveVrayRenderer : public shaveRenderer +{ +public: + shaveVrayRenderer(); + virtual ~shaveVrayRenderer(); + + virtual void renderStart(); + virtual void renderEnd(); + // + // these will not do any job - vrayKeyframeCallback will be used instead + // + virtual void frameStart(const shaveGlobals::Globals& g); + virtual void timeChange(const MTime& newTime); + virtual void frameEnd(const shaveGlobals::Globals& g); + + + virtual bool isGeomNode(const shaveHairShape* nodePtr) const; + + virtual void render( + float frame, + shaveConstant::ShutterState shutter, + const MDagPath& camera + ); + + // + //This should be used instead of frameStart - timeChange - frameEnd + //will be called before each keyframe is created + //but after the current time is moved for the current keyframe. + void vrayKeyframeCallback(); + +//************************************************ +// +// Helper Methods +// +//************************************************ + + MString fileName; + bool exportOK; + bool ioError; + + MSelectionList list; + +protected: + enum TimeState + { + kAwaitingNothing, + kAwaitingShutterOpen, + //kAwaitingShutterOpenSwap, + kAwaitingCenterFrame, + kAwaitingShutterClose, + kAwaitingShutterBoth + }; + + TimeState mTimeState; + //bool mIsAnimation; + //MTime mFirstFrame; + //bool mIsFirstFrame; + + MString tempDra; + +}; + +#endif //USE_VRAY + +#endif |