Blender  V3.3
usd_reader_geom.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2021 Tangent Animation. All rights reserved. */
3 #pragma once
4 
5 #include "usd.h"
6 #include "usd_reader_xform.h"
7 
8 struct Mesh;
9 
10 namespace blender::io::usd {
11 
12 class USDGeomReader : public USDXformReader {
13 
14  public:
15  USDGeomReader(const pxr::UsdPrim &prim,
16  const USDImportParams &import_params,
17  const ImportSettings &settings)
18  : USDXformReader(prim, import_params, settings)
19  {
20  }
21 
22  virtual Mesh *read_mesh(struct Mesh *existing_mesh,
23  double motionSampleTime,
24  int read_flag,
25  const char **err_str) = 0;
26 
27  virtual bool topology_changed(const Mesh * /* existing_mesh */, double /* motionSampleTime */)
28  {
29  return true;
30  }
31 
32  void add_cache_modifier();
33  void add_subdiv_modifier();
34 };
35 
36 } // namespace blender::io::usd
virtual Mesh * read_mesh(struct Mesh *existing_mesh, double motionSampleTime, int read_flag, const char **err_str)=0
virtual bool topology_changed(const Mesh *, double)
USDGeomReader(const pxr::UsdPrim &prim, const USDImportParams &import_params, const ImportSettings &settings)
const pxr::UsdPrim & prim() const