Toggle between tools?

Toggle between tools?

Anonymous
Not applicable
892 Views
2 Replies
Message 1 of 3

Toggle between tools?

Anonymous
Not applicable

Hi, im trying to do something very simple, i want to bind hotkeys for several things. Among them the ability to toggle between marquee modes, selection modes, so on and so forth. Ive had luck with simple things as toggle between orintation modes. But now im trying to do one to toggle between selection constratins.

 

I want to be able to quickly turn off/on the angle constraint without ever going up to the little drop down menu. So far i got this bit of code, which works, except im not sure why im getting a syntax error.

 

string $angleConstrain = `dR_DoCmd("selConstraintAngle")`;
if ($angleConstrain == "0");
dR_DoCmd("selConstraintAngle");
else
dR_DoCmd("selConstraintOff");
0 Likes
893 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

Had a friend helped me out, if anyone is curious. Besides the ; on the if statement he made other suggestions. And it worked perfectly.

 

global int $angleConstrainBool;
if ($angleConstrainBool == 0)
{
    selectPref -paintSelect 0; 
    dR_DoCmd("selConstraintAngle");
    $angleConstrainBool = 1;
} 
else 
{
    dR_DoCmd("selConstraintOff"); 
    $angleConstrainBool = 0;
}
Message 3 of 3

deepakamba13
Enthusiast
Enthusiast

v good one more    (Tweak/Marquee) show hide please Tweak.png

0 Likes