Re: [osg-users] Collada Reader - name import

2010-05-03 Thread Jason Daly

Matthias Gabriel wrote:

Hi Roland,

I didn't know about the animation issue. What i'm trying to do is to 
find nodes by their name so that i can manipulate it later.
I don't think, that putting the name to description list will do the 
job, because other loaders set their names via osg::Node::setName(..) 
(i.e. the osg loader)


Wouldn't it be better to have something like osg::Node::setID() or, if 
we don't want to change too much in the core library, move the IDs to 
description list? Other osgPlugin readers treat the node names as human 
readable ones.
  


If someone names a node in the modeling process, there's a good chance 
they're going to need it at runtime.  I'd argue alongside Matthias that 
the Name is the more important label to preserve.  The ID is largely 
useless once everything is loaded.


A possible solution would be to subclass osg::Group inside the loader 
and add the additional fields to it (one for ID and one for SID).  The 
TXP loader seems to do something like this, so there's precedent.  Just 
an idea...


--"J"

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collada Reader - name import

2010-05-01 Thread Matthias Gabriel

Hi Roland,

I didn't know about the animation issue. What i'm trying to do is to 
find nodes by their name so that i can manipulate it later.
I don't think, that putting the name to description list will do the 
job, because other loaders set their names via osg::Node::setName(..) 
(i.e. the osg loader)


Wouldn't it be better to have something like osg::Node::setID() or, if 
we don't want to change too much in the core library, move the IDs to 
description list? Other osgPlugin readers treat the node names as human 
readable ones.


regards,
MG

On 01.05.2010 10:25, Roland Smeenk wrote:

Hi Matthias,

names in Collada file are only their for providing a human friendly textual
description. ID's are used for referencing of elements. These references are 
needed by the OSG loader in case of animation parsing and probably some other 
places too. When writing the Collada file it is essential that the ID's stay 
the same. Writing with the same name would be nice too, but is not essential 
for maintaining the correct internal structure. Probably the best solution 
would be to store the Collada element names in the osg node descriptions.

regards,

Roland Smeenk

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27489#27489








___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collada Reader - name import

2010-05-01 Thread Roland Smeenk
Hi Matthias,

names in Collada file are only their for providing a human friendly textual 
description. ID's are used for referencing of elements. These references are 
needed by the OSG loader in case of animation parsing and probably some other 
places too. When writing the Collada file it is essential that the ID's stay 
the same. Writing with the same name would be nice too, but is not essential 
for maintaining the correct internal structure. Probably the best solution 
would be to store the Collada element names in the osg node descriptions.

regards,

Roland Smeenk

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27489#27489





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Collada Reader - name import

2010-05-01 Thread Matthias Gabriel

Hi,

i want to import a 3d model from a collada file. This works fine, but 
all the names of the Nodes in my scenegraph are set to some IDs like 
"ID1057". So i looked to the .dae file and found something like this:




obviously the osg collada importer sets the name of the osg::Nodes to 
the IDs from the collada file but i would expect the osg::Node's name to 
be "Line01".


here is the code from daeReader.cpp:
Line 546: resultNode->setName( node->getId() ? node->getId() : "" );

shouldn't it be:
resultNode->setName(node->getName() ? node->getName() : "")?

or is there a special reason to use getId() instead of getName() here?

Regards,
MG

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org