From Katharina Plugge, "I found a bug in the OpenFlight-Plugin. When exporting to OpenFlight it could happen that palettes of an external reference like the texture palette are set wrong, because they are overwritten by parent settings (userData), which actually do not refer to palette entries respectively ParentPools (happens for example if a Transform is parent of a ProxyNode). The static cast from userData to ParentPools should therefore be a dynamic cast.
--------------------------- function FltExportVisitor::writeExternalReference( const osg::ProxyNode& proxy ): Line 423 in file expPrimaryRecords.cpp has to be changed from const ParentPools* pp = static_cast<const ParentPools*>(proxy.getUserData() ); to const ParentPools* pp = dynamic_cast<const ParentPools*>(proxy.getUserData() ); "
This commit is contained in:
@@ -420,7 +420,8 @@ FltExportVisitor::writeExternalReference( const osg::ProxyNode& proxy )
|
||||
SHADER_PALETTE_OVERRIDE ;
|
||||
|
||||
// Selectively turn off overrides for resources we don't need
|
||||
const ParentPools* pp = static_cast<const ParentPools*>(proxy.getUserData() );
|
||||
const ParentPools* pp = dynamic_cast<const ParentPools*>(proxy.getUserData() );
|
||||
|
||||
if (pp && pp->getColorPool() )
|
||||
flags &= ~COLOR_PALETTE_OVERRIDE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user