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

Return type


of the callback in all circumstances - including where the extension is hot-reloaded.