Files
goo-engine/source/blender/io/usd/intern/usd_reader_skeleton.cc
T
Jesse Yurkovich 7bb78be256 Cleanup: Use CLOG instead of iostream for USD logging
Straightforward change from usage of iostream to CLOG.

Using CLOG unifies info/warning/error logging under a common
infrastructure that provides facilities for standardized filtering,
categorization, and printing. It also removes direct dependencies on
`<iostream>` which can be detrimental to compile times.

Pull Request: https://projects.blender.org/blender/blender/pulls/117429
2024-01-24 21:27:59 +01:00

46 lines
1.0 KiB
C++

/* SPDX-FileCopyrightText: 2021 NVIDIA Corporation. All rights reserved.
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#include "usd_reader_skeleton.h"
#include "usd_skel_convert.h"
#include "BKE_armature.hh"
#include "BKE_idprop.h"
#include "BKE_object.hh"
#include "DNA_armature_types.h"
#include "DNA_object_types.h"
#include "MEM_guardedalloc.h"
#include "WM_api.hh"
namespace blender::io::usd {
bool USDSkeletonReader::valid() const
{
return skel_ && USDXformReader::valid();
}
void USDSkeletonReader::create_object(Main *bmain, const double /*motionSampleTime*/)
{
object_ = BKE_object_add_only_object(bmain, OB_ARMATURE, name_.c_str());
bArmature *arm = BKE_armature_add(bmain, name_.c_str());
object_->data = arm;
}
void USDSkeletonReader::read_object_data(Main *bmain, const double motionSampleTime)
{
if (!object_ || !object_->data || !skel_) {
return;
}
import_skeleton(bmain, object_, skel_, reports());
USDXformReader::read_object_data(bmain, motionSampleTime);
}
} // namespace blender::io::usd