vsg-dev/vsgXchange

OSG loader does not map object name

Closed this issue · 1 comments

On Fri, 17 Sept 2021 at 11:39, Ralf Habacker @.***>
wrote:

Another difference is that the conversation do not convert the name of the
osg::Object instance.

The osgt file contains

osg::Group {
  UniqueID 2
  Name "GroupOfLayers"
  Children 20 {
    osg::Switch {
      UniqueID 3
      Name "LADMGroup"

which is converted to

vsg::Node id=2 vsg::Group
{
NumUserObjects 0
children 20
vsg::Node id=3 vsg::Switch
{

It do not include a name attribute nor a key/value pair providing that
attribute.

The OSG loader should be considered a first pass, rather than complete. As
the VSG becomes more fully featured the OSG loader will need revisiting to
add features that can now be mapped across.

In the case of the osg::Node name is should be straightforward to utilize
VSG's meta object support i.e. vsg::Object::setValue("name",
osgObj->getName());

Robert.

Originally posted by @robertosfield in vsg-dev/VulkanSceneGraph#308 (comment)

I have just checked a fix to the vsgXchange OSG converter for this issue: a8f2c7f