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; }
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; }
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); }