URL | This node creates a Ventuz or File URI which is needed to specify the location of resources. |
A Uniform Resource Identifier (URI) can be used to describe file locations and is used as an input for a number of nodes (Image Loaders, Audio Clip, Video Nodes, ...). Four different Schemes and several standard Windows folders (like /Users/Public/Pictures) are available via the Scheme property. All of them have a Path and the Persistent flag in common.
When referencing a file directly (for example with an Image Loader), the file is copied into the Ventuz Project Structure. Using a URI, a weak reference is created and a non-project file will not be copied to the project. When exporting a Scene, only those resources will be included which are referenced by an URL node that uses the Ventuz scheme and has the Persistent flag checked.
The Asset scheme uses the Path to relate to a file that lies in the Asset pool of the Ventuz Project. The Asset Browser of the Ventuz Director, for example, browses this folder and provides the Assets to the end-user.
Assets are transient resources like images, movies, logos, etc that are not part of the actual design of a project or scene. Assets are never packed into scene or project archives.
The Ventuz scheme uses the Path to relate to a file that lies relative to the project the URL Node belongs to. The DataPool specifies the project sub-folder in which an asset is expected by Ventuz. The File scheme expects the path to be an absolute file path to a file on the local machine.
The LocalFilename property is not filled in FTP and HTTP schemes. In Ventuz or Assets scheme the Persistent flag must be checked to retrieve LocalFilename. It provides an absolute path to the file referenced by the URI. Other Nodes can use this local file name to access a resource if it cannot handle URIs, e.g. the connection string of a Database Node. The Exists property is true if the actual file exists (this doesn't check if the file is readable). The value of this property is only valid if Persistent is true. If a scene, using the LocalFilename, runs in Presentation Mode, the actual file is extracted to a temporary folder and the LocalFilename points to that file. The filename may change during this operation, but the file extension is always kept, because some applications rely on it.
When using the File scheme, Ventuz can address files stored relatively to the Ventuz Project file. To create a relative path enter a value for Path starting with a dot followed by a backslash. Two dots point to the parent folder.
Examples for relative paths:
.\data.txt .\subfolder\data.txt ..\data.txt ..\..\data\data.txt
Relative paths are resolved by starting from the location of the Ventuz Project file. In Presentation Mode the location of the VPR file is the starting point!
The URLs of this scheme point to a file on an HTTP or FTP Host server. If the URL points to a password protected section on an HTTP or FTP server, User name and Password can be specified in the corresponding Properties. Query and Fragment are optional parts that may follow the path (the ?query1=123&query2=456#fragment1 part at the end of an URL).