Exemplo n.º 1
0
std::string 
Sdf_MarkerUtils<Spec>::GetMarker(
    const Spec& owner, const SdfPath& connectionPath)
{
    if (connectionPath.IsEmpty()) {
        return std::string();
    }

    const SdfLayerHandle layer = owner.GetLayer();
    const SdfPath specPath = owner.GetPath().AppendTarget(connectionPath);
    return layer->GetFieldAs<std::string>(specPath, SdfFieldKeys->Marker);
}
Exemplo n.º 2
0
SdfPathVector 
Sdf_MarkerUtils<Spec>::GetMarkerPaths(const Spec& owner)
{
    SdfPathVector paths;

    const SdfLayerHandle layer = owner.GetLayer();
    const SdfPathVector children = owner.template GetFieldAs<SdfPathVector>(
        _MarkerPolicy::GetChildFieldKey());

    TF_FOR_ALL(path, children) {
        const SdfPath targetSpecPath = owner.GetPath().AppendTarget(*path);
        if (layer->HasField(targetSpecPath, SdfFieldKeys->Marker)) {
            paths.push_back(*path);
        }
    }

    return paths;
}