Katana Plug-in APIs 0.1

FnRendererInfoSuite.h

00001 // Copyright (c) 2013 The Foundry Visionmongers Ltd. All Rights Reserved.
00002 
00003 
00004 #ifndef FnRendererInfoSuite_H
00005 #define FnRendererInfoSuite_H
00006 
00007 extern "C" {
00008 
00009 #include <FnAttribute/suite/FnAttributeSuite.h>
00010 
00011 // Render Method constants
00012 #define kFnRenderMethodTypeDiskRender       "diskRender"
00013 #define kFnRenderMethodTypePreviewRender    "previewRender"
00014 #define kFnRenderMethodTypeLiveRender       "liveRender"
00015 
00016 // Constants used as keys of the stateArg parameter of:
00017 //   getLiveRenderTerminalOps()
00018 //   getRenderTerminalOps()
00019 //   fillLiveRenderTerminalOps()
00020 //   fillRenderTerminalOps()
00021 #define kFnTerminalOpStateArgRenderMethodType   "renderMethodType"
00022 #define kTerminalOpStateArgSystem               "system"
00023 
00024 
00025 typedef struct RendererInfoPluginStruct* RendererInfoPluginHandle;
00026 
00027 #define RendererInfoPluginSuite_version 2
00028 
00029 struct RendererInfoPluginSuite_v1
00030 {
00031     RendererInfoPluginHandle (*create)();
00032 
00033     void (*destroy)(
00034         RendererInfoPluginHandle handle);
00035 
00036     FnAttributeHandle (*getRenderMethods)(
00037         RendererInfoPluginHandle handle);
00038 
00039     FnAttributeHandle (*getBatchRenderMethod)(
00040         RendererInfoPluginHandle handle);
00041 
00042     // return string attribute containing list of renderer node names
00043     FnAttributeHandle (*getRendererObjectNames)(
00044         RendererInfoPluginHandle handle,
00045         const char *type,
00046         FnAttributeHandle typeTags);
00047 
00048     // return string attribute containing list of renderer shader type names
00049     FnAttributeHandle (*getRendererObjectTypes)(
00050         RendererInfoPluginHandle handle,
00051         const char *type);
00052 
00053     FnAttributeHandle (*getRendererCoshaderType)(
00054         RendererInfoPluginHandle handle);
00055 
00056     FnAttributeHandle (*getRegisteredRendererName)(
00057         RendererInfoPluginHandle handle);
00058 
00059     FnAttributeHandle (*getRegisteredRendererVersion)(
00060         RendererInfoPluginHandle handle);
00061 
00062     bool (*isPresetLocalFileNeeded)(
00063         RendererInfoPluginHandle handle,
00064         const char *outputType);
00065 
00066     bool (*isPolymeshFacesetSplittingEnabled)(
00067         RendererInfoPluginHandle handle);
00068 
00069     bool (*isNodeTypeSupported)(
00070         RendererInfoPluginHandle handle,
00071         const char *nodeType);
00072 
00073     // return string attribute containing the tags associated with a shader type
00074     FnAttributeHandle (*getRendererShaderTypeTags)(
00075         RendererInfoPluginHandle handle,
00076         const char *shaderType);
00077 
00078     // return string attribute containing default output type name
00079     FnAttributeHandle (*getRendererObjectDefaultType)(
00080         RendererInfoPluginHandle handle,
00081         const char *type);
00082 
00083     FnAttributeHandle (*getLiveRenderControlModules)(
00084         RendererInfoPluginHandle handle);
00085 
00086     // return group attribute containing dict of renderer object info
00087     FnAttributeHandle (*getRendererObjectInfo)(
00088         RendererInfoPluginHandle handle,
00089         const char *name,
00090         const char *type,
00091         const FnAttributeHandle inputData);
00092 
00093     // return the list of the names of inputs of a shader
00094     FnAttributeHandle (*getShaderInputNames)(
00095         RendererInfoPluginHandle handle,
00096         const char *shader);
00097 
00098     // return the list of the tags associated with a given input of a shader
00099     FnAttributeHandle (*getShaderInputTags)(
00100         RendererInfoPluginHandle handle,
00101         const char *shader,
00102         const char *inputName);
00103 
00104     // return the list of the names of outputs of a shader
00105     FnAttributeHandle (*getShaderOutputNames)(
00106         RendererInfoPluginHandle handle,
00107         const char *shader);
00108 
00109     // return the list of the tags associated with a given input of a shader
00110     FnAttributeHandle (*getShaderOutputTags)(
00111         RendererInfoPluginHandle handle,
00112         const char *shader,
00113         const char *outputName);
00114 
00115     // automatically assign typeTag to shaders whose name matches the filename-style (fnmatch) filter
00116     void (*setTypeTagNameFilter)(
00117         RendererInfoPluginHandle handle,
00118         const char *filter,
00119         const char *typeTag);
00120 
00121     // Gives the plugin its location path
00122     void (*setPluginPath)(
00123         RendererInfoPluginHandle handle,
00124         const char *pluginPath);
00125 
00126     // Gives the plugin the path to its 'root' directory
00127     void (*setPluginRootPath)(
00128         RendererInfoPluginHandle handle,
00129         const char *pluginRootPath);
00130 
00131     // Tells the plugin what is Katana's path
00132     void (*setKatanaPath)(
00133         RendererInfoPluginHandle handle,
00134         const char *katanaPath);
00135 
00136     // Tells the plugin what is the current Katana session's temporary directory
00137     void (*setTmpPath)(
00138         RendererInfoPluginHandle handle,
00139         const char *tmpPath);
00140 
00141     // add full path or assetId that resolves to a shader location
00142     //  examples: /my/path/to/shader.slo
00143     //            {spref:my/shader.slo}
00144     void (*addObjectLocation)(
00145         RendererInfoPluginHandle handle,
00146         const char *type,
00147         const char *location);
00148 
00149     void (*clearObjectLocations)(
00150         RendererInfoPluginHandle handle,
00151         const char *type);
00152 
00153     void (*flushCaches)(
00154         RendererInfoPluginHandle handle);
00155 
00156     void (*initialiseCaches)(
00157         RendererInfoPluginHandle handle);
00158 };
00159 
00160 struct RendererInfoPluginSuite_v2
00161 {
00162 
00163     RendererInfoPluginHandle (*create)();
00164 
00165     void (*destroy)(
00166         RendererInfoPluginHandle handle);
00167 
00168     FnAttributeHandle (*getRenderMethods)(
00169         RendererInfoPluginHandle handle);
00170 
00171     FnAttributeHandle (*getBatchRenderMethod)(
00172         RendererInfoPluginHandle handle);
00173 
00174     // return string attribute containing list of renderer node names
00175     FnAttributeHandle (*getRendererObjectNames)(
00176         RendererInfoPluginHandle handle,
00177         const char *type,
00178         FnAttributeHandle typeTags);
00179 
00180     // return string attribute containing list of renderer shader type names
00181     FnAttributeHandle (*getRendererObjectTypes)(
00182         RendererInfoPluginHandle handle,
00183         const char *type);
00184 
00185     FnAttributeHandle (*getRendererCoshaderType)(
00186         RendererInfoPluginHandle handle);
00187 
00188     FnAttributeHandle (*getRegisteredRendererName)(
00189         RendererInfoPluginHandle handle);
00190 
00191     FnAttributeHandle (*getRegisteredRendererVersion)(
00192         RendererInfoPluginHandle handle);
00193 
00194     bool (*isPresetLocalFileNeeded)(
00195         RendererInfoPluginHandle handle,
00196         const char *outputType);
00197 
00198     bool (*isPolymeshFacesetSplittingEnabled)(
00199         RendererInfoPluginHandle handle);
00200 
00201     bool (*isNodeTypeSupported)(
00202         RendererInfoPluginHandle handle,
00203         const char *nodeType);
00204 
00205     // return string attribute containing the tags associated with a shader type
00206     FnAttributeHandle (*getRendererShaderTypeTags)(
00207         RendererInfoPluginHandle handle,
00208         const char *shaderType);
00209 
00210     // return string attribute containing default output type name
00211     FnAttributeHandle (*getRendererObjectDefaultType)(
00212         RendererInfoPluginHandle handle,
00213         const char *type);
00214 
00215     FnAttributeHandle (*getLiveRenderControlModules)(
00216         RendererInfoPluginHandle handle);
00217 
00218     // return group attribute containing dict of renderer object info
00219     FnAttributeHandle (*getRendererObjectInfo)(
00220         RendererInfoPluginHandle handle,
00221         const char *name,
00222         const char *type,
00223         const FnAttributeHandle inputData);
00224 
00225     // return the list of the names of inputs of a shader
00226     FnAttributeHandle (*getShaderInputNames)(
00227         RendererInfoPluginHandle handle,
00228         const char *shader);
00229 
00230     // return the list of the tags associated with a given input of a shader
00231     FnAttributeHandle (*getShaderInputTags)(
00232         RendererInfoPluginHandle handle,
00233         const char *shader,
00234         const char *inputName);
00235 
00236     // return the list of the names of outputs of a shader
00237     FnAttributeHandle (*getShaderOutputNames)(
00238         RendererInfoPluginHandle handle,
00239         const char *shader);
00240 
00241     // return the list of the tags associated with a given input of a shader
00242     FnAttributeHandle (*getShaderOutputTags)(
00243         RendererInfoPluginHandle handle,
00244         const char *shader,
00245         const char *outputName);
00246 
00247     // automatically assign typeTag to shaders whose name matches the filename-style (fnmatch) filter
00248     void (*setTypeTagNameFilter)(
00249         RendererInfoPluginHandle handle,
00250         const char *filter,
00251         const char *typeTag);
00252 
00253     // Gives the plugin its location path
00254     void (*setPluginPath)(
00255         RendererInfoPluginHandle handle,
00256         const char *pluginPath);
00257 
00258     // Gives the plugin the path to its 'root' directory
00259     void (*setPluginRootPath)(
00260         RendererInfoPluginHandle handle,
00261         const char *pluginRootPath);
00262 
00263     // Tells the plugin what is Katana's path
00264     void (*setKatanaPath)(
00265         RendererInfoPluginHandle handle,
00266         const char *katanaPath);
00267 
00268     // Tells the plugin what is the current Katana session's temporary directory
00269     void (*setTmpPath)(
00270         RendererInfoPluginHandle handle,
00271         const char *tmpPath);
00272 
00273     // add full path or assetId that resolves to a shader location
00274     //  examples: /my/path/to/shader.slo
00275     //            {spref:my/shader.slo}
00276     void (*addObjectLocation)(
00277         RendererInfoPluginHandle handle,
00278         const char *type,
00279         const char *location);
00280 
00281     void (*clearObjectLocations)(
00282         RendererInfoPluginHandle handle,
00283         const char *type);
00284 
00285     void (*flushCaches)(
00286         RendererInfoPluginHandle handle);
00287 
00288     // Deprecated in 2.0v4, to be removed in 2.1
00289     void (*initialiseCaches)(
00290         RendererInfoPluginHandle handle);
00291 
00292     // New in version 2
00293     // -------------------------------------------------------------------------
00294 
00295     FnAttributeHandle (*getLiveRenderTerminalOps)(
00296         RendererInfoPluginHandle handle,
00297         const FnAttributeHandle stateArgs);
00298 
00299     FnAttributeHandle (*getRenderTerminalOps)(
00300         RendererInfoPluginHandle handle,
00301         const FnAttributeHandle stateArgs);
00302 };
00303 
00304 }
00305 #endif // FnRendererInfoSuite_H
 All Classes Functions Variables Typedefs Enumerations Enumerator