I've been studying this Dual Functionality question and trying to get something similar going, however for a slightly different need. I'm trying to create a hotkey that is repeatable, and cycles through 3 or more operators. Activate the hotkey once correlates with the first operator, 2 times with the 2nd operator, 3 etc, and once you hit it the last time it loops back to the 1st operator. I can get this to work with just two operators, but not 3 or more.

I'm assuming this is a failure to figure out the counting system. How does the counting system work? From my understanding


sets it to start at 0.

if self.count ==1

adds a 1 to it and says "if it's 1, do this..". The final 0 in the elif

self.count = 0

sets it back to zero and thus the loop (return {'CANCELLED'} presumably). Adding additional elif statements with self.counts at higher numbers are either just skipped when I attempt to do it or break the script. What am I missing?

  • $\begingroup$ Paste an example code that doesn't work as you would expect it to, then we can point out where's the mistake. $\endgroup$ Feb 18 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.