I’m getting a really bad crash when I try to reload ANY reference inside of a Maya callback.
(Using Maya 2014 SP3)
Example
import pymel.core as pymel
import maya.OpenMaya as OpenMaya
FILE_PATH = "ADD MA PATH"
def create_then_reload_reference( *args):
reference_node = pymel.createReference(FILE_PATH, namespace = '' )
reference_node.load()
OpenMaya.MSceneMessage.addCallback( OpenMaya.MSceneMessage.kAfterNew, create_then_reload_reference )
The strange thing is that this proc works fine when you run create_then_reload_reference() manually.
If anyone has any idea on why Maya crashes every time please let me know!