existingAction method

dynamic existingAction(
  1. dynamic clip,
  2. dynamic optionalRoot
)

Implementation

existingAction(clip, optionalRoot) {
  var root = optionalRoot ?? _root;
  var rootUuid = root.uuid;

  var clipObject = clip.runtimeType.toString() == 'String' || clip is String  //GL
          ? AnimationClip.findByName(root, clip)
          : clip,
      clipUuid = clipObject ? clipObject.uuid : clip,
      actionsForClip = _actionsByClip[clipUuid];

  if (actionsForClip != null) {
    return actionsForClip.actionByRoot[rootUuid];
  }

  return null;
}