-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathalembicFileFormat.h
More file actions
70 lines (57 loc) · 2.31 KB
/
alembicFileFormat.h
File metadata and controls
70 lines (57 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//
// Copyright 2016 Pixar
//
// Licensed under the terms set forth in the LICENSE.txt file available at
// https://openusd.org/license.
//
#ifndef PXR_USD_PLUGIN_USD_ABC_ALEMBIC_FILE_FORMAT_H
#define PXR_USD_PLUGIN_USD_ABC_ALEMBIC_FILE_FORMAT_H
#include "pxr/pxr.h"
#include "pxr/usd/sdf/fileFormat.h"
#include "pxr/base/tf/staticTokens.h"
#include <iosfwd>
#include <string>
PXR_NAMESPACE_OPEN_SCOPE
#define USDABC_ALEMBIC_FILE_FORMAT_TOKENS \
((Id, "abc")) \
((Version, "1.0")) \
((Target, "usd"))
TF_DECLARE_PUBLIC_TOKENS(UsdAbcAlembicFileFormatTokens, USDABC_ALEMBIC_FILE_FORMAT_TOKENS);
TF_DECLARE_WEAK_AND_REF_PTRS(UsdAbcAlembicFileFormat);
/// \class UsdAbcAlembicFileFormat
///
class UsdAbcAlembicFileFormat : public SdfFileFormat {
public:
// SdfFileFormat overrides
virtual SdfAbstractDataRefPtr InitData(const FileFormatArguments&) const override;
virtual bool CanRead(const std::string &file) const override;
virtual bool Read(SdfLayer* layer,
const std::string& resolvedPath,
bool metadataOnly) const override;
virtual bool WriteToFile(const SdfLayer& layer,
const std::string& filePath,
const std::string& comment = std::string(),
const FileFormatArguments& args =
FileFormatArguments()) const override;
virtual bool ReadFromString(SdfLayer* layer,
const std::string& str) const override;
virtual bool WriteToString(const SdfLayer& layer,
std::string* str,
const std::string& comment=std::string())
const override;
virtual bool WriteToStream(const SdfSpecHandle &spec,
std::ostream& out,
size_t indent) const override;
protected:
SDF_FILE_FORMAT_FACTORY_ACCESS;
virtual ~UsdAbcAlembicFileFormat();
UsdAbcAlembicFileFormat();
bool _ReadDetached(
SdfLayer* layer,
const std::string& resolvedPath,
bool metadataOnly) const override;
private:
SdfFileFormatConstPtr _usda;
};
PXR_NAMESPACE_CLOSE_SCOPE
#endif // PXR_USD_PLUGIN_USD_ABC_ALEMBIC_FILE_FORMAT_H