Version Control#

apsync.toggle_version_control(path: str, enable: bool) None#

Toggles incremental version control for the folder that ‘path’ points to. Pass enable=True to enable version control, pass enable=False to disable it.

Parameters
  • path (str) – The path to the folder

  • enable (bool) – Whether version control should be enabled or disabled

Examples

Enable version control on a folder:
>>> apsync.toggle_version_control("my/asset/folder", True)
Check whether or not version control is enabled on a folder:
>>> folder = apsync.get_folder("my/asset/folder")
>>> if folder: print(folder.versioning_enabled)
True
apsync.comment_file(file_path: str, comment: Optional[str]) None#

Adds a comment by the current user to the file identified by file_path.

Parameters
  • file_path (str) – The path to the file

  • comment (Optional[str]) – The comment to put on the file

Example

>>> apsync.comment_file(file_path, "This is a nice file")
apsync.create_next_version(file_path: str) str#

Creates a new incremental version of file_path.

Parameters

file_path (str) – The path to the file

Returns

The path to the newly created file

Example

>>> apsync.create_next_version("monkey_v001.blend")
monkey_v002.blend
apsync.get_next_version_path(file_path: str) str#

Returns the path of the file that is used when running create new version

Parameters

file_path (str) – The path to the file

Returns

The file path

Example

>>> apsync.get_next_version_path("monkey_v001.blend")
monkey_v002.blend