Skip to content

Instantly share code, notes, and snippets.

@lukpazera
Created December 12, 2018 11:29
Show Gist options
  • Select an option

  • Save lukpazera/809f66a3d895d488452e78ee09a09bc0 to your computer and use it in GitHub Desktop.

Select an option

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.
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