Files
test/source/blender/io/usd/intern/usd_reader_geom.cc
Campbell Barton c434782e3a File headers: SPDX License migration
Use a shorter/simpler license convention, stops the header taking so
much space.

Follow the SPDX license specification: https://spdx.org/licenses

- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile

While most of the source tree has been included

- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
  use different header conventions.

doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.

See P2788 for the script that automated these edits.

Reviewed By: brecht, mont29, sergey

Ref D14069
2022-02-11 09:14:36 +11:00

44 lines
1.1 KiB
C++

/* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright 2021 Tangent Animation. All rights reserved. */
#include "usd_reader_geom.h"
#include "BKE_lib_id.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_math_geom.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "DNA_cachefile_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "DNA_space_types.h" /* for FILE_MAX */
namespace blender::io::usd {
void USDGeomReader::add_cache_modifier()
{
ModifierData *md = BKE_modifier_new(eModifierType_MeshSequenceCache);
BLI_addtail(&object_->modifiers, md);
MeshSeqCacheModifierData *mcmd = reinterpret_cast<MeshSeqCacheModifierData *>(md);
mcmd->cache_file = settings_->cache_file;
id_us_plus(&mcmd->cache_file->id);
mcmd->read_flag = import_params_.mesh_read_flag;
BLI_strncpy(mcmd->object_path, prim_.GetPath().GetString().c_str(), FILE_MAX);
}
void USDGeomReader::add_subdiv_modifier()
{
ModifierData *md = BKE_modifier_new(eModifierType_Subsurf);
BLI_addtail(&object_->modifiers, md);
}
} // namespace blender::io::usd