diff options
| author | Ben Marsh <[email protected]> | 2019-10-22 09:07:59 -0400 |
|---|---|---|
| committer | Ben Marsh <[email protected]> | 2019-10-22 09:07:59 -0400 |
| commit | bd0027e737c6512397f841c22786274ed74b927f (patch) | |
| tree | f7ffbdb8f3741bb7f24635616cc189cba5cb865c /mayaPlug/shaveVraySharedFunctions.h | |
| download | shave-and-a-haircut-bd0027e737c6512397f841c22786274ed74b927f.tar.xz shave-and-a-haircut-bd0027e737c6512397f841c22786274ed74b927f.zip | |
Adding Shave-and-a-Haircut 9.6
Diffstat (limited to 'mayaPlug/shaveVraySharedFunctions.h')
| -rw-r--r-- | mayaPlug/shaveVraySharedFunctions.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/mayaPlug/shaveVraySharedFunctions.h b/mayaPlug/shaveVraySharedFunctions.h new file mode 100644 index 0000000..0f84d19 --- /dev/null +++ b/mayaPlug/shaveVraySharedFunctions.h @@ -0,0 +1,65 @@ +#ifndef _HAIR_VR_PRIM_SHARED_FUCTIONS_H_ +#define _HAIR_VR_PRIM_SHARED_FUCTIONS_H_ + +// Shave and a Haircut +// (c) 2019 Epic Games +// US Patent 6720962 + +/********************************************************************** + *< + FILE: shaveVraySharedFunctions.h + + DESCRIPTION: Various shared functions + + HISTORY: created 21-08-2008 ( as part of 3ds Max + VRay hair shaders) + merged 31-03-2010 + + *> + **********************************************************************/ + +#include "shaveVrayNode.h" + +#ifdef USE_VRAY + + +#include <maya/MGlobal.h> +#include <maya/MPlug.h> +#include <maya/MObjectArray.h> +#include <maya/MTypeId.h> + +/* +// This code seems unused... +#include <vraybase.h> +inline void GenOrthVectors(const VR::Vector& in, VR::Vector& u, VR::Vector& v) +{ + u = (in.x != 0.0f || in.y != 0.0f) ? + normalize(VR::Vector(-in.y, in.x, 0.0f)) : + VR::Vector(1.0f, 0.0f, 0.0f); + + v = normalize(in^u); +} +// */ + +MObject getNodeByName(const char *nodeName); + +void FindNodesByTypeId(MTypeId nodeType, MObjectArray& nodes); + +void FindNodesByApiType(MFn::Type type, MObjectArray& nodes); + +bool getSourcePlugFromPlug(const MPlug destPlug, MPlug &plug); + +bool FindCurrentShaveShape(MObject &shShape); + +bool FindConnectedShaveShape(MObject node, MObject &shShape); + +bool FindAllShaveShapes(MObjectArray& shShapes); + +bool EnumDownNodes(MObject thisNode, MObjectArray& nodes); + +bool GetLibPathEnv(const MString vrayVersion, MString &path); + +bool GetLibPath(const MString vrayVersion, MString &var); + +#endif //USE_VRAY + +#endif //end of_HAIR_VR_PRIM_SHARED_FUCTIONS_H_ |