
Yas Opisso
Members-
Content Count
12 -
Joined
-
Last visited
About Yas Opisso
-
Rank
Member
Profile Information
-
Gender
Female
Recent Profile Visitors
450 profile views
-
How to Query only Projects that have some exact user assigned?
Yas Opisso replied to Alex Sknarin's topic in API
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. -
Yas Opisso reacted to a post in a topic: How to Query only Projects that have some exact user assigned?
-
How to Query only Projects that have some exact user assigned?
Yas Opisso replied to Alex Sknarin's topic in API
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 -
How to Query only Projects that have some exact user assigned?
Yas Opisso replied to Alex Sknarin's topic in API
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. -
If you don't want Ftrack to manage the locations for you, you could use the ftrack.unmanaged location and publish the files using that location. You can query the location like this: location = session.query('Location where name is "ftrack.unmanaged"').first()
-
Yas Opisso reacted to a post in a topic: Change Version Number when creating Assets/Asset Versions
-
Change Version Number when creating Assets/Asset Versions
Yas Opisso replied to Tom Mikota's topic in API
Hi, I would change the Asset query from .one() to .first() if you leave .one() it will complain that the Asset doesn't exist (ftrack_api.exception.NoResultFoundError), setting it to .first() will return None which will properly trigger your if not asset: code block. There should only be one Asset with the same name under the same parent so .first() should work just fine. If you still need to set the version numbers yourself (at times we do that to make sure that the version has the same number that the component published) and you want to avoid duplicate errors, much like what you did with th -
Here's a quick snippet for you. import ftrack_api # Your info goes here session = ftrack_api.Session( server_url='http://your.server.com', api_key='11111111-22222-33333-44444-5555555555555555', api_user='yourusername' ) # Queries all priorities (so you can know their names/values/id etc) priorities = session.query('Priority').all() for p in priorities: print p.keys() # Queries a priority by name priority_name = 'Extreme' # 'Low, Medium, High' priority_extreme = session.query('Priority where name is "{}"'.format(priority_name)).one() # Queries a task/entity ftrack_ta
-
# This will query all the users. Uncomment the print statement # if you want to see what keys are available to the entity users = session.query('User').all() for user in users: # print user.keys() print user['username'] # If you know what values you need you can use select to speed things up # Carefull, too many selects can actually slow you down on large queries users = session.query('select username from User').all() for user in users: print user['username'] # Ultimately if you want to query a specific user here's how you do it. # Replace JDoe with the actual user name. users =
-
Has a "not so hacky" way of doing this been implemented in the new api?
-
Yas Opisso started following API
-
Yas Opisso reacted to a post in a topic: quality levels for review
-
get the actual status of a task (...as we see them in webUI)?
Yas Opisso replied to Henrik Cednert's topic in API
Hi Henrik, Just FYI you can also query the tasks of a specific user by getting the user and then getting his/her tasks. user = ftrack.getUser ('UserName') # This gets the usertasks = ftrack.getTasks(user) # Gets the current tasks for the particular user from here you can get the task statuses by: task[0].getStatus().get('name') PS: I don't realized you answered this already -
Hi guys, I'm having this issue with connect. It won't open up. I uninstalled it and re-installed several times with no luck. Any Ideas? File "C:\Program Files\ftrack-connect-package\library.zip\cx_Freeze__init__.py", line 29, in <module>File "C:\Program Files\ftrack-connect-package\library.zip\ftrack_connect_package__main__.py", line 70, in <module>File "C:\Program Files\ftrack-connect-package\common.zip\ftrack_connect\__main__.py", line 77, in main theme=namespace.themeFile "C:\Program Files\ftrack-connect-package\common.zip\ftrack_connect\ui\application.py", line 83, in __init__
-
Yas Opisso reacted to a post in a topic: Nuke Integration - How to?
-
Hi, When I right click on an task, Photoshop is the only software that's available in the Actions menu. Any Idea about what is it I'm missing? The hooks are installed (Nuke in my case). Also, is there any other way I could Implement the plugging in Nuke without calling it from FTrack? Thanks in advance. PS: I have nuke 9.0v5 & 8.0v6 installed