add_constraint_layer

add_constraint_layer(constrain_node, target_node, name=None, mode=0)

Add a new Constraint layer on the top of the layer stack and return it

Parameters:
  • constrain_node (Node) – The constrain node
  • target_node (Node) – The constraint target node
  • name (str) – Optional constraint layer name
  • mode (ConstraintMode) – The type of the constraint
Returns:

the newly created animation layer

Return type:

ConstraintLayer