deex 1 Posted October 19, 2015 Report Share Posted October 19, 2015 Hello, I have added custom attributes to shots.When i do a query like this :tasks = session.query( 'Shot where name is {0} and ' 'parent.name is {1} and ' 'project.name is {2} ' .format(shotName, sequenceName, projectName ) )My custom attributes are not here. How can i do this please ? Link to post Share on other sites
deex 1 Posted October 19, 2015 Author Report Share Posted October 19, 2015 Ok i will try this : http://ftrack-python-api.rtd.ftrack.com/en/latest/example/custom_attribute.html#example-custom-attribute Link to post Share on other sites
deex 1 Posted October 19, 2015 Author Report Share Posted October 19, 2015 Doesn't work : session = ftrack_api.Session() shots = session.query( #===================================================== # 'select fstart, fend, duration, startHandles, endHandles, fsequenceend, fsequencestart ' #===================================================== 'Shot where name is {0} and ' 'parent.name is {1} and ' 'project.name is {2} ' .format(shotName, sequenceName, projectName ) ) for i in shots: print i.keys() print i['custom_attributes'] print i['custom_attributes'] File "C:\Python27\lib\site-packages\ftrack_api\entity\base.py", line 167, in __getitem__ raise KeyError(key)KeyError: 'custom_attributes' Link to post Share on other sites
Mattias Lagergren 145 Posted October 20, 2015 Report Share Posted October 20, 2015 Hi, What version of ftrack are you running on the server? Custom attributes support requires ftrack server version 3.3.2+:http://ftrack.rtd.ftrack.com/en/latest/release/release_notes.html Link to post Share on other sites
deex 1 Posted October 20, 2015 Author Report Share Posted October 20, 2015 Hi, What version of ftrack are you running on the server? Custom attributes support requires ftrack server version 3.3.2+:http://ftrack.rtd.ftrack.com/en/latest/release/release_notes.html Hi, The server version is : 3.2.4.4348How do we can update please ? Thank you,Damien Link to post Share on other sites
Mattias Lagergren 145 Posted October 21, 2015 Report Share Posted October 21, 2015 Hi Damien, I will contact you by e-mail to help you get upgraded. Link to post Share on other sites
deex 1 Posted October 21, 2015 Author Report Share Posted October 21, 2015 Thank you Mattias Link to post Share on other sites
deex 1 Posted November 20, 2015 Author Report Share Posted November 20, 2015 Hi, We are using FTrack 3.3.6.4382, last new API, and we have empty result when we query custom attributes... Link to post Share on other sites
Mattias Lagergren 145 Posted November 24, 2015 Report Share Posted November 24, 2015 Hey, Could you provide some more information, such as: * Code example* Information about the project structure and custom attributes you are using* Expected result More information here:http://ftrack-python-api.rtd.ftrack.com/en/latest/example/custom_attribute.html Link to post Share on other sites
deex 1 Posted December 2, 2015 Author Report Share Posted December 2, 2015 Hi, Code example :import ftrack_apisession = ftrack_api.Session()projects = session.query( 'Project where status is active and ' '(full_name like "ftrack test")')tasks = session.query('Task where project.id is "{0}"'.format(projects[0]['id'])).all()for task in tasks: customAttr = task['custom_attributes'] print customAttr.keys() for attr in customAttr: print attr.keys()The project : Custom attribute (some are hierarchical) : Code result :[][][][][][][][][][][][][][][]Expected result :Something not empty. Hey, Could you provide some more information, such as: * Code example* Information about the project structure and custom attributes you are using* Expected result More information here:http://ftrack-python-api.rtd.ftrack.com/en/latest/example/custom_attribute.html Link to post Share on other sites
Mattias Lagergren 145 Posted December 3, 2015 Report Share Posted December 3, 2015 Hi deex, I noticed that you are querying for tasks but the screenshot you shared is showing a Sequence. Do you have custom attributes on the tasks as well, other than hierarchical? Accessing hierarchical attributes are not supported at present:http://ftrack-python-api.rtd.ftrack.com/en/latest/example/custom_attribute.html#hierarchical-attributes Link to post Share on other sites
deex 1 Posted December 3, 2015 Author Report Share Posted December 3, 2015 Ah, all my custom attributes are hierarchical. It is why it doesn't work. Hi deex, I noticed that you are querying for tasks but the screenshot you shared is showing a Sequence. Do you have custom attributes on the tasks as well, other than hierarchical? Accessing hierarchical attributes are not supported at present:http://ftrack-python-api.rtd.ftrack.com/en/latest/example/custom_attribute.html#hierarchical-attributes Link to post Share on other sites
Nebukadhezer 2 Posted February 17, 2017 Report Share Posted February 17, 2017 is there news on this topic ? From the docs it reads as though it was possible, only I need to loop through all parents myself, But I cannot even see hierarchical attr in the custom attributes keys ... cheers Link to post Share on other sites
Mattias Lagergren 145 Posted February 20, 2017 Report Share Posted February 20, 2017 On 17/02/2017 at 4:56 PM, Nebukadhezer said: is there news on this topic ? From the docs it reads as though it was possible, only I need to loop through all parents myself, But I cannot even see hierarchical attr in the custom attributes keys ... No news at the moment. On your custom attribute configuration there should be a `is_hierarchical` to indicate if it is a an hierarchical attribute.. Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now