Skip to content

Latest commit

 

History

History

stl_iteration

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Quick Reference

C++

Example: Modifying objects

std::for_each(std::begin(range), std::end(range), [](pxr::UsdPrim const &prim){
    pxr::UsdModelAPI(prim).SetKind(pxr::KindTokens->component);
});

Example: Printing / Reporting

auto range = pxr::UsdPrimRange::Stage(stage);

// Get every prim using accumulate
auto text = std::accumulate(
    std::begin(range),
    std::end(range),
    std::string {"Prims:"},
    [](std::string text, pxr::UsdPrim const &prim) {
        return std::move(text) + "\n" + pxr::TfStringify(prim.GetPath());
    }
);