unreal.BlueprintEditorLibrary¶
- class unreal.BlueprintEditorLibrary(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BlueprintFunctionLibraryBlueprint Editor Library
C++ Source:
Module: BlueprintEditorLibrary
File: BlueprintEditorLibrary.h
- classmethod add_function_graph(blueprint, func_name='NewFunction') EdGraph¶
Adds a function to the given blueprint
- classmethod add_member_variable(blueprint, member_name, variable_type) bool¶
Adds a member variable to the specified blueprint with the specified type.
- Parameters:
blueprint (Blueprint)
member_name (Name)
variable_type (EdGraphPinType)
- Returns:
true if it succeeds, false if it fails.
- Return type:
- classmethod compare_asset_save_version_to(asset, version_to_check) AssetSaveVersionComparisonResults¶
Compares the given assets save version to the VersionToCheck. see: GetSavedByEngineVersion and GetCurrentEngineVersion
- Parameters:
- Returns:
result (AssetSaveVersionComparisonResults): The outcome of the version comparison
- Return type:
- classmethod compare_soft_object_save_version_to(object_to_check, version_to_check) AssetSaveVersionComparisonResults¶
Compares the given soft object’s save version to the VersionToCheck. This will read the packages file header see: GetSavedByEngineVersion and GetCurrentEngineVersion
- Parameters:
- Returns:
result (AssetSaveVersionComparisonResults): The outcome of the version comparison
- Return type:
- classmethod compile_blueprint(blueprint) None¶
Compiles the given blueprint.
- Parameters:
blueprint (Blueprint) – Blueprint to compile
- classmethod create_blueprint_asset_with_parent(asset_path, parent_class) Blueprint¶
Creates a blueprint based on a specific parent, honoring registered custom blueprint types
- classmethod find_event_graph(blueprint) EdGraph¶
Finds the event graph of the given blueprint. Null if it doesn’t have one. This will only return the primary event graph of the blueprint (the graph named “EventGraph”).
- classmethod find_graph(blueprint, graph_name) EdGraph¶
Finds the graph with the given name on the blueprint. Null if it doesn’t have one.
- classmethod generated_class(blueprint_obj)¶
Gets the class generated when this blueprint is compiled
- classmethod get_array_type(contained_type) EdGraphPinType¶
- Parameters:
contained_type (EdGraphPinType)
- Returns:
a array of ContainedType type - returns ‘int’ type if invalid type is provided
- Return type:
- classmethod get_basic_type_by_name(type_name) EdGraphPinType¶
- Parameters:
type_name (Name)
- Returns:
a pintype for ‘int’, ‘byte’, ‘bool’, ‘real’, ‘name’, ‘string’ or ‘text’ - returns ‘int’ type if invalid type is provided
- Return type:
- classmethod get_blueprint_asset(object) Blueprint¶
Casts the provided Object to a Blueprint - the root asset type of a blueprint asset. Note that the blueprint asset itself is editor only and not present in cooked assets.
- classmethod get_blueprint_for_class(class_) -> (Blueprint, does_class_have_blueprint=bool)¶
Looks up the UBlueprint that generated the provided class, if any. Provides a ‘true’ exec pin to execute if there is a valid blueprint associated with the Class.
- classmethod get_class_reference_type(class_type) EdGraphPinType¶
- Parameters:
- Returns:
a class reference pintype for the provided class - returns ‘int’ type if invalid class is provided
- Return type:
- classmethod get_current_engine_version() str¶
Returns a string which represents the current engine version (FEngineVersion::Current())
For example: “5.6.0-37518009+++UE5+Main”
- Return type:
- classmethod get_map_type(key_type, value_type) EdGraphPinType¶
- Parameters:
key_type (EdGraphPinType)
value_type (EdGraphPinType)
- Returns:
a map of KeyType to ValueType type - returns ‘int’ type if invalid type is provided
- Return type:
- classmethod get_object_reference_type(object_type) EdGraphPinType¶
- Parameters:
- Returns:
a object reference pintype for the provided class - returns ‘int’ type if invalid object type is provided
- Return type:
- classmethod get_saved_by_engine_version(asset) str¶
Returns a string representation of the engine version which the given asset was saved with. see: FLinker::Summary::SavedByEngineVersion see: FPackageFileSummary
- classmethod get_set_type(contained_type) EdGraphPinType¶
- Parameters:
contained_type (EdGraphPinType)
- Returns:
a set of ContainedType type - returns ‘int’ type if invalid type is provided
- Return type:
- classmethod get_struct_type(struct_type) EdGraphPinType¶
- Parameters:
struct_type (ScriptStruct)
- Returns:
a pintype for the provided struct - returns ‘int’ type if invalid struct is provided
- Return type:
- classmethod refresh_open_editors_for_blueprint(bp) None¶
Attempt to refresh any open blueprint editors for the given asset
- Parameters:
bp (Blueprint)
- classmethod remove_function_graph(blueprint, func_name) None¶
Deletes the function of the given name on this blueprint. Does NOT replace function call sites.
- classmethod remove_graph(blueprint, graph) None¶
Removes the given graph from the blueprint if possible
- classmethod remove_unused_nodes(blueprint) None¶
Remove any nodes in this blueprint that have no connections made to them.
- Parameters:
blueprint (Blueprint) – The blueprint to remove the nodes from
- classmethod remove_unused_variables(blueprint) int32¶
Deletes any unused blueprint created variables the given blueprint. An Unused variable is any BP variable that is not referenced in any blueprint graphs
- Parameters:
blueprint (Blueprint) – Blueprint that you would like to remove variables from
- Returns:
Number of variables removed
- Return type:
int32
- classmethod rename_graph(graph, new_name_str='NewGraph') None¶
Attempts to rename the given graph with a new name
- classmethod reparent_blueprint(blueprint, new_parent_class) None¶
Attempts to reparent the given blueprint to the new chosen parent class.
- classmethod replace_variable_references(blueprint, old_var_name, new_var_name) None¶
Replace any references of variables with the OldVarName to references of those with the NewVarName if possible
- classmethod set_blueprint_variable_expose_on_spawn(blueprint, variable_name, expose_on_spawn) None¶
Sets “Expose On Spawn” to true/false on a Blueprint variable
- classmethod set_blueprint_variable_expose_to_cinematics(blueprint, variable_name, expose_to_cinematics) None¶
Sets “Expose To Cinematics” to true/false on a Blueprint variable
- classmethod set_blueprint_variable_instance_editable(blueprint, variable_name, instance_editable) None¶
Sets “Instance Editable” to true/false on a Blueprint variable
- classmethod upgrade_operator_nodes(blueprint) None¶
Replace any old operator nodes (float + float, vector + float, int + vector, etc) with the newer Promotable Operator version of the node. Preserve any connections the original node had to the newer version of the node.
- Parameters:
blueprint (Blueprint) – Blueprint to upgrade