Version History
===============

0.2.3
-----

* Added two new fields to :class:`~oyProjectManager.core.models.Shot` to hold
  the handle information.

* Added a new method to ``NukeEnv`` to create slate information.

* Replacing references in ``MayaEnv`` now uses the repository environment
  variable and prevents reloading of the referenced versions upon saving.

* Fixed :attr:`~oyProjectManager.core.models.Shot.duration` attribute
  initialization in :class:`~oyProjectManager.core.models.Shot`.

* Now in ``version_creator`` the shot frame range and handle information can be
  updated.

* Fixed tests of ``version_creator``, the popups were interrupting the test
  while the environment to UI relation was tested. Now the dialog boxes only
  appear if the system is not in debug mode.

* Added thumbnail support and ``version_creator`` UI can load/upload the
  defined thumbnails.

* For a quick fix the template format has been changed in
  :meth:`~oyProjectManager.core.models.Sequence.add_shots`\ . Compressing shots
  by using a "-" is not supported anymore. This will probably updated later on.

* Changed the name formatting of
  :class:`~oyProjectManager.core.models.Shot`,
  :class:`~oyProjectManager.core.models.Asset` and
  :class:`~oyProjectManager.core.models.Version`\ . It is now allowed to have
  numbers at the beginning of the string.

* Fixed :class:`~oyProjectManager.environments.mayaEnv.Maya`\ , it was raising
  IntegrityErrors when there are more than one references to the same
  :class:`~oyProjectManage.core.models.Version`\ .

* Fixed a bug in ``version_creator`` where setting the font color was not
  working in PySide, it is now fixed by changing the code to a common way of
  doing it.

* ``version_creator`` ui now displays the file size of the previous versions,
  and will not display the full path of the them anymore.

* Added ``thumbnail_format`` to the config and ``version_creator`` now uses
  the specified format.

* Fixed ``nukeEnv.py`` now it is properly opening
  :class:`~oyProjectManager.core.models.Version`\ s.
  
* There is now two new settings in the config for time and date formatting of
  previous versions.

* ``version_creator`` now displays the modification time of the previous
  versions.

* Added "Texture Paint" also to the Nuke. So it is now possible to save Nuke
  scenes as Texture files.

* Fixed nukeEnv, the output path is now correctly generated for Assets and
  Shots.

* Changed the default Nuke output to "png"

0.2.2
-----

* Added :attr:`~oyProjectManager.core.models.Version.is_published` to
  :class:`~oyProjectManager.core.models.Version` class to track if a particular
  Version is published.

* ``version_creator`` UI now shows the published
  :class:`~oyProjectManager.core.models.Version`\ s in green and bold font.

* :class:`~oyProjectManager.core.models.User` instances now have a
  :meth:`~oyProjectManager.core.models.User.save` method to easily save the
  data to the database.

* Added ``Show Only Published Versions`` option to the ``version_creator`` UI.

* ``version_creator`` UI now only shows a definite amount of previous Versions,
  and it can be adjustable by the ``version_count_spinBox``.

* Default database placement now uses the ``$OYPROJECTMANAGER_PATH`` instead of
  ``REPO``. It is much better to store ``config.py`` and ``project_manager.db``
  side by side.

* Fixed a bug in :class:`~oyProjectManager.core.models.Sequence` where it was
  not able to create two Sequences with the same name but for different
  :class:`~oyProjectManager.core.models.Project`\ s.

* Added the ability work both with PySide and PyQt4 by setting the environment
  variable ``PREFERRED_QT_MODULE`` to ``PySide`` or ``PyQt4`` respectively
  before launching the application (added especially for Nuke 6.3v5 and later
  for their inclusion of PySide to their default install). If no environment
  variable is found then the system will continue to work with PyQt4.

* In Maya the resolution will only be set if the given
  :class:`~oyProjectManager.core.models.Version` instances version number is 1
  to prevent unwanted resolution changes.

* :class:`~oyProjectManager.environments.mayaEnv.Maya` now replaces external
  paths (images and references) with absolute paths starting with ``$REPO``
  (the env variable name can change according to the studio config).

* For Maya environment the support for ``mentalrayTexture``s has ended due to
  the lack of a good environment variable support. Use regular maya ``file``
  nodes for textures with ``mib_texture_filter_lookup`` nodes for the same
  sharp result.

