Duncan Posted March 6, 2019 Report Share Posted March 6, 2019 Hi all, I'm just starting with creating custom actions but I am having trouble getting any of them to show up. For example, just to test, I have tried adding this code, which I found on a thread here, to my \ftrack-connect-plugins\hook\ folder- import ftrack_api class TestAction(object): identifier = "test_action" label = "Test Action" def __init__(self, session): super(TestAction, self).__init__() self.session = session def register(self): self.session.event_hub.subscribe('topic=ftrack.action.discover and source.user.username={0}'.format(self.session.api_user), self.discover) self.session.event_hub.subscribe('topic=ftrack.action.launch and source.user.username={0} and data.actionIdentifier={1}'.format(self.session.api_user, self.identifier), self.launch) def discover(self, event): items = [{'label': self.label, 'actionIdentifier': self.identifier}] return {'items': items} def launch(self, event): print "Launching the App" return { 'success': True, 'message': 'Action launched successfully.' } def register(session, **kw): if not isinstance(session, ftrack_api.Session): return action = TestAction(session) action.register() However, no new actions are showing in ftrack connect or when opened from the web interface. I have installed the api and am able to access ftrack using python in the command line. Is there something I'm missing to make the action work? Link to comment Share on other sites More sharing options...
Duncan Posted March 6, 2019 Author Report Share Posted March 6, 2019 OK I've just found the houdini tutorial here - http://ftrack-connect.rtd.ftrack.com/en/stable/developing/tutorial/custom_applications.html and that seems to be working, so I will work on adapting that... Link to comment Share on other sites More sharing options...
JPrydz Posted March 7, 2019 Report Share Posted March 7, 2019 Hi Duncan, Ok, sounds like you're able to proceed with your actions. Let us know if you have any further questions. /Johan Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.