All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_usdimport.h
1 //
2 // Copyright 2017 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 _GUSD_SOP_USDIMPORT_H_
25 #define _GUSD_SOP_USDIMPORT_H_
26 
27 #include <PRM/PRM_Template.h>
28 #include <SOP/SOP_Node.h>
29 
30 #include <pxr/pxr.h>
31 
32 PXR_NAMESPACE_OPEN_SCOPE
33 
34 class GusdUSD_Traverse;
35 
36 
37 class GusdSOP_usdimport : public SOP_Node
38 {
39 public:
40  static OP_Node* Create(OP_Network* net,
41  const char* name,
42  OP_Operator* op);
43 
44  void UpdateTraversalParms();
45 
46  void Reload();
47 
48 protected:
49  GusdSOP_usdimport(OP_Network* net, const char* name, OP_Operator* op);
50 
51  virtual ~GusdSOP_usdimport() {}
52 
53  virtual bool updateParmsFlags();
54 
55  virtual OP_ERROR cookMySop(OP_Context& ctx);
56 
57  virtual OP_ERROR cookInputGroups(OP_Context& ctx, int alone);
58 
59  OP_ERROR _Cook(OP_Context& ctx);
60 
61  OP_ERROR _CreateNewPrims(OP_Context& ctx,
62  const GusdUSD_Traverse* traverse,
63  UT_ErrorSeverity sev);
64 
65  OP_ERROR _ExpandPrims(OP_Context& ctx,
66  const GusdUSD_Traverse* traverse,
67  UT_ErrorSeverity sev);
68 
69 
72  void _AddTraversalParmDependencies();
73 
74  virtual void finishedLoadingNetwork(bool isChildCall);
75 
76 private:
77  UT_Array<PRM_Template> _templates;
78  PRM_Default _tabs[2];
79  const GA_Group* _group;
80 
81 public:
82  static void Register(OP_OperatorTable* table);
83 };
84 
85 PXR_NAMESPACE_CLOSE_SCOPE
86 
87 #endif /*_GUSD_SOP_USDIMPORT_H_*/
Base class for custom stage traversal.
Definition: USD_Traverse.h:57