* :class:`~oyProjectManager.core.models.Version` now has
  :meth:`~oyProjectManager.core.models.Version.is_latest_published_version` and
  :meth:`~oyProjectManager.core.models.Version.

* Fixed a bug in the ``version_creator`` UI where the ``shots_listWidget`` was
  not correctly cleared after switching the current project from a project with
  sequences to a project without any sequences.

* Fixed a bug in ``mayaEnv`` where it was not able to retrieve the
  list of references correctly under Windows OS which is caused again by the
  backslash issue.

* Updated the ``version_updater`` UI, it now works properly with new
  :class:`~oyProjectManager.core.models.Version` instances. But it is again not
  informing the user about `deep updates` which will be added in near future
  releases.

* Fixed the ``version_creator`` UI, for Shots, it was listing all the types
  instead of types which are compatible with the current environment.

* Fixed a bug in ``mayaEnv`` where it was not able to save the scene if
  mentalray is set as the renderer but the mentalrayGlobals node is not
  created yet.

* Converted the ``version_type_comboBox`` and ``takes_comboBox`` to a
  listWidget, which will be much suitable for viewing all the types and takes
  at the first sight.

* ``version_creator``now only lists active
  :class:`~oyProjectManager.core.models.Project`\ s.

* Fixed ``maya_env`` references to Versions in the same workspace now updating
  the reference paths correctly by replacing the server path with $REPO.

* Fixed ``maya_env`` referencing a Version now properly initializes the
  reference path with $REPO env variable.

* Fixed a bug in ``version_creator`` UI where it was raising an IndexError
  while restoring the ui with a Version whose Project is not active anymore.

* ``version_creator`` now shows the Projects in sorted order.

* Now the :attr:`~oyProjectManager.core.models.Shot.number` is now compatible
  with GradientFX's shot format, accepts any upper case letters and the dash
  ("-") character. Also the Shot.code is updated accordingly.

* project_properties UI now shows and edits advanced properties like shot
  number padding and prefix, revision number padding and prefix, version number
  padding and prefix and the structure of the Project.

* Updated the default project structure to also include shot folders. So
  calling :meth:`~oyProjectManager.core.models.Project.create` will create also
  the Shot folders if there is any
  :class:`~oyProjectManager.core.models.Sequence` and also
  :class:`~oyProjectManager.core.models.Shots` defined.

* Dash ("-") character is now allowed in the version base name

* Updated `version_updated` UI, now it warns the user for references with no
  published versions.

* The :attr:`~oyProjectManager.core.models.Project.structure` in
  :class:`~oyProjectManager.core.models.Project` was incorrectly configured as
  ``PickleType`` whereas it should be ``String``, it is now fixed.

* Renamed the ``replace_file_paths`` with
  :meth:`~oyProjectManager.environments.nukeEnv.replace_external_paths` in
  :class:`~oyProjectManager.environments.nukeEnv` and moved it to the
  :class:`~oyProjectManager.core.models.EnvironmentBase` to make it common in
  environments.

0.2.1
-----

* Fixed a bug when a :class:`~oyProjectManager.core.models.Project` doesn't
  have any Sequence, :meth:`~oyProjectManager.core.models.create` will raise
  ``OSErrors`` about not being able to create the resultant directory which is
  an empty string.

* Because at time of this release it was hard to reach PySide on every
  platform, the system has been moved back to PyQt4 for now. PySide will
  definitely be used in the future, when all the main programs (Maya, Houdini
  and Nuke) are supporting it (for now it is just Nuke which is delivered with
  PySide).

* Fixed :class:`~oyProjectManager.config.Conf` it now saves the last_user_id
  properly

* Fixed ``version_creator`` UI, it now saves and retrieves the last user choice
  properly.

* Fixed ``version_creator`` UI, it now only displays Versions with type
  available to the current environment if there is any environment passed to
  it.

* Now in MayaEnv and NukeEnv the output file also includes the
  :class:`~oyProjectManager.core.models.Project` ``code`` and if it is a
  :class:`~oyProjectManager.core.models.Shot`
  :class:`~oyProjectManager.core.models.Version` then it also includes the
  :class:`~oyProjectManager.core.models.Sequence` ``code`` in the output file
  names (ex. rendered images).

0.2.0
-----
* Updated the license to BSD 2.

* Updated the license text on module headers.

0.2.0.b1
--------
* The ``fullpath`` and the ``path`` attributes of the
  :class:`~oyProjectManager.core.models.Project` will not be stored in the
  database anymore. But instead they will be generated from the
  :attr:`~oyProjectManager.core.models.Project.path` and
  :attr:`~oyProjectManager.core.models.Project.code` attributes.

* The concept of paths are enhanced. Now all the paths stored in the database
  is relative to the repository root. So the
  :attr:`~oyProjectManager.core.models.Version.path` attribute of
  :class:`~oyProjectManager.core.models.Version` class is an relative path to
  the :attr:`~oyProjectManager.core.models.Repository.server_path` attribute of
  :class:`~oyProjectManager.core.models.Repository` class. And the templates in
  the :class:`~oyProjectManager.core.models.VersionType` should be designed in
  that way.

* Fixed a bug where all the
  :class:`~oyProjectManager.core.models.Version`\ s for the same
  :class:`~oyProjectManager.core.models.Shot` or
  :class:`~oyProjectManager.core.models.Asset` with the same
  ``take_name`` considered in the same version queue. Thus
  :class:`~oyProjectManager.core.models.Version`\ .\
  :meth:`~oyProjectManager.core.models.Version.is_latest_version` and
  :class:`~oyProjectManager.core.models.Version`\ .\
  :attr:`~oyProjectManager.core.models.Version.max_version` were not working
  properly.

* Removed the ``description`` field from the ``version_creator`` UI to make the
  interface more compact and also this kind of information will be available in
  the web ui.

* Added
  :class:`~oyProjectManager.core.models.EnvironmentBase.get_version_from_fullpath`,
  :class:`~oyProjectManager.core.models.EnvironmentBase.get_versions_from_path`,
  and  :class:`~oyProjectManager.core.models.EnvironmentBase.trim_server_path`,
  methods to :class:`~oyProjectManager.core.models.EnvironmentBase` class.

* Added :meth:`~oyProjectManager.core.models.Version.dependency_update_list`
  property to the :class:`~oyProjectManager.core.models.Version` class. Which
  returns a list of :class:`~oyProjectManager.core.models.Version` instances
  which are referenced by this :class:`~oyProjectManager.core.models.Version`
  or are referenced by the references of this
  :class:`~oyProjectManager.core.models.Version` and those have newer versions
  in the database, resulting a deeper update information.

* Fixed a little bug, it is now possible to create
  :class:`~oyProjectManager.core.models.VersionableBase` instances (
  :class:`~oyProjectManager.core.models.Asset` and
  :class:`~oyProjectManager.core.models.Shot` instances particularly) with the
  same ``code`` value if their ``project_id`` is not the same.

* To be able to make the :attr:`~oyProjectManager.core.models.Asset.name`
  attribute in the :class:`~oyProjectManager.core.models.Asset` unique, the
  column moved to the ``VersionableBases`` table which also has the
  ``project_id`` column.

* Moved the ``description`` attribute to the
 :class:`~oyProjectManager.core.models.VersionableBase` class, which
  was a common attribute for the
  :class:`~oyProjectManager.core.models.Asset`` and
  :class:`~oyProjectManager.core.models.Shot` classes.

