omni.graph.core.register_pre_load_file_format_upgrade_callback(callback: object) int

Registers a callback to be invoked when the file format version changes. Happens before the file has already been parsed and stage attached to. The callback takes 3 parameters: the old file format version, the new file format version, and a graph object (always invalid since the graph has not been created yet).


callback (callable) – The callback function


A handle that could be used for deregistration. Note the calling module is responsible for deregistration of the callback in all circumstances, including where the extension is hot-reloaded.

Return type