artellapipe.core.asset module¶
Module that contains definitions for asset in Artella
-
class
artellapipe.core.asset.ArtellaAsset(project, asset_data, category=None, node=None)¶ Bases:
artellapipe.core.abstract.AbstractAsset,object-
ASSET_FILES= {}¶
-
ASSET_TYPE= None¶
-
export_shaders()¶ Exports shaders of current asset This function generates 2 files: 1. Shader JSON files which are stored inside Shaders Library Path 2. Asset Shader Description file, which maps the asset geometry to their respective shader :return: str
-
get_artella_data(force_update=False)¶ Retrieves status data of the asset from Artella :param force_update: bool, Whether to resync data if it is already synced :return: ArtellaAssetMetaData
-
get_artella_url()¶ Returns Artella URL of the asset :return: str
-
get_category()¶ Implements abstract get_thumbnail_icon function Returns the category of the asset :return: str
-
get_file(file_type, status, extension=None, fix_path=False)¶ Returns file path of the given file type and status :param file_type: str :param status: str :param extension: str :param fix_path: str
-
get_file_type(file_type, extension=None)¶ Returns asset file object of the current asset and given file type :param file_type: str :param extension: str :return: ArtellaAssetType
-
get_icon()¶ Returns the icon of the asset depending of the category :return: QIcon
-
get_latest_local_versions(status=None, file_types=None)¶ Returns latest local version of the given asset file types :param file_types: list (optional) :return: dict
-
get_local_versions(status=None, file_types=None)¶ Returns all local version of the given asset file types and with the given status :param status: ArtellaAssetFileStatus :param file_types: :return:
-
get_name()¶ Implements abstract get_name function Returns the name of the asset :return: str
-
get_path()¶ Implements abstract get_path function Returns the path of the asset :return: str
-
get_shading_type(**kwargs)¶ Returns the asset file type of the shading file for the project :return: str
-
get_valid_file_types()¶ Returns a list with all valid file types of current asset :return: list(str)
-
is_available()¶ Returns whether or not asset is available locally or not :return: bool
-
open_file(file_type, status, extension=None, fix_path=True)¶ Opens asset file with the given type and status (if exists) :param file_type: str :param status: str :param extension: str :param fix_path: bool :return: bool
-
open_in_artella()¶ Opens current asset in Artella web
-
property
project¶ Returns project linked to this assset :return: ArtellaProject
-
reference_file(file_type, status, extension=None, fix_path=True)¶ References asset file with the given type and status :param file_type: str :param status: str :param fix_path: bool :return: bool
-
sync(file_type, sync_type)¶ Synchronizes asset file type and with the given sync type (working or published) :param asset_type: str, type of asset file :param sync_type: str, type of sync (working, published or all) :param ask: bool, Whether user will be informed of the sync operation before starting or not
-
sync_latest_published_files(file_type=None, ask=False)¶ Synchronizes all latest published files for current asset :param file_type: str, if not given all files will be synced
-
view_locally()¶ Opens folder where item is located locally
-
-
class
artellapipe.core.asset.ArtellaAssetFileStatus¶ Bases:
object-
PUBLISHED= 'published'¶
-
WORKING= 'working'¶
-
static
is_valid(status)¶ Returns whether given status is valid or not :param status: str :return: bool
-
-
class
artellapipe.core.asset.ArtellaAssetWidget(asset, parent=None)¶ Bases:
tpQtLib.core.base.BaseWidget,object-
ASSET_INFO_CLASS¶
-
DEFAULT_ICON= None¶
-
THUMB_SIZE= (200, 200)¶
-
property
asset¶ Returns asset data :return: ArtellaAsset
-
clicked= <PySide2.QtCore.Signal object>¶
-
get_asset_info()¶ Retruns AssetInfo widget associated to this asset :return: AssetInfoWidget
-
get_main_layout()¶ Function that generates the main layout used by the widget Override if necessary on new widgets :return: QLayout
-
get_thumbnail_icon()¶ Implements abstract get_thumbnail_icon function Returns the icon of the asset :return: QIcon
-
setup_signals()¶ Function that set up signals of the widget
-
startSync= <PySide2.QtCore.Signal object>¶
-
staticMetaObject= <PySide2.QtCore.QMetaObject object>¶
-
ui()¶ Function that sets up the ui of the widget Override it on new widgets (but always call super)
-
-
class
artellapipe.core.asset.ArtellaTagNode(project, node, tag_info=None)¶ Bases:
object-
get_asset_node()¶ Returns asset node linked to this tag node :return: ArtellaAssetNode
-
get_clean_node()¶ Returns current node with the short name and with ids removed :return: str
-
get_tag_type()¶ Returns the type of the tag :return: str
-
property
node¶ Returns linked to the tag node :return: str
-
property
tag_info¶ Returns tag info data stored in this node :return: dict
-