All Activity

This stream auto-updates     

  1. Yesterday
  2. Ok, so here's a little update! If I run the action against the component, I can pull the file path with: selection = event['data'].get('selection', []) component = self.session.get('Component', selection[0]['entityId']) if component is not None: # this is an internal function that prints to a file on my desktop for quick debugging # returns 'u'https://ftrack-us-east-1.s3-accelerate.amazonaws.com/68d68ada-9f98-11ea-96a3-42010af0000d/storage/5/5/0/f/f586-a218-11ea-8422-72ed585b6b9d?Signature=iUglFLXGsXDm4pTY7RvA5gFxn%2BQ%3D&Expires=1590812357&AWSAccessKeyId=AKIAYKW36AUCL5BMAVWP' self.__debug(component['component_locations'][0]['url']['value']) Is there a better way to do this or am I on the right track?
  3. Last week
  4. @Lorenzo Angeli These links are incredibly helpful. Adding the path with launchArguments works perfectly. I can use the context['selection'] data to look up the file name I assume, right? I see I get an entityId and type, so I'll start playing around with the API and reference the links you sent me. Thanks again!
  5. 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.
  6. It look like the problem is that ftrack_api.Session._request.post() have no timeout in ftrack_api.Session.call(), so control never returned to main thread to test EventHub connection
  7. Hi, all. I making ftrack services with docker containers with auto restart and i found that if you disconnect a network with docker, event hub will just attempt to to reconnect 30 times * 10 seconds and then just sleep. Event EventHub.connected will be truth, i think it is because of unlogged error in EventHub.disconnect()
  8. 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.
  9. I built a little Blender launcher action for Connect so I can integrate ftrack with my current studio setup. I have a basic launcher working well, and can open Blender both from Connect and the ftrack interface. How do I go a step further and tell it to open the component file associated with an asset? I've found some documentation pointing me in the right direction, but can't seem to make it to the finish line. Any pointers would be appreciated! I assume I should be grabbing the file location from the asset and pushing it through either the event data's "command" or "options" variables (http://ftrack-connect.rtd.ftrack.com/en/stable/developing/hooks/application_launch.html#developing-hooks-application-launch). Because opening a blend file from the command line isn't a keyword argument (ie, "blender my_blend_file.blend") it should be under the command variable, but I can't figure out how to get it to work. Here is my launch function: def launch(self, event): '''Callback method for Blender action.''' applicationIdentifier = ( event['data']['applicationIdentifier'] ) self.logger.debug( pprint(event['data']) ) context = event['data'].copy() # Tried opening a test file, but this crashes the action. Removing it opens default Blender file. #context['data']['command'].append('C:\\Users\\aaron\\Desktop\\test.blend') return self.launcher.launch( applicationIdentifier, context ) I've spent some time in the Maya action source code, but found little helpful for this particular problem. https://bitbucket.org/ftrack/ftrack-connect-maya/src/394b8d7a065bb67469386391caa9d883165e926a/resource/hook/ftrack_connect_maya_hook.py?at=master#ftrack_connect_maya_hook.py-74,89,117,126,131,134,137:138
  10. If you want to go directly through the project, you can look at its "assignments" key. You can tweak the code above to query Assignment instead of Task. Edit: Although to be fair I'm not sure the "assignments" key in a project will give you assignments for every children. I don't believe the project has assignee so it might work. I haven't tried doing so this way.
  11. oh, projection should be fast enough. Thank you. Just to clarify: Project dosen't have some property that holds users from tasks?
  12. Yes I have standalone tool that used list of projects that's loaded from Ftrack. I need to show only projects that user is involved in. Ah, get from user side. Ok I'll try but I will need to get list of all tasks that artist is assigned to so it could be slower
  13. Here is a quick example; let's suppose you have the user ID and you need to find out the list of projects he/she has assigned. session = #<build your session here> user_id = '805cf360-115e-11e5-ax81-002593f15914' # This query looks at active projects only task_query = 'select project.id, project.name, project.full_name from Task where project.status is active and assignments any (resource_id={})'.format(user_id) ft_tasks = session.query(task_query).all() for task in ft_tasks: project_id = task['project']['id'] project_code = task['project']['name'] project_name = task['project']['full_name'] print(project_code, project_name, project_id)
  14. What's your end goal? Find a list of projects that user X is assigned to? If so I would instead query the assignments for the user and find the project from there.
  15. Hi For example I have list of projects: Project01 Project02 Project03 Project04 I also have some user assigned to some tasks in Project02 and Project03. How could I query only that projects?
  16. 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.
  17. 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.
  18. Hi, I know how to add and customize action in ftrack, but I was wondering is there a way to play an uploaded media with an external player (in order to play correctly a 360° video degree), without using actions. If possibile to add a custom menu through the ftrack api next to "Launch Web player, "Launch RV", "Launch HieroPlayer", so I can launch my custom application to play that uploaded media? Is good for me just know if possibile to do that, so I can start to work on it! Thanks again for your great work. Andrea
  19. and how to make sure whether this ftrack_client.py work
  20. our unity version is 2019.3.8f1. we launched it from unity connector ,and dig into init.cs 's code . it seems that the $"{resourcePath}/scripts/ftrack_client.py" does not start correctly. we also checked the windows background for this ftrack_client.py, it did not appear in task manager list.
  21. Earlier
  22. Environment: MacOS 10.15.4 Python 3.8.1 ftrack-python-api 2.0.0
  23. Hi, When I was trying to connect to event hub (ftrack studio on cloud), I got an exception(paths and domain name have been masked): Traceback (most recent call last): File "-*-/threading.py", line 932, in _bootstrap_inner self.run() File "-*-8/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "-*-/ftrack_api/event/hub.py", line 191, in connect raise ftrack_api.exception.EventHubConnectionError( ftrack_api.exception.EventHubConnectionError: Failed to connect to event server at b'https://-*-.ftrackapp.cn' with error: "b'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)'". But if start session without "auto_connect_event_hub=True" the session can be created. Any clue? Cheers, John
  24. Hello im passing in a spreadsheet into python trying to create many asset builds and folder etc. from this and i keep getting the below error which i believe is because i have multiple objects in the same hierarchy so its trying to create the upper objects int he hierarchy twice, what is the best way you guys have found to catch this or query if that item exists before creating my code it similar to below below ERROR ftrack_api.exception.ServerError: Server reported error: IntegrityError((_mysql_exceptions.IntegrityError) (1062, "Duplicate entry '780a712a-9bc3-11ea-b9ae-d61ccb4e321b-Assets' for key 'context_parent_id_key'") [SQL: u'INSERT INTO context (context_type, name, parent_id, id) VALUES (%s, %s, %s, %s)'] [parameters: (('task', 'Assets', u'780a712a-9bc3-11ea-b9ae-d61ccb4e321b', u'2fec278a-12d1-44fa-8e26-adc3b218a6bf'), ('task', 'Assets', u'780a712a-9bc3-11ea-b9ae-d61ccb4e321b', u'72fd181f-f72d-4f87-9cd8-74e579cfa588'), ('task', 'Assets', u'780a712a-9bc3-11ea-b9ae-d61ccb4e321b', u'9261c102-080b-45c6-9a07-d3e4eeca3fc1'))] (Background on this error at: http://sqlalche.me/e/gkpj)) [Finished in 21.9s] CODE: task = FTrack_session.create(object_type,{'name':object_name,'parent':FTrack_object_parent})
  25. I have not tried the first solution. The second one does not work. I found a solution to this. session.reset() Using session.reset() to replace session.cache.clear() seems working fine for me now. Thanks for the help, Lorenzo.
  26. 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()
  27. Thanks, Lorenzo I'm sorry but It doesn't work. I tried the session.populate(project, 'notes'), but the result is same as not using the code, just like before when I didn't add cache.clear(). Newly created notes were removed. Seems like the session data is not updated. The code I've changed is like below:
  1. Load more activity