make nodes more const friendly and prepare their functions for stateless work
Since the nodes won't be holding any rendering data themselves in this system, we may as well enforce some level of non-write access by setting all the functions to const. They were already const-friendly, they just weren't labelled as such.
This commit is contained in:
@@ -31,37 +31,37 @@ SolidGenerator::SolidGenerator() :
|
||||
AddParameter(texture_output_);
|
||||
}
|
||||
|
||||
Node *SolidGenerator::copy()
|
||||
Node *SolidGenerator::copy() const
|
||||
{
|
||||
return new SolidGenerator();
|
||||
}
|
||||
|
||||
QString SolidGenerator::Name()
|
||||
QString SolidGenerator::Name() const
|
||||
{
|
||||
return tr("Solid");
|
||||
}
|
||||
|
||||
QString SolidGenerator::id()
|
||||
QString SolidGenerator::id() const
|
||||
{
|
||||
return "org.olivevideoeditor.Olive.solidgenerator";
|
||||
}
|
||||
|
||||
QString SolidGenerator::Category()
|
||||
QString SolidGenerator::Category() const
|
||||
{
|
||||
return tr("Generator");
|
||||
}
|
||||
|
||||
QString SolidGenerator::Description()
|
||||
QString SolidGenerator::Description() const
|
||||
{
|
||||
return tr("Generate a solid color.");
|
||||
}
|
||||
|
||||
NodeOutput *SolidGenerator::texture_output()
|
||||
NodeOutput *SolidGenerator::texture_output() const
|
||||
{
|
||||
return texture_output_;
|
||||
}
|
||||
|
||||
QString SolidGenerator::Code(NodeOutput *output)
|
||||
QString SolidGenerator::Code(NodeOutput *output) const
|
||||
{
|
||||
if (output == texture_output()) {
|
||||
// FIXME: Not color managed
|
||||
|
||||
Reference in New Issue
Block a user