ai_scene_format.h
Go to the documentation of this file.
1// Copyright 2021 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
83typedef bool (*AtSceneLoad)(AtUniverse* universe, const char* filename, const AtParamValueMap* params);
84
94typedef 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) \
107static AtSceneFormatMethods ai_scene_mtds = { \
108 NULL, \
109 NULL \
110}; \
111const AtSceneFormatMethods* tag = &ai_scene_mtds;
112
114#define scene_format_loader \
115AI_EXPORT_LIB bool SceneFormatLoader(AtSceneFormatLib* format)
116
118#define scene_load \
119static bool SceneLoad(AtUniverse* universe, const char* filename, const AtParamValueMap* params); \
120AI_OPTIONAL_METHOD_INSTALL(ai_scene_mtds, SceneLoad) \
121static bool SceneLoad(AtUniverse* universe, const char* filename, const AtParamValueMap* params)
122
124#define scene_write \
125static bool SceneWrite(AtUniverse* universe, const char* filename, const AtParamValueMap* params, const AtMetadataStore* mds); \
126AI_OPTIONAL_METHOD_INSTALL(ai_scene_mtds, SceneWrite) \
127static bool SceneWrite(AtUniverse* universe, const char* filename, const AtParamValueMap* params, const AtMetadataStore* mds)
Key/Value storage.
API for reading and writing scene file formats.
Version number information and checking of backwards-compatibility.
const void * methods
pointer to load/write methods for this format
Definition: ai_scene_format.h:70
const char ** extensions
null-terminated list of extensions used by this format
Definition: ai_scene_format.h:67
const char * description
description for this scene format
Definition: ai_scene_format.h:69
bool(* AtSceneLoad)(AtUniverse *universe, const char *filename, const AtParamValueMap *params)
Scene format load method.
Definition: ai_scene_format.h:83
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
char version[AI_MAXSIZE_VERSION]
Arnold version that this plugin was compiled against
Definition: ai_scene_format.h:71
const AtParamValueMap * params
optional params that will be passed on to the methods
Definition: ai_scene_format.h:72
This structure holds a generic list of metadata items, each of which could optionally be associated t...
Used by dynamically-linked scene format plugins.
Definition: ai_scene_format.h:66
Scene format methods.
Definition: ai_scene_format.h:100
This represents a universe in Arnold.

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