unreal.Blueprint

class unreal.Blueprint(outer: Object | None = None, name: Name | str = 'None')

Bases: BlueprintCore

Blueprints are special assets that provide an intuitive, node-based interface that can be used to create new types of Actors and script level events; giving designers and gameplay programmers the tools to quickly create and iterate gameplay from within Unreal Editor without ever needing to write a line of code.

C++ Source:

  • Module: Engine

  • File: Blueprint.h

Editor Properties: (see get_editor_property/set_editor_property)

  • blueprint_category (str): [Read-Write] The category of the Blueprint, used to organize this Blueprint class when displayed in palette windows

  • blueprint_description (str): [Read-Write] Shows up in the content browser tooltip when the blueprint is hovered

  • blueprint_display_name (str): [Read-Write] Overrides the BP’s display name in the editor UI

  • blueprint_namespace (str): [Read-Write] The namespace of this blueprint (if set, the Blueprint will be treated differently for the context menu)

  • compile_mode (BlueprintCompileMode): [Read-Write] The mode that will be used when compiling this class.

  • deprecate (bool): [Read-Write] Deprecates the Blueprint, marking the generated class with the CLASS_Deprecated flag

  • generate_abstract_class (bool): [Read-Write] Whether or not this blueprint’s class is a abstract class or not. Should set CLASS_Abstract in the KismetCompiler.

  • generate_const_class (bool): [Read-Write] Whether or not this blueprint’s class is a const class or not. Should set CLASS_Const in the KismetCompiler.

  • hide_categories (Array[str]): [Read-Write] Additional HideCategories. These are added to HideCategories from parent.

  • run_construction_script_in_sequencer (bool): [Read-Write] whether or not you want to continuously rerun the construction script for an actor in sequencer

  • run_construction_script_on_drag (bool): [Read-Write] whether or not you want to continuously rerun the construction script for an actor as you drag it in the editor, or only when the drag operation is complete

  • should_cook_property_guids_value (ShouldCookBlueprintPropertyGuids): [Read-Write] Whether to include the property GUIDs for the generated class in a cooked build. note: This option may slightly increase memory usage in a cooked build, but can avoid needing to add CoreRedirect data for Blueprint classes stored within SaveGame archives.

  • status (BlueprintStatus): [Read-Write] The current status of this blueprint

  • thumbnail_info (ThumbnailInfo): [Read-Only] Information for thumbnail rendering

add_event_dispatcher(name) bool

Creates a new event dispatcher on the Blueprint with the given name. Returns false if the name is already in use or the Blueprint is invalid.

Parameters:

name (Name)

Return type:

bool

add_event_dispatcher_parameter(dispatcher_name, param_name, param_type) bool

Adds a parameter to an event dispatcher’s signature. Returns false if the dispatcher does not exist or the parameter name is already in use.

Parameters:
Return type:

bool

change_member_variable_type(variable_name, new_type) None

Changes the specified member variable’s type - inherited variables must have their type changed at the point of declaration

Parameters:
generated_class()

Gets the class generated when this blueprint is compiled

Returns:

UClass* The generated class

Return type:

type(Class)

get_blueprint_parent_class()

Returns the parent class of the given Blueprint.

Returns:

The parent class of the Blueprint, or null if the Blueprint is invalid

Return type:

type(Class)

get_blueprint_variable_category(variable_name) Text

Gets the user-defined category of a Blueprint member variable. Categories are used to group variables in the My Blueprint panel.

Parameters:

variable_name (Name) – The variable name

Returns:

The category text. Empty if the variable was not found or has no explicit category override (defaults to the Blueprint’s name in the UI).

Return type:

Text

get_blueprint_variable_replication(variable_name) BlueprintVariableReplication

Gets the replication mode of a Blueprint variable.

Parameters:

variable_name (Name) – The variable name

Returns:

The replication mode: None, Replicated, or RepNotify

Return type:

BlueprintVariableReplication

get_member_variable_type(member_variable_name) EdGraphPinType | None

Returns the type of a member variable, unset if no variable is found. Inherited variables can be requested using a fully qualified name to avoid ambiguities.

Parameters:

member_variable_name (str)

Return type:

Optional[EdGraphPinType]

list_event_dispatchers() Array[Name]

Returns the names of all event dispatchers defined on the Blueprint.

Return type:

Array[Name]

list_member_variable_names(include_inherited_members=True) Array[str]

Lists the names of the member variables in the BP. Inherited members will be prefixed with the full path of their declaring class.

Parameters:

include_inherited_members (bool)

Returns:

out_member_variable_names (Array[str]):

Return type:

Array[str]

remove_event_dispatcher(name) bool

Removes the event dispatcher with the given name from the Blueprint. Returns false if no dispatcher with that name exists or the Blueprint is invalid.

Parameters:

name (Name)

Return type:

bool

remove_event_dispatcher_parameter(dispatcher_name, param_name) bool

Removes a parameter from an event dispatcher’s signature. Returns false if the dispatcher or parameter does not exist.

Parameters:
  • dispatcher_name (Name)

  • param_name (Name)

Return type:

bool

set_blueprint_variable_category(variable_name, new_category) None

Sets the user-defined category on a Blueprint member variable. Categories are used to group variables in the My Blueprint panel. Note: Will not change the category for variables defined via native classes.

Parameters:
  • variable_name (Name) – The variable name

  • new_category (Text) – The new category text. Pass empty to reset to the default (the Blueprint’s name).

set_blueprint_variable_expose_on_spawn(variable_name, expose_on_spawn) None

Sets “Expose On Spawn” to true/false on a Blueprint variable

Parameters:
  • variable_name (Name) – The variable name

  • expose_on_spawn (bool) – Set to true to expose on spawn

set_blueprint_variable_expose_to_cinematics(variable_name, expose_to_cinematics) None

Sets “Expose To Cinematics” to true/false on a Blueprint variable

Parameters:
  • variable_name (Name) – The variable name

  • expose_to_cinematics (bool) – Set to true to expose to cinematics

set_blueprint_variable_instance_editable(variable_name, instance_editable) None

Sets “Instance Editable” to true/false on a Blueprint variable

Parameters:
  • variable_name (Name) – The variable name

  • instance_editable (bool) – Toggle InstanceEditable

set_blueprint_variable_replication(variable_name, replication) None

Sets the replication mode on a Blueprint variable. RepNotify will auto-create an OnRep_ function if one does not already exist.

Parameters:
property status: BlueprintStatus

[Read-Only] The current status of this blueprint

Type:

(BlueprintStatus)