Blender V5.3
usd_blend_shape_utils.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 NVIDIA Corporation. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4#pragma once
5
6#include <pxr/usd/usd/prim.h>
7
8namespace blender {
9
10struct Key;
11struct Mesh;
12struct Object;
13
14namespace io::usd {
15
16/* Name of the temporary USD primvar for storing blend shape
17 * weight time samples on the mesh before they are copied
18 * to the bound skeleton. */
19extern pxr::TfToken TempBlendShapeWeightsPrimvarName;
20
28const Key *get_mesh_shape_key(const Object *obj);
29
37bool is_mesh_with_shape_keys(const Object *obj);
38
49void create_blend_shapes(pxr::UsdStageRefPtr stage,
50 const Object *obj,
51 const pxr::UsdPrim &mesh_prim,
52 bool allow_unicode);
53
60pxr::VtFloatArray get_blendshape_weights(const Key *key);
61
77void ensure_blend_shape_skeleton(pxr::UsdStageRefPtr stage, pxr::UsdPrim &mesh_prim);
78
91void remap_blend_shape_anim(pxr::UsdStageRefPtr stage,
92 const pxr::SdfPath &skel_path,
93 const pxr::SdfPathSet &mesh_paths);
94
103Mesh *get_shape_key_basis_mesh(Object *obj);
104
105} // namespace io::usd
106} // namespace blender
void remap_blend_shape_anim(pxr::UsdStageRefPtr stage, const pxr::SdfPath &skel_path, const pxr::SdfPathSet &mesh_paths)
void create_blend_shapes(pxr::UsdStageRefPtr stage, const Object *obj, const pxr::UsdPrim &mesh_prim, bool allow_unicode)
const Key * get_mesh_shape_key(const Object *obj)
void ensure_blend_shape_skeleton(pxr::UsdStageRefPtr stage, pxr::UsdPrim &mesh_prim)
pxr::TfToken TempBlendShapeWeightsPrimvarName
pxr::VtFloatArray get_blendshape_weights(const Key *key)
Mesh * get_shape_key_basis_mesh(Object *obj)
bool is_mesh_with_shape_keys(const Object *obj)
BMesh Iterators.