Ensure that absent bone names work (#284)

This commit is contained in:
Lars Müller
2024-02-06 20:22:44 +01:00
committed by GitHub
parent 8482cc3db8
commit f1504093d1
14 changed files with 73 additions and 95 deletions

View File

@ -14,6 +14,7 @@
#include "aabbox3d.h"
#include "matrix4.h"
#include "IAttributes.h"
#include <list>
#include <optional>
@ -117,23 +118,14 @@ namespace scene
//! Returns the name of the node.
/** \return Name as character string. */
virtual const c8* getName() const
virtual const std::optional<std::string> &getName() const
{
return Name.c_str();
return Name;
}
//! Sets the name of the node.
/** \param name New name of the scene node. */
virtual void setName(const c8* name)
{
Name = name;
}
//! Sets the name of the node.
/** \param name New name of the scene node. */
virtual void setName(const core::stringc& name)
virtual void setName(const std::optional<std::string> &name)
{
Name = name;
}
@ -601,7 +593,7 @@ namespace scene
}
//! Name of the scene node.
core::stringc Name;
std::optional<std::string> Name;
//! Absolute transformation of the node.
core::matrix4 AbsoluteTransformation;