Lorenzo Angeli

Administrators
  • Content Count

    207
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by Lorenzo Angeli

  1. All platforms: Download 1.0.3 Documentation Changes since last version fixed : Action icons not correctly loading. changed: Version comments are published as Perforce changelist description. new : Update docs to include timeout solution for credentials. 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
  2. Hi @Bryan Fordney we have a similar integration for Nuke Studio and we are looking into the user base requests for other DCC applications. Are these the kind of features you would be after ? Cheers. L.
  3. Lorenzo Angeli

    Importing Modules

    Hi @Rory , as long as the module you are importing are in PYTHONPATH it should work. If you have both python2 and 3 available be careful though as the variable is the same for both and can lead to issues. If you still have issues, please send the relevant code to our support providing details about where the third party module is located and how has it been installed. Cheers. L.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. @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.
  10. @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.
  11. 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.
  12. 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
  13. 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.
  14. 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.
  15. Lorenzo Angeli

    2.4.0

    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
  16. 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.
  17. 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.
  18. Hi @daans, so glad to hear you sorted it out! if you happen to have any other issue, please let us know! Cheers. L.
  19. Hi @daans, Although I wouldn't suggest to install modules system wise (either installing on the user or in virtualenvs), ftrack api can totally be imported and put to the use from within Nuke and without the connect support. Looking at the error you are having : ImportError: No module named backports.functools_lru_cache seems some dependencies are not properly installed, or not picked up from Nuke itself. But I'd say the latter if you can make them work from pure python shell. As test I've been creating (under Linux Centos 7 , but should not make any difference for Ubuntu) a virtual environment as: python -m virtualenv api-test -p python2.7 (note, python2.7 is an alternative python built of 2.7.18 as C7 ships with 2.7.5 which is too old for the api to work) and then activating the virtualenv and installing the api with : python -m pip install ftrack-python-api started nuke (12.1v2) with and then from the Script editor: import sys sys.path.insert(0, '/home/ftrackwork/.venv/api-test/lib/python2.7/site-packages') import ftrack_api s = ftrack_api.Session() # note I've the my credentials in the environment variables print s.query('Project').all() > # Result: [<dynamic ftrack Project object 140663537353232>, <dynamic ftrack Project object 140663537353488>, <dynamic ftrack Project object 140663537353552>, <dynamic ftrack Project object 140663537353040>, <dynamic ftrack Project object 140663537353104>, <dynamic ftrack Project object 140663537353168>, <dynamic ftrack Project object 140663537353424>, <dynamic ftrack Project object 140663537353808>, <dynamic ftrack Project object 140663537353680>] hope it helps. L.
  20. Thanks @Konstantin Maslyuk we'll go through them asap. Cheers. L.
  21. hi @Konstantin Maslyuk thanks for reporting. We'll be having a closer look as soon as possible (or feel free as usual to open a PR in case )! L.
  22. Hi @Aaron Powell have you tried using the 'launchArguments' rather than data.command ? you can see how it gets used in nuke (in this case from the discovery itself) https://bitbucket.org/ftrack/ftrack-connect-nuke/src/77c27edbab69316fc09a3b37f77852c9b8adadd7/resource/hook/ftrack_connect_nuke_hook.py#lines-276 and how gets interally used: https://bitbucket.org/ftrack/ftrack-connect/src/e9c26b4007b03825f1fcf5b0346a4260c38ad45b/source/ftrack_connect/application.py#lines-416 hope it helps. L.
  23. Hi @intelyuxiang as first thing I would check if your machine provides the prerequisites: http://ftrack-connect-unity-engine.rtd.ftrack.com/en/latest/install.html When Unity start up correctly, you should be having a python interpreter opening in a shell like: and a python process running: Hope it helps. L.
  24. Hi @Andrea Perisano, there's no way to customise the dropdown menu I'm sorry. The way to go is to provide an action which launches your review based on either lists, or components. Hope it helps. L.
  25. Hi @chengshun neither does adding the notes in the projection ? entity_ins = self.session.query('select notes from AssetVersion where id is %s' % sel_id).first()