The object of the CENPyOlpWM_SyncPgAttribOperator class is passed to the PostWmSyncPgAttributes callback as a parameter.
It can be used to obtain the required operators within the scope of the PostWmSyncPgAttributes callback in the %WORK_METHOD%.py script file, located in the folder of the plugin.
[Example]
def PostWmSyncPgAttributes(syncPgAttribOperator):
pass
[Example]
attribGetter = syncPgAttribOperator.GetAttribGetter()
[Example]
attribSetter = syncPgAttribOperator.GetAttribSetter()
[Example]
eventAttribGetter = syncPgAttribOperator.GetEventAttribGetter('CIRCLE')
|
oeventName
|
Name of the event. Kernel defined event name may be used
|
|
|
Object of CENPyOlpAttribSetter class
|
[Example]
eventAttribSetter = syncPgAttribOperator.GetEventAttribSetter('CIRCLE')
[Example]
logOperator = syncPgAttribOperator.GetLoggerOperator()
[Example]
processGeometryOperator = syncPgAttribOperator.GetCurrentProcessGeometryOperator()
•
|
GetCurrentToolFrameIndex(): int
|
|
|
Returns the index of the current tool frame for the parent operation, or -1 if tool index is not set
|
Get the current tool frame index of the parent operation.
[Example]
toolIndex = Operator.GetCurrentToolFrameIndex()
•
|
GetCurrentBaseFrameIndex(): int
|
|
|
Returns the index of the current base frame for the parent operation, or -1 if base index is not set
|
Get the current base frame index of the parent operation.
[Example]
baseIndex = Operator.GetCurrentBaseFrameIndex()
|
|
Returns the matrix of the current tool frame for the parent operation
|
Get the current tool frame matrix of the parent operation.
[Example]
toolFrameMatrix = Operator.GetCurrentToolFrameMatrix()
if toolFrameMatrix.IsValid():
logging.LogInfo("toolFrameMatrix is valid!")
logging.LogInfo("Tool frame matrix position:" + str(toolMatrix.GetPosition().GetXYZ()))
logging.LogInfo("Tool frame matrix rotation:" + str(toolMatrix.GetRotation()))
else:
logging.LogInfo("toolFrameMatrix is not valid!")
|
|
Returns the matrix of the active base frame for the parent operation
|
Get the current base frame matrix of the parent operation.
[Example]
baseFrameMatrix = Operator.GetCurrentBaseFrameMatrix()
if baseFrameMatrix.IsValid():
logging.LogInfo("baseFrameMatrix is valid!")
logging.LogInfo("Base frame matrix position:" + str(baseMatrix.GetPosition().GetXYZ()))
logging.LogInfo("Base frame matrix rotation:" + str(baseMatrix.GetRotation()))
else:
logging.LogInfo("baseFrameMatrix is not valid!")
This method returns the parent controller.
[Example]
controller = operator.GetController()
|