This adds a const qualifier to some code path in the Alembic and USD importers. More could be added elsewhere. This change is done as it will be required when GeometrySets are supported and helps keeping diff noise in the patch to a bare minimum.
37 lines
894 B
C++
37 lines
894 B
C++
/* SPDX-License-Identifier: GPL-2.0-or-later
|
|
* Copyright 2021 Tangent Animation. All rights reserved. */
|
|
#pragma once
|
|
|
|
#include "usd.h"
|
|
#include "usd_reader_xform.h"
|
|
|
|
struct Mesh;
|
|
|
|
namespace blender::io::usd {
|
|
|
|
class USDGeomReader : public USDXformReader {
|
|
|
|
public:
|
|
USDGeomReader(const pxr::UsdPrim &prim,
|
|
const USDImportParams &import_params,
|
|
const ImportSettings &settings)
|
|
: USDXformReader(prim, import_params, settings)
|
|
{
|
|
}
|
|
|
|
virtual Mesh *read_mesh(struct Mesh *existing_mesh,
|
|
double motionSampleTime,
|
|
int read_flag,
|
|
const char **err_str) = 0;
|
|
|
|
virtual bool topology_changed(const Mesh * /* existing_mesh */, double /* motionSampleTime */)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
void add_cache_modifier();
|
|
void add_subdiv_modifier();
|
|
};
|
|
|
|
} // namespace blender::io::usd
|