title: Callbacks in Python Maya plugin
body: <p>I am trying to create a callback in my Maya plugin that runs every time a new object is created. The callback works but the data object passed is of NoneType. I want to access the newly created object in my callback function, how do i do that? </p>
  
  <pre><code>g_Callbacks = list()
  
  def initializePlugin( obj ):
      g_Callbacks.append( OpenMaya.MEventMessage.addEventCallback( "DagObjectCreated", callback ) )
  
      ...
  
  def callback( data ):
      print data.apiTypeStr()
  </code></pre>