21 bool use_color3f_type)
23 switch (blender_type) {
25 return pxr::SdfValueTypeNames->FloatArray;
27 return pxr::SdfValueTypeNames->UCharArray;
29 return pxr::SdfValueTypeNames->IntArray;
31 return pxr::SdfValueTypeNames->Float2Array;
33 return pxr::SdfValueTypeNames->Float3Array;
35 return pxr::SdfValueTypeNames->StringArray;
37 return pxr::SdfValueTypeNames->BoolArray;
40 return use_color3f_type ? pxr::SdfValueTypeNames->Color3fArray :
41 pxr::SdfValueTypeNames->Color4fArray;
43 return pxr::SdfValueTypeNames->QuatfArray;
45 return pxr::SdfValueTypeNames->Matrix4dArray;
91 if (value ==
nullptr) {
99 const pxr::UsdTimeCode time,
108 primvar, time, data_type, domain, face_indices, attributes);
112 primvar, time, data_type, domain, face_indices, attributes);
116 primvar, time, data_type, domain, face_indices, attributes);
120 primvar, time, data_type, domain, face_indices, attributes);
124 primvar, time, data_type, domain, face_indices, attributes);
127 const pxr::SdfValueTypeName pv_type = primvar.GetTypeName();
129 pxr::SdfValueTypeNames->Color3fArray,
130 pxr::SdfValueTypeNames->Color3hArray,
131 pxr::SdfValueTypeNames->Color3dArray))
134 primvar, time, data_type, domain, face_indices, attributes);
138 primvar, time, data_type, domain, face_indices, attributes);
143 primvar, time, data_type, domain, face_indices, attributes);
147 primvar, time, data_type, domain, face_indices, attributes);
151 primvar, time, data_type, domain, face_indices, attributes);
161 const pxr::UsdTimeCode time,
162 const pxr::UsdGeomPrimvar &primvar,
163 pxr::UsdUtilsSparseValueWriter &value_writer)
168 attribute.typed<
float>(), time, primvar, value_writer);
176 attribute.typed<
int>(), time, primvar, value_writer);
188 attribute.typed<
bool>(), time, primvar, value_writer);
191 if (primvar.GetTypeName() == pxr::SdfValueTypeNames->Color3fArray) {
202 if (primvar.GetTypeName() == pxr::SdfValueTypeNames->Color3fArray) {
void copy_primvar_to_blender_buffer(const pxr::UsdGeomPrimvar &primvar, const pxr::UsdTimeCode time, const bke::AttrType data_type, const bke::AttrDomain domain, const OffsetIndices< int > faces, bke::MutableAttributeAccessor attributes)
void copy_primvar_to_blender_attribute(const pxr::UsdGeomPrimvar &primvar, const pxr::UsdTimeCode time, const bke::AttrType data_type, const bke::AttrDomain domain, const OffsetIndices< int > face_indices, bke::MutableAttributeAccessor attributes)