MCPcopy Create free account
hub / github.com/ImageEngine/cortex / attributeNames

Method attributeNames

src/IECoreScene/NParticleReader.cpp:209–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209void NParticleReader::attributeNames( std::vector<std::string> &names )
210{
211 names.clear();
212 if( !open() )
213 {
214 return;
215 }
216
217 int frameIndex = m_frameParameter->getNumericValue();
218 int frame = m_frames->readable()[frameIndex];
219 std::map<int, IFFFile::Chunk::ChunkIterator>::const_iterator frameIt = frameToRootChildren.find( frame );
220 if( frameIt == frameToRootChildren.end() )
221 {
222 msg( Msg::Warning, "NParticleReader::attributeNames()", boost::format( "Frame '%d' (index '%d') does not exist in '%s'." ) % frame % frameIndex % m_iffFileName );
223 return;
224 }
225
226 IFFFile::Chunk::ChunkIterator child = frameIt->second;
227 IFFFile::Chunk::ChunkIterator it = child->childrenBegin();
228
229 for ( ; it != child->childrenEnd(); it++ )
230 {
231 if ( it->type().id() == kCHNM )
232 {
233 std::string channelName;
234 it->read( channelName );
235 names.push_back( channelName );
236 }
237 }
238}
239
240const IntVectorData * NParticleReader::frameTimes()
241{

Callers

nothing calls this directly

Calls 10

getNumericValueMethod · 0.80
readableMethod · 0.80
childrenBeginMethod · 0.80
childrenEndMethod · 0.80
idMethod · 0.80
clearMethod · 0.45
findMethod · 0.45
endMethod · 0.45
typeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected