We provide macros that are entry points into the job context logic.
More...
#include <JobContextRegistry.h>
|
typedef std::function< VtDictionary()> | EnablerFn |
| Enabler function, returns a dictionary containing all the options for the context. More...
|
|
|
MaxUSDAPI void | RegisterExportJobContext (const std::string &jobContext, const std::string &niceName, const std::string &description, EnablerFn enablerFct, bool fromPython=false) |
|
MaxUSDAPI void | RegisterImportJobContext (const std::string &jobContext, const std::string &niceName, const std::string &description, EnablerFn enablerFct, bool fromPython=false) |
|
|
static TfTokenVector | ListJobContexts () |
| Get all registered export job contexts:
|
|
static const ContextInfo & | GetJobContextInfo (const TfToken &jobContext) |
| Gets the conversion information associated with jobContext on export and import.
|
|
static MaxUSDAPI MaxUsdJobContextRegistry & | GetInstance () |
|
|
class | TfSingleton< MaxUsdJobContextRegistry > |
|
We provide macros that are entry points into the job context logic.
◆ EnablerFn
Enabler function, returns a dictionary containing all the options for the context.
An job context basically wraps a function that tweaks the set of import/export options. This job context has a name and UI components, as well as an enabler function that allows specifying the options dictionary.
To register an export job context, you need to use the REGISTER_EXPORT_JOB_CONTEXT macro for each export job context supported by the library.
In order for the core system to discover the plugin, you need a plugInfo.json
that declares job contexts.
{
"Plugins": [
{
"Info": {
"MaxUsd": {
"JobContextPlugin": {
}
}
},
"Name": "myUsdPlugin",
"LibraryPath": "../myUsdPlugin.dll",
"Type": "library"
}
]
}
◆ RegisterExportJobContext()
MaxUSDAPI void MaxUsdJobContextRegistry::RegisterExportJobContext |
( |
const std::string & |
jobContext, |
|
|
const std::string & |
niceName, |
|
|
const std::string & |
description, |
|
|
EnablerFn |
enablerFct, |
|
|
bool |
fromPython = false |
|
) |
| |
Registers an export job context, with nice name, description and enabler function.
- Parameters
-
jobContext | name will be used directly as one of the valid values of the job context option. |
niceName | is the name displayed in the options dialog. |
description | is displayed as a tooltip in the options dialog. |
enablerFct | will be called after option parsing to enable context specific options. |
◆ RegisterImportJobContext()
MaxUSDAPI void MaxUsdJobContextRegistry::RegisterImportJobContext |
( |
const std::string & |
jobContext, |
|
|
const std::string & |
niceName, |
|
|
const std::string & |
description, |
|
|
EnablerFn |
enablerFct, |
|
|
bool |
fromPython = false |
|
) |
| |
Registers an import job context, with nice name, description and enabler function.
- Parameters
-
jobContext | name will be used directly as one of the valid values of the job context option. |
niceName | is the name displayed in the options dialog. |
description | is displayed as a tooltip in the options dialog. |
enablerFct | will be called after option parsing to enable context specific options. |
The documentation for this class was generated from the following file: