Closed bob-white closed 7 years ago
hey bob, what's the status of this one? Do I remember you saying you'd dropped it on the slack a while back? Or am I imagining that?
Haven't dropped it yet. I like it better than the old method I was using which relied on some semi-singleton event wrappers. But I'm worried I haven't caught all the edge cases for deterministic cleanup.
Yeah, I'm going to drop this one for now. To many instances of the callback hanging around when it shouldn't have during testing.
This is a pretty simple wrapper in the spirit of the
mGui.scriptJobs
module, that wraps the various messages provided byOpenMaya.MSceneMessage
.Basically I needed finer grained access to the opened / saved events than scriptJobs provided.
These provide a
runOnce
andparent
flag to more closely mimic the API found inmGui.scriptJobs
. These events do have one difference from standardmGui.events.Event
and that is that they pass aweakref.Proxy
of the event to any handlers instead of a strong reference. I needed to break the circular reference here so that the__del__
method could be better relied on to help with cleanup.