Exemplo n.º 1
0
void RenderThread::run()
{
    // Check for any possible conditions, and emit errors for each one
    if(exe.isEmpty()) {
        emit renderError("Anime Studio executable not configured"); return; }

    if(project.first.isEmpty()||project.second.isEmpty()) {
        emit renderError("Project file not set properly"); return; }
    if(outputPath.isEmpty())
        emit renderWarning("Output directory not configured; defaulting to project location");

    // Get our separator now, to avoid multiple function calls
    QString sep = QDir::separator();

    // Separate the filename from the extension
    QString filename = project.second.mid(0,project.second.lastIndexOf("."));

    // Compile the final output directory, and create it if it doesn't exist
    QString outdir = (outputPath.isEmpty()?(project.first):(outputPath+sep))+
            (isImageSequence(indexToFormat(format))?filename+sep:"");
    QDir dirpath; dirpath.mkpath(outdir);   // This is just silly.

    // Set all of the arguments based on the configuration settings we now have
    QStringList args = generateCommand(project.first+project.second, indexToFormat(format),
                                       outdir+filename+extension(indexToFormat(format)),
                                       frameStart,frameEnd,switchAA,switchShapeFX,switchLayerFX,
                                       switchHalfSize,switchHalfFPS,switchFewParticles,
                                       switchExtraSmooth,switchNTSCSafe,switchPremultiply,
                                       switchVariableWidths);

    // Finally, emit the signal to begin the render
    emit cli(exe, args);
}
Exemplo n.º 2
0
void RenderThread::setFrameRange(int start, int end)
{
    if(end>start)
        emit renderError("Start frame must be smaller than end frame");
    frameStart = start;
    frameEnd = end;
}
Exemplo n.º 3
0
void RenderThread::setExe(QString in)
{
    // On Mac OS X, we need to do a bit of extra work to find the executable in the bundle
#ifdef Q_WS_MACX
    in += "/Contents/MacOS/Anime Studio";
    if(!QFileInfo(in).isExecutable()) {
        in += " Pro";
        if(!QFileInfo(in).isExecutable())
            emit renderError("No Mac OS X executable found in the application bundle");
    }
#endif
    exe = in;
}
Exemplo n.º 4
0
PUBLIC void espRenderConfig(HttpConn *conn)
{
    EspRoute    *eroute;
    MprJson     *settings;

    eroute = conn->rx->route->eroute;
    settings = mprLookupJson(eroute->config, "settings");
    if (settings) {
        renderString(mprJsonToString(eroute->config, MPR_JSON_QUOTES));
    } else {
        renderError(HTTP_CODE_NOT_FOUND, "Cannot find config.settings to send to client");
    }
    finalize();
}