How to switch RAW/JPG main version if no placeholder?

Post Reply
pdarrah
Posts: 7
Joined: 15 Aug 07 16:49
Location: Near Chicago

How to switch RAW/JPG main version if no placeholder?

Post by pdarrah »

I am finally switching to PS from IDI and so far it has been going all right. However, I've seen several references that for my RAW/JPG pairs it is better to have the JPG as the "main version". I have about 2500 paIrs where the main version is the RAW file and the JPG is a version WITHOUT a placeholder attached. I really don't know how I ended up with this as I don't remember changing any settings. I never used the version sets much in IDI and the sets were just created over the years as I downloaded the files from my memory cards.

I have seen several references to a script that can swap version placeholders - that would be great if I HAD a version placeholder for the JPG versions. They are definitely part of the set, but have no placeholder defined. I really don't think I want to manually assign 2500 versions to a placeholder! Is there any way to swap the RAW/JPG as the "main version" without a placeholder. If not, is there any way to batch assign all those JPG versions to a placeholder?

I can certainly setup the import for my memory cards in PS to set the main version as the JPG and assign the RAW to a placeholder now that I know that's the way it "should" be, but what do I do about the 2500 existing pairs?
DirkS
moderator
Posts: 284
Joined: 25 May 08 13:28
Location: Essex, UK

Re: How to switch RAW/JPG main version if no placeholder?

Post by DirkS »

Is there any way to swap the RAW/JPG as the "main version" without a placeholder.
Swapping is not the problem (select version w/o placeholder and use 'set as main'), but I can't yet find a way to select the ones without a placeholder...

Gr.
Dirk.
Problems searching the forum? Try Google Site Search by adding 'site:forum.idimager.com' to a standard Google search.
pdarrah
Posts: 7
Joined: 15 Aug 07 16:49
Location: Near Chicago

Re: How to switch RAW/JPG main version if no placeholder?

Post by pdarrah »

I'm still stumped on this, but I'm wondering if the script in the thread "Cascade metadata from RAW to Main version" might have a hint on how to do this. It sounds like it is also working with versions that do NOT have a placeholder. I'm afraid I don't know enough about the scripting interface to really understand the code and tell if it would work for what I need... If there was a script that assigns the JPG version with no placeholder to a placeholder, then I could follow that with the swap script I've already seen to switch the JPG and RAW versions.
Hert
Posts: 7928
Joined: 13 Sep 03 6:24

Re: How to switch RAW/JPG main version if no placeholder?

Post by Hert »

The script only works with placeholders, because a placeholder is unique wishing a version set. There can be unlimited versions in a single version set that aren't assigned to a placeholder. Hence the script can't work with those because it wouldn't know which to pick.

Since you didn't use an album placeholder in IDimager I see no reason why you would have to switch your main versions. What is your reasoning to switch them all to jpg as main version? You mention some references in the opening post but afaik all discussion where about album place holders. And if you're using album placeholders in idi ager then those are displayed. Is PSU the main version is always displayed and so the recommendation is to switch placeholders in PSU. But you always use raw for the version set and so nothing will need to be switched.

Hope that makes sense
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message
pdarrah
Posts: 7
Joined: 15 Aug 07 16:49
Location: Near Chicago

Re: How to switch RAW/JPG main version if no placeholder?

Post by pdarrah »

OK - I guess I had picked up the impression that it wasn't ideal to have the "main version" as the RAW format image (maybe slower to display?) If that isn't the case, then I'll just leave it the way it is.

If I wanted to give all those JPG files a placeholder - is it possible with scripting to do that? For all these images, the version set consists of only the RAW "main version" and the unassigned JPG. There are no other versions for probably 98% of these and I know which are the 50 or so that do have another version so could avoid running the script on those and handle that subset manually.

Thanks for the quick response!
Hert
Posts: 7928
Joined: 13 Sep 03 6:24

Re: How to switch RAW/JPG main version if no placeholder?

Post by Hert »

Here's a script that will assign the first found version to the first available placeholder.

Please make a backup before running the script.

Code: Select all

var
  i: Integer;
  APhs: TCatalogPlaceHolders;
  APh: TCatalogPlaceHolder;
  ACatItem, AVers: TCatalogItem;
  AVersions: TCatalogItems;
begin
  APhs := TCatalogPlaceHolders.Create(TCatalogPlaceHolder, '');
  Catalog.EnumPlaceHolders(APhs, False);
  APh := nil;
  for i := 0 to APhs.Count - 1 do
  begin
    if APhs.Items[i].Visible then
    begin
      APh := APhs.Items[i];
      break;
    end;
  end;

  if APh = nil then
  begin
    Say ('No place hodler found.');
  end
  else
  begin
    for i := 0 to Selected.Count - 1 do
    begin
      ACatItem := TCatalogItem.Create(nil);
      AVers := TCatalogItem.Create(nil);
      AVersions := TCatalogItems.Create(TCatalogItem, '');
      if Catalog.FindImageCombined(Selected.Items[i], ACatItem, True, vptNone) then
      begin
        if not Catalog.EnumVersionForPlaceHolderInMain(ACatItem, APh, AVers) then
        begin
          Catalog.EnumVersionsForItem(ACatItem, AVersions);
          if AVersions.Count > 0 then
            Catalog.AssignPlaceHolderToVersionInMain(ACatItem, AVersions.Items[0], APh);
        end;
      end;
      AVersions.Free;
      AVers.Free;
      ACatItem.Free;
    end;
  end;

  APhs.Free;

  Say ('done');
end;
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message
pdarrah
Posts: 7
Joined: 15 Aug 07 16:49
Location: Near Chicago

Re: How to switch RAW/JPG main version if no placeholder?

Post by pdarrah »

Thank you so much! It works perfectly :)

IS it better to have the "main version" as JPG rather than RAW (CR2 in my case) or does it not make any difference?
Hert
Posts: 7928
Joined: 13 Sep 03 6:24

Re: How to switch RAW/JPG main version if no placeholder?

Post by Hert »

It doesn't matter
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message
Post Reply