aboutsummaryrefslogtreecommitdiffstats
path: root/observer_test.py
AgeCommit message (Collapse)Author
2015-11-19observer_test.py: Remove test print statementTeddy Wing
2015-11-19observer_test.py: Center on 'a' key pressTeddy Wing
A lot of testing code from when I was trying to get this to work. Actually just trying to inspect the objects/event. Unfortunately, `print`ing and `pdb` don't seem to work. Fortunately managed to get enough information from the `ObjectBrowser` once I figured out that I could use that for inspecting. The `print 'test'` at the end was just for me to confirm that the script was running when I couldn't see any outward evidence of that fact. Finally figured out what was going on and now the script will center when you press 'a' in the Space Center. Future enhancements include: * Add undo support * Make sure `center()` does what we're looking for and actually equalises sidebearings * Add a setting that allows users of the plugin to customise the hotkey through a custom interface (and ideally through a text configuration file as well).
2015-11-19observer_test.py: Convert to new Python classTeddy Wing
Inherit from `object` instead of not inheriting from anything to get a new Python class. Actually, now that I'm writing this message, I'm wondering if this may not be necessary since Python 3 defaults to new Python objects regardless of how you write it. But then again this is RoboFont and I'm not sure which Python version it's built against (was thinking of TruFont for a moment since I'm currently trying to build it).
2015-11-19Initial commit. Placeholder RoboFont observer code.Teddy Wing
Start with RoboFont's sample code for creating an observer. The goal is to observe key presses in Space Center and equalise sidebearings when a special key is pressed so that this functionality can be triggered from the keyboard instead of needing to open the control-click contextual menu and selecting it from the menu options.