This factors out the current set of attribute-to-primvar functions inside the USD mesh reader/writer so we can use them elsewhere. These new functions will be used for PointCloud attribute reading and Curve attribute reading and writing in follow up changes. Pull Request: https://projects.blender.org/blender/blender/pulls/121145
30 lines
698 B
C++
30 lines
698 B
C++
/* SPDX-FileCopyrightText: 2024 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#include "BKE_mesh.hh"
|
|
#include "BKE_report.hh"
|
|
|
|
#include "DNA_customdata_types.h"
|
|
|
|
#include "usd.hh"
|
|
|
|
#include <pxr/base/vt/array.h>
|
|
#include <pxr/usd/sdf/valueTypeName.h>
|
|
#include <pxr/usd/usdGeom/primvar.h>
|
|
|
|
#include <optional>
|
|
|
|
struct Mesh;
|
|
struct ReportList;
|
|
|
|
namespace blender::io::usd {
|
|
|
|
void read_color_data_primvar(Mesh *mesh,
|
|
const pxr::UsdGeomPrimvar &color_primvar,
|
|
double motion_sample_time,
|
|
ReportList *reports,
|
|
bool is_left_handed);
|
|
|
|
} // namespace blender::io::usd
|