* The :attr:`~oyProjectManager.core.models.Version.version_number` attribute is
  now depending on to the
  :attr:`~oyProjectManager.core.models.Version.version_of` attribute instead of
  the :attr:`~oyProjectManager.core.models.Version.base_name` attribute, to
  prevent the ``version_number`` from being started over from 1 again in case
  of renames in :class:`~oyProjectManager.core.models.VersionableBase`
  instances attached to a particular
  :class:`~oyProjectManager.core.models.Version` instance.

* Updated the ``project_manager`` ui.

* :class:`~oyProjectManager.core.models.Sequence` will not accept strings for
  the ``project`` argument anymore.

* The :attr:`~oyProjectManager.core.models.Sequence.name` and
  :attr:`~oyProjectManager.core.models.Sequence.code` attributes of
  :class:`~oyProjectManager.core.models.Sequence` class is now working as
  expected.

0.2.0a2
-------

* Because every project had its own SQLite3 database it was hard to manage the
  same User in different projects, for that reason the system now uses a
  central database whose placement (if SQLite3) is defined by the config.py.
  Also, the system is able to use different databases than SQLite3. This latest
  improvement added another level of flexibility to the system.

* The ``assetManager.py`` is renamed to ``version_creator.py`` to reflect its
  functionality more clearly. And the interface is redesigned from scratch and
  programmed with TDD practices.

* Because there is a bug in the ``Beaker`` package, reintroduced the
  :mod:`oyProjectManager.utils.cache` module.

* Added :attr:`~oyProjectManager.core.models.Version.extension` attribute to
  the :class:`~oyProjectManager.core.models.Version` class.

* :class:`~oyProjectManager.core.models.Version` class now has
  :attr:`~oyProjectManager.core.models.Version.extension` and
  :attr:`~oyProjectManager.core.models.Version.output_path` attributes.

* Renamed the environments back to mayaEnv.py, houdiniEnv.py, nukeEnv.py and
  photoshopEnv.py

