Pulse
  • Overview
  • Custom Actions

Builtin Actions

  • Constraints
  • Controls
  • Core
  • Deformers
  • Kinematics

Core Modules

  • Actions
  • Asset
  • Blueprint
  • Builder
  • Config
  • Loader
  • Module
  • Rigs
  • Serializer

Modules

  • Editor Utils
  • Joints
  • Links
    • DefaultLinkPositioner
      • DefaultLinkPositioner.calculate_target_matrix()
    • IKPoleLinkPositioner
      • IKPoleLinkPositioner.calculate_target_matrix()
      • IKPoleLinkPositioner.create_link()
    • LinkPositioner
      • LinkPositioner.apply_link_position()
      • LinkPositioner.calculate_offsets()
      • LinkPositioner.calculate_target_matrix()
      • LinkPositioner.create_link()
      • LinkPositioner.get_offset_matrix()
      • LinkPositioner.get_target_node()
      • LinkPositioner.recreate_link()
      • LinkPositioner.set_follower_matrix_with_offset()
      • LinkPositioner.set_link_meta_data()
    • WeightedLinkPositioner
      • WeightedLinkPositioner.calculate_target_matrix()
      • WeightedLinkPositioner.create_link()
      • WeightedLinkPositioner.recreate_link()
    • cleanup_links()
    • get_all_linked_nodes()
    • get_link_meta_data()
    • get_linked_nodes()
    • get_positioner()
    • recreate_link()
    • set_link_meta_data()
    • unlink()
  • Math
  • Names
  • Nodes
  • Shapes
  • Skins
  • Source Editor
  • Spaces
  • Sym
  • Util Nodes
Pulse
  • Links
  • View page source

Links

Links are used to ensure that nodes update to match each other’s positions when doing rig layout.

They are like parent constraints that exist without any additional nodes or connections between nodes, and are only updated when requested by the designer.

Link information is stored in the scene on each node using metadata.

class DefaultLinkPositioner

Bases: LinkPositioner

Default link positioner, updates the follower to match a single leaders position.

calculate_target_matrix(follower, target_nodes, link_data)

Calculate the target matrix to use for a linked node.

class IKPoleLinkPositioner

Bases: LinkPositioner

IK Pole positioner, updates the follower to be placed along the pole vector.

calculate_target_matrix(follower, target_nodes, link_data)

Calculate the target matrix to use for applying a linked position to the follower node.

create_link(follower, target_nodes)

Create a link between a follower and other nodes. Default implementation just stores the given target nodes, and optionally calculates offsets.

Parameters:
  • follower (PyNode) – The node to be linked such that it can be positioned later automatically

  • target_nodes – The nodes to link to the follower.

class LinkPositioner

Bases: object

Handles updating the transform of a linked object to match its target.

apply_link_position(follower, link_data)

Update the transform of follower using its link data

calculate_offsets(follower, target_mtx)

Calculate the offset translate, rotate, and scale for a follower and target matrix.

calculate_target_matrix(follower, target_nodes, link_data)

Calculate the target matrix to use for applying a linked position to the follower node.

create_link(follower, target_nodes)

Create a link between a follower and other nodes. Default implementation just stores the given target nodes, and optionally calculates offsets.

Parameters:
  • follower (PyNode) – The node to be linked such that it can be positioned later automatically

  • target_nodes – The nodes to link to the follower.

get_offset_matrix(link_data)

Return the offset matrix to apply using any offsets defined in the link’s metadata.

get_target_node(link_data)

Return the first target node of the link.

recreate_link(node, link_data)

Re-create the link between a follower and other nodes. Useful for updating offsets.

set_follower_matrix_with_offset(follower, target_mtx, link_data)

Set the new world matrix of a follower node, incorporating the saved offsets from link_data if applicable.

set_link_meta_data(node, link_data)

Set the metadata for a linked node

class WeightedLinkPositioner

Bases: LinkPositioner

Weighted positioner updates the follower to be placed at a weighted location between targets.

calculate_target_matrix(follower, target_nodes, link_data)

Calculate the target matrix to use for applying a linked position to the follower node.

create_link(follower, target_nodes)

Create a link between a follower and other nodes. Default implementation just stores the given target nodes, and optionally calculates offsets.

Parameters:
  • follower (PyNode) – The node to be linked such that it can be positioned later automatically

  • target_nodes – The nodes to link to the follower.

recreate_link(node, link_data)

Re-create the link between a follower and other nodes. Useful for updating offsets.

cleanup_links()

Cleanup all nodes in the scene that have broken links

get_all_linked_nodes()

Return all nodes in the scene that are linked

get_link_meta_data(node)

Return all link metadata for a node

get_linked_nodes(node) → List[pymel.core.PyNode]

Return all leaders a node is linked to.

get_positioner(link_type) → LinkPositioner

Create and return a new positioner instance for a link type.

recreate_link(node, keep_offset=False)

Recreate the link for a node, updating or removing its offsets if necessary.

set_link_meta_data(node, link_data)

Set the metadata for a linked node

unlink(node)

Remove a link from a node

Previous Next

© Copyright 2022, Bohdon Sayre.

Built with Sphinx using a theme provided by Read the Docs.