def getThumbnailFrameForClip(clip):
  """

  Returns the in frame for the clip, or 0 if none was set.

  """

  frame = 0

  if not clip:
    return frame

  # This raises if its not been set
  try:
    frame = clip.posterFrame()
  except RuntimeError:
    pass

  return frame