However, it seems that the publish tree description file does not store information about whether or not a given publish plugin is checked and runs its publish tasks anyway. For example, if I un-check “Publish to Shotgun” it still gets written to the publish tree file and executed on the render farm.
This is the generator used to yield the tasks that need to be executed:
def generator(tree): """ Yields tasks that have the "Submit to Farm" setting set to True. """ for item in tree: for task in item.tasks: if task.checked: if "Submit to Farm" in task.settings \ and task.settings["Submit to Farm"].value is True: yield task
My question would be how can I ensure it doesn’t return any tasks that were not checked in the UI. So far I have tested item.active, item.checked, task.checked, task.active, task.enabled, which all seem to return True.
Any advice would be most welcome!