Cortex  10.0.0-a4
SOP_CortexConverter.h
1 //
3 // Copyright 2010 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios),
4 // its affiliates and/or its licensors.
5 //
6 // Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved.
7 //
8 // Redistribution and use in source and binary forms, with or without
9 // modification, are permitted provided that the following conditions are
10 // met:
11 //
12 // * Redistributions of source code must retain the above copyright
13 // notice, this list of conditions and the following disclaimer.
14 //
15 // * Redistributions in binary form must reproduce the above copyright
16 // notice, this list of conditions and the following disclaimer in the
17 // documentation and/or other materials provided with the distribution.
18 //
19 // * Neither the name of Image Engine Design nor the names of any
20 // other contributors to this software may be used to endorse or
21 // promote products derived from this software without specific prior
22 // written permission.
23 //
24 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
25 // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
26 // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
28 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
30 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
31 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
32 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 //
37 
38 #ifndef IECOREHOUDINI_SOPCORTEXCONVERTER_H
39 #define IECOREHOUDINI_SOPCORTEXCONVERTER_H
40 
41 #include "SOP/SOP_Node.h"
42 #include "PRM/PRM_Name.h"
43 
44 namespace IECoreHoudini
45 {
46 
48 class SOP_CortexConverter : public SOP_Node
49 {
50  public :
51 
52  static OP_Node *create( OP_Network *net, const char *name, OP_Operator *op );
53 
54  static const char *typeName;
55 
56  static PRM_Template parameters[];
57  static CH_LocalVariable variables[];
58 
59  enum ResultType
60  {
61  Cortex = 0,
62  Houdini
63  };
64 
65  static PRM_Name pNameFilter;
66  static PRM_Name pAttributeFilter;
67  static PRM_Name pResultType;
68  static PRM_Name pConvertStandardAttributes;
69 
70  static PRM_Default convertStandardAttributesDefault;
71  static PRM_Default filterDefault;
72  static PRM_Default resultTypeDefault;
73 
74  static PRM_ChoiceList resultTypeList;
75 
76  virtual void getNodeSpecificInfoText( OP_Context &context, OP_NodeInfoParms &parms );
77 
78  protected :
79 
80  SOP_CortexConverter( OP_Network *net, const char *name, OP_Operator *op );
81  virtual ~SOP_CortexConverter();
82 
83  virtual OP_ERROR cookMySop( OP_Context &context );
84 
85  private :
86 
87  void doConvert( const GU_DetailHandle &handle, const std::string &name, ResultType type, const std::string &attributeFilter, bool convertStandardAttributes );
88  void doPassThrough( const GU_DetailHandle &handle, const std::string &name );
89 
90 };
91 
92 } // namespace IECoreHoudini
93 
94 #endif // IECOREHOUDINI_SOPCORTEXCONVERTER_H
SOP class for converting between GU_CortexPrimitives and native Houdini geometry. ...
Definition: SOP_CortexConverter.h:48
The IECoreHoudini namespace holds all the functionality of libIECoreHoudini.
Definition: CoreHoudini.h:51