Home Technical Talk

[MaxScript] is it possible to store a ref to a callback?

polycounter lvl 8
Offline / Send Message
MaVCArt polycounter lvl 8
So I'm working on a set of tools that uses a variety of callbacks, most prominently the Selection Update callback. The problem I keep running into is that some callbacks, due to their nature, have to be persistent across file saves/loads. This in itself isn't a problem, were it not that the functions they're hooked up to don't exist in every scene, which is causing error messages.

What I'm currently trying to do is create a small-ish tool that acts, simply put, as a callback manager. I currently have a system where you can type in the callback's ID, and press a button to add or remove that ID, but as far as I can see there is no way to really ask MaxScript for a list of available callbacks and their individual active IDs.

I've scoured the MaxScript documentation, and the only thing I found that came close was callbacks.Show(), which only lists the available callbacks in the Listener Window, which is not at all what I need.

Does anyone have an idea of how to do this, other than accessing the Listener Window's content and do string processing? (I'm trying to avoid that, it's dirty and dangerous)

TL;DR:

is there a way, in MaxScript (or dotnet for maxscript), to "get" a list of active callbacks that can then be processed?

Replies

Sign In or Register to comment.