Created
December 12, 2018 11:29
-
-
Save lukpazera/809f66a3d895d488452e78ee09a09bc0 to your computer and use it in GitHub Desktop.
An example of setting up a notifier for command argument in MODO SDK. Snatched from post by James O'Hare on MODO slack coding channel.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Notifier(lxifc.UIValueHints): | |
| def __init__(self): | |
| self._notifiers = [('channel.value', '+v channelName itemType'),] | |
| def uiv_NotifierCount(self): | |
| return len(self._notifiers) | |
| def uiv_NotifierByIndex(self, index): | |
| return self._notifiers[index] | |
| class MyCommand(lxu.command.BasicCommand): | |
| def arg_UIValueHints(self, index): | |
| if index == IndexForNotifier: | |
| return Notifier() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment