hi,
im working on a script where the artist should choose an animation preset first, that gets applied to some layers later in the script.
it would be perfect to let the script read a folder content.
f.e.:
\\networkshare\example
preset1.ffx
preset2.ffx
preset3.ffx
everytime the script runs it should reflect the content of the folder in a dropdownlist.
i dont need a finished script, but any tip or hint would be great as a starting point.
thanks in advance,
payton
dropdown list feeded by folder content on harddrive
Moderator: Paul Tuersley
- lloydalvarez
- Enhancement master
- Posts: 460
- Joined: June 17th, 2004, 9:27 am
- Location: New York City, NY
- Contact:
Hi Paynton,
the Folder.getFiles() function will return an array of all files and folders as objects in that folder. It also accepts a function that can be used as a mask so that it only returns .ffx files or you can loop through the array and filter out the .ffx files afterwards (might be less confusing this way). You can then add the files names to a drop down list. Hope that sets you in the right direction.
-Lloyd
the Folder.getFiles() function will return an array of all files and folders as objects in that folder. It also accepts a function that can be used as a mask so that it only returns .ffx files or you can loop through the array and filter out the .ffx files afterwards (might be less confusing this way). You can then add the files names to a drop down list. Hope that sets you in the right direction.
-Lloyd
hi lloy,
unfortunately i dint receive a mail after your reply.
luckily i found it yesterday.
thanks for your tips.
im still having some problems to access the selection of the dropdownlist from outside the gui function. but i will give it another try tomorrow.
thanks again,
payton
unfortunately i dint receive a mail after your reply.
luckily i found it yesterday.
thanks for your tips.
im still having some problems to access the selection of the dropdownlist from outside the gui function. but i will give it another try tomorrow.
thanks again,
payton