Blender V4.3
usd_reader_points.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4#pragma once
5
6#include "usd.hh"
7#include "usd_reader_geom.hh"
8
9#include <pxr/usd/usdGeom/points.h>
10
11struct Main;
12struct PointCloud;
13
14namespace blender::io::usd {
15
16/*
17 * Read UsdGeomPoints primitives as Blender point clouds.
18 */
20 private:
21 pxr::UsdGeomPoints points_prim_;
22
23 public:
24 USDPointsReader(const pxr::UsdPrim &prim,
25 const USDImportParams &import_params,
26 const ImportSettings &settings);
27
28 bool valid() const override;
29
30 /* Initial object creation. */
31 void create_object(Main *bmain, double motionSampleTime) override;
32
33 /* Initial point cloud data update. */
34 void read_object_data(Main *bmain, double motionSampleTime) override;
35
36 /* Implement point cloud update. This may be called by the cache modifier
37 * to update animated geometry. */
38 void read_geometry(bke::GeometrySet &geometry_set,
40 const char **r_err_str) override;
41
42 void read_velocities(PointCloud *point_cloud, const double motionSampleTime) const;
43 void read_custom_data(PointCloud *point_cloud, const double motionSampleTime) const;
44
45 /* Return true if the USD data may be time varying. */
46 bool is_animated() const;
47};
48
49} // namespace blender::io::usd
void read_object_data(Main *bmain, double motionSampleTime) override
void create_object(Main *bmain, double motionSampleTime) override
void read_geometry(bke::GeometrySet &geometry_set, USDMeshReadParams params, const char **r_err_str) override
void read_custom_data(PointCloud *point_cloud, const double motionSampleTime) const
USDPointsReader(const pxr::UsdPrim &prim, const USDImportParams &import_params, const ImportSettings &settings)
void read_velocities(PointCloud *point_cloud, const double motionSampleTime) const
const pxr::UsdPrim & prim() const
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]