tde_io

tde_io.genDepFile(dep_file, asset_info, additional_deps=None, brain=None)
tde_io.get_asset_info(node, brain)

Queries the asset information of the selected asset

Parameters:
  • node – nr_tde node as {‘node’: tde4.node, ‘name’: <node_name>, ‘file_path’: <asset_file_path>}
  • brain – an instance of an initialized nreal_brain
Returns:

the asset information dictionary for the given tde4 node

tde_io.get_local_assetsInfo()

Reads the project asset information from the projects notes and return them as dictionary

Returns:dict of {‘<asset_name>: info_dict{}, ….etc}
tde_io.get_project_nodes(brain, node_type='')

Gets list of all assets used in the project, both pipeline assets and internally created assets will be returned

Parameters:
  • brain
  • node_type – if given, only nodes of this type will be returned (valid types: pgroup, lens, camera [geo is returned with pgroup])
Returns:

list of {‘node’: <tde4_node>, ‘name’: <node_name>, ‘file_path’: <asset_file_path_if_available_for_the_found_node>} dicts

tde_io.get_selected_nodes(brain)

builds a dictionary from the information of the first selected object in the Object Browser Note: only “Cameras”, “Lenses” and “3DModels” are respected in selections, then first one to be found in selection list will be used to return the node dict object.

Returns:nr_tde_node as dict of {‘node’: tde4.node, ‘type’: <type>, ‘name’: <node_name>, ‘file_path’: <asset_file_path>}
tde_io.get_version(node, brain)

Get the version of the given node :param brain: pre-initialized instance of the nreal_brain :param node: :return: float(version)

tde_io.is_asset(node_name)
tde_io.load_asset(self, depFile_data, method, for_asset, for_context, ignore_dup=True, database_data={}, **kwargs)
tde_io.load_lens(lens_path, cam_id=None, lens_node=None, lens_name=None)
tde_io.open_project(self, asset_file, asset_type, database_data={}, **kwargs)
tde_io.retarget_asset(self, current_process, srcRetargetFiles, dst_refNode_patterns, for_asset='', for_context='', ignore_dup=True, database_data={}, deps_data=[], **kwargs)

Retarget wont be needed in Katana, you may think about deleting the following code in the future

tde_io.retarget_footage_path(from_str='', to_str='')
tde_io.transcode_and_load(self, depFile_data, method, for_asset, for_context, ignore_dup=True, database_data={})
tde_io.update_assets_info(dep_info=None, sync_only=False, brain=None)

updates the project notes edit text by the current project assets as json format :param dep_info: the depFile_data of the asset to be added or modified in the json phrase of the project note :param sync_only: if True, then the dep_info will be ignored and the function will loop over the available assets and

delete whatever not exist from the json phrase
Returns:the asset_info json formatted string
tde_io.update_nodes_version(brain, nodes=None)

loop over the script nodes and set the internal node version to match the file version it references :param nodes: list of nuke nodes, if None, all nodes will be updated whenever this is possible :param brain: pre-initialized instance of the nreal_brain :return: