Lorenzo Angeli

  • Content Count

  • Joined

  • Last visited

  • Days Won


Lorenzo Angeli last won the day on April 8

Lorenzo Angeli had the most liked content!

1 Follower

About Lorenzo Angeli

  • Rank
    ftrack staff

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Lorenzo Angeli

    Action on Shot

    hi @Rory here a simple example to translate the entities using the action handler as base class: from ftrack_action_handler.action import BaseAction import ftrack_api class TestAction(BaseAction): label = 'Test Action' identifier = 'com.ftrack.test.action' description = 'Simple test action' def validate_selection(self, entities, event): if not entities: return False results = self._translate_event( self.session, event ) if not results : return False for (entity_type, entity_id) in results[0]: resolved_entity= self.session.get(entity_type, entity_id) print resolved_entity, resolved_entity.entity_type return True def discover(self, session, entities, event): return self.validate_selection(entities, event) def launch(self, session, entities, event): return { 'success': True, 'message': u'Done.' } def register(api_object, **kw): '''Register hook with provided *api_object*.''' if not isinstance(api_object, ftrack_api.session.Session): return action = TestAction(api_object) action.register() hope it helps. L.
  2. Hi @Aaron Powell using the discovery to populate the available applications does not work as it will look into the application store to decide which one to start. The best option at the time seems to be to override the _getApplicationLauncher as by this example to inject the launchArguments you are after. long story short this is what you can simply do: class ApplicationLauncher(ftrack_connect.application.ApplicationLauncher): '''Custom launcher to modify environment before launch.''' def _getApplicationLaunchCommand(self, application, context=None): command = super(ApplicationLauncher, self)._getApplicationLaunchCommand(application, context) command.extend(context.get('launchArguments')) return command The issue is in the original _getApplicationLauncher, which extracts the extra launchArguments from the applications but does not take in account the current context. good news is that we are in the process of reviewing how applications are launched, hence this will be fixed soon. Cheers. L.
  3. Lorenzo Angeli

    Action on Shot

    Hi @Rory, if you look a the action handler, the entity needed to be passed in is the original one coming from the event, there's no need to try to build the entity from the session. hope it helps. L.
  4. Lorenzo Angeli

    Action on Shot

    Hi @Rory, if you want to write new actions I'd suggest having a look at our action handler. Regarding your question is because many of the Context entities comes from a common Task base entity (server side), if you want to properly identify have a look at the _get_entity_type method of the action handler. Hope it helps. L.
  5. Hi @Dave Goodbourn the list of available ones can be found here , if you need more complex ui you can think of using custom html widget . Hope it helps. L.
  6. @Aaron Powell would you mind either paste here the full launcher or send it over support so I can have a closer look ? Thanks. L.
  7. @marc mantei _getApplicationLaunchCommand is a method of the ftrack connect ApplicationLauncher class. Using this as baseclass for your launcher will provide you access to the underlying method. You can see an example in the maya hook hope it helps. L.
  8. Hi @tdugard, users query will respect the roles assigned, so they will have different result depending on what they have been set to, especially in regard of the private projects. If you want to ensure these are maintained I'd suggest setting up different global API keys for different behaviours. hope it helps. L.
  9. Hi @tdugard api are not supposed to return filtered results, unless these limits are bound to your user permissions level. What you should do is to filter out the result for the user you are interested in during the query, something along these lines should work. import ftrack_api import os project_name = 'myproject' # login data is passed to the session through environments session = ftrack_api.Session() ftrack_user = session.query('User where username is {}'.format(session._api_user)).first() tasks = session.query('Task where project.name is "{0}" and assignments.resource_id is "{1}" order by name asc'.format(project_name, ftrack_user['id'])) for task in tasks: print t
  10. Hi @Aaron Powell, extra arguments seems to be passed fine : 'launchArguments': ['c:\\Users\\aaron\\Desktop\\lookdev_addon.blend'], but then does not get populated when running the application 2020-06-20 11:55:34,786 - ftrack_connect.application.ApplicationLauncher - DEBUG - Launching ['C:\\Program Files\\Blender Foundation\\Blender 2.82\\blender.exe'] as by https://bitbucket.org/ftrack/ftrack-connect/src/57ece813d21bff72621c1a6a58feb958cd0557cd/source/ftrack_connect/application.py#lines-364 your Launching command should contain your extra arguments. in order to further debug you can overwrite _getApplicationLaunchCommand to print the command before being returned to the actual popen function. Hope it helps. L.
  11. in the ftrack_connect logs you should have the full command which gets executed by subprocess in a line such as : try to manually run it to see if there's any error. let us know how it goes. L.
  12. Lorenzo Angeli


    Download 2.4.0 What's new Fixed Rebuild track from exported episodes does not work.. Changed Ensure shot export path is consistent with the location structure generated.. New Add 'Ftrack Copy Exporter' for publish file or sequence to ftrack without transcoding. Fixed Tokens are not always parsed correctly. Changed Ensure shot output path normalized when replacing shot name. Changed Replace fixed version with automatic versioning from git repository. Fixed Reviewable export audio breaks on earlier Nuke Studio versions (version < 12.1). Fixed Reviewable Task break when including audio. How to install stop ftrack-connect-package remove previous nuke studio plugin from : <ftrack-connect-package>/resource/connect-standard-plugins/ download and uncompress the new version in : <ftrack-connect-package>/resource/connect-standard-plugins/ restart ftrack-connect-package
  13. Hi @Alex Sknarin, Starting with ftrack 4.1, new accounts does not receive a API key by default and API keys can only be viewed when they are created. To generate a personal API key, you can press “Reset API Key” from My account. There is a slight difference though in the presentation in the UI: No API key set looks like: ******************** An API key set looks like: MXN5Y******************** Where the first characters are a readable identifier for the key. hope it helps. L.
  14. Hi @Aaron Powell, depending on where you file lives (location type), you can use either : location = session.pick_location() location.get_filesystem_path(component) or location = session.pick_location() location.get_url(component) Hope it helps. L.
  15. Hi @daans, so glad to hear you sorted it out! if you happen to have any other issue, please let us know! Cheers. L.