//-***************************************************************************** void IPolyMeshSchema::init( const Abc::Argument &iArg0, const Abc::Argument &iArg1 ) { ALEMBIC_ABC_SAFE_CALL_BEGIN( "IPolyMeshSchema::init()" ); Abc::Arguments args; iArg0.setInto( args ); iArg1.setInto( args ); AbcA::CompoundPropertyReaderPtr _this = this->getPtr(); // no matching so we pick up old assets written as V3f m_positionsProperty = Abc::IP3fArrayProperty( _this, "P", kNoMatching ); m_indicesProperty = Abc::IInt32ArrayProperty( _this, ".faceIndices", args.getSchemaInterpMatching() ); m_countsProperty = Abc::IInt32ArrayProperty( _this, ".faceCounts", args.getSchemaInterpMatching() ); // none of the things below here are guaranteed to exist if ( this->getPropertyHeader( "uv" ) != NULL ) { m_uvsParam = IV2fGeomParam( _this, "uv", iArg0, iArg1 ); } if ( this->getPropertyHeader( "N" ) != NULL ) { m_normalsParam = IN3fGeomParam( _this, "N", iArg0, iArg1 ); } IObject _thisObject = this->getParent().getObject(); size_t numChildren = _thisObject.getNumChildren(); for ( size_t childIndex = 0 ; childIndex < numChildren; childIndex++ ) { ObjectHeader const & header = _thisObject.getChildHeader (childIndex); if ( IFaceSet::matches( header ) ) { // start out with an empty (invalid IFaceSet) // accessor later on will create real IFaceSet object. m_faceSets [header.getName ()] = IFaceSet (); } } m_faceSetsLoaded = false; ALEMBIC_ABC_SAFE_CALL_END_RESET(); }
//-***************************************************************************** void ICurvesSchema::init( const Abc::Argument &iArg0, const Abc::Argument &iArg1 ) { // Only callable by ctors (mt-safety) ALEMBIC_ABC_SAFE_CALL_BEGIN( "ICurvesSchema::init()" ); Abc::Arguments args; iArg0.setInto( args ); iArg1.setInto( args ); AbcA::CompoundPropertyReaderPtr _this = this->getPtr(); // no matching so we pick up old assets written as V3f m_positionsProperty = Abc::IP3fArrayProperty( _this, "P", kNoMatching, args.getErrorHandlerPolicy() ); m_nVerticesProperty = Abc::IInt32ArrayProperty( _this, "nVertices", iArg0, iArg1 ); m_basisAndTypeProperty = Abc::IScalarProperty( _this, "curveBasisAndType", args.getErrorHandlerPolicy()); // none of the things below here are guaranteed to exist if ( this->getPropertyHeader( "uv" ) != NULL ) { m_uvsParam = IV2fGeomParam( _this, "uv", iArg0, iArg1 ); } if ( this->getPropertyHeader( "N" ) != NULL ) { m_normalsParam = IN3fGeomParam( _this, "N", iArg0, iArg1 ); } if ( this->getPropertyHeader( "width" ) != NULL ) { m_widthsParam = IFloatGeomParam( _this, "width", iArg0, iArg1 ); } if ( this->getPropertyHeader( ".velocities" ) != NULL ) { m_velocitiesProperty = Abc::IV3fArrayProperty( _this, ".velocities", iArg0, iArg1 ); } ALEMBIC_ABC_SAFE_CALL_END_RESET(); }
//-***************************************************************************** void ISubDSchema::init( const Abc::Argument &iArg0, const Abc::Argument &iArg1 ) { ALEMBIC_ABC_SAFE_CALL_BEGIN( "ISubDSchema::init()" ); AbcA::CompoundPropertyReaderPtr _this = this->getPtr(); Abc::Arguments args; iArg0.setInto( args ); iArg1.setInto( args ); // no matching so we pick up old assets written as V3f m_positionsProperty = Abc::IP3fArrayProperty( _this, "P", kNoMatching, args.getErrorHandlerPolicy() ); m_faceIndicesProperty = Abc::IInt32ArrayProperty( _this, ".faceIndices", iArg0, iArg1 ); m_faceCountsProperty = Abc::IInt32ArrayProperty( _this, ".faceCounts", iArg0, iArg1 ); if ( this->getPropertyHeader(".faceVaryingInterpolateBoundary") != NULL ) { m_faceVaryingInterpolateBoundaryProperty = Abc::IInt32Property( _this, ".faceVaryingInterpolateBoundary", iArg0, iArg1 ); } if ( this->getPropertyHeader(".faceVaryingPropagateCorners") != NULL ) { m_faceVaryingPropagateCornersProperty = Abc::IInt32Property( _this, ".faceVaryingPropagateCorners", iArg0, iArg1 ); } if ( this->getPropertyHeader(".interpolateBoundary") != NULL ) { m_interpolateBoundaryProperty = Abc::IInt32Property( _this, ".interpolateBoundary", iArg0, iArg1 ); } // creases, corners, and holes optionally exist if ( this->getPropertyHeader(".creaseIndices") != NULL) { m_creaseIndicesProperty = Abc::IInt32ArrayProperty( _this, ".creaseIndices", iArg0, iArg1 ); } if ( this->getPropertyHeader(".creaseLengths") != NULL) { m_creaseLengthsProperty = Abc::IInt32ArrayProperty( _this, ".creaseLengths", iArg0, iArg1 ); } if ( this->getPropertyHeader(".creaseSharpnesses") != NULL) { m_creaseSharpnessesProperty = Abc::IFloatArrayProperty( _this, ".creaseSharpnesses", iArg0, iArg1 ); } if ( this->getPropertyHeader(".cornerIndices") != NULL) { m_cornerIndicesProperty = Abc::IInt32ArrayProperty( _this, ".cornerIndices", iArg0, iArg1 ); } if ( this->getPropertyHeader(".cornerSharpnesses") != NULL) { m_cornerSharpnessesProperty = Abc::IFloatArrayProperty( _this, ".cornerSharpnesses", iArg0, iArg1 ); } if ( this->getPropertyHeader(".holes") != NULL) { m_holesProperty = Abc::IInt32ArrayProperty( _this, ".holes", iArg0, iArg1 ); } if ( this->getPropertyHeader(".scheme") != NULL) { m_subdSchemeProperty = Abc::IStringProperty( _this, ".scheme", iArg0, iArg1 ); } // none of the things below here are guaranteed to exist if ( this->getPropertyHeader( "uv" ) != NULL ) { m_uvsParam = IV2fGeomParam( _this, "uv", iArg0, iArg1 ); } if ( this->getPropertyHeader( ".velocities" ) != NULL ) { m_velocitiesProperty = Abc::IV3fArrayProperty( _this, ".velocities", iArg0, iArg1 ); } m_faceSetsLoaded = false; ALEMBIC_ABC_SAFE_CALL_END_RESET(); }
//-***************************************************************************** void INuPatchSchema::init( const Abc::Argument &iArg0, const Abc::Argument &iArg1 ) { ALEMBIC_ABC_SAFE_CALL_BEGIN( "INuPatchSchema::init()" ); Abc::Arguments args; iArg0.setInto( args ); iArg1.setInto( args ); m_hasTrimCurve = false; AbcA::CompoundPropertyReaderPtr _this = this->getPtr(); // required properties // no matching so we pick up old assets written as V3f m_positionsProperty = Abc::IP3fArrayProperty( _this, "P", kNoMatching, args.getErrorHandlerPolicy() ); m_numUProperty = Abc::IInt32Property( _this, "nu", iArg0, iArg1 ); m_numVProperty = Abc::IInt32Property( _this, "nv", iArg0, iArg1 ); m_uOrderProperty = Abc::IInt32Property( _this, "uOrder", iArg0, iArg1 ); m_vOrderProperty = Abc::IInt32Property( _this, "vOrder", iArg0, iArg1 ); m_uKnotProperty = Abc::IFloatArrayProperty( _this, "uKnot", iArg0, iArg1 ); m_vKnotProperty = Abc::IFloatArrayProperty( _this, "vKnot", iArg0, iArg1 ); // optional properties // none of the things below here are guaranteed to exist if ( this->getPropertyHeader( "w" ) != NULL ) { m_positionWeightsProperty = Abc::IFloatArrayProperty( _this, "w", iArg0, iArg1 ); } if ( this->getPropertyHeader( ".velocities" ) != NULL ) { m_velocitiesProperty = Abc::IV3fArrayProperty( _this, ".velocities", iArg0, iArg1 ); } if ( this->getPropertyHeader( "N" ) != NULL ) { m_normalsParam = IN3fGeomParam( _this, "N", iArg0, iArg1 ); } if ( this->getPropertyHeader( "uv" ) != NULL ) { m_uvsParam = IV2fGeomParam( _this, "uv", iArg0, iArg1 ); } if ( this->hasTrimProps() ) { m_trimNumLoopsProperty = Abc::IInt32Property( _this, "trim_nloops", iArg0, iArg1 ); m_trimNumCurvesProperty = Abc::IInt32ArrayProperty( _this, "trim_ncurves", iArg0, iArg1 ); m_trimNumVerticesProperty = Abc::IInt32ArrayProperty( _this, "trim_n", iArg0, iArg1 ); m_trimOrderProperty = Abc::IInt32ArrayProperty( _this, "trim_order", iArg0, iArg1 ); m_trimKnotProperty = Abc::IFloatArrayProperty( _this, "trim_knot", iArg0, iArg1 ); m_trimMinProperty = Abc::IFloatArrayProperty( _this, "trim_min", iArg0, iArg1 ); m_trimMaxProperty = Abc::IFloatArrayProperty( _this, "trim_max", iArg0, iArg1 ); m_trimUProperty = Abc::IFloatArrayProperty( _this, "trim_u", iArg0, iArg1 ); m_trimVProperty = Abc::IFloatArrayProperty( _this, "trim_v", iArg0, iArg1 ); m_trimWProperty = Abc::IFloatArrayProperty( _this, "trim_w", iArg0, iArg1 ); m_hasTrimCurve = m_trimNumLoopsProperty.getNumSamples() > 0; } ALEMBIC_ABC_SAFE_CALL_END_RESET(); }