Search the Community

Showing results for tags 'event listener'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Company news
    • General announcements
  • ftrack Studio (main app)
    • Open discussion
    • Feature requests
    • API
    • Help
    • Actions and Widgets
    • ftrack Go
  • Connect (plugins)
    • Open discussion
    • Feature requests
    • Help
  • Reviews
    • Open discussion
    • Feature requests
    • Help
  • Advisory Forum
  • Tech preview
    • New integrations
    • Studio overview
    • ftrack Review
  • Jobs board
    • Job listings

Categories

There are no results to display.


Found 4 results

  1. need some hep with a event listener

    Hello. I am trying to create an event Listener that basically prevents people from moving assets inside ftrack. I found an example and tried to do it my self, but Iam getting some issues. the script is suscribed to 'topic=ftrack.update', and will always revert changes,but it seems the "revert function" also activates the listener, so it enters in an infinite loop. these are the functions used in my script. Any help would be very appreciated: def MoveAssetsBlock(session, event): reverted= False for entity in event['data'].get('entities', []): if (entity.get("entityType") == "task" and entity["action"] == "move"): entity_id = entity['entityId'] fObject = session.query("Context where id is '{0}' ".format(entity_id))[0] fObject['parent_id'] = entity["changes"]["parent_id"]["old"] reverted=True if reverted: try: session.commit() except Exception: session.rollback() raise def register(session, **kw): if not isinstance(session, ftrack_api.Session): return handle_event = functools.partial( MoveAssetsBlock, session) session.event_hub.subscribe('topic=ftrack.update', handle_event)
  2. Hi, I've created an event listener to require comments when logging time on certain tasks, and thought I should share it with the community. It shows the usage of triggering and handling an actions UI based on an event. Please let me know if you have any comments or feedback. You can find the snippet on bitbucket. Event listener: Require timelog comments The event listener can be used to require comments when logging time against certain tasks from the ftrack interface. The event listener will trigger an Action UI to require timelog comments if the custom attribute require_comments is set on the timelog context. Configuration You can configure the following in the script: REQUIRE_COMMENTS_ATTRIBUTE The name of the custom attribute, that can be used to control if a task requires timelog comments. Running the event listener You can run the event listener from the command line:: python require_timelog_comments.py You can also register the event listener as a plugin. For more information, see the links below. Read more Find more information in our documentation: * Developing: Events * Event: Action - trigger interface * Event: Update * Tracking time * Python API: Configuring plugins * Python API: Environment variables
  3. Hi, From an event listener I can see when a status is changed, but there's not context (that I'm aware of) on what type of entity it was changed on. Is there a way to find out what entity type (task, version, shot, etc) that status was changed on? Thanks! -Mark
  4. Hi, I've created an example event listener which can be used to restrict which users should be allowed to set certain statuses. I thought it would be useful for the rest of the community and wanted to share it here. Let me know if you have any questions or feedback. You can find the snippet on bitbucket. Event listener: Restrict task status updates The event listener can be used to limit which users are allowed to set certain statuses. When a status is changed in the ftrack interface, the event listener will check if the status is restricted, and if the user is member of the group with users that are allowed to set to those statuses. If not, the status will be reverted to the old value, and a message will inform the user that the operation was not permitted. Configuration To use the event listener, first set the two variables at the top: RESTRICTED_STATUSES A list of task status names that are restricted, only the members of a group will be allowed to change these. ALLOWED_GROUP_NAME The name of the group in ftrack which contains the users that are allowed to set the restricted statuses. Running the event listener You can run the event listener from the command line:: python restrict_task_status_listener.py You can also register the event listener as a plugin. For more information, see the links below. Read more Find more information in our documentation: * Developing: Events * Event: Action - trigger interface * Event: Update * Managing statuses * Organizing users into groups * Python API: Configuring plugins * Python API: Environment variables