Search the Community

Showing results for tags 'new api'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Company news
    • General announcements
  • ftrack Studio (main app)
    • General discussion
    • Feature requests
    • API
    • Help
    • Actions and Widgets
    • ftrack Go
  • Connect and plugins
    • General discussion
    • Connect package releases
    • Feature requests
    • Help
    • Connect plugins releases
  • Reviews
    • General discussion
    • Feature requests
    • Help
  • Advisory Forum
  • Tech preview
    • API
    • New integrations
    • Studio overview
    • ftrack Review


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 3 results

  1. Hello, are there any resources/tutorials for new api location, structure, and resolver migration? I've been waiting for the new API roll out to finally tackle these, but I'm not finding enough resources on the dev portal to successfully migrate. I'm currently getting this error when my location tries to register: 2017-10-23 15:02:36,408 - ftrack_connect.ui.application.Application - ERROR - Error during login. ....... ...... ..... File "path\to\mb_plugins\hook\location\", line 65, in register session.event_hub.subscribe( AttributeError: 'Registry' object has no attribute 'event_hub' My new location plugin is below. I'd also like to update my structure and resolver plugins (if that's possible yet). import os import sys import platform import ftrack_api import ftrack_api.entity.location import ftrack_api.accessor.disk def configure_locations(event): '''Configure locations for session.''' session = event['data']['session'] # Import custom structure plugin. RESOURCE_DIRECTORY = os.path.abspath( os.path.join(os.path.dirname(__file__), '..', '..', 'resource') ) if RESOURCE_DIRECTORY not in sys.path: sys.path.append(RESOURCE_DIRECTORY) from pipeline_structures import structure_plugin # Location and prefix variables. studio = os.getenv('STUDIO').lower() site = os.getenv('SITE').lower() LOCATION = '{0}.{1}'.format(studio, site) # Get mount point. disk_name = session.query('Disk where name is "{0}"'.format(LOCATION)).one() platform_name = 'windows' if not platform.system().lower() == 'windows': platform_name = 'unix' disk_path = disk_name[platform_name] PREFIX = os.path.expandvars(disk_path) # Find location(s) and customise instances. #ftrack.ensureLocation(LOCATION) # I need an updated way to do this. I've noticed the session.ensure() method, is that it? location = session.query('Location where name is ""').one() #ftrack_api.mixin(location, ftrack_api.entity.location.UnmanagedLocationMixin) # Not sure what this does, do I need it? location.accessor = ftrack_api.accessor.disk.DiskAccessor(prefix=PREFIX) location.structure = structure_plugin.mbStructure() location.priority = 50 def register(session): '''Register plugin with *session*.''' session.event_hub.subscribe( 'topic=ftrack.api.session.configure-location', configure_locations )
  2. Hi, is there a way to get all the custom_attributes in a query or a session.populate() call? I can do session.query("select custom_attributes from Shot where ....") but when I check the values with "auto_populating False", they are mostly Symbol(NOT_SET), except for default values. I can't do "select custom_attributes.fstart from Shot where ..." because that throws ftrack_api.exception.ServerError: Server reported error: KeyError(u'fstart') as does session.populate(shot, "custom_attributes.fstart") The reason I'm asking is that I usually need a bunch of custom attributes so I want to speed things up and reduce queries.
  3. Hi, Is it possible to use both old and new API together? for example: project = session.query('Project')[0] myLink = project['children'][0] myLink.getPredecessor() #is this possible?? If not, Please provide me with an alternative to get the predecessors with the new api. Thanks in advance