Jump to content

SteveZeelo

Members
  • Posts

    3
  • Joined

  • Last visited

SteveZeelo's Achievements

  1. Hello, I'm writing an event plugin that when a task status is changed the shot status will match. It works on the first change however if you change it to something else it still gets the original status. For example.... Change animation from "on hold" to "in progress" will change the status of the shot to "in progress". Change it to "approved" it will still set it as "in progress". Is there something that can be done to get the updated status? This is my code: def cascade_status_changes_event_listener(session, event): '''Handle *event*.''' user_id = event['source'].get('user', {}).get('id', None) status_changed = False entities = event['data'].get('entities', []) for entity in entities: entity_id = entity['entityId'] shot = session.query( 'select status_id, status.name from Shot ' 'where children any (id is "{0}")'.format(entity_id) ).first() if shot: # get the task name that its been set to query = f'Task where id is {entity_id}' task = session.query(query).one() task_status_name = task['status']['name'] project = shot['project'] schema = project["project_schema"] shot_statuses = schema.get_statuses(schema='Shot') for status in shot_statuses: if status['name'] == task_status_name: shot['status_id'] = status["id"] status_changed = True break else: logger.info('No shot found, ignoring update') if not status_changed: return # Persist changes try: session.commit() except Exception: logger.exception('Failed to update status') # Since we failed to synchronize our changes with the server, revert # our state to match what was on the server when we started. session.rollback() raise Thanks!
  2. Hello, I have installed FTrack connect on my PC. It sources the plugins from the local default directory. However I wish to change this to a network directory. I've tried adding the variable: FTRACK_CONNECT_PLUGIN_PATH And the network path in my windows user environment variables and it still sources the plugins from the default directory. Is there something else I need to do? Many thanks Steve
  3. Hello, if you have a shot or asset crested on ftrack and it’s already had it’s task template assigned, how using the api would you assign an addition task that already exists but is not on the template. For example, I have a prop called ball and it a has a prop task template assigned. rigging, modelling, lookdev If I wanted to then add a texturing task in ftrack it’s right click the asset build and assign and select new task. How is this done in the python api? Thanks Steve
×
×
  • Create New...