Newbie question - how to effectively check if photo is part of the selection

Hi all

Sorry for the newbie question, but I do not know how to solve, and I'm sure that there is a quick and easy answer to this:

My goal is to get all the 'stack heads' (photos with Position 1 in batteries) selection ('photos' below).

for I have, make photo in ipairs( photos )
local date = picture:getFormattedMetadata("Filename")

if Photo:getRawMetadata( "isInStackInFolder" ), then
- Photo is in a stack
local photoHeadOfStack = picture:getRawMetadata("topOfStackInFolderContainingPhoto")

local stackPos = picture:getRawMetadata( "stackPositionInFolder" ), - get the position in the stack
local photoHeadName = photoHeadOfStack:getFormattedMetadata("Filename")

app:logVerbose(' Photo nb ^ 1, name ^ 2 is in a stack with the position ^ 3 ', i, date, stackPos"")

if stackPos == 1 then
- photo is the master of the battery
stackTop[#stackTop+1] =photo
app:logVerbose(' picture ^ 1 is the top of the stack ^ 2 ', date, #stackTop)

-check if couple if it is correct
elseif photos. photoHeadOfStack then
app:logVerbose(' picture ^ 1 is in a stack, but not over the top. ") (Top of the stack already selected", date)

other
stackTop[#stackTop+1] =photoHeadOfStack
app:logVerbose(' picture ^ 1 is in a stack, but not over the top. ") Top of the stack ^ 2 - ^ 3 ", date, #stackTop, photoHeadName)

end
end
end


In the if structure in the center of the Position in the stack control, if the Position is not 1, I would check if the photo to the stack ("photoHeadOfStack'") is part of the 'pictures '. I tried 'elseif photos.photoHeadOfStack then' and ' elseif photos [photoHeadOfStack] then ' but it doesn't work-> This elseif is never true even if 'photoHeadOfStack' part of the 'photos'.

Any way to have this check done without checking the photos "manually"? (via e.g. a loop for)

I'm sure that Lua offers this, but I do not know how...


Thank you for your support!

    --[[ This code creates "stackTops", an array of LrPhotos that are the
    tops of all the stacks containing photos in the array
    "photos". ]]
stackTopSet = {}
for _, photo in ipairs (photos) do
    local stackTop = photo:getRawMetadata ("topOfStackInFolderContainingPhoto")
    if stackTop ~= nil then stackTopSet [stackTop] = true end
    end
stackTops = {}
for photo, _ in pairs (stackTopSet) do table.insert (stackTops, photo) end

Tags: Photoshop Lightroom

Similar Questions

  • Newbie question, how to resize a DataGrid to always adjust to the content?

    Hello

    I don't know this is a question asked time and again one time so please forgive me if I go over old ground.

    I just discovered flex 4.5 on a week ago and I am absolutely amazed by the power it gives me and how it was easy to pick up... There is a problem, that I fight with however.

    How to resize to mx or datagrid to adjust the content of the sparks?

    I just used more traditional solutions (.net aspx) and I have the habit of (and quite like) the way that a datagrid or list control will resize itself automatically itself to adapt to ranks how it should display.

    I've accepted the fact that I need to place scrollbars on the external container so that the user can scroll down to see the content (I would like to apply dynamic resizing finally), however no matter what I do the items in the DataGrid in my flex application never seem to adjust the content.

    I looked around the internet and there seems to be a lot of people who say that it is possible, and a lot of the sample code provided for that matter, but many it seems relevant to flex 2/3 and doesn't seem to work in my situation.

    Any advice would be greatly appreciated.

    I found this in my search for another question. http://xposuredesign.NET/?p=68

  • Newbie question: How do I hide a page after click on the button?

    Hello!

    My name is Rafael. I'm talking about the Brazil.

    I am new user on the AdobeCycle software

    I do a form and I need help, please.

    My project form has three pages:

    1st Page - Instrucion

    Page 2 - form with fields to fill in

    3ª Page - (this page will be hidden). This page will be information the information filled out by the user to the 2nd Page . Will be just text.

    What do I want?

    When the user click on the button send email, I want the page with the form is hidden and show the 3rd Page with information (no field, only the full text). I want to send the PDF file to the e-mail with the 1st Page and 3rd Page (just the text with the information).

    How can I do this? How do the 3rd Page (the information filled with page two)?

    No problem of Rafael,

    Adobe have a guide that is very useful to access many of the features of the fields here: http://partners.adobe.com/public/developer/en/tips/CalcScripts.pdf

    I think about her a lot.

    Then at page 164, it looks like access/change the color of the legend AND the value:

    TextField1.caption.font.fill.color.value = "R, G, B" / / change the color of the legend

    TextField1.font.fill.color.value = "R, G, B" / / change the color of the value

    If you want to change the color of the border, then this requires another script. The example on the blog we mentioned, examples on page 2 to change the color of the borders of the second row down): http://assurehsc.ie/blog/index.php/2010/06/laying-out-a-form/

    For example:

    VNAME var = this.name.toString ();

    xfa.resolveNode (VNAME + ".") ui.textEdit.border.edge") .stroke ="solid";

    for (var i = 0; i)<4; i++)="">

    this.ui.oneOfChild.border.getElement("edge",i).color.value = "255,153,0"; orange tint

    xfa.resolveNode(vName_+_".ui.textEdit.border").getElement ("edge", I) .thickness = "0,0200" in

    }

    In addition, here are some links that might interest you: Re: books or guides for Livecycle Designer

    Good luck

    Niall

  • [Newbie question] How is-13:00 or by e-mail a link of Dell on the Community Council?

    [Newbie question] How is-13:00 or by e-mail a link of Dell on the Community Council?

    Once I click on a name of Dell link to access their profile. Currently, I don't see a where clause to send a private email Message. What Miss me? Thank you.

    A screenshot of the view that I see when I click on the link Dell profile is attached.

    My apologies, unlike most of us, DELL-Lorna M does not accept private messages. You will have to send him directly.

  • How can I check to see if I have the latest version of Windows XP?

    How can I check to see if I have the latest version of Windows XP? If I don't have the latest version of XP, how can I install it?

    There is not "later" version of XP - XP there and there is that Service Packs added to it.

    To know what Service Pack level you are to start - run and type in "winver" (without the quotes)

    If you find my answer helpful, please click the button "Vote as helpful"! Thank you!
    My Windows Blog

  • How can I change my photo which shows on the screen of my account.

    Original title: How can I change my photo which shows on the screen of my account.

    I have a picture on my account sign in the screen that I don't like.  Please tell me how to change and put a different picture.  I looked and looked, but can't find how do.

    I have a picture on my account sign in the screen that I don't like.  Please tell me how to change and put a different picture.  I looked and looked, but can't find how do.

    Hello

    Go to the start screen, then click on your account name in the upper right.

    Select change image account.

    In the next window, click on the Browse button.

    Navigate to the image you want to use, and then select it.

    Click the choose Image.

    Concerning

  • How do we uninstall PMB if one part of the provided software?

    How we uninstall PMB if it were part of the provided software? It does not show in the Panel!

    Hello

    What is the model # computer? Check the following link to locate the model #:

    http://eSupport.Sony.com/us/p/support-info.pl?info_id=264

    PMB can be uninstalled application to VAIO Manager. You can see the following link for reference:

    https://us.en.KB.Sony.com/app/answers/detail/A_ID/31552/c/65%2C66/kW/31552

    If my post answered your question, please mark it as an "accepted Solution".

  • [Newbie question] How to find unused media?

    Hello everyone, quick newbie question. How can I quickly find all media in my imported files that are currently not used in my project? I want to delete them from the project.

    Thank you!

    First, go to the Edit menu > remove unused.

    Use with caution!

    MtD

  • Newbie question: how to extend in unallocated disk in a VM XP?

    Hi all:

    This is a newbie question, but looking for answers only left confused me...

    I have VM Fusion (v2.0.6) running on a MAC (OS X - Snow Leopard) with an XP VM. When the XP VM has been implemented, it has been implemented with 20 GB hard drive space. I used VM Ware Virtual Machine settings to increase the disk space of 50 GB. (I left the "pre-allocate disk space' and 'divide into 2 GB files' options unchecked.) I don't have any snapshots during execution/implementation.

    However, my current XP VM flashing me alerts "low disk space" - I see only about 1 GB of free 20 GB (I don't see the 40 GB listed in 'My Computer'). When I use the Services of management of disk in XP, I see a disk 0 20 GB System Partition with 30 GB of unallocated space.

    How can I extend the current Parition (System) in the space of 30 additional GB? And do I have I done this to begin with?

    Thanks in advance!

    Take a look at: resizing of the ramdisks with step by step Instructions

  • Newbie question: how to set up a dynamic security with Essbase?

    Hi all

    of course, I'm new to technology Essbase and I have a simple question:

    -How can I configure a dynamic in Essbase OLAP server security so that the user can only see some members of the dimension (and according to the rows in the fact table)?

    By dynamic, I mean that I don't have to click on in via UI (for example http://businessintelligencedw.blogspot.com/2009/01/security-filter-essbase-tutorial.html), but to base the permissions on a database table where I can easily my users (by program) adjust the visible members for my users.
    Also, can I add users/roles programmatically?
    Surely, for mulitple user environments didn't click on them while...


    Can someone point me to relevenat documentation, I checked on this book (http://www.amazon.com/Oracle-Essbase-OLAP-Multidimensional-Solution/dp/0071621822), but there is not a single sentence on the security in this :(

    Thank you

    Igor
    It's a new bad:(et une bonne raison de laisser tomber le produit.)

    Wow, I would not say it is a breaker business, but to each his own.

    Well, there are other 'issues' with Essbase. As I imagine that there are with MSAS.

    I think of them as the oddities. But of course the quirks are the faults that love makes forgive you. I guess that means that I love you Esbsase. It's sad.

    I agree that an Excel/VBA solution is not... ideal. But in the context of the client, this is what they wanted.

    I pull a SQL - tables generated if I had to do it now, then run it through MaxL. I documented using MaxL/VBScript (go easy on me, Hey, it's a MS product) to generate the filters that look pretty. I will avoid linking to my blog twice in the same thread, but I have a post with the code example that shows how to do this. Research of planning + filters in the blog. It might give you some ideas.

    Kind regards

    Cameron Lackpour

  • Newbie question: how to display the logo of the company for all applications

    Hi all:

    I am new to APEX and in the thorough step 'Application two days Express Developer's Guide.

    I have Oracle XE with APEX 3.1.2 installed.

    I have a file called test.gif stored on my C:\logo\test.gif logo

    The question is what is the step to display this logo on all pages for each application (I could build applications in the same workspace, and I like the same logo to all pages for each display application).

    I have extensive air manual and this forum and cannot always understand.

    Here is what I tried:

    -Click on an app that I created in Application Builder
    -Click on "shared components".
    -Files-click == > Images and upload my C:\logo directory test.gif
    -Return to page 'Components of the part' == > Logo and select / access to the following values:
    > logo type: image
    > logo: /i/test.gif
    > logo attribute: width = "100" height = "20" alt = "Company Logo".

    Save the changes. When I run my application, the company logo displayed as 'x' icon.

    A I missed something?


    Thank you!

    Kevin

    Kevin,

    You wanted a step by step so that is.

    You must first download your logo to your workspace file. Then you can assign it as a logo, so this step appears on all pages.

    Before you start, I suggest that ensure you that your graphic file name does not include the spaces inside. Replace spaces by dashes, underscore or squish traits it.

    1. application Builder-> shared-> files components-> Images.

    2. click on the create button.

    3. application for leave "No Application associated with" value, provide the specification of file, then click on the download button. When it's done, copy the name of the file (for example MyFile.gif).

    4. go into the Application Builder-> shared-> Application-> definition components

    5 scroll down the page to the section Logo and set the Type of Logo Image.

    6 Logo, enter ' #WORKSPACE_IMAGES # ' follow-up of your files.

    for example #WORKSPACE_IMAGES #MyFile.gif

    7. Optionally, you can set the attributes of the Logo, for example, by specifying the height and width to display your image.

    8. click on apply changes.

    9. run app.

    If you have the right to file specification, you should see your logo in the upper left corner. If you want elsewhere, you have to change the page template, which is way beyond the scope of this forum and the tutorial. :-)

    Good luck

    Stew

    p.s. If it works for you, please give points for correct answer at the top of this topic.

  • How can I find my photos in Aperture in the Finder (for Macs)?

    I have a full 8 photos Aperture GIGANTIC library. I have separated/cloisonne each year, except the last one in the library, 2014. I tried export library to a new library of many, many times only to have opening crash when I try to do. I am certain that it is because the new library would be great (I have a lot of pictures in the folder 2014) that he won't let me do.

    That said, I need a workaround solution. My first thought was to copy all photos by project, in folders in the Finder (I have an iMac) and just create a new library with these photos. While it worked, it would take me forever! So, there must be a better way to create this new library. Here are my ideas:

    1. I believe that there is a way you can find photos that are in the open in the Finder. I know, I know, it is not suggested for this. That's the problem since I signed for Lightroom because Apple did away with opening, so I don't care if my current database of opening it messes up. I have the Grand opening saved in two places, anyway.

    Can someone out there tell me how to find these photos? I right click on them and there is no option for ' info, or even to show the contents of the package. "

    2. can you someone thinking differently to create the new library?

    Thank you very much!

    Andy

    I am certain that it is because the new library would be great (I have a lot of pictures in the folder 2014) that he won't let me do.

    You have enough free free storage on the disk with the aperture library?

    The size of the exported library shouldn't matter, unless you are running out of storage.  I exported a partial library with 100000 photos without problem.

    What version of Aperture do you use? If it is opening 9.4.5 or an older version, disconnect from the Internet when you are working with Aperture. Older versions are currently crashing, if they can't access Google map servers.

    Frequently, it allows to run a repair of the library before you try to export an Aperture library. Have you tried?  See: repair and rebuild your Aperture library: Aperture 3 user manual

    . In my view, there is a way you can find photos that are in the open in the Finder. I know, I know, it is not suggested for this.

    To see your photos imported from 2014 in the Finder, select your Aperture library, ctrl + click, and then select "Show Package Contents".

    Open the 'Masters' folder and look for a 2014 subfolder.  It will contain all of the original images files for photos you imported in 2014.

  • How can I check if a file exists in the CVI real-time?

    Also, it would be nice if designated so help file functions have been supported in real time or now.

    I tried this:

    If (GetFileAttrs (DataFileName, NULL, NULL, NULL, NULL) == - 1).

    You can check if a file exists in the CVI real-time using GetFileInfo.

    CVI provides a list of the available functions in the CVI real-time here: CVI real-time functions

  • How to make a zoom in on part of the image using editing?

    Recently returned to the opening.  Do not remember how to enlarge the part of the image using editing.  If the answer is Loupe tool, please remind me how it works.

    What version of Aperture do you use?

    To zoom the viewer enter the combination of keys command - + (⌘ +) or press the zoom-viewer:

    If you prefer the magnifying glass, launching it from the view menu with "view Magnifier, where also find magnifying glass options to switch to a centered Loupe or show the grid under the microscope.

  • How to create a drop down that list after the selection of an item on the list, an action is performed (for example, open a document)

    I have already created a drop to downgrade

    Capture.JPG

    But can't seem to select each and create a separate 'action' for each name... i. e open file 1 if name 1 is selected in the drop down... There must be something right forward, Miss me here!

    Capture2.JPG

    You must use a script than the custom validation script. It should look like this:

    If (event.value == "name 1")

    app.openDoc("/c/temp/1.pdf");

    If (event.value == "name 2")

    app.openDoc("/c/temp/2.pdf");

    If (event.value == "name 3")

    app.openDoc("/c/temp/3.pdf");

    If (event.value == "name 4")

    app.openDoc("/c/temp/4.pdf");

    Make sure that check the option to validate the selected value immediately (under Properties - Options) for the script launched as soon as the item is selected.

Maybe you are looking for

  • TRIM and Bootcamp

    I know the TRIM THAT is enabled by default on internal SSD Apple of my 2011 iMac, which houses an Apple partition (OS X 10.11.4 beta) and a Windows 7 Bootcamp partition. Issues related to the: 1 - is the Bootcamp Windows 7 also "pruned" default parti

  • Replace its system

    Hello guys! So my problem is that I'm working on the application of the alarm and need to overload the system. So when user set his phone in silent mode, my app will still play a sound. Any help would be appreciated!

  • Problem using QFileSystemWatcher in/accounts/1000

    Hi all I'm trying to detect changes in files with a QFileSystemWatcher directory ' accounts/1000. However, it does not work. Parts of my code: QFileSystemWatcher * watcher = new QFileSystemWatcher(this); watcher->addPath("/accounts/1000/"); connect(w

  • Copy a contact group?

    How is it, I'm not able to make a copy of a Contact Group (just like I can with other assets in Eloqua?)

  • Apply a radial gradient of irregular shape

    I am trying to add a radial gradient to an elliptical shape (or irregular) so that the transition is uniform around the edges, but in contrast to the circle, where it is homogeneous, in the irregular shape, it is concentric applied. How can I get the