Managing Versions Mk III - WIP

Post Reply
David Grundy
Posts: 241
Joined: 13 May 07 16:40
Location: Hong Kong

Managing Versions Mk III - WIP

Post by David Grundy » 03 Aug 13 15:52

This isn't really ready, but I'm posting anyway in response to Andy's question in another thread about my custom thumbs script.

In concept - I wanted to do as much as I could of this suggestion using only capabilities which are currently available in PSu. Here's how I'm approaching it.

VUTs
Rather than "placeholders" I want to set "Version Usage Tags" ("VUT"s) which define which Managed Versions are intended for which purposes.

VUTs need to be specific to files, and not shared across Version Sets. I can only see one way to do this with current PSu capabilities: Custom Input Fields. There is one field defined for each VUT. The idea is that I put a value of "Y" in the field if that VUT is assigned to that file.

At present my VUTs are defined in the following Custom Input Fields:
  • xmp.icd.QV2Main --> Main (In principle this might not agree with PSu's designation of Main, but I think it's probably easier if it does agree.)
  • xmp.icd.QV2Display --> Display version (ie preferred Version to display when I don't want the whole set shown separately; there might be more than one if the same original leads to more than one good interpretation. I'm still thinking about this.)
  • xmp.icd.QV2Camera --> Camera (ie original with no destructive edits; applies equally to Raw or Camera jpg)
  • xmp.icd.QV2BW --> B&W
  • xmp.icd.QV2HDR --> HDR (one of an exposure bracketing set intended for HDR rendering)
  • xmp.icd.QV2XNoVUT --> No other VUTs assigned (This is a housekeeping item which I'm not using at the moment)
It's easy to search for (say) those with the Camera VUT by a text search for Y@xmp.icd.QV2Camera.

I use a custom thumbs script to see which files have which VUTs attached.
CustomThumbs.jpg
CustomThumbs.jpg (99.41 KiB) Viewed 2780 times
In the thumbnail custom info line, working from left to right:
1. The number shows how many versions there are in total (including Main). The number is shown in blue if it's 1, otherwise it's white.
2. The triangle is blue for unversioned, Green for PSu's designated Main, Red for other Managed Versions.
(This means that if my designation of "Main VUT" agrees with PSu's system designation of Main Version, then the triangle and the following M are the same colour.)
3. Then the VUTs are indicated by their initial letters. If the value "Y" is set in the corresponding custom input field, this letter will be shown in green. If the value "N" is set, the letter is shown in red. Otherwise, it's in blue.
(M for Main VUT, D for Display, etc)
4. Then the star ratings indicator - I'm trying to find something compact and easy to recognise at a glance. 1 quadrant = 1 star, 2 quadrants = 2 stars, etc, and if it's 5 star then fill in the whole square. The example has 6 images rated in descending order from 5 to 0. (I have turned on the tweak that keeps ratings synchronised across a Version Set.)

I'm still trying to figure out whether this really works and is worth the effort. I think so, but there are still some complications to sort out.

... David
Last edited by David Grundy on 04 Aug 13 2:59, edited 1 time in total.

David Grundy
Posts: 241
Joined: 13 May 07 16:40
Location: Hong Kong

Re: Managing Versions Mk III - WIP

Post by David Grundy » 03 Aug 13 15:53

Here's the code for the custom thumbs info. It takes a noticeable amount of time to update, but not enough to be a problem at the moment.

Code: Select all

%code
// 2013-08-03 v7d Add the version count to the start of the line
// 2013-07-31 v7c Change colour of Version triangles to agree with the Main version VUT colour
// 2013-07-29 v7b Show VUTs (add Camera, HDR, BW, XNoFunction)
// 2013-07-27 v7 Show VUTs (implemented using the Custom Input Fields)
// 2013-07-27 v6d Replace stars with a part-filled square
// 2013-07-13 v5b, modified colours
// 2013-06-30 v5a, split version indicator from rating stars
// 2013-06 early versions based on code by Hert

// Note to self: Colours seem to be specified as ARGB Hex

var
  ACatItem: TCatalogItem;
  AVersionColor: String;
  AVersionShape: String;
  ARatingColor: String;
  ASetRatingColor: String;
  ANumVersions: Integer;
  i: Integer;
begin
  result := '';

  ARatingColor := '#FFCCCC00'; //#### Yellow colour for rating shapes
  ASetRatingColor := '" pathfillcolor="' + ARatingColor + '" pathstrokestyle="solid" pathstrokecolor="' + ARatingColor + '">';

  ARatingShape1 := 'M 0,0 '; //#### First part of rating shape
  ARatingShape2 := ' L 5,5 L 0,5 L 0,0 Z'; //#### Second part of rating shape

  AVersionShape := 'M 0,0 L 1,1 L 0,1 L 0,0 Z'; //#### Triangle shape for the version indicator

  ACatItem := TCatalogItem.Create(nil);
  if Catalog.FindImageCombined (ImageItem, ACatItem, False, vptNone) then
  begin

// Number of versions

    ANumVersions := ACatItem.VersionCount+1;
    if ANumVersions = 1 then
      result := result + '<font color="#FF0000FF">';
    else
      result := result + '<font color="#FFFFFFFF">';
    result := result + IntToStr(ANumVersions);
    result := result + '</font>';

// Show a shape coloured to indicated versions

    AVersionColor := '#FF0000CC'; //#### Blue colour for Solo (unVersioned) files
    if ACatItem.IsVersion then
      AVersionColor := '#FFCC0000'; //#### Red colour for non-Main Versions
    if (ACatItem._MainVersionGUID = ACatItem.GUID) and (ACatItem.VersionCount > 0) then
      AVersionColor := '#FF00CC00'; //#### Green colour for Main Versions

    result := result + '<font color="'+ AVersionColor +'"><ind y="2">';
    result := result + '<img size="22" path="' + AVersionShape + '" pathfillcolor="' + AVersionColor + '">';
    result := result + ''; //####This line adds extra space after the version symbol
    result := result + '</ind></font>';

// Show VUTs

    case '%xmp:icd:QV2Main' of
      'Y': result := result + '<font color="#FF00FF00">';
      'N': result := result + '<font color="#FFFF0000">';
      else result := result + '<font color="#FF0000FF">';
    end;
    result := result + 'M';
    result := result + '</font>';

    case '%xmp:icd:QV2Display' of
      'Y': result := result + '<font color="#FF00FF00">';
      'N': result := result + '<font color="#FFFF0000">';
      else result := result + '<font color="#FF0000FF">';
    end;
    result := result + 'D';
    result := result + '</font>';

    case '%xmp:icd:QV2Camera' of
      'Y': result := result + '<font color="#FF00FF00">';
      'N': result := result + '<font color="#FFFF0000">';
      else result := result + '<font color="#FF0000FF">';
    end;
    result := result + 'C';
    result := result + '</font>';

    case '%xmp:icd:QV2BW' of
      'Y': result := result + '<font color="#FF00FF00">';
      'N': result := result + '<font color="#FFFF0000">';
      else result := result + '<font color="#FF0000FF">';
    end;
    result := result + 'B';
    result := result + '</font>';

    case '%xmp:icd:QV2HDR' of
      'Y': result := result + '<font color="#FF00FF00">';
      'N': result := result + '<font color="#FFFF0000">';
      else result := result + '<font color="#FF0000FF">';
    end;
    result := result + 'H';
    result := result + '</font>';

    case '%xmp:icd:QV2XNoFunction' of
      'Y': result := result + '<font color="#FF00FF00">';
      'N': result := result + '<font color="#FFFF0000">';
      else result := result + '<font color="#FF0000FF">';
    end;
    result := result + 'X';
    result := result + '</font>';

    result := result + ' '; //####This line adds extra space after the VUT symbols

// Show a shape to indicate the rating
    result := result + '<font color="'+ ARatingColor +'"><ind y="2">';
    result := result + '<img size="22" path="';
    Case ACatItem.Rating of
    //#### Specify the shape to indicate the number of stars
      0: result := result + ' M 0,4 L 0,0 L -4,0 L 0,0 L 0,-4 L 0,0 L 4,0 L 0,0 L 0,4 Z ';
      1: result := result + ' M 0,4 L -3,3 L -4,0 L 0,0 L 0,-4 L 0,0 L 4,0 L 0,0 L 0,4 Z ';
      2: result := result + ' M 0,4 L -3,3 L -4,0 L -3,-3 L 0,-4 L 0,0 L 4,0 L 0,0 L 0,4 Z ';
      3: result := result + ' M 0,4 L -3,3 L -4,0 L -3,-3 L 0,-4 L 3,-3 L 4,0 L 0,0 L 0,4 Z ';
      4: result := result + ' M 0,4 L -3,3 L -4,0 L -3,-3 L 0,-4 L 3,-3 L 4,0 L 3,3 L 0,4 Z ';
      5: result := result + ' M 0,4 L -4,4 L -4,0 L -4,-4 L 0,-4 L 4,-4 L 4,0 L 4,4 L 0,4 Z';
    end;
    result := result + ASetRatingColor;
    result := result + '</ind></font>';


  end;
  ACatItem.Free;
end;
%/code

andy@damroundup.com
Posts: 109
Joined: 13 Apr 08 19:54
Location: Boston, MA USA

Re: Managing Versions Mk III - WIP

Post by andy@damroundup.com » 04 Aug 13 15:03

Thanks David - that is a very interesting solution and approach... you mention the data takes a noticeable amount of time to update and that has been my experience with custom thumb info as well - I had some many icons and thumb details that it took too long to redraw the screen upon scrolling and I have since turned it off - a real shame because that has always been something of an idi strength and something I use quite heavily to easily and quickly see details at a glance.

I like your clean icon / color/ letter approach.. nice work and thanks again for sharing!
Check out our detailed DAM reviews at http://www.DAMRoundup.com
Custom designed books for publication or personal enjoyment - http://www.JingotheCat.com

David Grundy
Posts: 241
Joined: 13 May 07 16:40
Location: Hong Kong

Re: Managing Versions Mk III - WIP

Post by David Grundy » 04 Aug 13 15:36

As an indication of the time taken for refreshing the thumbs script ... it's on the order of 4 seconds for a (worst case for me) new screen full of about 200 thumbs. But normally I have 20-30 thumbs on a screen so it's not a problem.
That's with Win7 64bit on an i7 running at 2.10GHz - there are 4 dual-thread cores but judging by the resources monitor, I guess only one thread is used for this operation. Or maybe the database queries are slower disk operations; I didn't check disk use. I have the database on an internal SSD so that would still be a relatively fast operation compared to (say) my previous PC.

Hert
Posts: 5857
Joined: 13 Sep 03 7:24

Re: Managing Versions Mk III - WIP

Post by Hert » 04 Aug 13 15:54

The question is; when did Andy hit these custom script performance issues. If I remember well, that was at the end of the beta (Andy was ine of the beta testers). He had speed issues when using SVG path images.
In the mean time this is all completely optimized for performance.
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

andy@damroundup.com
Posts: 109
Joined: 13 Apr 08 19:54
Location: Boston, MA USA

Re: Managing Versions Mk III - WIP

Post by andy@damroundup.com » 09 Aug 13 13:28

Thanks Hert - I believe you are correct and if I did have it still active after beta - it was for a very early release version... if the SVG routines have been optimized since, I have not tried them but will now... Many thx for the info about optimization!
Check out our detailed DAM reviews at http://www.DAMRoundup.com
Custom designed books for publication or personal enjoyment - http://www.JingotheCat.com

Hert
Posts: 5857
Joined: 13 Sep 03 7:24

Re: Managing Versions Mk III - WIP

Post by Hert » 09 Aug 13 13:41

andy@damroundup.com wrote:it was for a very early release version...
Products evolve Andy... don't assume thing to be the same without verifying first. ;)
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

andy@damroundup.com
Posts: 109
Joined: 13 Apr 08 19:54
Location: Boston, MA USA

Re: Managing Versions Mk III - WIP

Post by andy@damroundup.com » 10 Aug 13 13:26

IDimager wrote:Products evolve Andy... don't assume thing to be the same without verifying first. ;)
If only I had the time to test - seems like I am playing catch-up with many things these days... :o
Check out our detailed DAM reviews at http://www.DAMRoundup.com
Custom designed books for publication or personal enjoyment - http://www.JingotheCat.com

Post Reply