unreal.ModifierHierarchyRules

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

Bases: Object

Defines a tree hierarchy. Each node is called a group. A group consists of connections and (sub) groups. A connection is a modifier and a corresponding connection point.

An example use case is if you want to have a button menu which should procedurally generate sub-button menus depending on the modifiers in the component. One group could be a Lens group which groups together modifiers that e.g. modify focal distance, filmback, and FOV. The rules are defined generically enough so as modifiers are added or removed, the groupings also update accordingly.

C++ Source:

  • Plugin: VirtualCamera

  • Module: VCamExtensions

  • File: ModifierHierarchyRules.h

get_child_nodes(node) Set[Name]

Gets the child groups of the given group.

Parameters:

node (Name) –

Return type:

Set[Name]

get_connection_point_target_for_node(group_name, component) VCamModifierConnectionBinding or None

Gets the connection point the modifier is configured to be bound to, if any. This function is optional to implement; it is valid for it to always return false.

Parameters:
Returns:

Whether there is a connection point configured for this hierarchy node.

connection (VCamModifierConnectionBinding):

Return type:

VCamModifierConnectionBinding or None

get_modifier_in_node(component, node_name) VCamModifier

Gets all the modifiers on the component that belong in the given group.

Parameters:
Return type:

VCamModifier

get_nodes_containing_modifier(modifier) Set[Name]

Utility function to get all groups which contain this modifier.

Parameters:

modifier (VCamModifier) –

Return type:

Set[Name]

get_parent_node(child_node) Name or None

Gets the parent of this given group. Fails if called on the root node.

Parameters:

child_node (Name) –

Returns:

parent_node (Name):

Return type:

Name or None

get_root_node() Name

Gets the root of the tree.

Return type:

Name