Mani Varma

Members
  • Content Count

    2
  • Joined

  • Last visited

  • Days Won

    1

Mani Varma last won the day on March 16

Mani Varma had the most liked content!

About Mani Varma

  • Rank
    Newbie
  1. Hi, I cooked up a script to delete File Component from Note's belonging to a specific Project and has worked out fine, but it doesn't seem to reflect on Ftrack Storage Usage. Query for NoteComponent doesn't return anything anymore and I don't understand where NoteComponent get it's storage space from if it's not in Ftrack Storage. def get_filter_string(entity_ids): return ', '.join( '"{0}"'.format(entity_id) for entity_id in entity_ids ) note_entities = [] project_component = session.query('select name, descendants from Project where id is "{0}"'.format( entity_id )).one() note_entities.append(project_component['id']) for hierarchy_item in project_component['descendants']: note_entities.append(hierarchy_item['id']) note_components = session.query('select component, component.file_type, component.name ' 'from NoteComponent where note.parent_id in ({0})'.format( get_filter_string(note_entities) )).all() # Download happens from note_components information then delete. for note_component in note_components: session.delete(note_component['component']) session.commit()
  2. Hi, I'm trying to create an Action to launch a tree widget similar to the one used to create Links between Objects. This is to help me copy Task structure from another Project. I tried querying all descendant items from a Project but it's taking a little bit of time and the Links widget seems to be pretty fast and is structured in a hierarchy. I couldn't find any straight answer to use a widget with Python Actions. If it can't be done this way, is there any other way to copy structure? Because we do it so often it would be easier to have a quick shortcut without going back and forth. Task Templates is not helping much since it seems to create only Tasks without any hierarchy.