unreal.CineAssemblyEditorFunctionLibrary¶
- class unreal.CineAssemblyEditorFunctionLibrary(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BlueprintFunctionLibraryLibrary of functions that expose CineAssembly functionality to editor scripting
C++ Source:
Plugin: CinematicAssemblyTools
Module: CineAssemblyToolsEditor
File: CineAssemblyEditorFunctionLibrary.h
- classmethod add_associated_asset(schema, asset_class, asset_name='', label='None', relative_path='', template_asset=None) Guid¶
Adds a new Associated Asset descriptor to a Schema’s template sequence. When an Assembly is created from this Schema, the CineAssembly factory will create an asset of the specified class at the specified relative path, and include it in the Assembly’s asset tree.
EXPERIMENTAL: The CinematicAssemblyTools plugin officially supports UWorld for associated assets through the CineAssemblySchema UI. Associating assets of other class types may work, but some are untested.
Note: Only asset classes are supported. Non-asset classes, such as AActor or UActorComponent, will be rejected at runtime. Note: If AssetClass is UCineAssembly, the call is routed to AddSubAssemblyTemplate and the returned AssetID will be invalid. Consider calling AddSubAssemblyTemplate instead.
- Parameters:
schema (CineAssemblySchema) – The schema whose template sequence will be modified
asset_class (type(Class)) – The class of asset to create alongside each assembly. Only asset classes are supported. Non-asset classes, such as AActor or UActorComponent, will be rejected at runtime.
asset_name (str) – Optional template name for the asset. If empty, the factory’s default asset name is used.
label (Name) – Optional semantic label. If empty, a unique label is auto-assigned from the asset’s display name.
relative_path (str) – Optional path, relative to the assembly root, where the asset should be created
template_asset (Object) – Optional template asset to duplicate when the factory creates this descriptor’s asset. Must match AssetClass. If null, a new asset of AssetClass is created instead.
- Returns:
The stable AssetID for the new descriptor. The AssetID will be invalid if the operation failed, or if the call was routed to AddSubAssemblyTemplate (see note above).
- Return type:
- classmethod add_sub_assembly_reference(schema, track_type=SubAssemblyTrackType.SUBSEQUENCE_TRACK, sequence=None) MovieSceneSubAssemblySection¶
Adds a new reference SubAssembly track and section to a Schema’s template sequence. When an Assembly is created from this Schema, the section will reference the provided sequence directly.
- Parameters:
schema (CineAssemblySchema) – The schema whose template sequence will be modified
track_type (SubAssemblyTrackType) – Whether this SubAssembly represents a Shot track or Subsequence track
sequence (MovieSceneSequence) – The existing sequence (UCineAssembly or ULevelSequence) to reference
- Returns:
The new SubAssemblySection, or null if creation failed
- Return type:
- classmethod add_sub_assembly_template(schema, track_type=SubAssemblyTrackType.SUBSEQUENCE_TRACK, sub_assembly_name='', label='None', relative_path='', template_object=None) MovieSceneSubAssemblySection¶
Adds a new template SubAssembly track and section to a Schema’s template sequence. When an Assembly is created from this Schema, a new sequence will be initialized from the provided template object.
- Parameters:
schema (CineAssemblySchema) – The schema whose template sequence will be modified
track_type (SubAssemblyTrackType) – Whether this SubAssembly represents a Shot track or Subsequence track
sub_assembly_name (str) – The name for the new SubAssembly sequence
label (Name) – The semantic label for the new section. If None (default), a unique default label is auto-assigned.
relative_path (str) – The path (relative to the assembly root) where the new SubAssembly should be created
template_object (Object) – The template object (UCineAssemblySchema, UCineAssembly, or ULevelSequence) to use when initializing the SubAssembly
- Returns:
The new SubAssemblySection, or null if creation failed
- Return type:
- classmethod build_token_context(assembly) Object¶
Constructs a CineAssembly Naming Token context object for the input Assembly.
- Parameters:
assembly (CineAssembly) – The assembly context used to evaluate tokens
- Returns:
The new context object which can be passed to the NamingTokensEngineSubsystem’s EvaluateTokenString function.
- Return type:
- classmethod create_assembly(schema, level, parent_assembly, metadata, path, name_override='') CineAssembly¶
Create a new CineAssembly asset using the input Schema, Level, and Metadata. It is important that any metadata required for resolving asset naming tokens is provided to this function so that the Assembly and SubAssemblies are all named correctly.
- Parameters:
schema (CineAssemblySchema) – The schema to initialize the new assembly from
level (World) – Optional Level to associate with the new assembly
parent_assembly (CineAssembly) – Optional parent assembly reference
metadata (Map[str, str]) – Optional metadata overrides to apply to the assembly (key/value string pairs)
path (str) – The content browser path where the assembly should be created
name_override (str) – Optional name for the assembly. If empty, the default name defined by the schema is used.
- Returns:
The newly created assembly, or nullptr if creation failed
- Return type:
- classmethod create_assembly_to_configure(schema, level, parent_assembly, metadata) CineAssembly¶
Creates an in-memory (transient) CineAssembly object, with defaults configured from the input Schema, ready for further configuration. SubAssembly objects (as specified by the Schema) are also created in-memory and can be obtained by calling GetSubAssemblies(). Once configuration is complete, call FinalizeConfiguredAssembly() to persist the Assembly (and SubAssemblies) as a real asset. Other persist APIs (duplicate/rename/save) on the transient CineAssembly are not supported.
- Parameters:
schema (CineAssemblySchema) – The schema to initialize the new assembly from
level (World) – Optional Level to associate with the new assembly
parent_assembly (CineAssembly) – Optional parent assembly reference
metadata (Map[str, str]) – Optional metadata overrides to apply to the assembly (key/value string pairs)
- Returns:
The transient assembly, or nullptr if creation failed
- Return type:
- classmethod create_schema(schema_name, asset_path, default_assembly_name='', relative_assembly_path='', description='', parent_schema=None, thumbnail_image=None, is_data_only=False, is_hidden=False) CineAssemblySchema¶
Creates a new CineAssemblySchema asset at the specified path.
- Parameters:
schema_name (str) – The name of the schema, used as the “assembly type” for assemblies made from it
asset_path (str) – The content browser path where the schema should be created
default_assembly_name (str) – The default name pattern for assemblies created from this schema
relative_assembly_path (str) – The default path (relative to the content root) where assemblies created from this schema should be placed
description (str) – A user-facing text description of the schema
parent_schema (CineAssemblySchema) – Restricts assemblies made from this schema to only allow setting the Parent Assembly to an Assembly with this Parent Schema
thumbnail_image (Texture2D) – The thumbnail image to use for this schema and assemblies built from it
is_data_only (bool) – Mark this schema as data-only
is_hidden (bool) – Hide this schema from the UI when creating new assemblies
- Returns:
The new schema, or nullptr if creation failed
- Return type:
- classmethod duplicate_assembly(source_assembly, duplicate_path, metadata, duplicate_subsequences=True, duplicate_associated_assets=True, name_override='', external_asset_preference=DuplicateExternalAssetPreference.DUPLICATE_INTO_ASSEMBLY_FOLDER) CineAssembly¶
Duplicates a CineAssembly asset at the specified path.
- Parameters:
source_assembly (CineAssembly) – The assembly to duplicate
duplicate_path (str) – The content browser path where the duplicate should be created
metadata (Map[str, str]) – Optional metadata overrides to apply to the assembly (key/value string pairs)
duplicate_subsequences (bool) – If true, recursively duplicate all descendant subsequences. If false, subsequences will reference the same sequences as the source Assembly.
duplicate_associated_assets (bool) – If true, the schema-defined associated assets are duplicated from the source assembly and its managed SubAssemblies.
name_override (str) – Optional name for the duplicate. If empty, the source assembly’s name is used.
external_asset_preference (DuplicateExternalAssetPreference) – Preference for handling assets (subsequences, sublevels, etc.) that live outside the source assembly’s content tree
- Returns:
The duplicated assembly, or nullptr if duplication failed
- Return type:
- classmethod duplicate_assembly_to_configure(source_assembly, metadata, duplicate_subsequences=True) CineAssembly¶
Creates an in-memory (transient) duplicate of the source CineAssembly, ready for further configuration. If bDuplicateSubsequences is true, duplicate SubAssembly objects are also created in-memory and can be obtained by calling GetSubAssemblies(). Once configuration is complete, call FinalizeDuplicateAssembly() to persist the duplicate Assembly (and SubAssemblies) as a real asset. Other persist APIs (duplicate/rename/save) on the transient CineAssembly are not supported.
- Parameters:
source_assembly (CineAssembly) – The assembly to duplicate
metadata (Map[str, str]) – Optional metadata overrides to apply to the assembly (key/value string pairs)
duplicate_subsequences (bool) – If true, each managed SubAssembly (as specified by the Schema) is also duplicated in-memory. Additional subsequences can be duplicated during FinalizeDuplicateAssembly(). If false, the duplicate assembly will maintain a reference to source assembly’s original SubAssemblies.
- Returns:
The transient duplicate, or nullptr if duplication failed
- Return type:
- classmethod evaluate_token_string(token_string, assembly) NamingTokenResultData¶
Evaluates a tokenized string using the input Assembly for context. Always considers tokens in the “cat” namespace.
- Parameters:
token_string (str) – The template string containing tokens to resolve
assembly (CineAssembly) – The assembly context used to evaluate tokens
- Returns:
The full FNamingTokenResultData results, including the evaluated text and per-token information
- Return type:
- classmethod finalize_configured_assembly(configured_assembly, path, name_override='') CineAssembly¶
Persists an in-memory, pre-configured CineAssembly object (typically returned by CreateAssemblyToConfigure()) to the specified path.
- Parameters:
configured_assembly (CineAssembly) – The transient CineAssembly object to persist
path (str) – The content browser path where the assembly should be created
name_override (str) – Optional name for the assembly. If empty, the configured name (tokens resolved) is used.
- Returns:
The persisted CineAssembly asset, or nullptr if the operation failed.
- Return type:
- classmethod finalize_duplicate_assembly(configured_duplicate_assembly, duplicate_path, name_override='', duplicate_subsequences=True, duplicate_associated_assets=True, external_asset_preference=DuplicateExternalAssetPreference.DUPLICATE_INTO_ASSEMBLY_FOLDER) CineAssembly¶
Persists an in-memory, pre-configured CineAssembly duplicate (typically returned by DuplicateAssemblyToConfigure()) to the specified path, and optionally duplicates the source assembly’s unmanaged subsequences and associated assets.
- Parameters:
configured_duplicate_assembly (CineAssembly) – The transient assembly to persist
duplicate_path (str) – The content browser path where the duplicate should be created
name_override (str) – Optional name for the assembly. If empty, the configured name (tokens resolved) is used.
duplicate_subsequences (bool) – If true, unmanaged subsequences are duplicated using ExternalAssetPreference.
duplicate_associated_assets (bool) – If true, the schema-defined associated assets are duplicated from the source assembly and its managed SubAssemblies.
external_asset_preference (DuplicateExternalAssetPreference) – Preference for handling assets (subsequences, sublevels, etc.) that live outside the source assembly’s content tree
- Returns:
The now-persisted assembly, or nullptr if the input was not a transient assembly or the path was invalid
- Return type:
- classmethod find_assemblies_by_schema(schema) Array[AssetData]¶
Returns asset data for every CineAssembly asset created from the input Schema. If the input is null, this function returns all CineAssembly assets that have no schema set.
- Parameters:
schema (CineAssemblySchema) – The schema to search for, or null to find assemblies with no schema
- Returns:
Asset data for every assembly whose schema matches the input
- Return type:
- classmethod get_assembly_associated_asset_desc(assembly, asset_id) AssemblyAssociatedAssetDesc¶
Returns a copy of the Associated Asset descriptor with the given AssetID on the Assembly. To mutate, call one of the appropriate setter functions with the descriptor’s AssetID.
- Parameters:
assembly (CineAssembly)
asset_id (Guid)
- Return type:
- classmethod get_assembly_associated_asset_descs(assembly) Array[AssemblyAssociatedAssetDesc]¶
Returns copies of all Associated Asset descriptors on the Assembly. To mutate one, call one of the appropriate setter functions with the descriptor’s AssetID.
- Parameters:
assembly (CineAssembly)
- Return type:
- classmethod get_schema_associated_asset_desc(schema, asset_id) AssemblyAssociatedAssetDesc¶
Returns a copy of the Associated Asset descriptor with the given AssetID on the Schema’s template sequence. To mutate, call one of the appropriate setter functions with the descriptor’s AssetID.
- Parameters:
schema (CineAssemblySchema)
asset_id (Guid)
- Return type:
- classmethod get_schema_associated_asset_descs(schema) Array[AssemblyAssociatedAssetDesc]¶
Returns copies of all Associated Asset descriptors on the Schema’s template sequence. To mutate one, call one of the appropriate setter functions with the descriptor’s AssetID.
- Parameters:
schema (CineAssemblySchema)
- Return type:
- classmethod open_assembly(cine_assembly, open_associated_level=True, save_options=[True, True]) None¶
Opens a CineAssembly in Sequencer, and optionally opens its associated Level
- Parameters:
cine_assembly (CineAssembly)
open_associated_level (bool)
save_options (CineAssemblyLevelSaveOptions)
- classmethod open_associated_level(cine_assembly, save_options=[True, True]) bool¶
Opens the Level associated with the input CineAssembly (if it has one). Returns false only if the input assembly was invalid, or if its associated level was valid but could not be opened.
- Parameters:
cine_assembly (CineAssembly)
save_options (CineAssemblyLevelSaveOptions)
- Return type:
- classmethod remove_associated_asset(schema, asset_id) None¶
Removes an Associated Asset descriptor from a Schema’s template sequence by AssetID.
- Parameters:
schema (CineAssemblySchema)
asset_id (Guid)
- classmethod set_assembly_associated_asset_label(assembly, asset_id, new_label) None¶
Sets the Label of the Associated Asset descriptor matching the AssetID in the Assembly.
- Parameters:
assembly (CineAssembly)
asset_id (Guid)
new_label (Name)
- classmethod set_assembly_associated_asset_name(assembly, asset_id, new_asset_name) None¶
Sets the AssetName of the Associated Asset descriptor matching the AssetID in the Assembly. Note: Operation will fail if descriptor’s asset has already been created.
- Parameters:
assembly (CineAssembly)
asset_id (Guid)
new_asset_name (str)
- classmethod set_assembly_associated_asset_should_create(assembly, asset_id, should_create) None¶
Sets the bShouldCreate flag of the Associated Asset descriptor matching the AssetID in the Assembly. Note: This operation has no effect if the descriptor’s asset has already been created.
- Parameters:
assembly (CineAssembly)
asset_id (Guid)
should_create (bool)
- classmethod set_associated_asset_class(schema, asset_id, new_asset_class) None¶
Sets the AssetClass of the Associated Asset descriptor matching the AssetID in the Schema’s template sequence. Schema-only because AssetClass is a structural property shared across all assemblies.
- Parameters:
schema (CineAssemblySchema)
asset_id (Guid)
- classmethod set_associated_asset_relative_path(schema, asset_id, new_relative_path) None¶
Sets the RelativePath of the Associated Asset descriptor matching the AssetID in the Schema’s template sequence. Schema-only because RelativePath is a structural property shared across all assemblies.
- Parameters:
schema (CineAssemblySchema)
asset_id (Guid)
new_relative_path (str)
- classmethod set_associated_asset_template(schema, asset_id, new_template_asset) None¶
Sets the TemplateAsset of the Associated Asset descriptor matching the AssetID in the Schema’s template sequence. Schema-only because TemplateAsset is a structural property shared across all assemblies. Note: Operation will fail if the input TemplateAsset does not match the existing AssetClass filter of the Associated Asset descriptor.
- Parameters:
schema (CineAssemblySchema)
asset_id (Guid)
new_template_asset (Object)
- classmethod set_schema_associated_asset_label(schema, asset_id, new_label) None¶
Sets the Label of the Associated Asset descriptor matching the AssetID in the Schema’s template sequence.
- Parameters:
schema (CineAssemblySchema)
asset_id (Guid)
new_label (Name)
- classmethod set_schema_associated_asset_name(schema, asset_id, new_asset_name) None¶
Sets the AssetName of the Associated Asset descriptor matching the AssetID in the Schema’s template sequence.
- Parameters:
schema (CineAssemblySchema)
asset_id (Guid)
new_asset_name (str)