* Added an attribute called
  :attr:`~oyProjectManager.core.models.Version.project` to the
  :class:`~oyProjectManager.core.models.Version` class which is a shortcut to
  the ``Version.version_of.project``

* Added :attr:`~oyProjectManager.core.models.Version.absolute_path` attribute
  to the :class:`~oyProjectManager.core.models.Version` class which returns the
  absolute path of the version to the
  :class:`~oyProjectManager.core.models.Project` root
  
* The :attr:`~oyProjectManager.core.models.Version.fullpath` attribute in 
  :class:`~oyProjectManager.core.models.Version` now returns an absolute path.

* The duty of the :attr:`~oyProjectManager.core.models.Project.name` attribute
  of the :class:`~oyProjectManager.core.models.Project` class is now shifted to
  the :attr:`~oyProjectManager.core.models.Project.code` attribute, thus, the
  :attr:`~oyProjectManager.core.models.Project.name` of the
  :class:`~oyProjectManager.core.models.Project` can now be freely changed,
  without effecting the file management.

* Updated the :meth:`~oyProjectManager.core.models.Sequence.add_shots`\ ,
  :meth:`~oyProjectManager.core.models.Sequence.add_alternative_shot` and
  :meth:`~oyProjectManager.core.models.Sequence.get_next_alternate_shot_number`
  methods in :class:`~oyProjectManager.core.models.Sequence` class.

* Added resolution presets to the config file.

* Added :attr:`~oyProjectManager.core.models.Project.active` attribute to the
  :class:`~oyProjectManager.core.models.Project` class to track the status of
  the :class:`~oyProjectManager.core.models.Project`.

0.2.0a1
-------

* The system now uses SQLAlchemy Declarative in its data models. And a new
  settings file located in the Project root with the name ``.metadata.db`` is
  governed to hold the related data for that Project. The system doesn't scan
  the file system anymore but instead uses this ``.metadata.db`` SQLite3 file.
  There are a lot of interface changes in the classes: 

  * The Project.sequenceNames and Project.updateSequenceList methods are no
    longer needed and they don't exist anymore.
  
  * There is no ``readSettings`` method in any of the classes anymore. All the
    settings are read from the database (by retrieving an instance from the db)
    as the instance is created.
  
  * All the XML parsing code is removed. So there is no backward compatibility.
  
  * It was very hard keep the compatibility with the previous versions. So,
    the version 0.2.0 is not backward compatible. The system will look with
    blinking eyes if you try to use it with an old Project.
  
  * The methods:
    
    * ``_parseSequenceDataNode``
    * ``_parseStructureNode``
    * ``_parseAssetTypesNode``
    * ``_parseShotListNode``
    * ``_parseShotDataNode``
    * ``create``
    * ``createShots``
    * ``_sortShots``
    * ``getShot``
    * ``shotList``
    * ``structure``
    * ``createStructure``
    * ``convertToShotString``
    * ``convertToRevString``
    * ``convertToVerString``
    * ``convertToShotNumber``
    * ``convertToRevNumber``
    * ``convertToVerNumber``
    * ``shotPadding``
    * ``shotPrefix``
    * ``getAssetTypes``
    * ``getAssetTypeWithName``
    * ``getAssetFolders``
    * ``projectName``
    * ``getAllAssets``
    * ``getAllAssetsForType``
    * ``getAllAssetFileNamesForType``
    * ``getAssetBaseNamesForType``
    * ``getAllAssetsForTypeAndBaseName``
    * ``filterAssets``
    * ``filterAssetNames``
    * ``generateFakeInfoVariables``
    * ``aFilter``
    * ``undoChange``
    * ``path``
    * ``fullpath``
    * ``projectName``
    * ``timeUnit``
    * ``isValid``
    * ``addNewAssetType``
    * ``exists``
    * ``noSubNameField``
    

    of the :class:`~oyProjectManager.core.models.Sequence` are removed. They
    were preliminarily used for fake database query like behaviour which is
    greatly handled by SQLAlchemy right now.

* All the models are now placed under one module called
  :mod:`oyProjectManager.core.models`. Thus deleted the old
  ``oyProjectManager.models.project``, ``oyProjectManager.models.asset``,
  ``oyProjectManager.models.user`` modules and the ``oyProjectManager.models``
  module itself.

* ``utils.convertRangeToList`` is renamed to
  :func:`~oyProjectManager.utils.uncompress_range`\ .

