GT_PrimitiveHandle GusdPrimWrapper:: defineForRead( const GusdUSD_StageProxyHandle& stage, const UsdGeomImageable& sourcePrim, const UsdTimeCode& time, const GusdPurposeSet& purposes ) { GT_PrimitiveHandle gtUsdPrimHandle; GusdUSD_ImageableHolder::ScopedLock lock; GusdUSD_ImageableHolder holder( sourcePrim, stage->GetLock() ); lock.Acquire( holder, /*write*/false); UsdGeomImageable sourceImageable = *lock; // Find the function registered for the source prim's type // to define the prim from read and call that function. if(sourcePrim) { USDTypeToDefineFuncMap::const_iterator mapIt = s_usdTypeToFuncMap.find(sourceImageable.GetPrim().GetTypeName()); if(mapIt != s_usdTypeToFuncMap.end()) { gtUsdPrimHandle = mapIt->second(stage,sourcePrim,time,purposes); } } return gtUsdPrimHandle; }
GusdScopeWrapper::GusdScopeWrapper( const GusdUSD_StageProxyHandle& stage, const UsdGeomScope& scope, const UsdTimeCode& time, const GusdPurposeSet& purposes ) : GusdGroupBaseWrapper( time, purposes ) , m_usdScopeForRead( scope, stage->GetLock() ) , m_stageProxy( stage ) { }