Tim Edelmann

  • Content count

  • Joined

  • Last visited

About Tim Edelmann

  • Rank
    Advanced Member

Recent Profile Visitors

203 profile views
  1. dynamic enumerator and current selection

    ah.. ok thats good to know! I'm glad, this work around does the trick. thank you.
  2. Hierarchical Custom Attribute Change Event

    any news on this? we also would like to use this functionality A question that is very close to this: We have multiple multi-selection, hierarchical custom attributes. One of them triggers ftrack.update when changing its values (and clicking somewhere outside), the others don't!?!? Can anybody explain this? This is confusing. Thanks in advance Tim
  3. dynamic enumerator and current selection

    Additional information: We noticed, that the ids look different and we don't know why?? normal ids look like this: '75b59aae-e1bb-11e7-ad88-7ab7a47c9dda' while the one retrieved here looks something like this: '75b59aae-e1bb-11e7-ad88-7ab7a47c9dda_48' this '_48' breaks it! PLUS: The 'entityType' given in 'event['data']['recordData']['entity']['entityType']' is not starting with a Capital letter, which breaks it too! So if we remove the '_48' and use 'TypedContext' instead of the given type, we're able to query the object. Could anybody give us some more insight here? Thanks again
  4. dynamic enumerator and current selection

    Hey everybody, while setting up a dynamic-enumerator-action, we noticed, that the information on the currently selected element doesn't help to retrieve an actual object. We always get 'None' as a result. This is the event, that comes in: { "topic": "ftrack.dynamic-enumerator", "source": { "id": "c73c09beff154613ba61300782bb836e", "user": { "username": "TEdelmann", "id": "75b59aae-e1bb-11e7-ad88-7ab7a47c9dda" } }, "target": "", "data": { "attributeName": "Briefing_Workflows_00_Maya_Config", "sorters": [], "filters": [ { "disabled": "True", "property": "name", "root": "data", "initialConfig": { "disabled": "True", "property": "name", "root": "data", "id": "ft-dynamicenumerator-2000671-query-filter" }, "id": "ft-dynamicenumerator-2000671-query-filter" } ], "query": "", "groupers": [], "recordData": { "changes": {}, "entity": { "entityId": "883b74ea-132b-11e8-ae79-7ab7a47c9dda_15", "entityType": "task" } } }, "in_reply_to_event": "None", "id": "27304c3ea333491fa793b457e91f7966", "sent": "None" } As you can see, there is given an entity in 'recordData'. But for some reason, we can't query or get the actual object from it. This is what we tried so far.. obj_type = event['data']['recordData']['entity']['entityType'] obj_id = event['data']['recordData']['entity']['entityId'] # obj_id = event['source']['id'] # selected_object = self.session.get('TypedContext', obj_id) # selected_object = self.session.query('Task where id is "{0}"'.format(obj_id)).first() selected_object = self.session.query('{0} where id is "{1}"'.format(obj_type, obj_id)).first() selected_object is always None. any suggestions? How are we supposed to get the current selection, when reacting on 'topic=ftrack.dynamic-enumerator'? Alternatively, it would be very helpful, if the information on what is currently selected, coulde be retrieved in a general way (i.e. like session.getCurrentSelection()) thanks a lot in advance Tim
  5. adding sorted notes

    yeah, adding a 'custom' date manually is a good idea. thanks a lot Tim
  6. adding sorted notes

    Hey ftrackers, we recently tried to add notes to a task in a sorted order. We read a number of question from a json which looks like this: [ { "index": 1, "content": "Q1" }, { "index": 2, "content": "Q2" }, { "index": 3, "content": "Q3" }, { "index": 4, "content": "Q4" } ] ..and we would like these questions, to appear in the order given by index. But for some reason, we always get the order visible in attachment: ftrack_question_ordering.PNG Could this be the same problem we have with custom attributes being not sorted? Thanks in advance Tim EDIT: The note, which was altered latest is shown upmost automatically, which implies, that we cannot change the order, right?
  7. Access hierarchical custom attributes on User object

    Hey Mattias, thanks for getting back on this. Good to hear, that I'm not the only one running into this (so its not just my fault)..
  8. Access hierarchical custom attributes on User object

    Hey, another thing we noticed: We use a custom attribute of type: dynamic enum which is hierarchical. If the project is selected and we change its values, no 'ftrack.update' gets triggered! On the other hand, if we select a folder (or any other object under project), changes to our custom attribute, do trigger 'ftrack.update'. Is this behavior wanted? For our workflow, it would be great, if the custom attribute changes trigger 'ftrack.update' no matter what is selected. thanks again
  9. Dynamic Enum not accepting my values??

    yep. my bad I had another action (on another pc) registering for 'topic=ftrack.dynamic-enumerator' as well... So they seem to have interfered. It works when each registering instance makes use of 'event.stop()' if its to be handled here. Thanks for looking into this! Tim
  10. Dynamic Enum not accepting my values??

    Hey Mattias, here a short test: # :coding: utf-8 import os import sys import ftrack_api class DynamicEnumMayaPlugins(object): label = "Dynamic Enumerator Plugins" description = 'Returns a list of all plugins for maya' identifier = "DynamicEnumMayaPlugins" def __init__(self, session): super(DynamicEnumMayaPlugins, self).__init__() self.session = session def register(self): self.session.event_hub.subscribe('topic=ftrack.dynamic-enumerator', self.launch) def launch(self, event): if 'Maya_Plugins' not in event['data']['attributeName']: return return [{'name':'Plugin1 - 8.0.572','value':'C:\\Path\\to\\Plugin1\\Plugin1_8.0.572'}, {'name':'Plugin2 - 8.0.572','value':'C:\\Path\\to\\Plugin2\\Plugin2_8.0.572'}, {'name':'Plugin3 - 8.0.572','value':'C:\\Path\\to\\Plugin3\\Plugin3_8.0.572'}] def register(session, **kw): action = DynamicEnumMayaPlugins(session) action.register() # startup os.environ['FTRACK_SERVER'] = '<YOUR_SERVER_URL>' os.environ['FTRACK_APIKEY'] = '<YOUR_APIKEY>' os.environ['FTRACK_EVENT_PLUGIN_PATH'] = '.' session = ftrack_api.Session() register(session) print('Waiting for events') session.event_hub.wait() You need to note your server-url and apikey.. Seems to work in about 30% of my tests. I setup a custom attribute "Briefing_Workflows_04_Maya_Plugins" in its own group of custom attributes. Its a multi selection field were every role can read and write despite our 'Artist'-Role which is not allowed to write. When I click the dropdown, it simply doesn't show the returned list of entries. If I click it about 3-7 times, it comes up (in 30% of my tests). So its working .. somehow.. but not reliably hope this helps Little addition: It seems as if the returned list is read from a folder and created first (instead of just returning a fixed sample -- as seen above) its working even less.. Litte addition2: When I cache the created list of plugins, the dropdown gets populated but still not every time clicked (about every 5th-15th click.)
  11. Dynamic Enum not accepting my values??

    Hi Remus, we're using: python-API: 1.4.0 javascript: 0.4.5 Server:
  12. Dynamic Enum not accepting my values??

    Hello again, we would like to use Dynamic Enums to let our team-members select maya plugins from a drop-down which is populated from a folder containing all plugins available. For this we prepare the dropdown contents like described here: http://ftrack.rtd.ftrack.com/en/3.3.7/developing/dynamic_enumerator.html The resulting list looks like this: [{'name': '3Delight - 8.0.572', 'value': 'C:\\ConfigurationSync\\Maya\\3Delight\\3Delight_8.0.572'}, {'name': 'abcToA - 3.0.0 - 2018 - 2.0.1', 'value': 'C:\\ConfigurationSync\\Maya\\abcToA\\3.0.0_2018_2.0.1'}, {'name': 'abcToA - 3.0.1 - 2018 -', 'value': 'C:\\ConfigurationSync\\Maya\\abcToA\\3.0.1_2018_2.1.0.1'}, {'name': 'aTools - 2.0.1', 'value': 'C:\\ConfigurationSync\\Maya\\aTools\\2.0.1'}, {'name': 'aTools - 2.0.2', 'value': 'C:\\ConfigurationSync\\Maya\\aTools\\2.0.2'}, {'name': 'bonusTools - 2018', 'value': 'C:\\ConfigurationSync\\Maya\\bonusTools\\2018'}, {'name': 'cosmos - 1.0', 'value': 'C:\\ConfigurationSync\\Maya\\cosmos\\1.0'}, {'name': 'exocortex - crate - 1.1.153', 'value': 'C:\\ConfigurationSync\\Maya\\exocortex_crate\\1.1.153'}] This list has about 150 entries in the end. We noticed, that having 2-3 entries sometimes works and sometimes not. We Cannot figure out, what the problem with this might be. Are we missing anything here? Why is this not working? Thanks very much in advance Tim
  13. Hey there, we are currently trying to 'find' our custom attributes.. We set them up being 'Hierarchical' and when having selected a task, they can be retrieved via task['custom_attributes']['attribute_name']. In the web-ui they are visible when selecting a users profile in the overview. Now we would like to access these attributes via user['custom_attributes']['attribute_name'], but 'attribute_name' is not listed as a member in user['custom_attributes'] (Non-hierarchical attributes, which are added to 'User', are listed ). Are we missing something here? Thanks alot in advance
  14. publish custom events via javascript api

    Hey Lucas, thanks alot! Thats great news
  15. publish custom events via javascript api

    Hey there, we are currently trying to send custom events via the javascript api (as the title might let you guess... ) In a Node-style js-file we're testing the following code, which is sadly not working... var EventSender = function(server, user, key) { require('isomorphic-fetch') var ftrack = require('ftrack-javascript-api'); this.session = new ftrack.Session(server, user, key); if (this.session==null) { console.log('Error creating session'); return; } this.DoStuff = function() { // TODO: find another way to solve this // make session available to all subfunctions by creating a 'locally scoped' variable // otherwise 'this.session' is only available at the outermost usage (i.e. only on line 28) // the nested functions below line 28 don't know about 'this.session' var session = this.session; if (session==null) { console.log('Error - No active Session'); return; } return session.initializing.then(function() { var event = new ftrack.Event('infected.custom-event', {foo: 'bar', xyz: true}); console.log('sending...'); return session.eventHub.publish(event); }).catch(error => {console.log(error);}); } } sender = new EventSender('', 'Admin', 'f22192fc-0cb6-11e8-b2cb-7ab7a47c9dda'); sender.DoStuff(); The resulting error-msg is: TypeError: Cannot read property 'socket' of null at EventHub._runWhenConnected (C:\dev\javascript\ftrack.OS.management\node_modules\ftrack-javascript-api\lib\event_hub.js:307:32) at C:\dev\javascript\ftrack.OS.management\node_modules\ftrack-javascript-api\lib\event_hub.js:224:23 at new Promise (<anonymous>) at EventHub.publish (C:\dev\javascript\ftrack.OS.management\node_modules\ftrack-javascript-api\lib\event_hub.js:223:31) at C:\dev\javascript\ftrack.OS.management\sendEventTest.js:30:28 at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) So for some reason, the local property '_socketIo' in event_hub.js is still null inside the method '_runWhenConnected', which is called in 'publish()' on line 224. Can you tell me why that is the case? having the same setup, we already successfully created calendar-events and other objects. Side-Question: Is it possible to send a custom event via javascript-api and receive it via the python-api? Thanks in advance Tim