Tim Edelmann

Members
  • Content Count

    61
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Thanks
    Tim Edelmann got a reaction from Mattias Lagergren in Autodesk RV Player Review AssetVersions with different filenames   
    Hey, 
     
    I wanted to complete this thread, to halp anyone, who might stumble into this...
     
    To make sure ftrack understands files with different filenames AND different versions, we ended up manually naming the associated asset and omit the part where the files differ!
     
    example: 
    if we want to publish a file called "my_awsome_file_v001.jpg" and "my_awsome_file_v002.jpg", the created asset gets the name "my_awsome_file". So both files are linked to this asset, which make ftrack understand, that these are both just different versions of the 'same' file. 
     
    Thanks for your help
     
     
     
    Tim
  2. Thanks
    Tim Edelmann reacted to Mattias Lagergren in Hierarchical Custom Attribute Change Event   
    The issue with update events on hierarchical custom attributes should be fixed in an upcoming maintenance release (scheduled for 3.5.25) 
  3. Thanks
    Tim Edelmann reacted to Mattias Lagergren in dynamic enumerator and current selection   
    Hi Tim,
    Sorry for the confusion on this - you're correct, the id is wrong when accessed from the sidebar. To work around this you can do the following:
    if '_' in entityId realId, junk = entityId.split('_') As for the entityType - this is old style entity type from the backend. Instead of using 'task' you would want to use 'TypedContext' on the session:
    session.get('TypedContext', realId)  
  4. Like
    Tim Edelmann reacted to Mattias Lagergren in Access hierarchical custom attributes on User object   
    I will report this as a bug (hierarchical attributes appearing on user in UI but not in API)
    We've just recently got a bug report about ftrack.update events no triggering when an hierarchical attribute changes. 
  5. Thanks
    Tim Edelmann reacted to Mattias Lagergren in Dynamic Enum not accepting my values??   
    Hi Tim,
    I've tried with the script that you provided and it works 100% of the time for me.
    If you run the above script as it is with no other actions/event listeners in the same script/python process, does it still only work 30% of the time? If you add a print or two in the launch method, does it seem to get called (trying ot locate if the issue is in the UI or in the python api)?
  6. Thanks
    Tim Edelmann reacted to Lucas Correia in publish custom events via javascript api   
    Hi,

    Thanks for reaching out.
    The JavaScript API does not automatically connect to the event hub. You can either call Session.eventHub.connect() or specify autoConnectEventHub when creating the session.
    Read more in the documentation: http://ftrack-javascript-api.rtd.ftrack.com/en/stable/handling_events.html
    Yep! Both are connected to the same event server and events will be available to either client.
    Regards,
    Lucas
  7. Thanks
    Tim Edelmann reacted to Eric Hermelin in Access custom_attributes' labels   
    Hi Tim,
    you can reach the custom attribute configuration like this
     
    project = session.query( 'select custom_attributes.configuration.label from Project' ).first() for custom_attribute in project.get('custom_attributes').collection: logging.info( custom_attribute.get('configuration').get('label') )  
    cheers
    Eric
  8. Thanks
    Tim Edelmann reacted to Mattias Lagergren in Creating new events using API   
    To attach a calendar event to a user you will want to create a CalendarEventResource with the calendar_event_id and resource_id (the id of the user).
  9. Thanks
    Tim Edelmann reacted to Lucas Correia in How to access custom attributes via javascript api?   
    Ah, I misunderstood the question somewhat. ftrackWidget.getEntity() will return an object as provided by the ftrack.wiget.update event. This reflects the currently selected entity in the project outliner to the left in the interface. The format is:
    { id: 'eb16970c-5fc6-11e2-bb9a-f23c91df25eb', type: 'TypedContext' } In order to get get an object which contains the custom attributes, you will need to use the id and type and query the API for information you are interested in.
    You can see an example of how this is done in ftrack-spark-base in ExampleContainer::onFtrackWidgetUpdate, which gets the name and link attributes. Here is where you would use the code in my last post to get the custom attribute value for the selected entity.
    Regards,
    Lucas
  10. Thanks
    Tim Edelmann reacted to Lucas Correia in How to access custom attributes via javascript api?   
    Hi Tim,
    In the javascript API, only attributes which you have selected using a projection will currently be available on the returned objects. In order to see what attributes are available, you need to look at the API schema (Session.schemas). Here is an example that does this using the Python API.
    Here is an example of how it can be used.
    /** Get custom attribute value for *entity* and *key*. */ function getCustomAttributeValue(entity, key) { const customAttribute = entity.custom_attributes.find( attribute => attribute.key === key ); if (!customAttribute) { console.log('Unable to find attribute', key); return null; } return customAttribute.value; } // Query custom attributes for a single Shot and print the fstart custom attribute value. session.query( 'select custom_attributes from Shot limit 1' ).then(function (response) { console.info( 'Custom attribute value:', getCustomAttributeValue(response.data[0], 'fstart') ); }); Regards,
    Lucas
     
  11. Thanks
    Tim Edelmann reacted to Mattias Lagergren in Managers   
    Nothing new I'm afraid, I will re-raise the question with the team.
  12. Thanks
    Tim Edelmann reacted to Mattias Lagergren in Adding Managers via ftrack_api   
    Hi Tim, if you do not get a response here on the community forum you can always contact us through the support chat or by emailing support[at]ftrack.com