| Command | Type | Description |
|---|---|---|
flame.clear_graphics_memory() |
Function | flame.flush_graphics_memory() has been renamed and deprecated. |
flame.clear_unreferenced_cache() |
Function | Clear cached media that is no longer referenced by any clip in either the current project or any other project. all_projects parameter can be set to True to clear unreferenced cache in all available projects. |
# Will reclaim space used by unreferenced cache in current project (aka cache of deleted clip)
flame.clear_unreferenced_cache()
# Will reclaim space used by unreferenced cache in all projects (aka cache of deleted clip)
flame.clear_unreferenced_cache(all_projects=True)
| Command | Type | Description |
|---|---|---|
<PyActionFamilyNode>.get_metadata() |
Function | Used to get information about the metadata keys of an Action node or one of its inputs. Three optional arguments can be passed:
|
# Get all the metadata keys and values of a new PyAction node. If no socket is defined, the Result socket of the current Output is used.
action = flame.batch.create_node("Action")
print(action.get_metadata())
# Get all the metadata keys and values of a Media layer.
print(action.get_metadata("media1"))
| Command | Type | Description |
|---|---|---|
<PyAudioTrack>.stereo_merge() |
Function | Used to convert two mono audio tracks with the same editorial structure into a single stereo audio track. It is mandatory to pass a second PyAudioTrack object as an argument:
|
<PyBatch>.create_node() is not new, but serves as a reminder of how to create a Metadata node in Batch.
| Command | Type | Description |
|---|---|---|
<PyBatch>.create_node() |
Function | Used to create a Metadata node. |
# Create a Metadata node in the current Batch Group.
flame.batch.create_node("Metadata")
| Command | Type | Description |
|---|---|---|
<PyClip>.clear_renders() |
Function | <PyClip>.flush_renders() has been renamed and deprecated. |
<PyClip>.clear_cache_media() |
Function | <PyClip>.flush_cache_media() has been renamed and deprecated. |
<PyClip>.get_metadata() |
Function | Used to get information about the metadata keys of a Clip. Two optional arguments can be passed:
|
<PyClip>.tape_name |
Read-Only Property | Used to get the clip's tape name. |
<PyClip>.update_sources |
Function | Used to update the clip external sources. An optional argument can be passed
|
<PyClip>.version_uids |
Read-Only Property | Used to list the versions available for a source clip. Only available on single segment clips. |
<PyClip>.version_uid |
Read-Only Property | Used to get the current version of a source clip. Only available on single segment clips. |
| Command | Type | Description |
|---|---|---|
<PyClipNode>.get_metadata() |
Function | Used to get information about the metadata keys of a Clip node. Three optional arguments can be passed:
|
<PyClipNode>.get_tokenized_metadata() |
Function | Used to get information about the metadata keys of a Clip without resolving tokens. Two optional arguments can be passed:
|
<PyClipNode>.set_metadata_discarded() |
Function | Used to enable or disable the discard status of a key in a Clip node. Two mandatory and one optional arguments must be passed:
|
<PyClipNode>.set_metadata_key() |
Function | Used to set the name of a metadata key in a Clip node. One mandatory and two optional arguments must be passed:
|
<PyClipNode>.set_metadata_value() |
Function | Used to set the value of a metadata key in a Clip node. Two mandatory and one optional arguments must be passed:
|
<PyClipNode>.output_channel_as_metadata_key() |
Function | Used to output the content of a channel as a metadata key. Two arguments must be passed:
|
# Get all the metadata keys and values of a Clip node.
print(<PyClipNode>.get_metadata())
# Get all the metadata keys and values for a specific channel of a Multi-Channel Clip node.
print(<PyClipNode>.get_metadata("albedo"))
# Get the value for a specific key of a Clip node.
# The first argument is the socket_name, the second one is the key.
print(<PyClipNode>.get_metadata("Default", "focus"))
# Edit the name of a metadata key (string) of a Clip node.
# The first argument is the socket_name, the second one is the name of the key, and the third one is the new name for that key.
<PyClipNode>.set_metadata_key("Default", "key name", "modified key name")
# Restore the name of a renamed key in a Clip node.
# The first argument is the socket_name, the second one is the key, and the third one is discarded or can be set to None.
<PyClipNode>.set_metadata_key("Default", "key name")
<PyClipNode>.set_metadata_key("Default", "key name", None)
# Edit the metadata value (string) of a Clip node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
<PyClipNode>.set_metadata_value("Default", "focus", "100")
# Edit the metadata value (integer) of a Clip node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
<PyClipNode>.set_metadata_value("Default", "focus", 100)
# Edit the metadata value (float) of a Clip node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
<PyClipNode>.set_metadata_value("Default", "focus", 100.12)
# Edit the metadata value in the channel of a Multi-Channel Clip node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
<PyClipNode>.set_metadata_value("albedo", "CameraFOV", 100.12)
# Reset the value of key in Clip node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
# When value is set to None, the original value is restored.
<PyClipNode>.set_metadata_value("Default", "focus", None)
# Add a new key and set its value in the metadata of a Clip node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
<PyClipNode>.set_metadata_value("Default", "Application", "Flame")
# Delete an added key in a Clip node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
# The value must be set to None for the key to be deleted.
<PyClipNode>.set_metadata_value("Default", "Application", None)
# Set the Discard status for a key in a Clip node.
# The first argument is the socket_name, the second one is the key, and the third one is discarded.
<PyClipNode>.set_metadata_discarded("Default", "focus", True)
# Restore a discarded key in a Clip node.
# The first argument is the socket_name, the second one is the key, and the third one is discarded.
<PyClipNode>.set_metadata_discarded("Default", "focus", False)
| Command | Type | Description |
|---|---|---|
<PyMarker>.clear_annotations() |
Function | Used to clear all annotations from a marker. |
<PyMarker>.has_annotations |
Read-Only Property | Indicates whether a marker has annotations. |
# Find which Markers have annotations in the current Sequence.
for marker in flame.timeline.clip.markers:
if marker.has_annotations:
print(marker.name)
# Clear all the annotations in a Sequence.
for marker in flame.timeline.clip.markers:
if marker.has_annotations:
marker.clear_annotations()
| Command | Type | Description |
|---|---|---|
<PyMetadataNode>.get_metadata() |
Function | Used to get information about the metadata keys of a Metadata node or one of its inputs. Three optional arguments can be passed:
|
<PyMetadataNode>.get_tokenized_metadata() |
Function | Used to get information about the metadata keys of a Metadata node or one of its inputs without resolving tokens. Three optional arguments can be passed:
|
<PyMetadataNode>.load_node_setup() |
Function | Used to load a setup in the Metadata node. The complete path to the setup, including the file name, must be passed as an argument. The following arguments can also be set to True or False to apply modifications or discard keys when the setup is loaded. All arguments are set to True by default.
|
<PyMetadataNode>.set_metadata_discarded() |
Function | Used to enable or disable the discard status of a key in a Metadata node. Two mandatory arguments must be passed:
|
<PyMetadataNode>.set_metadata_key() |
Function | Used to set the name of a metadata key in a Metadata node. One mandatory and two optional arguments must be passed:
|
<PyMetadataNode>.set_metadata_value() |
Function | Used to set the value of a metadata key in a Metadata node. Two mandatory arguments must be passed:
|
# Get all the metadata keys and values of a Metadata node.
print(<PyMetadataNode>.get_metadata())
# Get the value for a specific key in a Metadata node
# The first argument is the socket_name, the second one is the key.
print(<PyMetadataNode>.get_metadata("Default", "focus"))
# Edit the name of a metadata key (string) in a Metadata node, without specifying an output socket.
# The first argument is the name of the key and the second one is the new name for that key.
<PyMetadataNode>.set_metadata_key(key = "key name", name = "new key name")
# Restore the name of a renamed key in a Metadata node.
# The first argument is the socket_name (always Result or Default for a Metadata node), the second one is the key, and the third one is discarded or can be set to None.
<PyMetadataNode>.set_metadata_key("Result", "key name")
<PyMetadataNode>.set_metadata_key("Result", "key name", None)
# Edit the metadata value (string) of a Metadata node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
<PyMetadataNode>.set_metadata_value("Default", "focus", "100")
# Edit the metadata value (integer) of a Metadata node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
<PyMetadataNode>.set_metadata_value("Default", "focus", 100)
# Edit the metadata value (float) of a Metadata node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
<PyMetadataNode>.set_metadata_value("Default", "focus", 100.12)
# Reset the value of key in a Metadata node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
# When value is set to None, the original value is restored.
<PyMetadataNode>.set_metadata_value("Default", "focus", None)
# Add a new key and set its value in the metadata of a Metadata node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
<PyMetadataNode>.set_metadata_value("Default", "Application", "Flame")
# Delete an added key in a Metadata node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
# The value must be set to None for the key to be deleted.
<PyMetadataNode>.set_metadata_value("Default", "Application", None)
# Set the Discard status for a key in a Metadata node.
# The first argument is the socket_name, the second one is the key, and the third one is discarded.
<PyMetadataNode>.set_metadata_discarded("Default", "focus", True)
# Restore a discarded key in a Metadata node.
# The first argument is the socket_name, the second one is the key, and the third one is discarded.
<PyMetadataNode>.set_metadata_discarded("Default", "focus", False)
# Load a setup in the Metadata node and only apply the added_keys.
<PyMetadataNode>.load_node_setup('/var/tmp/mysetup.metadata_node', edited_keys=False, discarded_keys=False, added_keys=True, replaced_keys=False)
| Command | Type | Description |
|---|---|---|
<PyMetadataTimelineFX>.get_metadata() |
Function | Used to get information about the metadata keys of a Source Metadata Timeline FX. Two optional arguments can be passed:
|
<PyMetadataTimelineFX>.get_tokenized_metadata() |
Function | Used to get information about the metadata keys of a Source Metadata Timeline FX without resolving tokens. Two optional arguments can be passed:
|
<PyMetadataTimelineFX>.load_setup() |
Function | Used to load a setup in the Source Metadata Timeline FX. The complete path to the setup, including the file name, must be passed as an argument. The following arguments can also be set to True or False to apply modifications or discard keys when the setup is loaded. All arguments are set to True by default.
|
<PyMetadataTimelineFX>.set_metadata_discarded() |
Function | Used to enable or disable the discard status of a key in a Source Metadata Timeline FX. Two mandatory arguments must be passed:
|
<PyMetadataTimelineFX>.set_metadata_key() |
Function | Used to set the name of a metadata key in a Metadata Timeline FX. One mandatory and one optional arguments must be passed:
|
<PyMetadataTimelineFX>.set_metadata_value() |
Function | Used to set the metadata value of a key in a Source Metadata Timeline FX. Two mandatory arguments must be passed:
|
# Get all the metadata keys and values of a Source Metadata Timeline FX.
print(<PyMetadataTimelineFX>.get_metadata())
# Get the value for a specific key in a Source Metadata Timeline FX.
# The argument is the key.
print(<PyMetadataTimelineFX>.get_metadata("focus"))
# Edit the name of a metadata key (string) in a Source Metadata Timeline FX.
# The first argument is the name of the key and the second one is the new name for that key.
<PyMetadataTimelineFX>.set_metadata_key("key name", "new key name")
# Restore the name of a renamed key in a Source Metadata Timeline FX.
# The first argument is the key and the second one is discarded or can be set to None.
<PyMetadataTimelineFX>.set_metadata_key("key name")
<PyMetadataTimelineFX>.set_metadata_key("key name", None)
# Edit the metadata value (string) of a Source Metadata Timeline FX.
# The first argument is the key, and the second one is the value.
<PyMetadataTimelineFX>.set_metadata_value("focus", "100")
# Edit the metadata value (integer) of a Source Metadata Timeline FX.
# The first argument is the key, and the second one is the value.
<PyMetadataTimelineFX>.set_metadata_value("focus", 100)
# Edit the metadata value (float) of a Source Metadata Timeline FX.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
<PyMetadataTimelineFX>.set_metadata_value("focus", 100.12)
# Reset the value of key in a Source Metadata Timeline FX.
# The first argument is the key, and the second one is the value.
# When value is set to None, the original value is restored.
<PyMetadataTimelineFX>.set_metadata_value("focus", None)
# Add a new key and set its value in the metadata of a Source Metadata Timeline FX.
# The first argument is the key, and the second one is the value.
<PyMetadataTimelineFX>.set_metadata_value("Application", "Flame")
# Delete an added key in a Source Metadata Timeline FX.
# The first argument is the key, and the second one is the value.
# The value must be set to None for the key to be deleted.
<PyMetadataTimelineFX>.set_metadata_value("Application", None)
# Set the Discard status for a key in a Source Metadata Timeline FX.
# The first argument is the key, and the second one is discarded.
<PyMetadataTimelineFX>.set_metadata_discarded("focus", True)
# Restore a discarded a key in a Source Metadata Timeline FX.
# The first argument is the key, and the second one is discarded.
<PyMetadataTimelineFX>.set_metadata_discarded("focus", False)
# Load a setup in the Metadata Timeline FX and only apply the edited_keys.
<PyMetadataTimelineFX>.load_setup('/var/tmp/mysetup.metadata_node', edited_keys=True, discarded_keys=False, added_keys=False)
| Command | Type | Description |
|---|---|---|
<PyNode>.create_marker() |
Function | Used to add a Marker to a Node. The following argument must be passed:
|
<PyNode>.get_metadata() |
Function | Used to get information about the metadata keys of a node or one of its inputs. Three optional arguments can be passed:
|
<PyNode>.markers |
Read-Only Property | Used to get a list of markers on a node. |
<PyNode>.output_channel_as_metadata_key() |
Function | Used to output the content of a channel as a metadata key. Two arguments must be passed:
|
<PyNode>.set_expression() |
Function | Used to set an expression on a channel. Two mandatory arguments must be passed:
|
<PyNode>.get_expression() |
Function | Used to get the expression set on a channel. One mandatory argument must be passed:
|
<PyNode>.clear_expression() |
Function | Used to clear the expression set on a channel. One mandatory argument must be passed:
|
<PyNode>.bake_expression() |
Function | Used to bake the expression set on a channel into keyframes. Four mandatory arguments must be passed:
|
# Get all the metadata keys and values of a new PyNode node. If no socket is defined, the Result socket is used.
flip = flame.batch.create_node("Flip")
print(flip.get_metadata())
# Output the content of the X Position channel of a 2D Transform node as a metadata key.
dd = flame.batch.create_node("2D Transform")
dd.output_channel_as_metadata_key("AxisTransform.Position.X", True)
# Stop outputting the content of the X Position channel of a 2D Transform node as a metadata key.
flame.batch.current_node.output_channel_as_metadata_key("AxisTransform.Position.X", False)
Examples of how the set_expression() and bake_expression() functions can be used to propagate information in the metadata keys of a clip to parameters of a Camera object in an Action node are available in the propagate_metadata_to_action_camera.py file, located in /opt/autodesk/<application version>/python_utilities/examples.
| Command | Type | Description |
|---|---|---|
<PyNodeMarker>.clear_annotations() |
Function | Used to clear all annotations from a marker. |
<PyNodeMarker>.has_annotations |
Read-Only Property | Indicates whether a marker has annotations. |
<PyNodeMarker>.name |
Attribute | Used to get or set the Marker's name. A string must be passed as the argument when the name is set. |
<PyNodeMarker>.tokenized_name |
Attribute | Used to get or set the Marker's tokenized name. A string must be passed as the argument when the tokenized name is set. |
<PyNodeMarker>.dynamic_name |
Attribute | Used to get or set the status of the Dynamic option for the name. True or False must be passed as an argument when the status is set. |
<PyNodeMarker>.comment |
Attribute | Used to get or set the Marker's comment. A string must be passed as the argument when the comment is set. |
<PyNodeMarker>.tokenized_comment |
Attribute | Used to get or set the Marker's tokenized comment. A string must be passed as the argument when the tokenized comment is set. |
<PyNodeMarker>.dynamic_comment |
Attribute | Used to get or set the status of the Dynamic option for the comment. True or False must be passed as an argument when the status is set. |
<PyNodeMarker>.location |
Attribute | Used to get or set the Marker's location. An integer number representing a frame must be passed when the location is set. |
<PyNodeMarker>.duration |
Attribute | Used to get or set the Marker's duration. An integer number representing a duration must be passed when the duration is set. |
<PyNodeMarker>.colour |
Attribute | Used to get or set the Marker's colour. A tuple containing three float numbers representing the red, green, and blue values must be passed as an argument when the colour is set. |
<PyNodeMarker>.colour_label |
Attribute | Used to get or set the Marker's colour label. A string representing the name of a colour label must be passed as an argument when the colour is set. |
<PyNodeMarker>.locked_location |
Attribute | Used to get or set the status of the Marker's lock option. True or False must be passed as an argument when the status is set. |
<PyNodeMarker>.selected |
Attribute | Used to get or set the selection status of the Marker. True or False must be passed as an argument when the status is set. |
| Command | Type | Description |
|---|---|---|
<PyRenderNode>.basic_metadata |
Attribute | Used to get or set the status of the Basic Metadata option. One of the following must be passed as the argument when the attribute is set:
|
<PyRenderNode>.basic_metadata_input |
Attribute | Used to get or set the status of the Basic Metadata Input option. One of the following must be passed as the argument when the attribute is set:
|
<PyRenderNode>.get_metadata() |
Function | Used to get information about the metadata keys of a Render node. Three optional arguments can be passed:
|
<PyRenderNode>.get_tokenized_metadata() |
Function | Used to get information about the metadata keys of a Render node without resolving tokens. Three optional arguments can be passed:
|
<PyRenderNode>.set_metadata_discarded() |
Function | Used to enable or disable the discard status of a key in a Render node. Two mandatory and one optional arguments must be passed:
|
<PyRenderNode>.set_metadata_key() |
Function | Used to set the name of a metadata key in a Render node. One mandatory and one optional arguments must be passed:
|
<PyRenderNode>.set_metadata_value() |
Function | Used to set the value of a metadata key in a Render node. Two mandatory and one optional arguments must be passed:
|
# Get all the metadata keys and values of a Render node.
print(<PyRenderNode>.get_metadata())
# Get the value for a specific key in a Render node.
# The first argument is the socket_name, the second one is the key.
print(<PyRenderNode>.get_metadata("Default", "focus"))
# Edit the name of a metadata key (string) in a Render node.
# The first argument is the socket_name (a channel name or Default for a Render node), the second one is the key, and the third one is the new name for that key.
<PyRenderNode>.set_metadata_key("channel name", "key name", "new key name")
# Restore the name of a renamed key in a Render node.
# The first argument is the socket_name (a channel name for a Render node), the second one is the key, and the third one is discarded or can be set to None.
<PyRenderNode>.set_metadata_key("channel name", "key name")
<PyRenderNode>.set_metadata_key("channel name", "key name", None)
# Edit the metadata value (string) of a Render node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
<PyRenderNode>.set_metadata_value("Default", "focus", 100)
# Edit the metadata value (integer) of a Render node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
<PyRenderNode>.set_metadata_value("Default", "focus", 100)
# Edit the metadata value (float) of a Render node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
<PyRenderNode>.set_metadata_value("Default", "focus", 100.12)
# Reset the value of key in a Render node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
# When value is set to None, the original value is restored.
<PyRenderNode>.set_metadata_value("Default", "focus", None)
# Add a new key and set its value in the metadata of a Render node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
<PyRenderNode>.set_metadata_value("Default", "Application", "Flame")
# Delete an added key in a Render node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
# The value must be set to None for the key to be deleted.
<PyRenderNode>.set_metadata_value("Default", "Application", None)
# Set the Discard status for a key in a Render node.
# The first argument is the socket_name, the second one is the key, and the third one is discarded.
<PyRenderNode>.set_metadata_discarded("Default", "focus", True)
# Restore a discarded a key in a Render node.
# The first argument is the socket_name, the second one is the key, and the third one is discarded.
<PyRenderNode>.set_metadata_discarded("Default", "focus", False)
The <PyRenderNode>.format attribute has been deprecated since its corresponding option inside the Render node user interface is no longer available.
<PySegment>.create_effect() is not new, but serves as a reminder of how to create a Source Metadata Timeline FX on a Timeline Segment.
| Command | Type | Description |
|---|---|---|
<PySegment>.create_effect() |
Function | Used to create a Metadata Source Timeline FX. |
<PySegment>.create_unlinked_segment() |
Function | The timewarp_speed argument has been added to create_unlinked_segment function. Use the timewarp_speed argument to create a Timewarp Timeline FX on the segment created from a Gap. The speed can be a float or integer value and can be a negative value, zero, or a positive value. The head value remains the first frame of the segment with any of the timewarp values. |
<PySegment>.get_metadata() |
Function | Used to get information about the metadata keys of a timeline segment. Two optional arguments can be passed:
|
# Create a Source Metadata Timeline FX on the selected segment.
flame.timeline.current_segment.create_effect("Source Metadata")
# Turn a gap into a timeline segment with a Timewarp Timeline FX of 50% on it.
flame.timeline.current_segment.create_unlinked_segment(timewarp_speed = 50.0)
| Command | Type | Description |
|---|---|---|
<PyTimelineFX>.clear_maps_cache_media() |
Function | <PyTimelineFX>.flush_maps_cache_media() has been renamed and deprecated. |
<PyTimelineFX>.output_channel_as_metadata_key() |
Function | Used to output the content of a channel as a metadata key. Two arguments must be passed:
|
create_marker() and get_metadata() listed in the PyNode section are also available on a PyTimelineFX object.# Output the content of the X Position channel of a 2D Transform Timeline FX as a metadata key.
dd = flame.timeline.current_segment.create_effect("2D Transform")
dd.output_channel_as_metadata_key("AxisTransform.Position.X", True)
# Stop outputting the content of the X Position channel of a 2D Transform Timeline FX as a metadata key.
flame.timeline.current_segment.effects[0].output_channel_as_metadata_key("AxisTransform.Position.X", False)
| Command | Type | Description |
|---|---|---|
<PyTypeNode>.show_char_axis |
Attribute | Used to get or set the status of Show Axis for the Characters Axis. One of the following must be passed as the argument when the attribute is set:
|
<PyTypeNode>.show_char_pos |
Attribute | Used to get or set the status of Show Position for the Characters Axis. One of the following must be passed as the argument when the attribute is set:
|
<PyTypeNode>.show_layer_axis |
Attribute | Used to get or set the status of Show Axis for the Layer Axis. One of the following must be passed as the argument when the attribute is set:
|
<PyTypeNode>.show_para_axis |
Attribute | Used to get or set the status of Show Axis for the Paragraph Axis. One of the following must be passed as the argument when the attribute is set:
|
get_metadata() listed in the PyNode section are also available on PyTypeNode and PyTypeTimelineFX objects.| Command | Type | Description |
|---|---|---|
<PyWriteFileNode>.basic_metadata |
Attribute | Used to get or set the status of the Basic Metadata option. One of the following must be passed as the argument when the attribute is set:
|
<PyWriteFileNode>.basic_metadata_input |
Attribute | Used to get or set the status of the Basic Metadata Input option. One of the following must be passed as the argument when the attribute is set:
|
<PyWriteFileNode>.get_metadata() |
Function | Used to get information about the metadata keys of a Write File node. Three optional arguments can be passed:
|
<PyWriteFileNode>.get_tokenized_metadata() |
Function | Used to get information about the metadata keys of a Write File node without resolving tokens. Three optional arguments can be passed:
|
<PyWriteFileNode>.set_metadata_discarded() |
Function | Used to enable or disable the discard status of a key in a Write File node. Two mandatory and one optional arguments must be passed:
|
<PyWriteFileNode>.set_metadata_key() |
Function | Used to set the name of a metadata key in a Write File node. One mandatory and one optional arguments must be passed:
|
<PyWriteFileNode>.set_metadata_value() |
Function | Used to set the value of a metadata key in a Write File node. Two mandatory and one optional arguments must be passed:
|
# Get all the metadata keys and values of a Write File node.
print(<PyWriteFileNode>.get_metadata())
# Get the value for a specific key in a Write File node.
# The first argument is the socket_name, the second one is the key.
print(<PyWriteFileNode>.get_metadata("Default", "focus"))
# Edit the name of a metadata key (string) in a Write File node.
# The first argument is the socket_name (a channel name or Default for a Write File node), the second one is the key, and the third one is the new name for that key.
<PyWriteFileNode>.set_metadata_key("channel name", "key name", "new key name")
# Restore the name of a renamed key in a Write File node.
# The first argument is the socket_name (a channel name for a Write File node), the second one is the key, and the third one is discarded or can be set to None.
<PyWriteFileNode>.set_metadata_key("channel name", "key name")
<PyWriteFileNode>.set_metadata_key("channel name", "key name", None)
# Edit the metadata value (string) of a Write File node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
<PyWriteFileNode>.set_metadata_value("Default", "focus", "100")
# Edit the metadata value (integer) of a Write File node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
<PyWriteFileNode>.set_metadata_value("Default", "focus", 100)
# Edit the metadata value (float) of a Write File node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
<PyWriteFileNode>.set_metadata_value("Default", "focus", 100.12)
# Reset the value of key in a Write File node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
# When value is set to None, the original value is restored.
<PyWriteFileNode>.set_metadata_value("Default", "focus", None)
# Add a new key and set its value in the metadata of a Write File node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
<PyWriteFileNode>.set_metadata_value("Default", "Application", "Flame")
# Delete an added key in a Write File node.
# The first argument is the socket_name, the second one is the key, and the third one is the value.
# The value must be set to None for the key to be deleted.
<PyWriteFileNode>.set_metadata_value("Default", "Application", None)
# Set the Discard status for a key in a Write File node.
# The first argument is the socket_name, the second one is the key, and the third one is discarded.
<PyWriteFileNode>.set_metadata_discarded("Default", "focus", True)
# Restore a discarded a key in a Write File node.
# The first argument is the socket_name, the second one is the key, and the third one is discarded.
<PyWriteFileNode>.set_metadata_discarded("Default", "focus", False)
An example of a script using the batch_export_begin Python hook to inject custom metadata in OpenEXR files written with the Write File node is available in the inject_metadata_write_file_exr.py file, located in /opt/autodesk/<application version>/python_utilities/scripts.
The <PyWriteFileNode>.format attribute has been deprecated since its corresponding option inside the Write File node user interface is no longer available.