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: VirtualCameraCore
Module: VCamExtensions
File: ModifierHierarchyRules.h
- 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:
group_name (Name) –
component (VCamComponent) –
- 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:
component (VCamComponent) –
node_name (Name) –
- Return type:
- get_nodes_containing_modifier(modifier) Set[Name] ¶
Utility function to get all groups which contain this modifier.
- Parameters:
modifier (VCamModifier) –
- Return type:
- get_parent_node(child_node) Name or None ¶
Gets the parent of this given group. Fails if called on the root node.