Added the ability for osgParticle::ParticleEffect to switch off the automatic setup.
Normally the automatic setup is useful, but in the case of the .osg support this automatic update was forcing premature loading of imagery that wasn't necessarily, and can lead to reports of looking for files that arn't present.
This commit is contained in:
@@ -10,7 +10,7 @@ bool ExplosionDebrisEffect_writeLocalData(const osg::Object &obj, osgDB::Output
|
||||
|
||||
osgDB::RegisterDotOsgWrapperProxy ExplosionDebrisEffect_Proxy
|
||||
(
|
||||
new osgParticle::ExplosionDebrisEffect,
|
||||
new osgParticle::ExplosionDebrisEffect(false),
|
||||
"ExplosionDebrisEffect",
|
||||
"Object Node ParticleEffect ExplosionDebrisEffect",
|
||||
ExplosionDebrisEffect_readLocalData,
|
||||
|
||||
@@ -10,7 +10,7 @@ bool ExplosionEffect_writeLocalData(const osg::Object &obj, osgDB::Output &fw);
|
||||
|
||||
osgDB::RegisterDotOsgWrapperProxy ExplosionEffect_Proxy
|
||||
(
|
||||
new osgParticle::ExplosionEffect,
|
||||
new osgParticle::ExplosionEffect(false),
|
||||
"ExplosionEffect",
|
||||
"Object Node ParticleEffect ExplosionEffect",
|
||||
ExplosionEffect_readLocalData,
|
||||
|
||||
@@ -10,7 +10,7 @@ bool FireEffect_writeLocalData(const osg::Object &obj, osgDB::Output &fw);
|
||||
|
||||
osgDB::RegisterDotOsgWrapperProxy FireEffect_Proxy
|
||||
(
|
||||
new osgParticle::FireEffect,
|
||||
new osgParticle::FireEffect(false),
|
||||
"FireEffect",
|
||||
"Object Node ParticleEffect FireEffect",
|
||||
FireEffect_readLocalData,
|
||||
|
||||
@@ -177,7 +177,14 @@ bool ParticleEffect_readLocalData(osg::Object& object, osgDB::Input& fr)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!effect.getAutomaticSetup())
|
||||
{
|
||||
// since by default the clone of the ParticleEffect is done with automatic setup off to prevent premature loading of
|
||||
// imagery, we still want to make sure the ParticleEffect is properly built so we'll now mannually enable the automatic setup
|
||||
// run the buildEffect().
|
||||
effect.setAutomaticSetup(true);
|
||||
effect.buildEffect();
|
||||
}
|
||||
|
||||
return itrAdvanced;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ bool SmokeEffect_writeLocalData(const osg::Object &obj, osgDB::Output &fw);
|
||||
|
||||
osgDB::RegisterDotOsgWrapperProxy SmokeEffect_Proxy
|
||||
(
|
||||
new osgParticle::SmokeEffect,
|
||||
new osgParticle::SmokeEffect(false),
|
||||
"SmokeEffect",
|
||||
"Object Node ParticleEffect SmokeEffect",
|
||||
SmokeEffect_readLocalData,
|
||||
|
||||
@@ -10,7 +10,7 @@ bool SmokeTrailEffect_writeLocalData(const osg::Object &obj, osgDB::Output &fw)
|
||||
|
||||
osgDB::RegisterDotOsgWrapperProxy SmokeTrailEffect_Proxy
|
||||
(
|
||||
new osgParticle::SmokeTrailEffect,
|
||||
new osgParticle::SmokeTrailEffect(false),
|
||||
"SmokeTrailEffect",
|
||||
"Object Node ParticleEffect SmokeTrailEffect",
|
||||
SmokeTrailEffect_readLocalData,
|
||||
|
||||
Reference in New Issue
Block a user