17 #include "maya/MObject.h"
18 #include "maya/MDagPath.h"
20 #include "pxr/usd/sdf/layer.h"
22 #include "pxr/usd/usd/prim.h"
25 #include "AL/usd/utils/ForwardDeclares.h"
27 PXR_NAMESPACE_USING_DIRECTIVE
54 {
return m_primStack.empty(); }
59 {
return m_primStack.size(); }
63 inline const UsdPrim&
prim()
const
64 {
return (m_primStack.end() - 1)->m_prim; }
77 inline void append(
const MObject newNode)
79 if(!m_primStack.empty())
80 m_primStack[m_primStack.size() - 1].m_object = newNode;
87 if(m_primStack.size() > 1)
89 if( (m_primStack.end() - 2)->m_object != MObject::kNullObj)
91 return (m_primStack.end() - 2)->m_object;
93 if( (m_primStack.end() - 1)->m_object != MObject::kNullObj)
95 return (m_primStack.end() - 1)->m_object;
98 if(m_primStack.size() == 1)
100 return (m_primStack.end() - 1)->m_object;
102 return m_parentPath.node();
112 StackRef(
const UsdPrim&
prim);
113 StackRef(
const StackRef&
prim);
117 UsdPrim::SiblingIterator m_begin;
118 UsdPrim::SiblingIterator m_end;
119 int32_t m_currentChild;
120 int32_t m_numChildren;
123 std::vector<StackRef> m_primStack;
124 UsdStageRefPtr m_stage;
125 size_t m_currentItem;
126 MDagPath m_parentPath;
128 TfHashSet<SdfPath, SdfPath::Hash> m_visitedMasterPrimPaths;