Set and see Star rating in image viewer

There is currently no option to see the star rating in the image viewer.
This script attempts offers functionality with some caveats.

The resulting menu:
you have two options use the provided menu button, or drag the individual buttons to the tool bar. If you use the menu button its icon will change to show the current file rating.
you can see the rating button is highlighted, also the

While we can't show the star rating based on the current file, we can show the star rating based on a variable and set the variable based on the current file.
The downside of this approach is that it wont work correctly if you have multiple image viewer windows open. This is because there is not image viewer specific variable group.

It requires three parts to set up.

  1. A script to set the global variable to the rating of the current image when the Image in the viewer changes.
  2. A set of rating buttons configured to toggle based on the global variables.
  3. The custom icon set for the buttons.

ViewerShowRating.js.txt (1.5 KB)

Image_viewer_set_rating.dcf (4.7 KB)

Icon set:
I am using the icon set from this post Star Ratings Icon-Set. Please follow the instructions on that post to install the Icon set.

Requested here:
Request: star rating in image viewer