DAZ Script | |
---|---|
GraphicsMode | { NoInterface, NoInterfaceWithOpenGL, FullInterface } |
OperatingSystem | { Unknown, WindowsUnknown, Windows95, Windows98, WindowsMe, Windows2000, WindowsXP, Windows2003, WindowsVista, Windows7, Windows8, Windows8_1, Windows10, MacUnknown, Mac10_0, Mac10_1, Mac10_2, Mac10_3, Mac10_4, Mac10_5, Mac10_6, Mac10_7, Mac10_8, Mac10_9, Mac10_10, Mac10_11, Mac10_12 } |
Platform | { Windows, MacOSX } |
ReleaseCycle | { GeneralRelease, PublicBuild, PublishingBuild, PrivateBuild, DevBuild } |
ReleaseEdition | { Free, Standard, Advanced, Pro, Alpha, Beta } |
void | closing () |
void | debugMsg ( String msg ) |
void | eventLoopStarted () |
void | mouseEvent () |
void | multiThreadingChanged ( Boolean onOff ) |
void | sceneBuilderAccepted ( Array selections ) |
void | sceneBuilderRejected () |
void | starting () |
void | styleAboutToChange () |
void | styleChanged ( DzStyle newStyle ) |
void | warningMsg ( String msg ) |
Derived from QApplication, this class embodies the main event loop, and owns application-wide settings and objects not directly related to the user interface.
Can be directly accessed using the global variable App.
The current graphical systems available in the application.
—–
The operating system.
—–
The platforms the application can run on.
—–
TODO: Add description.
—–
The available editions of the application.
Holds the name of the application; i.e., “DAZ Studio”. (Read Only)
Holds the name of the cloud service; i.e., “Daz Connect”. (Read Only)
Since:
Holds the exit code returned by the application. (Read Only)
Since:
Holds the size, in bytes, of the log file.
Since:
Holds a string representation of the full product version number; i.e., major.minor.revision.build. (Read Only)
Holds the name of the organization; i.e., “DAZ 3D”. (Read Only)
Holds the arguments passed to the application on launch. (Read Only)
Since:
Holds the full product version number as an encoded 32-bit integer. (Read Only) Deprecated
Use version64 instead.
Holds the full product version number as an encoded 64-bit integer. (Read Only)
Holds a string representation of the product version number; i.e., major.minor. (Read Only)
void : addSessionFileLoad( String name )
TODO: Add description.
Return Value:
String : bitArchitectureString()
Return Value:
String : byteSizeToString( Number bytes )
Parameter(s):
Return Value:
Example:
// The message will be written to the log file print( App.byteSizeToString( 1073741824 ) ); //1.0 GB
Boolean : canShowSceneBuilder( Object definition=undefined )
Parameter(s):
Return Value:
true
if the Scene Builder dialog would be displayed, otherwise false
.Since:
void : clearDelayedDeleteStack( Boolean doProgress )
Forces a deletion of all objects currently waiting to be deleted to free up more memory. If you are using this to clear memory you will generally want to clear the Undo Stack first.
See Also:
Parameter(s):
true
, a progress dialog will be shown to the user while the operation is taking place.String : createDigest( Array tokens )
Return Value:
String : createDigest( ByteArray data )
Return Value:
String : createUuid()
Return Value:
Write a debug message to the application log file.
Parameter(s):
See Also:
void : delayedExit( Number exitCode=0 )
Posts an event that causes the application to exit.
Parameter(s):
Since:
void : enableMultiThreading( Boolean onOff )
Parameter(s):
true
, multi-threaded features are enabled, otherwise multi-threaded features are disabled.Writes any currently buffered log messages to the log file. This is automatically called whenever the log buffer has more than 512 characters of data, but can be called at any time to force all messages to be written out.
String : getAbsoluteScriptPath( String scriptName )
Searches in default locations for a script file of the given name.
Parameter(s):
Return Value:
See Also:
String : getAppDataPath()
Return Value:
Attention:
See Also:
String : getApplicationBaseName()
Return Value:
Since:
DzAppSettingsMgr : getAppSettingsMgr()
Deprecated
Use the DzAppSettings class now instead.
Return Value:
DzAssetIOMgr : getAssetIOMgr()
Return Value:
Return Value:
DzAuthenticationMgr : getAuthenticationMgr()
Return Value:
DzCallBackMgr : getCallBackMgr()
Return Value:
String : getCommonUserDocumentPath()
Return Value:
Attention:
DzContentMgr : getContentMgr()
Return Value:
Return Value:
Return Value:
Return Value:
String : getDataFolderPathBase()
Return Value:
String : getDAZDataPath()
Return Value:
Attention:
See Also:
Return Value:
Return Value:
String : getDocumentationPath()
Return Value:
See Also:
Return Value:
Attention:
Return Value:
DzFileIOPresetMgr : getFileIOPresetMgr()
Return Value:
String : getGeneratedScriptsPath()
Return Value:
See Also:
String : getGeneratedShadersPath()
Return Value:
See Also:
GraphicsMode : getGraphicsMode()
Return Value:
DzHelpMgr : getHelpMgr()
Return Value:
String : getHomePath()
Return Value:
Return Value:
Return Value:
Return Value:
See Also:
Last directory that files were loaded or saved to/from.
See Also:
DzMultiMediaMgr : getMultiMediaMgr()
Return Value:
Return Value:
String : getPluginsPath()
Return Value:
See Also:
Return Value:
Attention:
See Also:
Return Value:
Return Value:
See Also:
DzSaveFilterMgr : getSaveFilterMgr()
Return Value:
String : getScriptsPath()
Return Value:
See Also:
String : getShadersPath()
Return Value:
See Also:
Get the application wide style.
Return Value:
Return Value:
Array : getStyleDefinitionList()
Return Value:
Get a filename for temporary storage.
Return Value:
String : getTempPath()
Return Value:
See Also:
String : getTempRenderFilename()
Get a filename for temporary storage of rendered images.
Return Value:
Return Value:
See Also:
Return Value:
true
if the application is in the process of shutting down, otherwise false
.Boolean : isKeyDown( Number key )
Parameter(s):
Return Value:
true
if key
is currently pressed, otherwise false
.Boolean : isKeySequenceDown( String sequence )
Parameter(s):
PortableText
format.Return Value:
true
if sequence
is currently pressed, otherwise false
.Boolean : isMultiThreadingEnabled()
Return Value:
true
if the user has chosen to enable multi-threaded features, otherwise false
.Boolean : isRegistered()
Return Value:
true
if a valid serial number has been provided, otherwise false
.Return Value:
true
if the main event loop is running and events that are posted can be expected to be delivered, otherwise false
.Return Value:
true
if the application is running as a slave to another application, otherwise false
.Boolean : isStarting()
Return Value:
true
if the application is in the process of starting up, otherwise false
.Write a message to the application log file.
Parameter(s):
Example:
//The message will be written to the log file App.log( "Hello World!" );
See Also:
SHIFT = 0x02000000 CTRL = 0x04000000 ALT = 0x08000000 META = 0x10000000 META + SHIFT = 0x12000000 META + CTRL = 0x14000000 META + ALT = 0x18000000 SHIFT + CTRL = 0x06000000 SHIFT + ALT = 0x0A000000 CTRL + ALT = 0x0C000000
Return Value:
Example:
var shftKey = App.modifierKeyState() & 0x02000000; var ctrlKey = App.modifierKeyState() & 0x04000000; var altKey = App.modifierKeyState() & 0x08000000; var metaKey = App.modifierKeyState() & 0x10000000; if( shftKey ){ print( "Shift pressed." ); } if( ctrlKey ){ print("Control pressed."); } if( altKey ){ print("Alt pressed."); } if( metaKey ){ print("Meta pressed."); }
OperatingSystem : operatingSystem()
Return Value:
String : operatingSystemString()
Return Value:
The application is intended to be as platform independent as possible, but there are cases where something needs to be done differently on one platform or another. This function provides a simple way to check which platform the application is running under.
Return Value:
Example:
var nPlatform = App.platform(); if( nPlatform == App.Windows ){ //doWinSomething(); } else if( nPlatform == App.MacOSX ){ //doMacSomething(); }
void : postScriptEvent( Boolean evaluate, String script, Array args=[] )
Posts an event that causes execution of a script as it is encountered in the event stack.
Parameter(s):
script
is actual code, set this to true
, otherwise set this to false
.evaluate
must also be set to true
.Since:
ReleaseCycle : releaseCycle()
Return Value:
Return Value:
ReleaseEdition : releaseEdition()
Return Value:
String : releaseEditionString()
Return Value:
void : restoreDefaultTempPath()
Restores the temporary files directory to the default location.
See Also:
void : setLoadSavePath( String dir )
Set the default directory for loading or saving files.
Parameter(s):
Example:
//Set the load/save path to our favorite folder App.setLoadSavePath( "c:/MyScenes" );
See Also:
Boolean : setStyleDefinition( String name )
Sets the current style for the application.
Parameter(s):
Return Value:
true
if the application switched to the given style, otherwise false
.Boolean : setTempPath( String tempPath )
Sets the directory path where temporary files are stored. The path provided needs to be an absolute path. A directory will be created at the new location if it does not already exist.
Parameter(s):
Return Value:
true
if the path provided is valid and changing the temporary path succeeded. false
if any errors occurred.See Also:
Boolean : showInNativeBrowser( String absFilePath )
A convenience method for opening a showing a file/directory in the OS file browser.
Parameter(s):
Return Value:
true
if the file exists and the OS file browser could be launched, otherwise false
.Boolean : showPrompts()
Return Value:
true
if the application should prompt the user for input, otherwise false
.Array : showSceneBuilder( Object definition=undefined, Boolean asEvent=false )
Displays the Scene Builder dialog.
Parameter(s):
false
(default), the Scene Builder configuration data is processed immediately. If false
, the the Scene Builder configuration data is posted to an event and processed as it is encountered in the event stack. (since 4.6.4.62)Return Value:
asEvent
is false
, a list of the selections made by the user in the Scene Builder dialog, otherwise an empty list. (since 4.6.4.62)See Also:
Since:
A convenience method for browsing to a given URL.
Parameter(s):
Example:
void : statusLine( String msg, Boolean writeToLog=true )
Display a message in the current status interface.
Parameter(s):
true
, the message will also be written the the log file.Example:
//The message will be displayed in status bar and written to the log file App.statusLine( "Hello World!" );
See Also:
Return Value:
Write a warning message to the application log file.
Parameter(s):
See Also:
Boolean : writeConfigScript( String configScriptFilename=“” )
Saves out a user configuration script to the given filename. If no filename is given, the script is saved to the same file read from in startup(). The run() function calls this at the end of each execution.
Parameter(s):
Return Value:
void : closing()
Signature:“closing()”
Emitted immediately after the main event loop exits.
Signature:“debugMsg(const QString&)”
Emitted when a debug message is sent to the application.
void : eventLoopStarted()
Signature:“eventLoopStarted()”
Emitted when the event loop is started on the application.
void : mouseEvent()
Signature:“mouseEvent()”
Emitted when a MouseButtonDblClick or MouseButtonRelease event occurs on the application.
void : multiThreadingChanged( Boolean onOff )
Signature:“multiThreadingChanged(bool)”
Emitted when multi-threading has changed on the application.
void : sceneBuilderAccepted( Array selections )
Signature:“sceneBuilderAccepted(const QStringList&)”
Emitted when the Scene Builder dialog has been rejected by the user, or when none of the files specified in the Scene Builder definition can be found.
Since:
void : sceneBuilderRejected()
Signature:“sceneBuilderRejected()”
Emitted when the Scene Builder dialog has been rejected by the user, or when none of the files specified in the Scene Builder definition can be found.
Since:
void : starting()
Signature:“starting()”
Emitted after the application has finished its startup just before the main event loop begins.
void : styleAboutToChange()
Signature:“styleAboutToChange()”
Emitted when a the style is about to change on the application.
void : styleChanged( DzStyle newStyle )
Signature:“styleChanged(DzStyle*)”
Emitted when the application wide style has changed.
void : warningMsg( String msg )
Signature:“warningMsg(const QString&)”
Emitted when a warning message is sent to the application.