parameters: (bone, frame, action, armature_matrix)
return_statement: return scale, change
docstring: :param bone:
      :param frame:
      :param action:
      :param armature_matrix:
function: def _scale(bone, frame, action, armature_matrix):
      """
  
      :param bone:
      :param frame:
      :param action:
      :param armature_matrix:
  
      """
      scale = mathutils.Vector((1.0, 1.0, 1.0))
  
      change = False
  
      ngroups = len(action.groups)
  
      # animation grouped by bones
  	
      if ngroups > 0:
  
          index = -1
  
          for i in range(ngroups):
              if action.groups[i].name == bone.name:
  		
                  print(action.groups[i].name)
  
                  index = i
  
          if index > -1:
              for channel in action.groups[index].channels:
   
                  if "scale" in channel.data_path:
                      has_changed = _handle_scale_channel(
                          channel, frame, scale)
                      change = change or has_changed
                      
      # animation in raw fcurves
  
      else:
  
          bone_label = '"%s"' % bone.name
  	
          for channel in action.fcurves:
              data_path = channel.data_path
              if bone_label in data_path and "scale" in data_path:
                  has_changed = _handle_scale_channel(
                      channel, frame, scale)
                  change = change or has_changed
      	
     
      #scale.xyz = armature_matrix * scale.xyz
  
      return scale, change
function_tokens: def _scale ( bone , frame , action , armature_matrix ) : scale = mathutils . Vector ( ( 1.0 , 1.0 , 1.0 ) ) change = False ngroups = len ( action . groups ) # animation grouped by bones if ngroups > 0 : index = - 1 for i in range ( ngroups ) : if action . groups [ i ] . name == bone . name : print ( action . groups [ i ] . name ) index = i if index > - 1 : for channel in action . groups [ index ] . channels : if "scale" in channel . data_path : has_changed = _handle_scale_channel ( channel , frame , scale ) change = change or has_changed # animation in raw fcurves else : bone_label = '"%s"' % bone . name for channel in action . fcurves : data_path = channel . data_path if bone_label in data_path and "scale" in data_path : has_changed = _handle_scale_channel ( channel , frame , scale ) change = change or has_changed #scale.xyz = armature_matrix * scale.xyz return scale , change