forked from blender/blender
Fix review comments #51
@ -109,6 +109,10 @@ pxr::HdPrimvarDescriptorVector CurvesData::primvar_descriptors(
|
||||
if (!vertices_.empty()) {
|
||||
primvars.emplace_back(pxr::HdTokens->points, interpolation, pxr::HdPrimvarRoleTokens->point);
|
||||
}
|
||||
if (!widths_.empty()) {
|
||||
primvars.emplace_back(pxr::HdTokens->widths, interpolation,
|
||||
pxr::HdPrimvarRoleTokens->none);
|
||||
}
|
||||
}
|
||||
else if (interpolation == pxr::HdInterpolationFaceVarying) {
|
||||
if (!uvs_.empty()) {
|
||||
@ -117,11 +121,6 @@ pxr::HdPrimvarDescriptorVector CurvesData::primvar_descriptors(
|
||||
pxr::HdPrimvarRoleTokens->textureCoordinate);
|
||||
}
|
||||
}
|
||||
else if (interpolation == pxr::HdInterpolationConstant) {
|
||||
if (!widths_.empty()) {
|
||||
primvars.emplace_back(pxr::HdTokens->widths, interpolation, pxr::HdPrimvarRoleTokens->none);
|
||||
}
|
||||
}
|
||||
return primvars;
|
||||
}
|
||||
|
||||
@ -159,14 +158,12 @@ void CurvesData::write_curves(Curves *curves)
|
||||
curve_vertex_counts_.push_back(num_points);
|
||||
|
||||
/* Set radius similar to Cycles if isn't set */
|
||||
widths_.push_back(radii ? radii[i] : 0.01f);
|
||||
|
||||
for (int j = 0; j < num_points; j++) {
|
||||
int ind = first_point_index + j;
|
||||
widths_.push_back(radii ? radii[ind] * 2 : 0.01f);
|
||||
vertices_.push_back(pxr::GfVec3f(positions[ind][0], positions[ind][1], positions[ind][2]));
|
||||
}
|
||||
}
|
||||
|
||||
write_uv_maps(curves);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user