Sg2.9
gardener 2.0
Recent RSS
Creator:  Pedro
Date:  6. September 2006, 23:12

gardener creates nice tendrils from a drawn path. assign one of the scriptographer-tools to the gardener script and select some objects in your document. then start drawing your shape. the selected objects will be used in a random order and size as the end objects of each created branch. make sure you tweak the script options by
a doubleclick on the assigned scriptographer-tool.

note:
you need to smooth the small branches manually. (if you zoom in close, you'll find them very edgy.) do this by selecting all the created branches, then go to the illustrator-menu > object > path > simplify.

credits:
original version by pedro and rob.
converted to sg 2.0 by the mighty graf salamander
with the debugging eye of jürg lehni.
used best with scriptographer 2.0

Re: Gardener problems
From:  oli
Date:  22. December 2006, 02:30

have the same problem with the "clone" error on Windows XP, Illustrator CS2...

Re: Gardener problems
From:  zeke tailunit
Date:  22. December 2006, 12:58

to the ones having the same problems (clone error and/or no config popup). here's a workaround which works for me. first this takes care of the config popup, change:

function onOptions()
{
optionDialog()
}

into:
optionDialog();

re: cloning error, i noticed that if i reload scriptographer after a clone error it does work. maybe this helps the developers as well.

Re: Gardener problems
From:  chicharito
Date:  27. December 2006, 01:22

/Applications/Adobe Illustrator CS2/Plug-ins.localized/Scriptographer/scripts/tools/gardener.js:212,0: TypeError: Cannot find function getActiveLayer. (/Applications/Adobe Illustrator CS2/Plug-ins.localized/Scriptographer/scripts/tools/gardener.js#212)
java.lang.NullPointerException
at com.scriptographer.ai.Tool.setScript(Tool.java:68)
at com.scriptographer.gui.MainDialog$ToolButton.onClick(MainDialog.java:286)
at com.scriptographer.adm.Button.onNotify(Button.java:75)
at com.scriptographer.adm.NotificationHandler.onNotify(NotificationHandler.java:55)

Re: Gardener problems
From:  chicharito
Date:  27. December 2006, 01:46

and now???

TypeError: Cannot call method "clone" of undefined (/Applications/Adobe Illustrator CS2/Plug-ins.localized/Scriptographer/scripts/tools/gardener2.0.js#327)
org.mozilla.javascript.EcmaError: TypeError: Cannot call method "clone" of undefined (/Applications/Adobe Illustrator CS2/Plug-ins.localized/Scriptographer/scripts/tools/gardener2.0.js#327)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3223)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3213)
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3229)
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3248)
at org.mozilla.javascript.ScriptRuntime.undefCallError(ScriptRuntime.java:3267)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:1966)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:2929)
at script.onMouseUp(/Applications/Adobe Illustrator CS2/Plug-ins.localized/Scriptographer/scripts/tools/gardener2.0.js:327)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2251)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:158)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:337)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2755)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:156)
at com.scriptographer.js.FunctionHelper.callFunction(FunctionHelper.java:61)
at com.scriptographer.ai.Tool.onMouseUp(Tool.java:142)
at com.scriptographer.ai.Tool.onMouseUp(Tool.java:188)

Re: Gardener problems
From:  zeke tailunit
Date:  27. December 2006, 16:56

i used to get that getActiveLayer error. i just downloaded the script that was posted in the comments earlier on. don't know if it's the same but it took care of that error. re: cloning error, have you tried reloading scriptographer?

curves
From:  Daniel Berio
Date:  1. March 2007, 16:59

Hi , adding
branch.art.pointsToCurves();
line in the loop where you create the branches seems to work in smoothing them out ....nice script!

Re: curves
From:  xaez
Date:  10. April 2007, 13:22

I'm getting the following error when i try to attach the gardener to my toolbox:

TypeError: Cannot find function getActiveLayer.
at /tools/gardener2.0.js:212
ReferenceError: "Grayscale" is not defined.
at /tools/gardener2.0.js:224 (onInit)

Using CS2 on PPC. Can't wait to see this script in action!

Any help is greatly appreciated. Cheers.

Re: curves
From:  xaez
Date:  12. April 2007, 00:13

Ahh, fair enough. Thanks for the solution.

Cheers

Re: curves
From:  mtsangma
Date:  14. May 2007, 20:18

Hey There.

I changed references to Grayscale to GrayColor, and it seems to have solved one error but I still get this:

TypeError: Cannot find function getActiveLayer.
at /tools/gardener2.0.js:212
at /tools/growth.js:25 (onMouseUp)

I searched for getActiveLayer but only found a reference to it as a method(?) of allLayers.

Please assist.

Thanks much for your time.

Alan
PS: I'm using CS3 on a Mac PPC.

Re: curves
From:  mtsangma
Date:  15. May 2007, 22:30

Alan here.
Back again.

The above mentioned error only seems to occur when I draw after I 'select some objects'. If there are no objects selected, it works fine except that there are not end objects. : (

Thanks for your help.

Alan

Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19