Function getScript

Synopsis

#include <Source/Falcor/Utils/Timing/Clock.h>

std::string getScript(const std::string &var) const

Description

Get the script string

Source

Lines 293-304 in Source/Falcor/Utils/Timing/Clock.cpp. Line 191 in Source/Falcor/Utils/Timing/Clock.h.

std::string Clock::getScript(const std::string& var) const
{
    std::string s;
    s += Scripting::makeSetProperty(var, kTime, 0);
    s += Scripting::makeSetProperty(var, kFramerate, mFramerate);
    if (mExitTime) s += Scripting::makeSetProperty(var, kExitTime, mExitTime);
    if (mExitFrame) s += Scripting::makeSetProperty(var, kExitFrame, mExitFrame);
    s += std::string("# If ") + kFramerate + " is not zero, you can use the frame property to set the start frame\n";
    s += "# " + Scripting::makeSetProperty(var, kFrame, 0);
    if (mPaused) s += Scripting::makeMemberFunc(var, kPause);
    return s;
}





Add Discussion as Guest

Log in to DocsForge