How to make toggle button for stylus pressure function on/off by mel script


#1

Hello ~
I need a help from you guys.
Maya 2022 has stylus pressure function and it’s good and I want to make the toggle button and hotkey on maya to improve my skills
You can see the stylus pressure function on…
rigging mode -> skin>paint skin weights (option)
on tool settings > stylus pressure > stylus pressure

here I tried to make the code but I failed…

if(artAttrSkinPaintCtx -e -usepressure true currentCtx == 1)
{
artAttrSkinPaintCtx -e -usepressure false currentCtx;
} else(artAttrSkinPaintCtx -e -usepressure false currentCtx == 1)
{
artAttrSkinPaintCtx -e -usepressure true currentCtx;
}

I hope you guys help me to solve that code plese