Skip to content

Commit

Permalink
sample vdb update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhxx1987 committed Oct 28, 2021
1 parent f8684c7 commit bcab863
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions projects/zenvdb/SampleVDBToPrimitive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ struct SampleVDBToPrimitive : INode {
auto prim = get_input<PrimitiveObject>("prim");
auto grid = get_input<VDBGrid>("vdbGrid");
auto attr = get_input<StringObject>("primAttr")->get();
auto &pos = prim->attr<vec3f>("pos");
auto sampleby = get_input<StringObject>("sampleBy")->get();
auto &pos = prim->attr<vec3f>(sampleby);

if (dynamic_cast<VDBFloatGrid *>(grid.get()))
prim->add_attr<float>(attr);
Expand All @@ -77,7 +78,7 @@ struct SampleVDBToPrimitive : INode {
};

ZENDEFNODE(SampleVDBToPrimitive, {
{"prim", "vdbGrid", {"string", "primAttr", "sdf"}},
{"prim", "vdbGrid", {"string", "sampleBy","pos"}, {"string", "primAttr", "sdf"}},
{"prim"},
{},
{"openvdb"},
Expand Down

0 comments on commit bcab863

Please sign in to comment.