The object of the CENPyOlpEvent_AttribInitOperator class is passed to the PostInitAttributes callback as a parameter.
It can be used to obtain the required operators within the scope of the PostInitAttributes callback in the %EVENT_NAME%.py script file, located in the folder of the plugin.
[Example]
def PostInitAttributes(eventAttribInitOperator):
[Example]
def PostInitAttributes(EventAttribInitOperator):
attribCreator = EventAttribInitOperator.GetAttribCreator()
attribCreator.AddInteger('EIntAttribute', 0, -100, 0, USER_ATTRIBUTE | PROCESS_ATTRIBUTE | GLOBAL_ATTRIBUTE, 'EIntAttribute')
attribCreator.AddDouble('EDoubleAttribute', 55.5, 0, 100, 0.5, USER_ATTRIBUTE | PROCESS_ATTRIBUTE | GLOBAL_ATTRIBUTE, ATTRIB_STANDARD, 'EDoubleAttribute')
attribCreator.AddString('EStringAttribute', 'Hello World', USER_ATTRIBUTE | PROCESS_ATTRIBUTE | GLOBAL_ATTRIBUTE, 'EStringAttribute')
attribCreator.AddBool('EBoolAttribute', True, USER_ATTRIBUTE | PROCESS_ATTRIBUTE | GLOBAL_ATTRIBUTE, 'EBoolAttribute')
myLiterals = ["earth", "revolves", "around"]
myLiterals.insert(0,"The")
myLiterals.append("sun")
attribCreator.AddEnum('EEnumAttribute', myLiterals, 'earth', USER_ATTRIBUTE | PROCESS_ATTRIBUTE | GLOBAL_ATTRIBUTE, 'EEnumAttribute')
[Example]
attribGetter = eventAttribInitOperator.GetAttribGetter()
[Example]
attribSetter = eventAttribInitOperator.GetAttribSetter()
[Example]
logOperator = eventAttribInitOperator.GetLoggerOperator()
[Example]
olpController = eventAttribInitOperator.GetController()
|