* Introduced the new :class:`~oyProjectManager.core.models.Version` class
  which from now on will hold the references to the individual files for every
  version created for an :class:`~oyProjectManager.core.models.Asset` or
  :class:`~oyProjectManager.core.models.Shot` in the repository. So contrary to
  the previous implementation an :class:`~oyProjectManager.core.models.Asset`
  is not the reference of the individual version files of itself any more.

* Introduced the :class:`~oyProjectManager.core.models.VersionableBase` class
  in which the :class:`~oyProjectManager.core.models.Shot` and
  :class:`~oyProjectManager.core.models.Asset` is derived from. Thus allow them
  to hold references to :class:`~oyProjectManager.core.models.Version`\ s.

* The :class:`~oyProjectManager.core.models.Repository` now uses the ``REPO``
  environment variable instead of ``STALKER_REPOSITORY_PATH``.

* All the project settings are now stored in the
  :class:`~oyProjectManager.core.models.Project` class.

* The ``timeUnit`` concept is replaced with ``fps``. To define the timeUnit
  (which is very much a specific naming convention for Maya only) set the
  :attr:`~oyProjectManager.core.models.Project.fps` of the
  :class:`~oyProjectManager.core.models.Project` class.

* It is now possible to set a project image format by setting the
  :attr:`~oyProjectManager.core.models.width`,
  :attr:`~oyProjectManager.core.models.height`,
  :attr:`~oyProjectManager.core.models.pixel_aspect` attributes of the
  :class:`~oyProjectManager.core.models.Project` class.

* The :class:`~oyProjectManager.core.models.Shot` class now initializes with
  the :attr:`~oyProjectManager.core.models.Shot.number` attribute and the
  :attr:`~oyProjectManager.core.models.Shot.code` attribute of the
  :class:`~oyProjectManager.core.models.Shot` composed from the
  :attr:`~oyProjectManager.core.models.Shot.number` and the
  :attr:`~oyProjectManager.core.models.Project.shot_prefix` and
  :attr:`~oyProjectManager.core.models.Project.shot_padding` attribute of the
  :class:`~oyProjectManager.core.models.Project` class.

* There is no ``Structure`` class anymore. The function is accomplished by the
  :class:`~oyProjectManager.core.models.Project` class itself.

* The system now uses the ``OYPROJECTMANAGER_PATH`` to search a file called
  ``conf.py`` and uses this file to configure the system. See
  :mod:`~oyProjectManager.config` documentation for more details.

* Renamed the environment modules:
  
  * ``houdiniEnv.py`` --> ``houdini.py``
  * ``mayaEnv.py`` --> ``maya.py``
  * ``nukeEnv.py`` --> ``nuke.py``
  * ``photoshopEnv.py`` --> ``photoshop.py``
  
  To ease the move of separate environment class concept, which will be
  introduced in version 0.3.0

* Updated the :class:`~oyProjectManager.core.models.Repository`, now it is only
  doing repository related things. The following methods are removed:
  
  * ``_init_repository_path_environment_variable`` (no environment variables to
    init anymore)
  * ``_parse_repository_settings`` (nothing to parse anymore)
  * ``projects`` (use ``Repository.project_names`` instead)
  * ``valid_projects`` (use ``Repository.project_names`` all the names are for
    valid projects -projects with .metadata.db- only)
  * ``users`` (it is :class:`~oyProjectManager.core.models.Project`\ s duty to
    return a list of users in the project, and a full list of user names and
    corresponding user name initials can be retrieved from
    ``oyProjectManager.config.Config.users``)
  * ``user_names`` (can be retrieved from
    ``oyProjectManager.config.Config.users``)
  * ``user_initials`` (can be retrieved from
    ``oyProjectManager.config.Config.users``)
  * ``_parse_users`` (nothing to parse anymore)
  * ``createProject`` (use::
      
      from oyProjectManager.core.models import Project
      new_proj = Project("NEW_PROJECT")
      new_proj.create()
    
    no need to introduce a new method)
    
  * ``defaultFiles`` (is handled by the environments, not by the repository)
  * ``default_settings_file_full_path`` (no default settings file anymore)
  * ``home_path`` (it is os.path.expanduser("~") no need to create new method)
  * ``last_user`` (use
    :attr:`oyProjectManager.config.Config.last_user_initial` instead)
  * ``get_project_and_sequence_name_from_file_path`` (use
    :meth:`oyProjectManager.core.models.Repository.get_project_name` instead,
    it is not possible to get the
    :class:`~oyProjectManager.core.models.Sequence` name for now)
  * ``settings_dir_path`` (no settings dir)
  * ``time_units`` (no time unit concept, use
    :attr:`~oyProjectManager.core.models.Project.fps` instead)
