made node edge changes undoable

This commit is contained in:
itsmattkc
2019-07-17 00:14:49 -04:00
parent a78cc3950a
commit 39256fd6f9
15 changed files with 318 additions and 12 deletions
+46
View File
@@ -0,0 +1,46 @@
#include "image.h"
ImageInput::ImageInput() :
texture_(nullptr)
{
texture_output_ = new NodeOutput();
texture_output_->set_data_type(NodeOutput::kTexture);
AddParameter(texture_output_);
}
QString ImageInput::Name()
{
return tr("Image");
}
QString ImageInput::Category()
{
return tr("Input");
}
QString ImageInput::Description()
{
return tr("Import an image file.");
}
NodeOutput *ImageInput::texture_output()
{
return texture_output_;
}
void ImageInput::Process(const rational &time)
{
// FIXME: Use OIIO and OCIO here
// FIXME: Test code
Q_UNUSED(time)
if (texture_ == nullptr) {
QImage img("/home/matt/Desktop/oof.png");
texture_ = new QOpenGLTexture(img);
}
texture_output_->set_value(texture_->textureId());
// End test code
}