Fix: Handle null Action during armature export
Regressed during fix for [1]. A null action is possible so we need to
provide a default name when this happens.
[1] 69c63311fa
Pull Request: https://projects.blender.org/blender/blender/pulls/132381
This commit is contained in:
committed by
Jesse Yurkovich
parent
95233ecf65
commit
da7e7a0e80
@@ -187,7 +187,8 @@ void USDArmatureWriter::do_write(HierarchyContext &context)
|
||||
if (usd_export_context_.export_params.export_animation) {
|
||||
/* Use the action name as the animation name. */
|
||||
const animrig::Action *action = animrig::get_action(context.object->id);
|
||||
const pxr::TfToken anim_name(make_safe_name(action->id.name + 2, allow_unicode));
|
||||
const pxr::TfToken anim_name(action ? make_safe_name(action->id.name + 2, allow_unicode) :
|
||||
"Action");
|
||||
|
||||
/* Create the skeleton animation primitive as a child of the skeleton. */
|
||||
pxr::SdfPath anim_path = usd_export_context_.usd_path.AppendChild(anim_name);
|
||||
|
||||
Reference in New Issue
Block a user