UsdUtils::GetPrimSpecPathForLayer

Returns a path exactly like Prim.GetPrimPath(), except that if the prim is within variant sets, it will return the full path with variant selections in it (i.e. the spec path), like "/Root/Child{Varset=Var}Inner" instead of just "/Root/Child/Inner".