pawel

Members
  • Content Count

    19
  • Joined

  • Last visited

  • Days Won

    7

pawel last won the day on March 8

pawel had the most liked content!

About pawel

  • Rank
    Member

Recent Profile Visitors

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

  1. thank you Lucas. We can switch to API and make some custom tools to deal with it, however, we would like to use the build in functionality whenever possible. It seems that out IT guys were able to hack ffmpeg to create videos the way we want. A pity we need to resolve to this in a commercial product... what other features differ between on-line and self hosted version?
  2. hi, We are in the process of testing ftrack review options. Is there a way to retain the native resolution of uploaded clip (ftrack scales everything down)? the other problem we are facing is that our local ftrack installation, even with the nearly lossless compresison setting creates unusable videos. The online ftrack seems to be handling our test uploads much better. How can we improve the quality of the videos on our end? Is the setting from the ftrack preferences passed to ffmpeg at all? thank you Pawel
  3. pawel

    sessions

    one session it is then. Thank you mate.
  4. pawel

    sessions

    we are using update 3 at the moment. thank you for the tip. will test it in update 4. cheers.
  5. pawel

    sessions

    hi @Remus Avram if I query an entity again and it was previously retrieved and is already cached it will be returned from the cache, won't it? That's how I understand the caching mechanism. Otherwise what is actually cached if every query fetches new data anyway? I will test it a bit more. Currently I have a session per call but it is troublesome to make sure all sessions are closed properly. cheers.
  6. pawel

    sessions

    hi, How is the session meant to be used? Should we start a session and re-use it between various calls (aka global singleton)? Or should we start a new session for each api interaction? #1 in case of the option one how is the cache invalidated? Do we need to invalidate it ourselves in some event listener? From our initial tests it doesn't seem to be automatically updated/invalidated. #2 in case of the option two do we need to close the session after each interaction or will it be closed once the variable is cleaned by garbage collection? a side question: how do we stop ftrack logger in maya? it spams script editor the moment a session is initialized.
  7. thank you Eric. it seems that our local test installation of ftrack is 3.5.6.4561 and it indeed fixes the issue. cheers.
  8. thank you Eric. Let me rephrase. I didn't run into problems overriding those methods but quickly realised I will need to override many more than just those two. Like *keys* and *items* and *__contains__* and basically almost everything that gets inherited from *collection* which is the base class of everything. If I don't do that many simple things break, for instance: #user = CustomUser returned by the api if key in user: #do something will not work if I only override __getitem__ I was hoping for some solution already built into Atrribute or AttributeCollection but by browsing the code base I don't think there is any. thank you. appreciate your help.
  9. ftrack version "3.3.42.4536" and api version "1.3.1"
  10. Hi Eric. I'm using the live online version. I will run the code once I get back. Cheers.
  11. so this syntax seems to only retriveve boolean attributes or maybe just a first boolean. When I tested it before I had only one bollean custom attribute and it seemed to work. but it fails with more project = session.query('select custom_attributes.value from Project where name is 1').one() for a in project['custom_attributes']: print "{0} - {1}".format(a, project['custom_attributes'][a]) shot = session.query('select custom_attributes.value from Shot where project.name is 1').first() for a in shot['custom_attributes']: print "{0} - {1}".format(a, shot['custom_attributes'][a]) prints: QTforWips - False width - NOT_SET height - NOT_SET fps - NOT_SET fend - NOT_SET handles - NOT_SET frameIn - NOT_SET frameOut - NOT_SET handleFrameIn - NOT_SET handleFrameOut - NOT_SET duration - NOT_SET fstart - NOT_SET fps - NOT_SET `QtForWips` was my first test attribute and it has the value retrieved. back to the original question. is it possible to retrieve custom attributes?
  12. it would be nice to have syntax like this documented in the documentation... this post is from 2016. is this syntax used in other places too? is there an equivalent syntax to sql `select * from bla`?
  13. Hi, I'm trying to figure out a query to retrieve all or selected custom_attributes in a query. I have some custom attributes on a project and my session has autopopulating turned OFF. project = session.query('select custom_attributes from Project where name is "{0}"'.format(name)).one() if I try to access my custom attribute "foo" the value of it is not set print project['custom_attributes']['foo'] > NOT_SET I tried to pass the attribute name directly to the query but that in key error project = session.query('select custom_attributes.foo from Project where name is "{0}"'.format(name, key)).one() > ServerError: Server reported error: KeyError(u"No attribute u'foo' exists for schema u'CustomAttributeValue'.") is it possible to fetch custom attributes in the main query?
  14. thank you Lucas. do you have an example of customized entity that renames attributes? I tried just adding a new attribute and setting it's value but my knowledge of the API is not extensive enough to do so. my crude implementation: logging.basicConfig(level=logging.DEBUG) class Factory(ftrack_api.entity.factory.StandardFactory): '''Entity class factory.''' def create(self, schema, bases=None): '''Create and return entity class from *schema*.''' # Optionally change bases for class to be generated. cls = super(Factory, self).create(schema, bases=bases) if str(schema['id']) == 'User': print "replacing User class" cls.default_projections = ['id', 'username', 'first_name', 'last_name'] a = ftrack_api.attribute.Attribute('firstName') cls.attributes.add(a) a.set_local_value(cls, 'foobar') return cls he above fails on `set_local_value` as it is missing session context. Probably adding an attribute is not the way it should be done. I also tried a full implementation of User sub class with custom `__getitem__` etc but that quickly become a bit problematic... renaming attributes must be a very common practice and I'm sure you have a nice solution for it. cheers.
  15. hi, this is probably a very dumb question... the documentation shows how to override Factories to extend the functionality of fetched objects. This is very cool and exactly what we need. http://ftrack-python-api.rtd.ftrack.com/en/stable/working_with_entities.html#default-projections However, I'm not entirely sure how to add a custom factory to a session. Do I need to wrap it in a plugin? The example in documentation states that the session has to be restarted but how will it pick up the new factory? There seems to be no way to just pass it to the session other than through a custom plugin. I'm sure I'm missing something trivial...