0

event daemon event filters

 This is a noob question, 

I fail to understand the logic behind eventfilters for event daemon plugins. 

What I want to do is get a callback whenever a task is set to final ("fin"). 

Any pointers would be highly appreciated :)

 

2 comments

  • 0
    Avatar
    Brandon Foster

    Hey Jon,

    There are two key parts to the plugin identifying which events to process. The first is in the registerCallbacks function where you define your matchEvents. An example for the Task status changing would look like:

    matchEvents = {
    'Shotgun_Task_Change': ['sg_status_list'],
    }

    This means look for events of type Shotgun_Task_Change, where that event is due to a change on the sg_status_list field. Then in your main function of the plugin you'll inspect the metadata of that event to see exactly what it changed from/to. From there you can branch off to perform actions based on those values. Let me know if that helps explain things!

    You can also see a number of example plugins here:

    https://github.com/shotgunsoftware/shotgunEvents/tree/master/src/examplePlugins

  • 0
    Avatar
    Brandon Foster

    Hey Jon,

    This is another great resource:

    https://www.youtube.com/watch?v=YPZ1FWvhf7k

Please sign in to leave a comment.