HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HUSD_ObjectImport-2.0.h
Go to the documentation of this file.
1 /*
2  * Copyright 2019 Side Effects Software Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 
18 #ifndef __HUSD_ObjectImport2_h__
19 #define __HUSD_ObjectImport2_h__
20 
21 #include "HUSD_API.h"
22 
23 class HUSD_FindPrims;
24 class HUSD_TimeCode;
25 class OBJ_Node;
26 class OP_Context;
27 class SOP_Node;
28 
30 {
31 public:
32  explicit HUSD_ObjectImport2(HUSD_AutoWriteLock &dest);
34 
35  // Returns the appropriate primtype for an object.
36  // Returns an empty string for unsupported object types.
37  static UT_StringHolder getPrimKindForObject(const OP_Node *node);
38 
39  bool importPrim(
40  const OBJ_Node *object,
41  const UT_StringHolder &primpath,
42  const UT_StringHolder &primtype,
43  const UT_StringHolder &primkind) const;
44 
45  void recordSOPForImport(
46  SOP_Node *sop,
47  OP_Context &context,
49  const UT_StringRef &refprimpath,
50  const UT_StringRef &primpath);
51 
52  void importAllRecordedSOPs(bool asreference = true);
53 
54  bool importMaterial(VOP_Node *object, const UT_StringHolder &primpath) const;
55 
56  HUSD_PathSet getOutputShaders(const UT_StringHolder &matpath) const;
57 
58 private:
59  HUSD_AutoWriteLock &myWriteLock;
60  UT_Array<UT_StringHolder> mySopImportFilePaths;
61  UT_Array<UT_StringHolder> mySopImportPrimPaths;
62  UT_Array<UT_StringHolder> mySopImportRefPrimPaths;
64  UT_Array<GU_DetailHandle> mySopImportGDHs;
65 };
66 
67 #endif
#define HUSD_API
Definition: HUSD_API.h:32
**If you just want to fire and args
Definition: thread.h:609