artellapipe.libs.artella.core.artellalib module¶
Utility module that contains useful utilities and classes related with Artella
-
class
artellapipe.libs.artella.core.artellalib.
ArtellaProjectType
¶ Bases:
object
-
ENTERPRISE
= 'enterprise'¶
-
INDIE
= 'indie'¶
-
-
artellapipe.libs.artella.core.artellalib.
can_unlock
(file_path, **kwargs)¶ Returns whether given path can be unlocked or not by current user :param file_path: str :return: bool
-
artellapipe.libs.artella.core.artellalib.
check_artella_plugin_loaded
()¶ Returns True if the Artella plugin is loaded in Maya or False otherwise :return: bool
-
artellapipe.libs.artella.core.artellalib.
close_all_artella_app_processes
()¶ Closes all Artella app (lifecycler.exe) processes :return:
-
artellapipe.libs.artella.core.artellalib.
connect_artella_app_to_spigot
(cli=None, app_identifier=None)¶ Creates a new Spigot Client instance and makes it to listen to our current installed (and launched) Artella app
-
artellapipe.libs.artella.core.artellalib.
create_asset
(asset_name, asset_path)¶ Creates an asset with given name and in given path :param asset_name: str :param asset_path: str :return: dict
-
artellapipe.libs.artella.core.artellalib.
delete_file
(file_path)¶ Removes given file from Artella server :param file_path: str :return: dict
-
artellapipe.libs.artella.core.artellalib.
explore_file
(path)¶ Opens the current file in the file explorer :param path: str
-
artellapipe.libs.artella.core.artellalib.
fix_path_by_project
(project, path, fullpath=False)¶ Fix given path and updates to make it relative to the Artella project :param project: ArtellaProject :param path: str, path to be fixed :return: str
-
artellapipe.libs.artella.core.artellalib.
get_artella_app
()¶ Returns path where Artella path is installed :return: str
-
artellapipe.libs.artella.core.artellalib.
get_artella_app_identifier
()¶ Returns the installed Artella App identifier :return: variant, str || None
-
artellapipe.libs.artella.core.artellalib.
get_artella_client
(app_identifier=None, force_create=True)¶ Creates, connects and returns an instance of the Spigot client :return: SpigotClient
-
artellapipe.libs.artella.core.artellalib.
get_artella_data_folder
()¶ Returns last version Artella folder installation :return: str
-
artellapipe.libs.artella.core.artellalib.
get_artella_dcc_plugin
(dcc='maya')¶ Gets Artella DCC plugin depending of the given dcc string :param dcc: str, “maya” or “nuke” :return: str
-
artellapipe.libs.artella.core.artellalib.
get_artella_launch_shortcut
()¶ Returns path where Launch Artella shortcut is located :return: str
-
artellapipe.libs.artella.core.artellalib.
get_artella_plugins_folder
()¶ Returns folder where Artella stores its plugins :return: str
-
artellapipe.libs.artella.core.artellalib.
get_artella_program_folder
()¶ Returns folder where Artella shortcuts are located :return: str
-
artellapipe.libs.artella.core.artellalib.
get_artella_project_url
(project_id, files_url=True)¶ Returns Artella project URL :param project_id: str, Unique ID for the Artella project :param files_url: bool, Whether to return root project URL of project files URL :return: str
-
artellapipe.libs.artella.core.artellalib.
get_artella_python_folder
()¶ Returns folder where Artella stores Python scripts :return: str
-
artellapipe.libs.artella.core.artellalib.
get_asset_image
(asset_path, project_id)¶ Returns the asset image from Artella server :param asset_path: str, path of the asset relative to the Assets folder :param project_id: str, ID of the Artella project you are currently working :return:
-
artellapipe.libs.artella.core.artellalib.
get_cms_uri
(path)¶ Returns the CMS uri of the given path, if exists :param path: str :return: dict
-
artellapipe.libs.artella.core.artellalib.
get_cms_uri_current_file
()¶ Returns the CMS uri of the current file :return: str
-
artellapipe.libs.artella.core.artellalib.
get_current_user_id
()¶ Returns Artella ID of the current user :return: str
-
artellapipe.libs.artella.core.artellalib.
get_current_version
(file_path)¶ Returns current published version of the given file path in Artella server :param file_path: str :return: int
-
artellapipe.libs.artella.core.artellalib.
get_dependencies
(file_path)¶ Returns a list with all the dependencies :param file_path: str :return: dict
-
artellapipe.libs.artella.core.artellalib.
get_file_history
(file_path, as_json=False)¶ Returns the history info of the given file, if exists :param file_path: str :param as_json: bool
-
artellapipe.libs.artella.core.artellalib.
get_latest_version
(file_path, check_validity=True)¶ Returns last version of the given file path in Artella server :param file_path: str :param check_validity: bool :return: int
-
artellapipe.libs.artella.core.artellalib.
get_local_working_version
(file_path)¶ Returns current version of the given file in Artella server :param file_path: str :return: int
-
artellapipe.libs.artella.core.artellalib.
get_metadata
()¶ Returns Artella App MetaData :return: ArtellaMetaData or None
-
artellapipe.libs.artella.core.artellalib.
get_status
(file_path, **kwargs)¶ Returns the status of the given file path :param file_path: str :return: str
-
artellapipe.libs.artella.core.artellalib.
get_status_current_file
()¶ Returns the status of the current file :return:
-
artellapipe.libs.artella.core.artellalib.
get_synchronization_progress
()¶ Returns the progress of the current Artella server synchronization operation Returns a tuple containing the following info:
amount of done download operations
amount of total download operations in progress
amount of total download operations that are going to be done
amount of total bytes downloaded
amount of total bytes to download
- Returns
int, int, int, int, int
-
artellapipe.libs.artella.core.artellalib.
get_user_avatar
(user_id)¶ Downloads from Artella the avatar of the given user id Only works if the user is loaded before to Artella :param user_id: str :return:
-
artellapipe.libs.artella.core.artellalib.
import_file_in_maya
(file_path, maya_version=None)¶ Import the given asset path in the given Maya version current scene :param file_path: str :param maya_version: int
-
artellapipe.libs.artella.core.artellalib.
init_artella
(dev=False, project_type='enterprise')¶
-
artellapipe.libs.artella.core.artellalib.
is_locked
(file_path)¶ Returns whether an absolute file path refers to a locked asset in edit mode, and if the file is locked by the current storage workspace :param file_path: str, absolute path to a file :return: (bool, bool), Whether file is locked or not, whether the file is locked by another user or not
-
artellapipe.libs.artella.core.artellalib.
is_published
(file_path)¶ Returns whether an absolute file path refers to a published asset :param file_path: str, absolute path to a file :return: bool
-
artellapipe.libs.artella.core.artellalib.
is_updated
(file_path)¶ Returns whether or not given file path is updated to the last version :param file_path: str :return: bool
-
artellapipe.libs.artella.core.artellalib.
launch_artella_app
()¶ Executes Artella App
-
artellapipe.libs.artella.core.artellalib.
launch_maya
(file_path, maya_version=None)¶ - Parameters
file_path – str
maya_version – int
- Returns
-
artellapipe.libs.artella.core.artellalib.
load_artella_maya_plugin
()¶ Loads the Artella plugin in the current Maya session :return: bool
-
artellapipe.libs.artella.core.artellalib.
lock_file
(file_path=None, force=False)¶ Locks given file path :param file_path: str :param force: bool
-
artellapipe.libs.artella.core.artellalib.
new_folder
(root_path, folder_name)¶ Creates a new folder in the given path :param root_path: str :param folder_name: str
-
artellapipe.libs.artella.core.artellalib.
open_file_in_maya
(file_path, maya_version=None)¶ Open the given path in the given Maya version :param file_path: str :param maya_version: int
-
artellapipe.libs.artella.core.artellalib.
pause_synchronization
()¶ Pauses synchronization of files from Artella server
-
artellapipe.libs.artella.core.artellalib.
publish_asset
(asset_path, comment, selected_versions, version_name)¶ Publish a new version of the given asset :param asset_path: :param comment: :param selected_versions: :param version_name:
-
artellapipe.libs.artella.core.artellalib.
reference_file_in_maya
(file_path, maya_version=None)¶ Import the given asset path in the given Maya version current scene :param file_path: str :param maya_version: int
-
artellapipe.libs.artella.core.artellalib.
rename_file
(file_path, new_name)¶ Renames given file with new given name :param file_path: str :param new_name: str
-
artellapipe.libs.artella.core.artellalib.
reroute
(fn)¶ Decorator that rerouts the function call on runtime to the specific Artella API function call depending on the current project Artella type (Indie or Enterprise) :param fn: :return:
-
artellapipe.libs.artella.core.artellalib.
resume_synchronization
()¶ Resumes synchronization of files from Artella server
-
artellapipe.libs.artella.core.artellalib.
spigot_listen
(cli, app_id, handler)¶ Function that creates Spigot Thread. We use it in non DCC Python apps to properly close thread when the app is closed :param cli: SpigotClient :param appId:str :param handler: fn
-
artellapipe.libs.artella.core.artellalib.
split_version
(name, next_version=False)¶ Returns the version of a specific given asset (model_v001, return [v001, 001, 1]) :param name: str :param next_version: bool :return: list(str, int, int)
-
artellapipe.libs.artella.core.artellalib.
synchronize_file
(file_path)¶ Synchronize the specific given file, if exists :param file_path: str :return:
-
artellapipe.libs.artella.core.artellalib.
synchronize_path
(path)¶ Synchronize all the content of the given path, if exists :param path: str
-
artellapipe.libs.artella.core.artellalib.
synchronize_path_with_folders
(file_path, recursive=False, only_latest_published_versions=True)¶ Synchronizes given path and all its folders :param file_path: str :param recursive: bool :param only_latest_published_versions: bool :return:
-
artellapipe.libs.artella.core.artellalib.
unlock_file
(file_path, **kwargs)¶ Unlocks a given file path :param file_path:
-
artellapipe.libs.artella.core.artellalib.
update_artella_paths
()¶ Updates system path to add artella paths if they are not already added :return:
-
artellapipe.libs.artella.core.artellalib.
update_local_artella_root
()¶ Updates the environment variable that stores the Artella Local Path NOTE: This is done by Artella plugin when is loaded, so we should not do it manually again
-
artellapipe.libs.artella.core.artellalib.
upload_file
(file_path, comment)¶ Uploads a new version of the given file to Artella server :param file_path: str :param comment: str
-
artellapipe.libs.artella.core.artellalib.
upload_new_asset_version
(file_path=None, comment='Published new version with Artella Pipeline', skip_saving=False)¶ Adds a new file to the Artella server :param file_path: :param comment: :param skip_saving: When we publish textures we do not want to save the maya scene
-
artellapipe.libs.artella.core.artellalib.
within_artella_scene
()¶ Returns True if the current Maya scene corresponds to a Artella Maya scene :return: bool