Viewed 2961 times

(32 Ratings)

categories:
General, Input-Output, System

description
Loader is an easy to use dynamic loading system for Quest3D. It can scan a whole directorytree including subdirectories and load all found files into a Quest3D project. The whole loadingprogress is tracked and can be retrieved for each directory or as an overall loading progress for all directories.

Use Loader to setup your whole application-loading or use it to load objectlibraries, characters, or anything else you wish to be organised in folders and subfolders on your harddisk and in your Quest3D project.

Note:
There is also an non-OO-version of Loader for Quest3D version 3.6.6 available.
Loader does not work in an online project, since it performs a directoryscan, which is not possible on a webserver with Quest3D.

IMPORTANT:
There is a Quest3D 4.1.2 Bug in the Project Tree! If you remove groups from your project, they sometimes remain in the Project Tree tab. If you try to click on such a (already removed) channelgroup, Quest3D crashes. This bug appears not in the Group Tree tab.

usage
Use the following commands to control Loader:

# getProgress
This function returns the overallprogress of the loadingqueue.
If you want to get the progress of a certain label read the array.

# addDirectory
Trigger this command to add a directory (or a whole directorytree) to the loadingqueue.
Parameter:
--Directory:
If absolutePath is set to 0 use only directoryname (for example \\\\\\\\\\\\\\\"mydirectory\\\\\\\\\\\\\\\")
--> has to be a subdirectory of the directory which contains Loader_Add.cgr
If absolutePath is set to 1 then use an absolute path (for example \\\\\\\\\\\\\\\"c:\\\\\\\\\\\\\\\\mypath\\\\\\\\\\\\\\\\mydirectory\\\\\\\\\\\\\\\")
--Label:
Each loading-job has to get an unique label. If the given label already exists in the loadingqueue,
the loading-job is ignored. Use the label to identify your directories.
--includeSubdirectories:
If set to 1, all subdirectories of the given directory are included.
--absolutePath:
see Directory

# reloadDirectory
All files loaded with ?Add? can be reloaded again. This is usefull, if you want to reset your application while debugging your project. Use the label (defined with \\\\\\\\\\\\\\\"addDirectory\\\\\\\\\\\\\\\") to reload a certain directory.

# removeDirectory
This command removes a given directory from your project. Use the label (defined with \\\\\\\\\\\\\\\"addDirectory\\\\\\\\\\\\\\\") to remove a certain directory.

# reloadAll
This command reloads all files from all directories.

# removeAll
This command removes all files from all directories.

changelog
changelog #1 on Jul 17th 2008 14:55
changed LuaScript in function: getOverallProgress to avoid array-access-debugmessages in debugwindow while not loading anything (slows down Quest3D when debugwindow is active)
changelog #2 on Feb 25th 2009 18:00
bugfixes:
- CGR extensions are now accepted (besides common cgr extension)
- reference to arraytable fixed

NEW FEATURE: WEB UPLOAD / DOWNLOAD
The webloading functionality is an easy way to upload your projectfiles to a webserver and load them again from there. Loader handles the complete upload - just call a single function. I developed this functionality to enable an easy to use patch-process.

To use webloading for patching just set up your application this way:

Insert a channelswitch to load your files from harddisk (normal Loader functionality) when in editor and load from web in published projects. Now work on your project like you are used to. Every time, you want your published application to be updated, save your current project and call \"doUpload\" from within the editor. Your current files get transfered from
your workingdirectory on harddisk to the webserver. The next time, the published application starts, it will download the new files from the server.

Webloading will only slow down loadingspeed on new or updated files - all other files are cached automatically by Quest3D!


current limitations:
Webloading is implemented to support a kind of \"complete application\" up- and download. At the moment it´s not possible to upload single directories and then download just these directories. There is only one filelist on the webserver which stores all uploaded files in all uploaded directories.
changelog #3 on Feb 25th 2009 18:22
just changed the uploaded file...

requirements
Quest3D Version v4-2 needed Quest3D Version 4.2  -  Creative Edition

custom channels needed
cgr's documented

You have to login to download this file!


comments:

no comments yet


Comment on this template