diff --git a/code/glTFAsset.h b/code/glTFAsset.h index be3c3e756..b5ae84985 100644 --- a/code/glTFAsset.h +++ b/code/glTFAsset.h @@ -756,15 +756,19 @@ namespace glTF virtual void AttachToDocument(Document& doc) = 0; virtual void DetachFromDocument() = 0; +#ifdef GLTF_ASSET_WITH_EXPORT_SUPPORT virtual void WriteObjects(AssetWriter& writer) = 0; +#endif }; +#ifdef GLTF_ASSET_WITH_EXPORT_SUPPORT template class LazyDict; //! (Implemented in glTFAssetWriter.h) template void WriteLazyDict(LazyDict& d, AssetWriter& w); +#endif //! Manages lazy loading of the glTF top-level objects, and keeps a reference to them by ID //! It is the owner the loaded objects, so when it is destroyed it also deletes them @@ -786,8 +790,10 @@ namespace glTF void AttachToDocument(Document& doc); void DetachFromDocument(); +#ifdef GLTF_ASSET_WITH_EXPORT_SUPPORT void WriteObjects(AssetWriter& writer) { WriteLazyDict(*this, writer); } +#endif Ref Add(T* obj); diff --git a/code/glTFAssetWriter.h b/code/glTFAssetWriter.h index 370d2c0ab..55d75451d 100644 --- a/code/glTFAssetWriter.h +++ b/code/glTFAssetWriter.h @@ -48,6 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef glTFAssetWriter_H_INC #define glTFAssetWriter_H_INC +#define GLTF_ASSET_WITH_EXPORT_SUPPORT #include "glTFAsset.h" namespace glTF