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:
itsmattkc
2019-12-04 20:10:42 +11:00
parent cbf4d5b8c7
commit bc0f01d9a3
30 changed files with 505 additions and 346 deletions
+7 -7
View File
@@ -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