Example #1
0
ROP_RENDER_CODE
ROP_Script::renderFrame(fpreal time, UT_Interrupt *)
{
    UT_String                   command, language;

    OP_CommandManager           *cmd;
    OP_Director                 *director;

    PY_Result                   result;

    // Execute the pre-frame script.
    executePreFrameScript(time);

    // Get the language and command we want to run.
    LANGUAGE(language, time);
    COMMAND(command, time);

    // If it's 'python', execute the statements.
    if (language == "python")
    {
        // Run the statements in a new context and store the result.
        result = PYrunPythonStatementsInNewContext(command);

        // If there was an error, add an error on the node.
        if (result.myResultType == PY_Result::ERR)
            addPythonNodeError(result);
    }
    // If the language is 'hscript', or any other value, run the command
    // as hscript.
    else
    {
        // Get the scene director.
        director = OPgetDirector();
        // Get the command manager.
        cmd = director->getCommandManager();
        // Run the hscript command.
        cmd->execute(command);
    }

    // If no problems have been encountered, execute the post-frame
    // script.
    if (error() < UT_ERROR_ABORT)
	executePostFrameScript(time);

    return ROP_CONTINUE_RENDER;
}
Example #2
0
ROP_RENDER_CODE wendy_GIO_ROP::renderFrame( fpreal time, UT_Interrupt *boss )
{

    executePreFrameScript(time);
    fpreal t =CHgetManager()->getTime(this->myCurrentFrame);  //this can get the time!!!!
    now=time;


    UT_String save_geo_path;
    evalString(save_geo_path,"file",0,time);
    OP_Context		 context(time);

    UT_String _ar_dso_path;
    evalString(_ar_dso_path,"ArDso",0,time);

    save_gdp_to_disk(_ar_dso_path,context,save_geo_path);



    if (error() < UT_ERROR_ABORT)
        executePostFrameScript(time);
    return ROP_CONTINUE_RENDER;
}