Hi Michael,

You can get compound attribute like this.

def compute(self, plug, dataBlock):
   
   #   Compute only on input compound attribute
   a_valid_attr = [self.attrIn_tensionColor_01, 
self.attrIn_tensionIndex_01, self.attrIn_blendWeight]
   if plug not in a_valid_attr:
       return

   #   Get CompoundAttribute array handle
   ah_bs_multi_input = 
data.inputArrayValue(self.attrIn_blendShapeMultiInput)
   i_input_count = ah_bs_multi_input.elementCount()

   #   Iter on element count
   for i in xrange(i_input_count):

       #   Get compound handle
       ah_bs_multi_input.jumpToElement(i)
       h_bs_multi_input = ah_bs_multi_input.inputValue()

       #   Get compound children handle
       h_tension_color = h_bs_multi_input.child(0) # 
cls.attrIn_tensionColor_01
       h_tension_index = h_bs_multi_input.child(0) # 
cls.attrIn_tensionIndex_01
       h_blend_weight = h_bs_multi_input.child(0) # cls.attrIn_blendWeight


-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/eee1b335-d7ca-4e2f-acfc-2cd33d64fad8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to