#define MSS_CLICK_BUTTONS (DM_PRIMARY_BUTTON|DM_SECONDARY_BUTTON)
using namespace HDK_Sample;
void
{
"Custom Brush",
"SOP_proto_custombrush",
0));
}
BM_SceneManager *scene)
{
}
JEDI_View &view,
BM_SceneManager *scene,
const char *cursor)
myBrushHandle((DM_SceneManager &)workbench(), "MSS_CustomBrushState")
{
myIsBrushVisible = false;
myResizingCursor = false;
cparms.
gdp = &myBrushCursor;
#if defined(HOUDINI_11)
#else
#endif
myBrushCursorXform.identity();
myBrushRadius = 0.1;
}
MSS_CustomBrushState::~MSS_CustomBrushState()
{
}
const char *
{
return "MSS_CustomBrushState";
}
int
{
if(op)
}
void
{
myIsBrushVisible = false;
}
void
{
if(op)
}
void
{
myIsBrushVisible = false;
}
int
{
if (!sop)
return 1;
int x =
event->state.values[
X];
int y =
event->state.values[
Y];
{
myResizingCursor = true;
}
else if (myResizingCursor)
{
y - myLastCursorY;
myBrushRadius *=
powf(1.01, dist);
myResizingCursor = false;
}
{
}
else
{
if(begin)
sop->
setFloat(
"radius", 0, t, myBrushRadius);
{
? "erase" : "paint";
}
bool set_op = false;
if (begin)
{
set_op = true;
}
if (active)
{
if(set_op)
{
}
set_op = true;
}
{
if(set_op)
{
}
}
}
return 1;
}
void
{
{
if(ghost)
{
}
else
{
}
myBrushHandle.
renderWire(r, 0, 0, 0, clr, &myBrushCursor);
}
}
void
{
showPrompt(
"LMB to apply stroke. MMB to erase. Shift-LMB to adjust radius.");
}
void
{
myBrushCursorXform.
translate(delta.x(), delta.y(), delta.z());
myBrushCursorXform.
prescale(myBrushRadius, myBrushRadius, 1);
myIsBrushVisible = true;
}