EnvironmentLibrary.EnvironmentLibrary Class Reference

#include <class_environment_library_1_1_environment_library.h>

Inheritance diagram for EnvironmentLibrary.EnvironmentLibrary:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  __init__ ()
  instance ()
  destruct ()
  getBaseEnvId ()
  Referenced Ids: Empty\Empty.a3e,..., Empty\Empty.a3e[n],...
  generateReferenceId ()
  Base Id : Empty\Empty.a3e Referenced Ids: Empty\Empty.a3e,..., Empty\Empty.a3e[n],...
  isEditableLibrary ()
  Return true if the library can be edited.
  isRemovedLibrary ()
  Return True if the given environment library is a removed library, False otherwise.
  isWritableEnvironment ()
  Returns True if the passed environment can be overwritten.
  validateEnvironmentId ()
  At the moment environment ids are simply relative paths.
  environmentExists ()
  Return True if the argument envId corresponds to an environment in the library.
  libraryExists ()
  isBackplateEnvironment ()
  isEditableEnvironment ()
  Some of the environments that are shipped with the application are editable.
  getDefaultEnvironment ()
  Return the id of the default library, also, if the invalidEnvironment is passed, skip it and try to get the next one.
  setDefaultEnvironment ()
  Sets the environment with the given id as the default environment.
  getEnvironmentName ()
  Return the name of the environment corresponding to the argument envId.
  getEnvironmentFile ()
  Return the file of the environment corresponding to the argument envId.
  getFirstFoundLibrary ()
  Find the absolute path to the given env.
  resolveEnvironmentId ()
  Currently, fully qualified paths are used as environment ids.
  getEnvironmentLibrary ()
  Return the library containing the environment corresponding to the argument envId.
  getEnvironmentImage ()
  Return the image of the environment corresponding to the argument envId.
  getAllEnvironmentLibraries ()
  Return a list of all environment library paths.
  getEnvironmentIds ()
  Return a list of all environment ids belonging to an environment library.
  getAllEnvironmentIds ()
  Return a list of all environment ids.
  loadEnvironment ()
  Load the environment from specified directory.
  loadEnvironmentLibrary ()
  Load the environment library.
  getRemovedEnvironmentLibrary ()
  Return the removed library which contains the environment specified by the envId.
  getRemovedEnvironmentFile ()
  Return the filename of the removed environment specified by the envId.
  getRemovedEnvironments ()
  Return the ids of the environments which are under the removed library specified by the libraryPath.
  storeRemovedEnvironmentLibrary ()
  Stores the environment id and its library which was deleted from disk.
  removeEnvironment ()
  Remove the specified environment from disk and remove it from the environment catalog.
  removeEnvironmentLibrary ()
  Remove the specified environment library.
  loadAllEnvironments ()
  Loads all Environment files found in the search directories defined in the Environments search path.
  setEnvironmentImage ()
  Update the environment image without reloading the environment file.
  isTemporaryEnvironment ()
  Return true if the environment is currently stored in the temporary directory.
  getAllTemporaryEnvironmentIds ()
  Returns a list of all environments currently stored in the temporary directory.
  getTemporaryEnvironmentLibrary ()
  Returns the directory where unsaved environments are temporarily stored.
  removeAllEnvironments ()
  Removes all environments from the catalog.

Member Function Documentation

EnvironmentLibrary.EnvironmentLibrary.__init__ ( )
EnvironmentLibrary.EnvironmentLibrary.instance ( )
EnvironmentLibrary.EnvironmentLibrary.destruct ( )
EnvironmentLibrary.EnvironmentLibrary.getBaseEnvId ( )

Referenced Ids: Empty\Empty.a3e,..., Empty\Empty.a3e[n],...

Base Id : Empty\Empty.a3e Extracts and return a based id from the given one. Example: given id = "Empty\Empty.a3e[2]" -> baseId = "Empty\Empty.a3e".

EnvironmentLibrary.EnvironmentLibrary.generateReferenceId ( )

Base Id : Empty\Empty.a3e Referenced Ids: Empty\Empty.a3e,..., Empty\Empty.a3e[n],...

Generates a referenced id from passed base id and a passed number. Example: given id = "Empty\Empty.a3e", number = 2 -> referencedId = "Empty\Empty.a3e[2]". if the passed id is a referenced id, the same id is returned.

EnvironmentLibrary.EnvironmentLibrary.isEditableLibrary ( )

Return true if the library can be edited.

The library can be editable if: -the library is not the shipped library

EnvironmentLibrary.EnvironmentLibrary.isRemovedLibrary ( )

Return True if the given environment library is a removed library, False otherwise.

EnvironmentLibrary.EnvironmentLibrary.isWritableEnvironment ( )

Returns True if the passed environment can be overwritten.

The environment can be written if: -the environment file and all its corresponding files are writable (User writable and Access Permission wise) -it's not one of the environments that are shipped with the application.

EnvironmentLibrary.EnvironmentLibrary.validateEnvironmentId ( )

At the moment environment ids are simply relative paths.

Maybe one day they'll become unique numbers but for now they are strings.

Because they are strings of relative paths we need to handle scene files that may be using / instead of \ as the directory separator This is enough to make a string comparison fail when looking for ids. This method simply converts / to \.

EnvironmentLibrary.EnvironmentLibrary.environmentExists ( )

Return True if the argument envId corresponds to an environment in the library.

