Make particle emitter editor window source code button disable itself is no source code is available
This commit is contained in:
@@ -440,4 +440,21 @@ bool ParticleEmitter::Save(const StringView& path)
|
||||
return SaveSurface(data);
|
||||
}
|
||||
|
||||
bool ParticleEmitter::HasShaderCode()
|
||||
{
|
||||
if(SimulationMode != ParticlesSimulationMode::GPU)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#if COMPILE_WITH_PARTICLE_GPU_GRAPH && COMPILE_WITH_SHADER_COMPILER
|
||||
if(_shaderHeader.ParticleEmitter.GraphVersion == PARTICLE_GPU_GRAPH_VERSION
|
||||
&& HasChunk(SHADER_FILE_CHUNK_SOURCE)
|
||||
&& !HasDependenciesModified())
|
||||
return true;
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user