Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Aborted Maya pick walking script
import sys
import pymel.core as pm
def pick_walk(direction, add=False):
nodes =
new_nodes = []
non_dag_nodes = []
for node in nodes:
# Make a list of non-DAG nodes.
if not isinstance(node, pm.nodetypes.DagNode):
continue, ne=True)
# If any non-DAG objects were selected, like components, use the regular pick walk command to handle them.
if non_dag_nodes:
# Add our individual pick walking results. #, ne=True, add=True)
# If add is true, reselect the original selection.
if add:, ne=True, add=True)
pick_walk('down', False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment