HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HUSD_SceneDoctor.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  */
7 
8 #ifndef DEV_HUSD_SCENEDOCTOR_H
9 #define DEV_HUSD_SCENEDOCTOR_H
10 
11 #include "HUSD_API.h"
12 #include "HUSD_FindPrims.h"
13 #include "HUSD_Path.h"
14 #include <PY/PY_CompiledCode.h>
15 #include <UT/UT_Array.h>
17 
19 {
20 public:
22  {
23  UNDEFINED = -1,
24  // kind
25  PARENT_PRIM_IS_NONE_KIND = 0,
26  COMPONENT_HAS_MODEL_CHILD = 1,
27  SUBCOMPONENT_HAS_MODEL_CHILD = 2,
28  // gprims
29  GPRIM_TYPE_HAS_CHILD = 3,
30  GPRIM_MARKED_INSTANCEABLE = 4,
31  // primvar
32  PRIMVAR_ARRAY_LENGTH_MISMATCH = 5,
33  INTERPOLATION_TYPE_MISMATCH = 6,
34  PRIM_ARRAY_LENGTH_MISMATCH = 7,
35  INVALID_PRIMVAR_INDICES = 8,
36  // value clips
37  MISSING_VALUECLIP_MANIFEST = 9,
38  // python
39  PYTHON_EXCEPTION = 10,
40  // material binding API
41  MISSING_MATERIAL_BINDING_API = 11,
42  };
44  {
47  ValidationError(HUSD_Path path, int errorState)
48  : myPath{path}, myErrorState{errorState} {}
49  bool operator<(const ValidationError &message) const
50  { return myPath < message.myPath; }
51  bool operator==(const ValidationError &message) const
52  { return myPath == message.myPath; }
53  };
55  {
56  bool myValidateKind = false;
57  bool myValidateGprims = false;
58  bool myValidatePrimvars = false;
59  bool myValidateValueClips = false;
60  bool myValidateMaterialBind = false;
61  };
64  void validate(UT_Array<ValidationError> &errors, const HUSD_FindPrims *prims);
65  bool validatePython(const HUSD_FindPrims *validationPrims,
66  const HUSD_FindPrims *collectionPrim,
67  const UT_String &collectionName,
68  PY_CompiledCode &pyExpr);
69 private:
70  HUSD_AutoAnyLock &myLock;
71  ValidationFlags myFlags;
72  UT_Array<ValidationError> myValidationErrors;
73 };
74 
75 #endif // DEV_HUSD_SCENEDOCTOR_H
GLuint GLsizei const GLchar * message
Definition: glcorearb.h:2543
GLbitfield flags
Definition: glcorearb.h:1596
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
#define HUSD_API
Definition: HUSD_API.h:31
ValidationError(HUSD_Path path, int errorState)
bool operator==(const ValidationError &message) const
bool operator<(const ValidationError &message) const