EnvironmentLibrary.EnvironmentLibrary.libraryExists ( )
EnvironmentLibrary.EnvironmentLibrary.isBackplateEnvironment ( )
EnvironmentLibrary.EnvironmentLibrary.isEditableEnvironment ( )

Some of the environments that are shipped with the application are editable.

Currently, there are:

  • Backplate
  • Generic Return False for those environments, True otherwise.
EnvironmentLibrary.EnvironmentLibrary.getDefaultEnvironment ( )

Return the id of the default library, also, if the invalidEnvironment is passed, skip it and try to get the next one.

EnvironmentLibrary.EnvironmentLibrary.setDefaultEnvironment ( )

Sets the environment with the given id as the default environment.

Returns True on success; False otherwise (with the previous default unchanged).

EnvironmentLibrary.EnvironmentLibrary.getEnvironmentName ( )

Return the name of the environment corresponding to the argument envId.

EnvironmentLibrary.EnvironmentLibrary.getEnvironmentFile ( )

Return the file of the environment corresponding to the argument envId.

EnvironmentLibrary.EnvironmentLibrary.getFirstFoundLibrary ( )

Find the absolute path to the given env.

If the env is already an absolute path, it verifies that it is a valid path and if so, it returns it, otherwise, it returns None. If the envId is a relativePath, it finds the first absolute path that this environment can be found. If the envId is not found in any of the location, it returns none.

EnvironmentLibrary.EnvironmentLibrary.resolveEnvironmentId ( )

Currently, fully qualified paths are used as environment ids.

If environment id is a relative path (e.g.: Empty\Empty.a3e), resolve it with local shipped library.

If environment id points to the environment that is part of the Showcase shipped environment library, and the message is sent across the network, the environment ids need to be resolved to point to the same environment on the local machine.

EnvironmentLibrary.EnvironmentLibrary.getEnvironmentLibrary ( )

Return the library containing the environment corresponding to the argument envId.

EnvironmentLibrary.EnvironmentLibrary.getEnvironmentImage ( )

Return the image of the environment corresponding to the argument envId.

EnvironmentLibrary.EnvironmentLibrary.getAllEnvironmentLibraries ( )

Return a list of all environment library paths.

This list contains no duplicated library paths.

EnvironmentLibrary.EnvironmentLibrary.getEnvironmentIds ( )

Return a list of all environment ids belonging to an environment library.

EnvironmentLibrary.EnvironmentLibrary.getAllEnvironmentIds ( )

Return a list of all environment ids.

EnvironmentLibrary.EnvironmentLibrary.loadEnvironment ( )

Load the environment from specified directory.

EnvironmentLibrary.EnvironmentLibrary.loadEnvironmentLibrary ( )

Load the environment library.

EnvironmentLibrary.EnvironmentLibrary.getRemovedEnvironmentLibrary ( )

Return the removed library which contains the environment specified by the envId.

EnvironmentLibrary.EnvironmentLibrary.getRemovedEnvironmentFile ( )

Return the filename of the removed environment specified by the envId.

EnvironmentLibrary.EnvironmentLibrary.getRemovedEnvironments ( )

Return the ids of the environments which are under the removed library specified by the libraryPath.

EnvironmentLibrary.EnvironmentLibrary.storeRemovedEnvironmentLibrary ( )

Stores the environment id and its library which was deleted from disk.

EnvironmentLibrary.EnvironmentLibrary.removeEnvironment ( )

Remove the specified environment from disk and remove it from the environment catalog.

Store it in the list of removed environments for future references

EnvironmentLibrary.EnvironmentLibrary.removeEnvironmentLibrary ( )

Remove the specified environment library.

EnvironmentLibrary.EnvironmentLibrary.loadAllEnvironments ( )

Loads all Environment files found in the search directories defined in the Environments search path.

Returns the number of environments loaded.

EnvironmentLibrary.EnvironmentLibrary.setEnvironmentImage ( )

Update the environment image without reloading the environment file.

EnvironmentLibrary.EnvironmentLibrary.isTemporaryEnvironment ( )

Return true if the environment is currently stored in the temporary directory.

EnvironmentLibrary.EnvironmentLibrary.getAllTemporaryEnvironmentIds ( )

Returns a list of all environments currently stored in the temporary directory.

EnvironmentLibrary.EnvironmentLibrary.getTemporaryEnvironmentLibrary ( )

Returns the directory where unsaved environments are temporarily stored.

EnvironmentLibrary.EnvironmentLibrary.removeAllEnvironments ( )

Removes all environments from the catalog.


EnvironmentLibrary.EnvironmentLibrary EnvironmentLibrary.EnvironmentLibrary EnvironmentLibrary.EnvironmentLibrary EnvironmentLibrary.EnvironmentLibrary EnvironmentLibrary.EnvironmentLibrary EnvironmentLibrary.EnvironmentLibrary EnvironmentLibrary.EnvironmentLibrary EnvironmentLibrary.EnvironmentLibrary EnvironmentLibrary.EnvironmentLibrary EnvironmentLibrary.EnvironmentLibrary
EnvironmentLibrary.EnvironmentLibrary EnvironmentLibrary.EnvironmentLibrary EnvironmentLibrary.EnvironmentLibrary EnvironmentLibrary.EnvironmentLibrary EnvironmentLibrary.EnvironmentLibrary EnvironmentLibrary.EnvironmentLibrary EnvironmentLibrary.EnvironmentLibrary EnvironmentLibrary.EnvironmentLibrary EnvironmentLibrary.EnvironmentLibrary EnvironmentLibrary.EnvironmentLibrary