Blender V4.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
8struct Key;
9struct Mesh;
10struct Object;
11
12namespace blender::io::usd {
13
14/* Name of the temporary USD primvar for storing blend shape
15 * weight time samples on the mesh before they are copied
16 * to the bound skeleton. */
17extern pxr::TfToken TempBlendShapeWeightsPrimvarName;
18
26const Key *get_mesh_shape_key(const Object *obj);
27
35bool is_mesh_with_shape_keys(const Object *obj);
36
47void create_blend_shapes(pxr::UsdStageRefPtr stage,
48 const Object *obj,
49 const pxr::UsdPrim &mesh_prim,
50 bool allow_unicode);
51
58pxr::VtFloatArray get_blendshape_weights(const Key *key);
59
75void ensure_blend_shape_skeleton(pxr::UsdStageRefPtr stage, pxr::UsdPrim &mesh_prim);
76
89void remap_blend_shape_anim(pxr::UsdStageRefPtr stage,
90 const pxr::SdfPath &skel_path,
91 const pxr::SdfPathSet &mesh_paths);
92
102
103} // namespace blender::io::usd
EvaluationStage stage
Definition deg_eval.cc:83
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)