-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.h
More file actions
39 lines (35 loc) · 1.04 KB
/
Copy pathplugin.h
File metadata and controls
39 lines (35 loc) · 1.04 KB
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
#pragma once
#include <maya/MArgList.h>
#include <maya/MSyntax.h>
#include <maya/MPxCommand.h>
#include <maya/MVector.h>
#include <array>
#include "custommayaconstructs/draw/voxelrendereroverride.h"
#include <maya/MEventMessage.h>
using namespace MHWRender;
struct PluginArgs {
MPoint position{ 0.0f, 0.0f, 0.0f };
MVector rotation{ 0.0f, 0.0f, 0.0f };
double voxelSize{ 1.0 };
std::array<int, 3> voxelsPerEdge{ 2, 2, 2 };
MString selectedMeshName;
bool voxelizeSurface{ false };
bool voxelizeInterior{ false };
bool renderAsVoxels{ false };
bool clipTriangles{ false };
};
// TODO: move this command into the commands folder
class plugin : public MPxCommand
{
public:
plugin() {};
// Called when the command ("cubit") is executed in Maya
virtual MStatus doIt(const MArgList& args);
PluginArgs parsePluginArgs(const MArgList& args);
// Called when the command is registered in Maya
static void* creator();
static MSyntax syntax();
static VoxelRendererOverride* voxelRendererOverride;
static MCallbackId toolChangedCallbackId;
private:
};