Sg2.9
rot3d
Recent RSS
Creator:  Hiroyuki Sato
Date:  24. May 2009, 14:05

HOW TO USE:

*Select pathes and drag.
*Release mouse button to fix the result.

OPTIONS:

focal length: distance to focal point
global depth: default depth (negative value for z-axis)
fix z-order: (see OTHER NOTE below)

BE CAREFULL NOT TO DO SUBSEQUENT DRAGS:

*Once mouse button was released, the targets' z-axis values are
set to zero, and they return to 2D plane, as distorted shapes.
So, if you select these transformed targets and drag again,
the result must be a quite unexpected one.
If you don't prefer the result, make undo first.

OPTIONS BY THE NAME OF THE TARGETS:

*This script gets optional values from the name of the object
as follows. (N means a number)
N: height ( - global depth) (must be at the beginning of its name)
xN: x-axis rotation. uses center of the object itself as origin
xoN: x-axis rotation. uses global origin (default: center of the selection)
yN, zN: same as "xN" but for y-axis and z-axis
yoN, zoN: same as "xoN" but for y-axis and z-axis

LN: sets left side of the object as the self-rotation center
if N specified, offsets the center by N toward center of the object.
RN, TN, BN: same for right, top, bottom
ZN: offsets the center of the self-rotation by N toward z-axis (front/rear)

ex. name="10 x20" -> rotates 20 degree around x-axis, rotation origin is the center of the object itself. then offsets the center of this object's z-axis value by 10.

*If there's a path named "origin" in the selection, this script set its center as the rotation center.

*Here is an example Ai file.
http://park12.wakwak.com/~shp/cgi-bin/dl.cgi/rot3d_examples_cs.zip

OTHER NOTE:
*If "fix z-order" option is checked, this script changes the z-order of the objects according to the z-axis value of the center of the each object. It doesn't always work properly, and this process may destruct the groups.

*This script removes the transformed objects that had exceeded
the value which multiplied the virtual sphere radius by predefined value with a message dialog. The default predefined value is 2.0.
Edit "excessive_transform_threshold" value below to change it.

2009-05-24
2009-05-27
__*modified applying order:
__ self-rotation > height > global-rotation > global-height
__*If the parent of the target is an instance of Art ( unless it is not a Layer), gets options and applys recursively
2009-05-27a
__*added L,R,T,B,Z option.
__ see "OPTIONS BY THE NAME OF THE TARGETS" section for detail.
__*fixed a bug in "getArtSetRect" function
2009-06-30: *removed "min_radius" option
__*added "fix_z_order" option
2009-?-? official staff modified to work with Sg 2.5. Thanks!
2010-02-21 modified to work with Sg 2.6
2010-?-? official staff modified to work with Sg 2.9. Thanks!
2013-02-14 fixed a bug in Group detection / simplified the code
2013-02-14 fixed a bug in rotation

Great!
From:  Jürg Lehni
Date:  19. June 2009, 10:32

Very nice script, Hiroyuki! How about including an example AI file, e.g. the one used for the glasses here, so one can try out quick?

Re: Great!
From:  Hiroyuki Sato
Date:  20. June 2009, 16:31

>Lehni
Thanks.
I uploaded an example Ai file to my site.

http://park12.wakwak.com/~shp/cgi-bin/dl.cgi/rot3d_examples_cs.zip

This script works by simple select-and-drag operation.
But specifying options creates the shape that is not able to get with the supplied 3D-effect plugin.

Another edition of rot3d.js
From:  Hiroyuki Sato
Date:  28. June 2009, 11:53

Here is another edition.
This one uses a matrix to rotate, and seems to be a little faster than above one.
But there's some differences in the feeling of the rotation.
I can not decide which is better.

error
From:  tollot
Date:  10. June 2010, 12:45

Hello, I am delighted to find a script that can make me a lot of service.
However I do not know use this kind of script. The console scriptographer inform me of this. Sorry for my English I'm French.

"arguments "org.mozilla.javascript.Undefined" est introuvable
Le constructeur Java de "com.scriptographer.adm.FloatingDialog" avec les arguments "org.mozilla.javascript.Undefined" est introuvable
TypeError: Cannot read property "textedits" from undefined
Error: Unknown error
Le constructeur Java de "com.scriptographer.adm.FloatingDialog" avec les arguments "org.mozilla.javascript.Undefined" est introuvable"

Re: error
From:  Jürg Lehni
Date:  10. June 2010, 13:34

hi tollot,

This looks like an error introduced in the latest version of the plugin. I am looking into this right now, more in a bit.

Re: error
From:  Jürg Lehni
Date:  10. June 2010, 13:39

I cannot seem to reproduce this error with the latest version of Scriptographer. Are you sure you correctly installed this version, replacing the whole Scriptographer folder with the newly downloaded one?

Re: error
From:  Amy
Date:  23. July 2010, 23:14

Heya, having a bit of a problem myself something about unable to find 'match' I think. But your ai file confused me a little, how do you name something, as a layer?

Cheers

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