Beispiel #1
0
USDLUX_API
bool
UsdLuxLinkingAPI::DoesLinkPath(const LinkMap &linkMap, const SdfPath &path)
{
    if (!path.IsAbsolutePath()) {
        TF_CODING_ERROR("Path %s must be absolute\n",
                        path.GetText());
        return false;
    }
    // Scan for closest containing opinion
    for (SdfPath p = path; p != SdfPath::EmptyPath(); p = p.GetParentPath()) {
        const LinkMap::const_iterator i = linkMap.find(p);
        if (i != linkMap.end()) {
            return i->second;
        }
    }
    // Any path not explicitly mentioned, and that does not inherit
    // its setting from a prefix path, is included.
    return true;
}