Exemplo n.º 1
0
bool
UsdProperty::IsAuthoredAt(const UsdEditTarget &editTarget) const
{
    if (editTarget.IsValid()) {
        SdfPath mappedPath = editTarget.MapToSpecPath(GetPrimPath());
        return !mappedPath.IsEmpty() &&
            editTarget.GetLayer()->HasSpec(
                SdfAbstractDataSpecId(&mappedPath, &_PropName()));
    }
    return false;
}
Exemplo n.º 2
0
bool
UsdProperty::IsAuthored() const
{
    // Look for the strongest authored property spec.
    for (Usd_Resolver res(
             &GetPrim().GetPrimIndex()); res.IsValid(); res.NextLayer()) {
        if (res.GetLayer()->HasSpec(
                SdfAbstractDataSpecId(&res.GetLocalPath(), &_PropName())))
            return true;
    }
    return false;
}
Exemplo n.º 3
0
SdfAbstractDataRefPtr
SdfFileFormat::InitData(const FileFormatArguments& args) const
{
    SdfData* metadata = new SdfData;

    // The pseudo-root spec must always exist in a layer's SdfData, so
    // add it here.
    metadata->CreateSpec(
        SdfAbstractDataSpecId(&SdfPath::AbsoluteRootPath()), 
        SdfSpecTypePseudoRoot);

    return TfCreateRefPtr(metadata);
}