2 #include "AL/usdmaya/Common.h"
4 #include "maya/MObject.h"
5 #include "maya/MDagPath.h"
7 #include "pxr/usd/sdf/layer.h"
8 #include "pxr/usd/usd/prim.h"
37 {
return m_primStack.empty(); }
42 {
return m_primStack.size(); }
46 inline const UsdPrim&
prim()
const
47 {
return (m_primStack.end() - 1)->m_prim; }
60 inline void append(
const MObject newNode)
62 m_primStack[m_primStack.size() - 1].m_object = newNode;
69 if(m_primStack.size() > 1)
71 if( (m_primStack.end() - 2)->m_object != MObject::kNullObj)
73 return (m_primStack.end() - 2)->m_object;
75 if( (m_primStack.end() - 1)->m_object != MObject::kNullObj)
77 return (m_primStack.end() - 1)->m_object;
80 if(m_primStack.size() == 1)
82 return (m_primStack.end() - 1)->m_object;
84 return m_parentPath.node();
94 StackRef(
const UsdPrim&
prim);
95 StackRef(
const StackRef&
prim);
99 UsdPrim::SiblingIterator m_begin;
100 UsdPrim::SiblingIterator m_end;
101 int32_t m_currentChild;
102 int32_t m_numChildren;
105 std::vector<StackRef> m_primStack;
106 UsdStageRefPtr m_stage;
107 size_t m_currentItem;
108 MDagPath m_parentPath;
110 TfHashSet<SdfPath, SdfPath::Hash> m_visitedMasterPrimPaths;