Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Crazy reveal objects over time script. I Really need help.

New Here ,
Mar 02, 2009 Mar 02, 2009
I really do not get this scripting thing.

I don't know if this script is hard or not but the concept is simple.

I want my file to be blank. Over time I want all the objects on a current layer to slowly reveal themselves. Starting with the bottom. All the way to the top.

There are over 3000 objects. Hence the need for a script.

Any help would be appreciated.
TOPICS
Scripting
1.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Mar 02, 2009 Mar 02, 2009
How do you mean "slowly reveal themselves"? Are you talking about creating an animation, or what?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 02, 2009 Mar 02, 2009
Well basically a I want to have every object hidden. Then have them show up one at a time like you would layers.

Currently I have the layers panel open and I do it by hand. But 3000 objects takes a 30 mins.

I record video while I do it. So essentially it is for animation purposes.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 03, 2009 Mar 03, 2009
I guess it's possible, possibly with the setTimeout() function, but I have never tried it so I can't testify whether it works or not.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 03, 2009 Mar 03, 2009
In AppleScript with a very basic test and no error trapping something like this may get you started.

tell application "Adobe Illustrator"
tell document 1
set Page_Item_List to every page item
set hidden of every page item to true
delay 3 -- Inital delay in seconds before the first item reveal
repeat with i from (count of Page_Item_List) to 1 by -1
set hidden of page item i to false
delay 1 -- Between reveals
end repeat
end tell
end tell
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 03, 2009 Mar 03, 2009
Thank you.

I guess I should have mentioned Im on a windows machine.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 03, 2009 Mar 03, 2009
Not a problem. AppleScript is Mac only you will need to have someone do the same thing in JavaScript (cross platform) or Visual Basic (PC) I do neither of these so can't help you there. Principle should be the same. Mentioning your platform does help as your request didn't take a minute it was neither here or there to post.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 03, 2009 Mar 03, 2009
Thsi is a quick throw-together, it should work. If you want to change the delay, change the amount (milliseconds) in line 44 : pausecomp(1000)

#target illustrator

processObjects(app.documents, processDocument, noFiles);

function processObjects(theObjects, theMainFunction, theAlternateFunction) {
var returnValue = null;
if (theObjects == undefined) {
alert ('Undefined??')
returnValue = ''
} else {
if (theObjects.length ==0) {
if (!(theAlternateFunction == undefined) && !(theAlternateFunction == null) && !(theAlternateFunction == '')) {
returnValue = theAlternateFunction (theObjects.parent);
}
} else {
if (!(theMainFunction == undefined) && !(theMainFunction == null) && !(theMainFunction == '')) {
// returnValue = new Array;
for (var i = theObjects.length -1; i> -1; i--) {
returnValue += theMainFunction (theObjects, i);
}
}
}
}
return returnValue;
}

function processDocument(docRef, i) {
app.activeDocument = docRef
processObjects(docRef.layers, processLayer, null);
alert ('File "' + docRef.name + '" Completed.')
}

function processLayer(layertRef, i) {
// Check all groups on layer
processObjects(layertRef.pathItems, processGroup, null);
return 0
}

function processGroup(objectRef, i) {
objectRef.hidden = false
app.redraw()
pausecomp(1000)
return 0
}

function noFiles (objectRef) {
var userChoice = confirm ('No files open.\nSelect a file to process?')
// Allow selection of files?
if (userChoice) {
var theFilePath = File.openDialog ('Select a file:')
if (theFilePath != null) {
x = openFile (theFilePath)
if (x) {
processObjects(app.documents, processDocument, noFiles);
}
}
}
}

function pausecomp(millis)
{
var date = new Date();
var curDate = null;

do { curDate = new Date(); }
while(curDate-date < millis);
}
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 03, 2009 Mar 03, 2009
Wow thank you so much! I really really appreciate your help.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 04, 2009 Mar 04, 2009
That script worked perfect.

Here is the video.

http://arthub.ca/2009/03/04/video-of-underpainting-in-adobe-illustrator/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 02, 2009 Apr 02, 2009
Hey Mark Walsh,

Would you send me your email address. I would like to have you do some additions to the script for a possible art show.

I am willing to compensate you for your time to get a really good script done.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Apr 02, 2009 Apr 02, 2009
I'd rather not post my email address on a public forum (I get enough spam as it is already 😉 )

What is it that you need added?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 02, 2009 Apr 02, 2009
I wanted to have the script be able to come to a long pause at the end of the file.

Be able to break the script without it causing illustrator to crash.

Be able to have the script ignore visible objects.

I would like to have it loop through a large number of files. so that when all the above works I can present it on a large screen. It would loop through the files in a directory, slowly revealing each picture. Close the file without save, then open the next and do it again.

Do you think this is possible?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 29, 2009 Apr 29, 2009

I am willing to pay for the enhancements to this script. Is it possible to get this done?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Apr 29, 2009 Apr 29, 2009
LATEST

Send me a private message with your email, and I'll see what I can do.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines