def _get_asset_data(self): """ Get all available asset data joint `data` key with asset.data dict into the representaion """ asset_name = self.context["representation"]["context"]["asset"] self.data["assetData"] = pype.get_asset(asset_name)["data"]
def __init__(self, root_node=None, nodes=None, **kwargs): self._project = kwargs.get("project") or io.find_one( {"type": "project"}) self._asset = kwargs.get("asset_name") or api.Session["AVALON_ASSET"] self._asset_entity = pype.get_asset(self._asset) self._root_node = root_node or nuke.root() self._nodes = self.get_nodes(nodes=nodes) self.data = kwargs