ai_scene_format.h
Go to the documentation of this file.
1 // Copyright 2020 Autodesk, Inc. All rights reserved.
2 //
3 // Use of this software is subject to the terms of the Autodesk license
4 // agreement provided at the time of installation or download, or which
5 // otherwise accompanies this software in either electronic or hard copy form.
6 
12 #pragma once
13 
14 #include <ai_map.h>
15 #include <ai_scene.h>
16 #include <ai_version.h>
17 
67  const char** extensions;
68  const char* name;
69  const char* description;
70  const void* methods;
71  char version[AI_MAXSIZE_VERSION];
72  const AtParamValueMap* params;
73 };
74 
83 typedef bool (*AtSceneLoad)(AtUniverse* universe, const char* filename, const AtParamValueMap* params);
84 
94 typedef bool (*AtSceneWrite)(AtUniverse* universe, const char* filename, const AtParamValueMap* params, const AtMetadataStore* mds);
95 
100 {
101  AtSceneLoad SceneLoad;
102  AtSceneWrite SceneWrite;
103 };
104 
106 #define AI_SCENE_FORMAT_EXPORT_METHODS(tag) \
107 static AtSceneFormatMethods ai_scene_mtds = { \
108  NULL, \
109  NULL \
110 }; \
111 const AtSceneFormatMethods* tag = &ai_scene_mtds;
112 
114 #define scene_format_loader \
115 AI_EXPORT_LIB bool SceneFormatLoader(AtSceneFormatLib* format)
116 
118 #define scene_load \
119 static bool SceneLoad(AtUniverse* universe, const char* filename, const AtParamValueMap* params); \
120 AI_OPTIONAL_METHOD_INSTALL(ai_scene_mtds, SceneLoad) \
121 static bool SceneLoad(AtUniverse* universe, const char* filename, const AtParamValueMap* params)
122 
124 #define scene_write \
125 static bool SceneWrite(AtUniverse* universe, const char* filename, const AtParamValueMap* params, const AtMetadataStore* mds); \
126 AI_OPTIONAL_METHOD_INSTALL(ai_scene_mtds, SceneWrite) \
127 static bool SceneWrite(AtUniverse* universe, const char* filename, const AtParamValueMap* params, const AtMetadataStore* mds)
This represents a universe in Arnold.
API for reading and writing scene file formats.
const AtParamValueMap * params
optional params that will be passed on to the methods
Definition: ai_scene_format.h:72
const char ** extensions
null-terminated list of extensions used by this format
Definition: ai_scene_format.h:67
char version[AI_MAXSIZE_VERSION]
Arnold version that this plugin was compiled against.
Definition: ai_scene_format.h:71
This structure holds a generic list of metadata items, each of which could optionally be associated t...
bool(* AtSceneLoad)(AtUniverse *universe, const char *filename, const AtParamValueMap *params)
Scene format load method.
Definition: ai_scene_format.h:83
Key/Value storage.
const void * methods
pointer to load/write methods for this format
Definition: ai_scene_format.h:70
Version number information and checking of backwards-compatibility.
const char * description
description for this scene format
Definition: ai_scene_format.h:69
Used by dynamically-linked scene format plugins.
Definition: ai_scene_format.h:66
bool(* AtSceneWrite)(AtUniverse *universe, const char *filename, const AtParamValueMap *params, const AtMetadataStore *mds)
Scene format write method.
Definition: ai_scene_format.h:94
const char * name
name of this scene format ("ASS", "USD", etc)
Definition: ai_scene_format.h:68
Scene format methods.
Definition: ai_scene_format.h:99

© 2020 Autodesk, Inc. · All rights reserved · www.arnoldrenderer.com