Files
test/source/blender/io/usd/intern/usd_skel_root_utils.hh
Jesse Yurkovich 6d3b68c9df Cleanup: unused includes in source/blender/io/usd
Reduce dependence on Blender headers as much as possible and move closer
to an include-what-you-use setup.

- Removes unnecessary includes
- Replaces some includes with more appropriate, narrower, substitutes
- Removes unnecessary forward declarations

Pull Request: https://projects.blender.org/blender/blender/pulls/118308
2024-02-28 22:08:04 +01:00

35 lines
1.3 KiB
C++

/* SPDX-FileCopyrightText: 2023 NVIDIA Corporation. All rights reserved.
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
#include "usd.hh"
#include <pxr/usd/usd/common.h>
namespace blender::io::usd {
/**
* We must structure the scene graph to encapsulate skinned prim under a UsdSkelRoot
* prim. Per the USD documentation, a SkelRoot is a:
*
* "Boundable prim type used to identify a scope beneath which skeletally-posed primitives are
* defined. A SkelRoot must be defined at or above a skinned primitive for any skinning behaviors
* in UsdSkel."
*
* See: https://openusd.org/23.05/api/class_usd_skel_root.html#details
*
* This function attempts to ensure that skinned prims and skeletons are encapsulated
* under SkelRoots, converting existing Xform primitives to SkelRoots to achieve this,
* if possible. In the case where no common ancestor which can be converted to a SkelRoot
* is found, this function issues a warning. One way to address such a case is by setting a
* root prim in the export options, so that this root prim can be converted to a SkelRoot
* for the entire scene.
*
* \param stage: The stage
* \param params: The export parameters
*/
void create_skel_roots(pxr::UsdStageRefPtr stage, const USDExportParams &params);
} // namespace blender::io::usd