IECore::ConstInternedStringVectorDataPtr ObjectSource::computeSetNames( const Gaffer::Context *context, const ScenePlug *parent ) const { IECore::InternedStringVectorDataPtr result = new IECore::InternedStringVectorData; Gaffer::tokenize( setsPlug()->getValue(), ' ', result->writable() ); IECore::InternedString n = standardSetName(); if( n.string().size() ) { result->writable().push_back( n ); } return result; }
IECore::ConstInternedStringVectorDataPtr ObjectSource::computeSetNames( const Gaffer::Context *context, const ScenePlug *parent ) const { IECore::InternedStringVectorDataPtr result = new IECore::InternedStringVectorData; Gaffer::StringAlgo::tokenize( setsPlug()->getValue(), ' ', result->writable() ); IECore::ConstInternedStringVectorDataPtr setNames = computeStandardSetNames(); for(unsigned int i = 0; i < setNames->readable().size(); ++i) { result->writable().push_back( setNames->readable()[i] ); } return result; }
IECore::ConstInternedStringVectorDataPtr Light::computeStandardSetNames() const { IECore::InternedStringVectorDataPtr result = new IECore::InternedStringVectorData(); result->writable().push_back( g_lightsSetName ); if( defaultLightPlug()->getValue() ) { result->writable().push_back( g_defaultLightsSetName ); } return result; }
IECore::ConstInternedStringVectorDataPtr SubTree::computeChildNames( const ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const { bool createRoot = false; const ScenePath source = sourcePath( path, createRoot ); if( createRoot ) { IECore::InternedStringVectorDataPtr result = new IECore::InternedStringVectorData; result->writable().push_back( *(source.rbegin()) ); return result; } else { return inPlug()->childNames( source ); } }
IECore::ConstInternedStringVectorDataPtr ObjectSource::computeChildNames( const SceneNode::ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const { if( path.size() == 0 ) { IECore::InternedStringVectorDataPtr result = new IECore::InternedStringVectorData(); const std::string &name = namePlug()->getValue(); if( name.size() ) { result->writable().push_back( name ); } else { result->writable().push_back( "unnamed" ); } return result; } return parent->childNamesPlug()->defaultValue(); }