aboutsummaryrefslogtreecommitdiff
path: root/mayaPlug/shavePack2TexCmd.h
blob: 951454f019d16c51811f777590ab3bd0a62145c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef _HAIR_P2T_COMMAND_H_
#define _HAIR_P2T_COMMAND_H_

// Shave and a Haircut
// (c) 2019 Epic Games
// US Patent 6720962

/**********************************************************************
 *<
	FILE:			shavePack2TexCmd.h  

	DESCRIPTION:	command for packing hair data to image file

	HISTORY:		created  23-04-2013 

 *>
 **********************************************************************/

#include <maya/MPxCommand.h>
#include <maya/MArgList.h>
#include <maya/MCommandResult.h>
#include <maya/MSyntax.h>
#include <maya/MImage.h>


class shavePack2TexCmd : public MPxCommand {
public:
	// command
	//
	static MString cmd;

	// flags
	//
	//destinatin file
	static char* sf_file;
	static char* lf_file;

	//hair node name
	static char* sf_hair;
	static char* lf_hair;

	shavePack2TexCmd(){}
	virtual ~shavePack2TexCmd(){}

	static void *creator() {return new shavePack2TexCmd;}
	static MSyntax newSyntax();

	virtual MStatus	doIt(const MArgList&);

protected:

	bool findNodeByName(const MString& name, MObject& thenode) const;
	bool copyToImage(MObject thenode, MImage& image) const;
};

#endif