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

Method positionPrimVarName

src/IECoreScene/NParticleReader.cpp:412–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

410}
411
412std::string NParticleReader::positionPrimVarName()
413{
414 std::vector<std::string> names;
415 attributeNames( names );
416
417 // The position channel for an nParticle cache should be something like "nParticleShape1_position"
418 for( vector<string>::const_iterator it = names.begin(); it != names.end(); it++ )
419 {
420 if( boost::algorithm::ends_with( *it, "_position") )
421 {
422 return *it ;
423 }
424 }
425
426 msg( Msg::Warning, "NParticleReader::posPrimVarName()", "Cannot find name for particle position channel, using P" );
427 return "P";
428}
429
430
431

Callers

nothing calls this directly

Calls 3

attributeNamesFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected