View Filter Presets - Yes, they can be iterated, and set, but...

Anybody know how to create a view filter?
For example, my first use case would be to filter on PV2003 - anybody know how to do that?
(Back in the good ol' days I would just run a plugin to set custom metadata, then filter on the custom metadata (like Jeffrey Friedl's Focal Length Sort did), but isn't there a better way in SDK3.0? - Even if undocumented, for example, create a view-filter preset file that accesses unexposed fields... - Lightroom would probably have to be restarted to use it though, hmmm..
Any help?
Thanks,
Rob

John,
I do have a few more cores but I think the big difference is LR3 vs LR2.  I am still in 2.5 awaiting some performance fixes before switching to v3.  I continue to test LR3 on both my desktop (8 cores) and laptop (2 cores).  Here is what I am finding:
In version 2.5, it takes approximately 4 times longer to fill the shadow field if all are empty than simply checking.  So my rate of 2-3,000 per second is primarily checking - but that is what it will be doing most of the time once the initial fill is complete.  I see very little difference between my laptop and the desktop for this test.
Running v 3.0 it much, much longer to fill the fields than in v 2.5 - maybe a slow as 25/second.  Again, I see very little difference between the laptop and the desktop.  The worst part is that in 3.0 the incremental fill takes just as long as the initial fill - this might be related to the issue whereby issuing a Ctrl-S is not longer incremental but updates all images (hopefully an error on Adobe's part that will be corrected soon).
Conclusion, I think what you are seeing is primarily a difference between v2 and v3 of Lightroom; however, you seem to be getting much of that performance back by using the batch commands which, as a side note, I have not yet implemented since those commands just came out with v3.  I just loop through the catalog and read metadata one image at a time.  The relevant code (not pretty so don't laugh) is basically:
--###################### task code  ###########################################
LrTasks.startAsyncTask( function()
-- get a reference to all the photos in the entire catalog
local cat_photos = nil
catalog:withReadAccessDo( function()
     cat_photos = catalog.allPhotos
end )
-- determine number of photos to be processed
local ncat_photos = #cat_photos
-- confirm the action since it can be massive on large number of photos
local message = "Are you sure you want to create the duplicate field for the folder name and set the Metadata errors field of the " .. ncat_photos .. " selected images?"
local returnbutton = di.confirm( message,nil,"Yes")
if returnbutton == "cancel" then
     progressScope:done()
     return
end
-- get access to the current catalog
catalog:withWriteAccessDo("Construct Captions", function()
--di.message("Jeff Dialog",tostring(#cat_photos),"info")
local cap_string = "Checking/Updating " .. tostring(ncat_photos) .. " images "
progressScope:setCaption(cap_string)
-- loop through each of the photos selected
local indexnum = 0
for i, photo in ipairs(cat_photos) do
indexnum = indexnum + 1
local fold = trim(photo:getFormattedMetadata('folderName'))
local kws       = photo:getFormattedMetadata('keywordTags')  -- retrieves keywordes ENTERED
local sfold     = photo:getPropertyForPlugin(_PLUGIN, 'shadowFolder' )
-- remove blanks that don't work for filter bar purposes
local shadfold  = string.gsub(fold, " ", "")
shadfold  = string.gsub(shadfold, "_", "")
local firstchar = string.find(shadfold,"%a") -- finds first alpha character
if firstchar == nil then firstchar = #shadfold+1 end
shadfold = string.sub(shadfold,1,firstchar-1) .. "|" .. string.sub(shadfold,firstchar,#shadfold)
-- if in year/mo format, then insert dash between year and month
if firstchar == 7 then
     shadfold = string.sub(shadfold,1,4) .. "-" .. string.sub(shadfold,5,#shadfold)
end
-- COPY folder without blanks or _ to duplicate field
if shadfold ~= sfold then
     photo:setPropertyForPlugin(_PLUGIN, 'shadowFolder', shadfold )
end
end      -- of looping through selected photos
end )    -- of catalog:withWriteAccessDo
end)     -- of task
--###################### end of task code  ###########################################
Here's to hoping 3.1 brings our performance back!
Jeff

Similar Messages

Maybe you are looking for