Camera Sensor Extension

import sp

class CameraSensor_Plugin(sp.BaseCameraSensorObject):

    def __init__(self):
        sp.BaseCameraSensorObject.__init__(self)

if __name__ == "__main__":
	sp.registerPlugin(CameraSensor_Plugin)

Main Class

The class name CameraSensor_Plugin can be customized and also represent the name of your Plugin.

class CameraSensor_Plugin(sp.BaseCameraSensorObject):

While (sp.BaseCameraSensorObject) can´t be renamed.

Initialization

Within your Main Class it´s necessary to define a function for the initialization:

    def __init__(self):
        sp.BaseCameraSensorObject.__init__(self)

Register

To register the plugin you need the following lines of code outside of your Main Class:

if __name__ == "__main__":
	sp.registerPlugin(CameraSensor_Plugin)

Last updated