Jump to content

Query Project Schema Objects

lukas g

Recommended Posts

Hello, :)

I need to write some checks using the python api to make sure the current ftrack project is configured correctly. There fore i need to query the currents project Project Schema and check its configuration.
Specifically: I need to query the assigned Objecty (ObjectTypes) of a Project Schema.


I can access the the Types and objects with 'ProjectSchema.get_types()'  as well as the statuses an by calling  'ProjectSchema.get_statuses()' but i can't  find a way to actually figure out if an object (ObjectType) is assigned to the list of objects of the particular Project Schema.

(I can easily find out if a specific object type exists at all using 'session.query("ObjectType where name is my_object_type_name")' but not which schemas it is assigned to.)

I know from a different post, that creating new ProjectSchemas and "manage" them (editing them?) is only supported using the GUI. But What about retrieving the assigned Objects (ObjectTypes) ? It should be possible i guess.

The Docs from ProjectSchema dont show any more methods:

Examples for get_types() and get_statuses:


I Hope someone can help me out.

Thank you in advance


Link to comment
Share on other sites

Maybe there is another way of finding out which object types are assigned to my project so i can prevent a ServerError like this from happening:
"ServerError: Server reported error: ValidationError(Object type u'Shot' cannot be created on project u'Lukas Dev'.)"


The only solution i found for now i to try to create the desired types on startup to check if i can create them and catch the server error and show it to the TD to properly configure the ftrack project.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...