Downloading status icons for use in external tools

I have a PyQt tool that uses SG status icons. I'd like an easy way to download the icons instead of having to crop them out from a screen grab of the Status List. The Status entity makes reference to the Icon entity but it doesn't seem accessible from the API: 'icon': {'id': 2, 'name': 'Approved', 'type': 'Icon'}


  • 0
    Kevin Mullin

    I would also like to know if this is possible.

  • 0
    Benoit Leveau

    I had the same problem, so I searched how it was used on the website but it looks like it's a big image map...



  • 0
    Benoit Leveau

    for instance, the icon for "In Progress" is defined like this in the CSS:

    div.icon_ip {width: 10px; height: 10px; background: transparent url(/images/sg_icon_image_map.png?1397075566) -261px -0px no-repeat}
  • 0
    Ben Hadden

    Hey guys,

    Benoit is right that we merge all the icons together for performance reasons and then slice up the image when rendering individual statuses. So, we haven't exposed individual icons via the API just yet.

    We've heard feedback from artists, though, that often the status name is more informative than the icon (especially for PyQT type tools where you may not be building in tooltip descriptions). So, we recently added support to the API for returning a status's full name (previously, we'd just return the short codes).

    Here's how it works:

      #Connect with your server path, script name, and key
      #Get the display names for the sg_status_list field on Asset
      a = sg.schema_read()["Asset"]["sg_status_list"]["properties"]["display_values"]["value"]

    Terminal prints something like this...

    {'fin': 'Final',
    'hld': 'On Hold',
    'ip': 'In Progress',
    'omt': 'Omit',
    'rdy': 'Ready to Start',
    'wtg': 'Waiting to Start'}

    So not exactly what you're after, but hopefully closer.

    The other advantage of using the name vs the icon is that our icons are not optimized for retina displays yet, so icons will look fuzzy on certain monitors.