forked from pyblish/pyblish-base
-
Notifications
You must be signed in to change notification settings - Fork 1
API Plugin.process_instance
Marcus Ottosson edited this page Apr 28, 2015
·
1 revision
Override this in a plug-in to process the Instance
This method may be overridden in your plug-in subclasses to process the current Instance. If overridden, Pyblish will execute this method at the opportune time.
The implementation of your sub-class is dependent on the task you would like it to perform, read more about best-practices and use-cases in the Strategies section.
Example
import pyblish.api. as pyblish
class ValidateInstance(pyblish.Validator):
hosts = ["python"]
families = ["myFamily"]
def process_instance(self, instance):
if instance.data("name") != "Marcus":
raise pyblish.ValidationError("Invalid name")This wiki is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.