nomenclator.context¶
-
class
nomenclator.context.
Context
(location_path, recent_locations, path, suffix, version, description, descriptions, append_username_to_name, padding, paddings, create_subfolders, tokens, username, template_configs, outputs, error)¶ Bases:
tuple
Context Structure type.
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
append_username_to_name
¶ Alias for field number 7
-
count
()¶ Return number of occurrences of value.
-
create_subfolders
¶ Alias for field number 10
-
description
¶ Alias for field number 5
-
descriptions
¶ Alias for field number 6
-
error
¶ Alias for field number 15
-
index
()¶ Return first index of value.
Raises ValueError if the value is not present.
-
location_path
¶ Alias for field number 0
-
outputs
¶ Alias for field number 14
-
padding
¶ Alias for field number 8
-
paddings
¶ Alias for field number 9
-
path
¶ Alias for field number 2
-
recent_locations
¶ Alias for field number 1
-
suffix
¶ Alias for field number 3
-
template_configs
¶ Alias for field number 13
-
tokens
¶ Alias for field number 11
-
username
¶ Alias for field number 12
-
version
¶ Alias for field number 4
-
-
class
nomenclator.context.
OutputContext
(name, new_name, blacklisted_names, path, old_path, passname, enabled, destination, destinations, file_type, file_types, multi_views, colorspace, append_username_to_name, append_colorspace_to_name, append_passname_to_name, append_passname_to_subfolder, error)¶ Bases:
tuple
Output Context Structure type.
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
append_colorspace_to_name
¶ Alias for field number 14
-
append_passname_to_name
¶ Alias for field number 15
-
append_passname_to_subfolder
¶ Alias for field number 16
-
append_username_to_name
¶ Alias for field number 13
-
blacklisted_names
¶ Alias for field number 2
-
colorspace
¶ Alias for field number 12
-
count
()¶ Return number of occurrences of value.
-
destination
¶ Alias for field number 7
-
destinations
¶ Alias for field number 8
-
enabled
¶ Alias for field number 6
-
error
¶ Alias for field number 17
-
file_type
¶ Alias for field number 9
-
file_types
¶ Alias for field number 10
-
index
()¶ Return first index of value.
Raises ValueError if the value is not present.
-
multi_views
¶ Alias for field number 11
-
name
¶ Alias for field number 0
-
new_name
¶ Alias for field number 1
-
old_path
¶ Alias for field number 4
-
passname
¶ Alias for field number 5
-
path
¶ Alias for field number 3
-
-
nomenclator.context.
fetch
(config, is_project=False)[source]¶ Fetch context object.
Parameters: - config –
Config
instance. - is_project – Indicate whether the project context is requested. Default is False, which means that the composition context will be returned.
Returns: Context
instance.- config –
-
nomenclator.context.
fetch_outputs
(config, template_configs)[source]¶ Fetch list of output context objects.
An output context is returned for each matching output node.
Parameters: - config –
Config
instance. - template_configs – List of
OutputTemplateConfig
instances.
Returns: Tuple of
OutputContext
instances.- config –
-
nomenclator.context.
update
(context, discover_next_version=True)[source]¶ Return updated context object with generated paths.
Incoming context will not be mutated.
Parameters: - context –
Context
instance. - discover_next_version – Indicate whether the next version of the scene should be discovered and added to the context. Default is True. Otherwise, the version of the current scene is added to the context.
Returns: updated
Context
instance.- context –
-
nomenclator.context.
update_outputs
(contexts, template_configs, token_mapping, ignore_errors=False)[source]¶ Return updated output context objects with generated paths.
Incoming contexts will not be mutated.
Parameters: - contexts – :Tuple of
OutputContext
instances. - template_configs – List of available
OutputTemplateConfig
instances. - token_mapping – Mapping regrouping resolved token values associated with their name.
- ignore_errors – Indicate whether errors should be ignored.
Returns: Tuple of
OutputContext
instances.- contexts – :Tuple of