BasicOperations/FBSystemEvents.py
15 def OnUIIdle(control, event):
16 print "UIIdle", control, event
18 def OnConnectionNotify(control, event):
20 FBEventConnectionNotify
21 FBConnectionAction Action : Connection's action performed.
22 int SrcIndex : Index of the source in the destination component.
23 FBConnectionType ConnectionType: Connection's type.
24 object SrcPlug : The source plug involved in the action.
25 object DstPlug : The destination plug involved in the action.
26 object NewPlug : New plug created by the action. (Mostly used by merge/replace)
28 print "OnConnectionNotify", event.Action, event.SrcIndex, event.ConnectionType, event.SrcPlug, event.DstPlug, event.NewPlug
30 def OnConnectionDataNotify(control, event):
32 FBEventConnectionDataNotify
33 FBConnectionAction Action : Connection's action performed.
34 object Plug : The plug involved in the action.
36 print "OnConnectionDataNotify", event.Action, event.Plug
38 def OnConnectionStateNotify(control, event):
40 FBEventConnectionStateNotify
41 FBConnectionAction Action : Connection's action performed.
42 object Plug : The plug involved in the action.
44 print "OnConnectionStateNotify", event.Action, event.Plug
46 def OnConnectionKeyingNotify(control, event):
47 print "OnConnectionKeyingNotify", event.Action, event.Plug
48 print event.StartTime.GetFrame()
49 print event.StopTime.GetFrame()
54 sys.OnConnectionNotify.Add(OnConnectionNotify)
55 sys.OnConnectionDataNotify.Add(OnConnectionDataNotify)
56 sys.OnConnectionStateNotify.Add(OnConnectionStateNotify)
57 sys.OnConnectionKeyingNotify.Add(OnConnectionKeyingNotify)
61 app.OnFileExit.Add(Unregister)
63 def Unregister(control=None, event=None):
64 sys.OnConnectionNotify.Remove(OnConnectionNotify)
65 sys.OnConnectionDataNotify.Remove(OnConnectionDataNotify)
66 sys.OnConnectionStateNotify.Remove(OnConnectionStateNotify)
67 sys.OnConnectionKeyingNotify.Remove(OnConnectionKeyingNotify)
68 app.OnFileExit.Remove(Unregister)