Welcome,
Guest
. Please
login
or
register
.
May 25, 2013, 03:38:18 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Jan 9, 2012
John Beardsworth's new Lightroom site
Lightroom Solutions
27960
Posts in
5113
Topics by
2914
Members
Latest Member:
imthedamstar
The DAM Forum
Software Discussions
Lightroom
Beardy's plug-ins
« previous
next »
Pages:
[
1
]
2
3
Author
Topic: Beardy's plug-ins (Read 7083 times)
johnbeardy
Administrator
Hero Member
Posts: 1813
Beardy's plug-ins
«
on:
May 13, 2009, 04:02:58 AM »
Just a quick note to say that I've been getting my hands dirty and learning a bit of Lua, the programming language used by Lightroom. It's been about as much fun as
the toilet scene
in Trainspotting, but I have now put a couple of simple utilities on my site.
Size and count
is a simple dialog box that tells you the total size of the selected items, and tells you how many are online and offline/missing. It's most handy when you are working out buckets, for instance.
PseudoRatings
is a way to make Lightroom's Print print ratings as stars - not as numbers.
More will follow...
John
«
Last Edit: May 13, 2009, 04:07:08 AM by johnbeardy
»
Logged
Dorin Nicolaescu
Newbie
Posts: 26
Re: Beardy's plug-ins
«
Reply #1 on:
May 13, 2009, 04:21:24 AM »
Nice.
Some feedback if you accept... How do you calculate the size? Explorer gives me fewer megabytes (if we define a megabyte as bytes*1024*1024).
Also, isn't it possible to only have one OK button in Lua? Cancel seems redundant.
Logged
Dorin Nicolaescu-Musteata
johnbeardy
Administrator
Hero Member
Posts: 1813
Re: Beardy's plug-ins
«
Reply #2 on:
May 13, 2009, 04:30:40 AM »
Thanks Dorin. The size is the sum of what's recorded in Lightroom, so there's no call to Finder/Explorer. I suppose my view is that if Lightroom is wrong, that's something Adobe should fix, and I don't plan to do a Finder/Explorer call. But firmly in my sights is reading/writing with exiftool, and should mean I'll work out the Finder/Explorer call en passant.
Yes, it would make sense to lose the Cancel button. I'll see if I can find out how that can be done.
John
Logged
Dorin Nicolaescu
Newbie
Posts: 26
Re: Beardy's plug-ins
«
Reply #3 on:
May 13, 2009, 04:47:10 AM »
I did some digging... Do you get the size from the AgLibraryFile.importHash field? (The only place where I could find file size info. Or is there an SDK funtion for this?)
That number over there seems to be correct to the byte. But your plug-in calculates the megabytes as bytes/1000/1000, which is... well, most people are used to bytes/1024/1024.
Logged
Dorin Nicolaescu-Musteata
johnbeardy
Administrator
Hero Member
Posts: 1813
Re: Beardy's plug-ins
«
Reply #4 on:
May 13, 2009, 04:59:56 AM »
I used photo:getRawMetadata("fileSize"). I could put 1024 into the function instead.
I have been looking around and it doesn't look like I can suppress the cancel button. I'm using LrDialogs.presentModalDialog. I could switch to LrDialogs.message which has no cancel button but is ugly and doesn't seem to accept a columnar layout.
John
Logged
johnbeardy
Administrator
Hero Member
Posts: 1813
Re: Beardy's plug-ins
«
Reply #5 on:
May 13, 2009, 05:05:23 AM »
Just put a /1024 version online.
John
Logged
Dorin Nicolaescu
Newbie
Posts: 26
Re: Beardy's plug-ins
«
Reply #6 on:
May 13, 2009, 05:11:06 AM »
Quote
Just put a /1024 version online.
That's better
EDIT: If you deselect all files, the plug-in acts truly in Lightroom spirit, as if everything is selected. Nice touch, John!
«
Last Edit: May 13, 2009, 05:16:16 AM by Dorin Nicolaescu
»
Logged
Dorin Nicolaescu-Musteata
johnbeardy
Administrator
Hero Member
Posts: 1813
Re: Beardy's plug-ins
«
Reply #7 on:
May 13, 2009, 05:22:44 AM »
Yes, I knew that last bit - the plug-in loops through "catalog.targetPhotos". Maybe I'll just change the text from "selected".
John
Logged
markpirozzi
Full Member
Posts: 179
Re: Beardy's plug-ins
«
Reply #8 on:
May 13, 2009, 05:39:48 AM »
John,
Thanks for creating this plugin.
It seems that a substantial amount is added for Virtual Copies. Is the amount equal to the VCs being exported as DNGs? (I have been converting my DNG VCs to DNGs before archiving, so I should have done the conversion before using your plugin, but just curious.)
I take it this only works for RAW files: "I used photo:getRawMetadata("fileSize")". I first tried it on a group of mixed file types and got about 7GB instead of the 4GB that the finder and Toast indicated.
Mark
Logged
Mac OSX 10.7, 2009 MacPro
johnbeardy
Administrator
Hero Member
Posts: 1813
Re: Beardy's plug-ins
«
Reply #9 on:
May 13, 2009, 05:48:27 AM »
Thanks Mark
OK, I understand the VC problem. It's counting each VC and including its size. I think that should be easy to fix.
As for getRawMetadata, I will have to look further into that. I don't think it's restricted to raw files, but is raw in the sense of not being formatted - there's also a getFormattedMetadata function. My suspicion is that each function reads the file size at the point at which the file was first registered in Lightroom, and I don't discount bugs either in my coding or in Lightroom.
Good to know people are interested in this!
John
Logged
johnbeardy
Administrator
Hero Member
Posts: 1813
Re: Beardy's plug-ins
«
Reply #10 on:
May 13, 2009, 06:25:45 AM »
1.03 is now uploaded and resolves the virtual copy double-counting.
I'm not sure about the non-raws, because the code seems to work as I expected. I've actually edited a file outside Lightroom and added a few layers, but as soon as Lightroom sees it again the file size is updated in the catalogue, and the plugin works correctly. Maybe see what else distinguishes those files?
John
Logged
markpirozzi
Full Member
Posts: 179
Re: Beardy's plug-ins
«
Reply #11 on:
May 13, 2009, 07:21:22 AM »
Quote from: johnbeardy on May 13, 2009, 06:25:45 AM
I'm not sure about the non-raws, because the code seems to work as I expected. I've actually edited a file outside Lightroom and added a few layers, but as soon as Lightroom sees it again the file size is updated in the catalogue, and the plugin works correctly. Maybe see what else distinguishes those files?
John
The files with the inflated total file size were layered PSD files. I'll try it with layered TIFF files and retry using PSD files.
Mark
Logged
Mac OSX 10.7, 2009 MacPro
johnbeardy
Administrator
Hero Member
Posts: 1813
Re: Beardy's plug-ins
«
Reply #12 on:
May 13, 2009, 07:43:02 AM »
Definitely look at what LR says the file size is, as well as Finder/Explorer. The error could easily be Adobe's.
John
Logged
johnbeardy
Administrator
Hero Member
Posts: 1813
Re: Beardy's plug-ins
«
Reply #13 on:
May 13, 2009, 11:19:11 AM »
And now joined by a third plug-in
Find missing files
John
Logged
markpirozzi
Full Member
Posts: 179
Re: Beardy's plug-ins
«
Reply #14 on:
May 13, 2009, 01:51:29 PM »
John, I re-tried the Size and Count plugin on non-RAW files and it seems to be working now. It's usually off by 20 to 50 MB from the finder, but more than accurate enough for making buckets.
Thanks, Mark
Logged
Mac OSX 10.7, 2009 MacPro
Pages:
[
1
]
2
3
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> DAM Workshops
=> Comments about the book
=> General Discussion
=> Photo Blogs
=> GPS/ Geotagging
=> dpBestflow.org Discussions
-----------------------------
DAM Useful Stuff
-----------------------------
=> DAMuseful Video training
=> DAMuseful Software
=> DAM Useful CS3 Beta Products
-----------------------------
Software Discussions
-----------------------------
=> RAW File Converters
=> Lightroom
=> Choosing Software/Other DAM Applications
=> Aperture
=> Bridge/ Camera Raw
=> Media Pro & Expression Media
=> iView MediaPro
=> ImageIngester and ImageVerifier
=> idImager
=> Import From Camera
=> Scripting
-----------------------------
Workflow Discussions
-----------------------------
=> Multi-User Configurations
=> High Volume
=> Stock Photography
=> Wedding Workflow
=> Tethered Shooting
-----------------------------
DAM Stuff
-----------------------------
=> Loss and Recovery
=> Keywords and Controlled Vocabulary
=> Naming Issues
=> Migration Issues
=> Scans and Camera Scans
=> DNG
=> Software Discussions
=> Hardware Discussions
=> Backup Strategies and Tools
=> Data Validation
Loading...