All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
primWriterContext.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXRUSDMAYA_PRIMWRITERCONTEXT_H
25 #define PXRUSDMAYA_PRIMWRITERCONTEXT_H
26 
28 
29 #include "usdMaya/api.h"
30 
31 #include "pxr/pxr.h"
32 
33 #include "pxr/usd/usd/stage.h"
34 #include "pxr/usd/usd/timeCode.h"
35 
36 PXR_NAMESPACE_OPEN_SCOPE
37 
38 
42 class UsdMayaPrimWriterContext
43 {
44 public:
45 
46  PXRUSDMAYA_API
47  UsdMayaPrimWriterContext(
48  const UsdTimeCode& timeCode,
49  const SdfPath& authorPath,
50  const UsdStageRefPtr& stage);
51 
53  PXRUSDMAYA_API
54  const UsdTimeCode& GetTimeCode() const;
55 
58  PXRUSDMAYA_API
59  const SdfPath& GetAuthorPath() const;
60 
62  PXRUSDMAYA_API
63  UsdStageRefPtr GetUsdStage() const;
64 
70  PXRUSDMAYA_API
71  bool GetExportsGprims() const;
72 
80  PXRUSDMAYA_API
81  void SetExportsGprims(bool exportsGprims);
82 
92  PXRUSDMAYA_API
93  void SetPruneChildren(bool pruneChildren);
94 
100  PXRUSDMAYA_API
101  bool GetPruneChildren() const;
102 
106  PXRUSDMAYA_API
107  const SdfPathVector& GetModelPaths() const;
108 
116  PXRUSDMAYA_API
117  void SetModelPaths(const SdfPathVector& modelPaths);
118 
120  PXRUSDMAYA_API
121  void SetModelPaths(SdfPathVector&& modelPaths);
122 
123 private:
124  const UsdTimeCode& _timeCode;
125  const SdfPath& _authorPath;
126  UsdStageRefPtr _stage;
127  bool _exportsGprims;
128  bool _pruneChildren;
129  SdfPathVector _modelPaths;
130 };
131 
132 
133 PXR_NAMESPACE_CLOSE_SCOPE
134 
135 #endif
136 
Represent a time value, which may be either numeric, holding a double value, or a sentinel value UsdT...
Definition: timeCode.h:85
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:287