ai_scene_format.h
Go to the documentation of this file.
1// Copyright 2025 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_asset.h>
15#include <ai_map.h>
16#include <ai_scene.h>
17#include <ai_version.h>
18
68 const char** extensions;
69 const char* name;
70 const char* description;
71 const void* methods;
72 char version[AI_MAXSIZE_VERSION];
73 const AtParamValueMap* params;
74};
75
84typedef bool (*AtSceneLoad)(AtUniverse* universe, const char* filename, const AtParamValueMap* params);
85
95typedef bool (*AtSceneWrite)(AtUniverse* universe, const char* filename, const AtParamValueMap* params, const AtMetadataStore* mds);
96
108typedef AtArray* (*AtSceneGetAssets)(const char* filename, const AtParamValueMap* params);
109
114{
115 AtSceneLoad SceneLoad;
116 AtSceneWrite SceneWrite;
117 AtSceneGetAssets SceneGetAssets;
118};
119
121#define AI_SCENE_FORMAT_EXPORT_METHODS(tag) \
122static AtSceneFormatMethods ai_scene_mtds = { \
123 NULL, \
124 NULL, \
125 NULL \
126}; \
127const AtSceneFormatMethods* tag = &ai_scene_mtds;
128
130#define scene_format_loader \
131AI_EXPORT_LIB bool SceneFormatLoader(AtSceneFormatLib* format)
132
134#define scene_load \
135static bool SceneLoad(AtUniverse* universe, const char* filename, const AtParamValueMap* params); \
136AI_OPTIONAL_METHOD_INSTALL(ai_scene_mtds, SceneLoad) \
137static bool SceneLoad(AtUniverse* universe, const char* filename, const AtParamValueMap* params)
138
140#define scene_write \
141static bool SceneWrite(AtUniverse* universe, const char* filename, const AtParamValueMap* params, const AtMetadataStore* mds); \
142AI_OPTIONAL_METHOD_INSTALL(ai_scene_mtds, SceneWrite) \
143static bool SceneWrite(AtUniverse* universe, const char* filename, const AtParamValueMap* params, const AtMetadataStore* mds)
144
146#define scene_get_assets \
147static AtArray* SceneGetAssets(const char* filename, const AtParamValueMap* params); \
148AI_OPTIONAL_METHOD_INSTALL(ai_scene_mtds, SceneGetAssets) \
149static AtArray* SceneGetAssets(const char* filename, const AtParamValueMap* params)
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:71
const char ** extensions
null-terminated list of extensions used by this format
Definition: ai_scene_format.h:68
const char * description
description for this scene format
Definition: ai_scene_format.h:70
bool(* AtSceneLoad)(AtUniverse *universe, const char *filename, const AtParamValueMap *params)
Scene format load method.
Definition: ai_scene_format.h:84
AtArray *(* AtSceneGetAssets)(const char *filename, const AtParamValueMap *params)
Scene asset fetching method.
Definition: ai_scene_format.h:108
bool(* AtSceneWrite)(AtUniverse *universe, const char *filename, const AtParamValueMap *params, const AtMetadataStore *mds)
Scene format write method.
Definition: ai_scene_format.h:95
const char * name
name of this scene format ("ASS", "USD", etc)
Definition: ai_scene_format.h:69
char version[AI_MAXSIZE_VERSION]
Arnold version that this plugin was compiled against
Definition: ai_scene_format.h:72
const AtParamValueMap * params
optional params that will be passed on to the methods
Definition: ai_scene_format.h:73
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:67
Scene format methods.
Definition: ai_scene_format.h:114
This represents a universe in Arnold.

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