Jump to content

Tom Mikota

  • Content Count

  • Joined

  • Last visited

  • Days Won


Tom Mikota last won the day on August 12 2019

Tom Mikota had the most liked content!

About Tom Mikota

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Good points Yas, and yeah i'm finding that i am needing to control the version numbers at times, at least now i've got the version up happening on the end of Ftrack. I like your explanation of first() and one() as well, i'm still brute forcing my way thought some things as i get a larger overview. On the asset_version - that's a leftover from a test i was doing, forgot to delete it lol.
  2. OK i got this figured out, and yes it was dumb lol. Expressing my thoughts in a written form really helped me debug this one. This is my final code for these tests just in case anyone else runs into this. I just had to add a simple query (which i was already doing in my code but for some reason couldn't get it working until now) for checking to see if the Asset already existed. Once you have the asset Ftrack handles the version numbers. Which is exactly what you're saying, but something about the mutiple components flying around got me confused. Thanks for your patience all! ses
  3. I feel kind of dumb on this one, i've spent days on this, figured out hacks to work around the duplicate entry problem, and now i'm back to it trying to figure it out properly. I'm assuming there's just a fundamental thing i'm not seeing because i have a different paradigm in my head for what's going on under the hood. But i'm not sure what it is.
  4. That link is what i've based all my code off of. I"ve restructured my code for the purposes of this conversation to look as identical to the docs as possible. I have the same result. I can run this code once, but get "duplicate entry" errors after that. My question is - what is ftrack expecting as a trigger that i'm uploading a new 'version' and therefore starts incrementing on the version numbers. I would assume based off this conversation that i don't change anything on the create('assetversion') code. task = session.get('Task', 'dfa65df9-d955-4d4e-9658-e2bf8c11a10c') asse
  5. When i attempt to create a second AssetVersion and connect it to an Existing Asset i get a "duplicate entry" error: self.version_data = self.ftrack.create('AssetVersion', { 'asset': self.task_asset, 'task': self.task_asset['parent'], }) This is the way i'm currently doing it. Adding "version" to this doesn't change me getting the error. This works fine the first time i run it and create the initial "assetVersion" but after that it gives me an error, so i've been getting around it in other ways (creating an Asset for each AssetVersion) but i'd love to do it the proper "ftra
  6. Let's say i wanted to just use components (i'm ensuring all media is a properly formatted .mp4 files with an accompanything thumbnail that i control) and didn't want to use the encode() function. Is there a way to find/remove old components? This is something that'd be super useful for me.
  7. How do i define version numbers within the ftrack API? This is the code that's creating the "asset" of the thumbnail below. self.task_asset = self.ftrack.create('Asset', { 'name': self.version, 'type': asset_type, 'parent': self.entity_data }) Right now however, i'm just creating a new "Asset" for every version and giving it a version number where "name" is. Basically what i'm wanting to do is create a shot 000_0500, and this would be 'taskName v23' in my ideal world. I just couldn't ever get the version number to change so i'm doing it this way. I've tried us
  8. Yup, that was it! Thanks man, that's hilarious, i didn't notice it until working on this ftrack plugin, so it seemed like it was specific to this. Nope, just my own config code for the app, that I WROTE like 2 years ago lol.
  9. Perfect this is exactly what i'm looking to do thanks @Lorenzo Angeli
  10. I'm wondering how to mute this kind of feed from the ftrack session: 2019-07-17 11:37:48,561 DEBUG Checking for entity in cache with key ('Status', ['a0bc2444-15e2-11e1-b21a-0019bb4983d8']) "C:\Users\tmiko\AppData\Roaming\Python\Python27\site-packages\ftrack_api\session.py:967" 2019-07-17 11:37:48,561 DEBUG Retrieved existing entity from cache: <Status(a0bc2444-15e2-11e1-b21a-0019bb4983d8)> at 582088240 "C:\Users\tmiko\AppData\Roaming\Python\Python27\site-packages\ftrack_api\session.py:974" 2019-07-17 11:37:48,561 DEBUG Cache not updated with merged entity as no differences d
  11. So i've been using an ffmpeg script to create high quality h264 versions of everything before i upload and that works fine every time. I tried a bunch of different things before that. (let me know if you want the script) I'm super interested in the "proper" Prores Workflow though. Soon i'll be creating those for editorial purpose, but i hadn't thought about actually uploading them. I was planning to just make an h264 as well as a ProRes from existing CG frames. Would love to know workflows/strategies people are using. Right now i'm using "encode" simply becaqse it creates
  12. So here's some more information just if anybody is interested: This code is searching for a sequence that doesn't exist: seqs = session.query('Sequence where name is "{0}" and project.id is "{1}"'.format('060', project_data['id'])).first() .first() returns None seqs = session.query('Sequence where name is "{0}" and project.id is "{1}"'.format('060', project_data['id'])).one() .one() returns: Traceback (most recent call last): File "C:/Users/tmiko/PycharmProjects/cglumberjack/src/plugins/project_management/ftrack/ftrack_unit_tests/ftrack_tests.py", line 16, in <modul
  13. Ok I'm learning more about this already. QueryResult happens when i fail to put .one(), first(), or all() on the end of my query. This is going to make a huge difference moving forward. Going through and fixing some of these right now and tightening up my code. Still curious as to if there's another way other than querying and then creating based off the results. But this is getting cleaner!
  14. I want to create a project (or Sequence, or Shot, or AssetVersion, etc....) but right now i'm using all kinds of different ways of checking to see if something exists before i create it. I'm guessing there's some simple way of doing this that i'm just not aware of. For instance. To Create a Project Currently I'm doing something like this: project_data = session.query('Project where status is active and name is %s' % 'cgl_unittest2').first() print project_data if not project_data: project_data = session.create('Project', { 'name': 'cgl_unittest2', 'full_name':
  • Create New...