From Martin Beck, "
recently we noticed a little mistake for 3DS files using instances of the same meshs: Every groupnode gets the same name instead of the (correct) instance name of the object. The fix only consists of two additional lines which check whether an instance_name is given for the object and then uses this one instead of the node name."
This commit is contained in:
@@ -548,6 +548,8 @@ osg::Node* ReaderWriter3DS::ReaderObject::processNode(StateSetMap drawStateMap,L
|
||||
if (node->type == LIB3DS_NODE_MESH_INSTANCE)
|
||||
group->setName(reinterpret_cast<Lib3dsMeshInstanceNode *>(node)->instance_name);
|
||||
}
|
||||
else if (node->type == LIB3DS_NODE_MESH_INSTANCE && strlen(reinterpret_cast<Lib3dsMeshInstanceNode *>(node)->instance_name) != 0)
|
||||
group->setName(reinterpret_cast<Lib3dsMeshInstanceNode *>(node)->instance_name);
|
||||
else
|
||||
group->setName(node->name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user