1 #pragma once
2 #ifndef __MAYA_XRAY_MATERIAL_H__
3 #define __MAYA_XRAY_MATERIAL_H__
4 
5 #include <maya/MPxNode.h>
6 
7 class MFnPlugin;
8 
9 class maya_xray_material: public MPxNode {
10 public:
11 	virtual			~maya_xray_material();
12 
13 	virtual void		postConstructor();
14 	virtual MStatus		compute(const MPlug& plug, MDataBlock& data_block);
15 #if 0
16 	virtual MStatus		legalConnection(const MPlug& plug, const MPlug& other_plug, bool as_src, bool& is_legal) const;
17 	virtual MStatus		connectionMade(const MPlug& plug, const MPlug& other_plug, bool as_src);
18 	virtual MStatus		connectionBroken(const MPlug& plug, const MPlug& other_plug, bool as_src);
19 #endif
20 
21 	static void*		creator();
22 	static MStatus		init();
23 
24 	static MStatus		initialize(MFnPlugin& plugin_fn);
25 	static MStatus		uninitialize(MFnPlugin& plugin_fn);
26 
27 private:
28 	static const MTypeId	k_type_id;
29 	static const MString	k_type_name;
30 
31 	static MObject		g_tc;				// translucenceCoeff
32 	static MObject		g_drfl;				// diffuseReflectivity
33 	static MObject		g_cr, g_cg, g_cb, g_c;		// color
34 	static MObject		g_ir, g_ig, g_ib, g_ic;		// incandescence
35 	static MObject		g_itr, g_itg, g_itb, g_it;	// transparency
36 	static MObject		g_ocr, g_ocg, g_ocb, g_oc;	// color
37 	static MObject		g_otr, g_otg, g_otb, g_ot;	// outTransparency
38 	static MObject		g_nx, g_ny, g_nz, g_n;		// normalCamera
39 	static MObject		g_ldx, g_ldy, g_ldz, g_ld;	// lightDirection
40 	static MObject		g_lir, g_lig, g_lib, g_li;	// lightIntensity
41 	static MObject		g_la, g_ldf, g_ls;		// lightAmbient, lightDiffuse, lightSpecular
42 	static MObject		g_lsf;				// lightShadowFraction
43 	static MObject		g_psi;				// preShadowIntensity;
44 	static MObject		g_lbld;				// lightBlindData
45 	static MObject		g_ltd;				// lightDataArray
46 
47 	static MObject		g_xrd;		// xrayDoubleSide
48 	static MObject		g_xre;		// xrayEngineShader
49 	static MObject		g_xrc;		// xrayCompilerShader
50 	static MObject		g_xrm;		// xrayGameMaterial
51 };
52 
53 #endif
54