aboutsummaryrefslogtreecommitdiff
path: root/mayaPlug/shaveCutCtx.cpp
blob: 3729886a84da3f92037bda16147fd5266639febb (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
// Shave and a Haircut
// (c) 2019 Epic Games
// US Patent 6720962

#include <iostream>
using namespace std;

#include <maya/MPxContext.h>
#include <maya/MString.h>

#include "shaveCutCtx.h"
#include "shaveSDK.h"

const MString	shaveCutCtx::mCtxTypeName = "shaveCut";


shaveCutCtx::shaveCutCtx()
{
	setTitleString("Shave Cut Tool");
	setImage("shaveCut.xpm", MPxContext::kImage1);
}


shaveCutCtx::~shaveCutCtx()
{
}


MStatus shaveCutCtx::strokeBegin(
	VERT& eyePoint, VERT& viewDir, VERT& upDir, VERT& screenPos, VERT& worldPos
)
{
	SHAVEcut(
		eyePoint,
		viewDir,
		screenPos,
		worldPos
	);

	//
	// We don't care about the rest of the stroke, so let the caller know
	// this by returning kEndOfFile.
	//
	return MS::kEndOfFile;
}