DAZ Script | |
---|---|
ScriptFileMode | { UseExtension, TextScriptFile, DAZScriptFile, EncDAZScriptFile } |
ScriptLanguage | { Unknown, DAZScript1, DAZScript2 } |
TODO: Add detailed description.
Save mode for saving the script to file.
—–
Script language of the file.
void : addScriptBinaryExtensionAsFilter( DzFileFilter filter )
Parameter(s):
See Also:
Since:
void : addScriptBinaryExtensionsAsMultipleFilters( DzFileFilter filter )
Parameter(s):
See Also:
void : addScriptBinaryExtensionsToFilter( DzFileFilter filter )
Parameter(s):
void : addScriptEncryptedBinaryExtensionAsFilter( DzFileFilter filter )
Parameter(s):
See Also:
Since:
void : addScriptOpenExtensionsAsMultipleFilters( DzFileFilter filter )
Parameter(s):
void : addScriptOpenExtensionsToFilter( DzFileFilter filter )
Parameter(s):
void : addScriptSaveExtensionsAsMultipleFilters( DzFileFilter filter )
Parameter(s):
void : addScriptSaveExtensionsToFilter( DzFileFilter filter )
Parameter(s):
void : addScriptTextExtensionAsFilter( DzFileFilter filter )
Parameter(s):
Since:
void : addScriptTextExtensionsAsMultipleFilters( DzFileFilter filter, Boolean includeDeprecated=false )
Parameter(s):
See Also:
void : addScriptTextExtensionsToFilter( DzFileFilter filter, Boolean includeDeprecated=false )
Parameter(s):
Object : evaluate( String code, QObject context=null )
This function is provided as a quick method of evaluating DAZ Script statements without needing to create a DAZ Script object.
Parameter(s):
Return Value:
Return Value:
String : getScriptFile( String filenameWithoutExtension )
Parameter(s):
Return Value:
Boolean : isScriptBinaryExtension( String extension )
Parameter(s):
Return Value:
true
if extension is a supported binary script extension, otherwise false
.Boolean : isScriptBinaryFile( String filename )
Parameter(s):
Return Value:
true
if filename ends with a supported binary script extension, otherwise false
.Boolean : isScriptExtension( String extension )
Parameter(s):
Return Value:
true
if extension is a supported script extension, otherwise false
.Boolean : isScriptFile( String filename )
Parameter(s):
Return Value:
true
if filename ends with a supported script extension, otherwise false
.Boolean : isScriptTextExtension( String extension )
Parameter(s):
Return Value:
true
if extension is a supported [ascii] plain text script extension, otherwise false
.Boolean : isScriptTextFile( String filename )
Parameter(s):
Return Value:
true
if filename ends with a supported [ascii] plain text script extension, otherwise false
.String : legalizeName( String str )
Return Value:
DzScript()
Default constructor.
DzScript( DzScript script )
Copy Constructor.
Parameter(s):
Appends the given code to the end of the current script.
Parameter(s):
void : addLine( String line, Number indentLevel=0 )
Appends the given string and a newline character to the script.
Parameter(s):
void : addLines( String code, Number indentLevel=0 )
Appends the given code to the end of the current script.
Parameter(s):
Boolean : call( String function, Array args )
Calls a function in the script.
Parameter(s):
Return Value:
true
if the function was called successfully, false
if there was an error.Attention:
Boolean : checkSyntax()
Checks the syntax of the script for errors using the current interpreter.
Return Value:
true
if the syntax is valid, otherwise false
.void : clear()
Clears any code in the current script, and clears the encryption state if the script was read from an encrypted file.
Boolean : convertToDAZScript2()
Converts the script to DAZ Script 2 syntax.
Return Value:
String : errorMessage()
Return Value:
Execute the script.
Attention:
Return Value:
true
if the script was executed successfully, false
if there was an error.Boolean : execute( Array args )
Execute the script with an argument list.
Attention:
Parameter(s):
Return Value:
true
if the script was executed successfully, false
if there was an error.Return Value:
Return Value:
String : getFilename()
Return Value:
Boolean : getLastStatus()
Return Value:
true
if the last execution was successful, otherwise false
.ScriptLanguage : getScriptLanguage()
Return Value:
String : getScriptType()
Return Value:
DzVersion : getScriptVersion()
Return Value:
Boolean : getShouldReuseInterpreter()
Return Value:
See Also:
Return Value:
true
if the script is empty; otherwise false
.Boolean : isEncrypted()
Return Value:
true
if the contents of the script are encrypted (i.e. read from an encrypted file); otherwise false
.Attention:
Boolean : loadFromFile( String filename, Boolean convert=true )
Loads the script from a file.
Parameter(s):
true
(default), converts the file to DAZ Script 2.Return Value:
true
if the script was successfully loaded, otherwise false
.void : makeEncrypted()
Sets the script to be encrypted.
Attention:
Return Value:
DzError : saveFile( String filename, ScriptFileMode mode, String filetype=“DAZ Script”, DzVersion version=DzApp::getVersion() )
Save the script to a file.
Parameter(s):
Return Value:
Attention:
version
specified.Since:
DzError : saveFile( String filename )
Save the script to a file.
Parameter(s):
Since:
Replaces the existing code of the script with code
.
Parameter(s):
void : setReuseInterpreter( Boolean onoff )
Sets whether the same context is used between uses of call().
Parameter(s):
true
, the same context is used between calls. If false
a new context is used for each call.Attention:
onOff
is set to true
or false
.See Also:
Array : stackTrace()
Return Value:
Boolean : wasConverted( DzScript::ScriptLanguage language=DAZScript1 )
Access to whether or not the script was converted from the enumerated value specified.
Return Value:
DzError : saveToFile( String filename, ScriptFileMode mode=UseExtension, String filetype=“DAZ Script” )
Deprecated
Exists only to keep old code working. Do not use in new code. Use saveFile() instead.