summaryrefslogtreecommitdiff
path: root/rotord/src/rendercontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/src/rendercontext.cpp')
-rw-r--r--rotord/src/rendercontext.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/rotord/src/rendercontext.cpp b/rotord/src/rendercontext.cpp
index 77adc71..a5bb54f 100644
--- a/rotord/src/rendercontext.cpp
+++ b/rotord/src/rendercontext.cpp
@@ -312,10 +312,14 @@ void Render_context::session_command(const Session_command& command,xmlIO& XML,H
int frame=root["frame"].asInt();
int width=root["width"].asInt();
int height=root["height"].asInt();
- string resolution=root["resolution"].asString();
- cerr<<"preview: "<<frame<<" "<<width<<" "<<height<<" "<<resolution<<endl;
- //if (graph.preview(XML,frame,resolution))
- status=HTTPResponse::HTTP_OK;
+ if (graph.preview(XML,preview_node,width,height)) {
+ status=HTTPResponse::HTTP_OK;
+ }
+ else {
+ status=HTTPResponse::HTTP_BAD_REQUEST;
+ logger.error("ERROR: Could not create preview");
+ XML.addValue("error","Could not preview node '"+preview_node+"', frame "+ofToString(frame)+" at "+ofToString(width)+"x"+ofToString(height));
+ }
}
else {
std::cout << "Failed to parse preview request\n"