keyframe Posted October 20, 2017 Report Posted October 20, 2017 Heya everyone, I'm attempting to prevent users from renaming entities in an action subscribed to the ftrack.update event. In doing so, I set off another ftrack.update event, which calls the action, which sets off another ftrack.update event. Any clues would be most appreciated. G
Mattias Lagergren Posted October 23, 2017 Report Posted October 23, 2017 There might be some interesting discussions for you here:
Remus Avram Posted November 1, 2017 Report Posted November 1, 2017 Hi @keyframe we have this already implemented in our system. Let me know if you need any help with it.
keyframe Posted November 1, 2017 Author Report Posted November 1, 2017 @Remus Avram: Thank you Remus, we ended up following your breadcrumb and creating a dedicated API user to filter through the events. Works like a charm, but quite disappointing that it requires a license. Thanks again for the offer to help. It's much appreciated. Cheers, G
Björn Rydahl Posted November 2, 2017 Report Posted November 2, 2017 Hi Everyone, here is a workaround for this issue. I can't guarantee that it works in all situations or that we will not change something in the future causing it to fail. When creating the API session you will use to make the changes you can set the client token header which will be included in update events triggered from that update. session = ftrack_api.Session() session._request.headers.update( {'ftrack-clienttoken': 'API-EVENT-UPDATER-TOKEN'} ) Then in your listener you can get clientToken from the data in the event to check if you were the one triggering this event. Good luck!
keyframe Posted November 5, 2017 Author Report Posted November 5, 2017 On 11/2/2017 at 5:26 PM, Björn Rydahl said: I can't guarantee that it works in all situations or that we will not change something in the future causing it to fail. Thanks Bjorn. Way to sell the appraoch! G
Björn Rydahl Posted November 9, 2017 Report Posted November 9, 2017 I just dont want you to come after me if it does change. We are however discussing this internally and considering adding it to the API clients so that you dont have to add the headers yourself which would make it a permanent solution. Cheers
Recommended Posts
Archived
This topic is now archived and is closed to further replies.