nomenclator.utilities¶
-
nomenclator.utilities.fetch_next_version(path, pattern, token_mapping)[source]¶ Fetch next version from scene files saved in path.
Parameters: - path – Path to fetch scene files from.
- pattern – Pattern to compare scene files with.
- token_mapping – Mapping regrouping resolved token values associated with their name.
Returns: version integer.
-
nomenclator.utilities.fetch_version(scene_path, pattern, token_mapping)[source]¶ Fetch version from scene path.
Parameters: - scene_path – Path to the scene file to analyze.
- pattern – Pattern to compare scene file with.
- token_mapping – Mapping regrouping resolved token values associated with their name.
Returns: version integer, or None if no version is found.
-
nomenclator.utilities.fetch_template_config(path, template_configs, token_mapping)[source]¶ Return template configuration compatible with path.
Incoming token mapping will be mutated with new token values extracted from matching template configuration.
Parameters: - path – Path to extract template configuration from.
- template_configs – List of available
TemplateConfiginstances - token_mapping – Mapping regrouping resolved token values associated with their name. It will be updated with new token found.
Returns: TemplateConfigInstance or None.
-
nomenclator.utilities.fetch_output_template_config(path, template_configs)[source]¶ Return output template configuration compatible with path.
Incoming token mapping will be mutated with new token values extracted from matching template configuration.
Parameters: - path – Path to extract template configuration from.
- template_configs – List of available
OutputTemplateConfiginstances
Returns: OutputTemplateConfigInstance or None.
-
nomenclator.utilities.fetch_nodes()[source]¶ Fetch all available output nodes in the graph with all node names.
Returns: tuple with a list of output nodes and a list all available node names.
-
nomenclator.utilities.fetch_recent_comp_paths(max_values=10)[source]¶ Return list of paths recently used to save a composition.
Parameters: max_values – Maximum number of recent composition paths to return Returns: List of recent composition paths.
-
nomenclator.utilities.fetch_recent_project_paths(max_values=10)[source]¶ Return list of paths recently used to save a project.
Parameters: max_values – Maximum number of recent composition paths to return Returns: List of recent composition paths.
-
nomenclator.utilities.fetch_paddings(max_value=5)[source]¶ Return all available paddings if notation requested.
Parameters: max_value – Maximum padding number to use. Returns: List of available paddings.
-
nomenclator.utilities.fetch_current_comp_path()[source]¶ Return current composition path.
Returns: Path to current ‘nk’ file or empty string.
-
nomenclator.utilities.fetch_current_project_path()[source]¶ Return current project path.
Returns: Path to current ‘hrox’ file or empty string.
-
nomenclator.utilities.fetch_output_path(node)[source]¶ Return output path from node.
Parameters: node – nuke.Nodeinstance.Returns: Output path.
-
nomenclator.utilities.fetch_colorspace(node, alias_mapping)[source]¶ Return colorspace value from node.
Parameters: - node –
nuke.Nodeinstance. - alias_mapping – Mapping containing alias to replace some values.
Returns: Colorspace value, or “none” if node does not have a ‘colorspace’ knob.
- node –
-
nomenclator.utilities.fetch_file_type(node, default_value)[source]¶ Return file type from node.
Parameters: - node –
nuke.Nodeinstance. - default_value – Default value to return if no file type is set.
Returns: File type value.
- node –
-
nomenclator.utilities.fetch_file_types(node)[source]¶ Return list of available file types for node.
Parameters: node – nuke.Nodeinstance.Returns: Tuple containing all available file types.
-
nomenclator.utilities.has_multiple_views(node)[source]¶ Indicate whether node is configured with multiple views.
Parameters: node – nuke.Nodeinstance.Returns: Boolean value.