@@ -97,10 +97,16 @@ def process_plug(attr, plug, in_array=False):
9797 conn_node = connections [0 ].node ()
9898 api = conn_node .apiType ()
9999
100- if api == om .MFn .kCharacter :
101- character_node = get_curve_through_character (plug )
102- if character_node :
103- conn_node = character_node
100+ if api == om .MFn .kPairBlend :
101+ return # skip blend nodes for now
102+ blend_node = get_pair_blend_curve (plug )
103+ if blend_node :
104+ conn_node = blend_node
105+ api = conn_node .apiType ()
106+ elif api == om .MFn .kCharacter :
107+ deep_node = get_deep_curve (plug )
108+ if deep_node :
109+ conn_node = deep_node
104110 api = conn_node .apiType ()
105111
106112 if api in ANIM_CURVE_TYPES :
@@ -115,6 +121,7 @@ def process_plug(attr, plug, in_array=False):
115121 return None
116122
117123 # add the node if it matches one of the types we want
124+ print (om .MFnDependencyNode (conn_node ).name ())
118125 curves .append (om .MFnDependencyNode (conn_node ))
119126 plugs .append (plug )
120127
@@ -171,8 +178,8 @@ def process_plug(attr, plug, in_array=False):
171178 return curves , plugs
172179
173180
174- def get_curve_through_character (plug ):
175- """ Find character sets from selected nodes
181+ def get_deep_curve (plug ):
182+ """ Find curve by traversing graph
176183
177184 :type plug: maya.api.OpenMaya.MPlug
178185 :rtype: maya.api.OpenMaya.MObject or None
@@ -190,6 +197,15 @@ def get_curve_through_character(plug):
190197 return None
191198
192199
200+ def get_pair_blend_curve (plug ):
201+ """ Find curve by traversing graph
202+
203+ :type plug: maya.api.OpenMaya.MPlug
204+ :rtype: maya.api.OpenMaya.MObject or None
205+ """
206+ pass
207+
208+
193209def get_selected_anim_curves ():
194210 """
195211 Get directly selected animation curve nodes.
0 commit comments