Optimize empty groups from .ac models
The OSG optimizer seems to have changed since this work was originally done.
This commit is contained in:
parent
1a8fd62680
commit
be0635bfd3
@ -494,13 +494,14 @@ struct ACOptimizePolicy : public OptimizeModelPolicy {
|
||||
{
|
||||
ref_ptr<Node> optimized
|
||||
= OptimizeModelPolicy::optimize(node, fileName, opt);
|
||||
Group* group = dynamic_cast<Group*>(optimized.get());
|
||||
MatrixTransform* transform
|
||||
= dynamic_cast<MatrixTransform*>(optimized.get());
|
||||
if (transform && transform->getMatrix().isIdentity()
|
||||
&& transform->getName().empty()
|
||||
&& transform->getNumChildren() == 1) {
|
||||
optimized = static_cast<Node*>(transform->getChild(0));
|
||||
Group* group = dynamic_cast<Group*>(optimized.get());
|
||||
if (((transform && transform->getMatrix().isIdentity()) || group)
|
||||
&& group->getName().empty()
|
||||
&& group->getNumChildren() == 1) {
|
||||
optimized = static_cast<Node*>(group->getChild(0));
|
||||
group = dynamic_cast<Group*>(optimized.get());
|
||||
if (group && group->getName().empty()
|
||||
&& group->getNumChildren() == 1)
|
||||
optimized = static_cast<Node*>(group->getChild(0));
|
||||
|
Loading…
Reference in New Issue
Block a user