I am trying to make a plugin using Python. I have made my PACKAGE file as:
package: AardAnnotate
version: 1.0
rv: 3.6
requires: ''
modes:
- file: AardAnnotate
menu: Tools/AardAnnotate
load: immediate
description: |
<p>Custom RV annotations</p>
And have used the template Python app:
import rv.rvtypes
import rv.commands
class AardAnnotate(rv.rvtypes.MinorMode):
"A simple example that shows how to make shift-Z start/stop playback"
def togglePlayback(self, event):
if rv.commands.isPlaying():
rv.commands.stop()
else:
rv.commands.play()
def __init__(self):
rv.rvtypes.MinorMode.__init__(self)
self.init("AardAnnotate",
[("key-down--Z", self.togglePlayback, "Z key")],
None)
def createMode():
"Required to initialize the module. RV will call this function to create your mode."
return AardAnnotate()
But this does nothing when I click on the menu item. The documentation for Python is not very imformative and I don't know what I need to change to make it work. Any help greatly appreciated!
pyhello-1.0.rvpkg