Jump to content

mikedatsik

Members
  • Posts

    19
  • Joined

  • Last visited

  • Days Won

    3

mikedatsik last won the day on May 2 2018

mikedatsik had the most liked content!

About mikedatsik

  • Birthday 04/29/1986

Profile Information

  • Location
    Kiev

Recent Profile Visitors

1,600 profile views

mikedatsik's Achievements

  1. I want to recreate something like this: http://docs.efestolab.uk/tools/image-publisher/index.html Let's say I create version 1 of textures, and just want same textures components in next version and just update one component or add one additional texture. This will help me save disk space and get actual version of my textures in version 2.
  2. Found solution, this move component to new version, but how to copy this component to new version, without moving from previous version? version['components'].append(component)
  3. Hi! How to add component from existing version to a new version, without creating new component? Process: 1. Get component from let say version 1 2. Create new version 2 3. Add this component to new version Thanks!
  4. Yes, I want do it for performance reasons. I will need to get a list of version for all assets in task groped by assets. I did it something like that: import ftrack_api from itertools import groupby session = ftrack_api.Session() entity = session.get('Context', '376a3498-1191-11e8-8917-001e582bf738') assets = session.query( 'select asset.name, version from AssetVersion ' 'where task_id is "{0}" and asset.name is_not ' 'none order by version desc'.format( entity['id'])).all() res = [{"asset":l, "versions":list(v)} for l,v in groupby( sorted(assets, key=lambda x:x['asset']['name']), lambda x: x['asset']['name'])] But usually I working only with latest ones and rarely with previous. So in that reason I thought that's will be great to get only latest versions and how to get this list in best performance way.
  5. Thanks for you reply! But I mean that I need latest versions for all assets in the task with one query session.
  6. Hi all! This returns me all available version: task = session.get('Context', 'some-id') versions = session.query('AssetVersion where task_id is "{0}"'.format(task['id'])).all() I need to get only the latest versions. Is it possible?
×
×
  • Create New...